shells and stuff

This commit is contained in:
cnst
2024-07-13 07:02:26 +02:00
parent 17ff4d452a
commit 503408448a
4 changed files with 17 additions and 53 deletions

6
flake.lock generated
View File

@@ -69,11 +69,11 @@
] ]
}, },
"locked": { "locked": {
"lastModified": 1720790404, "lastModified": 1720832575,
"narHash": "sha256-9qe2eVsUAIZIf9aDa7PVui77cr1RW4CpZbWTwOdtXrI=", "narHash": "sha256-BJfwOsxQ8PYBB2Of9jK+42QE/M6JaDXi4xAptEjXC3w=",
"owner": "nix-community", "owner": "nix-community",
"repo": "flake-firefox-nightly", "repo": "flake-firefox-nightly",
"rev": "20773f6a9a6bb52444f5fe7495932740f840fe6d", "rev": "887871e3232eb03be0f2a08ab4e68c03aa9f8323",
"type": "github" "type": "github"
}, },
"original": { "original": {

View File

@@ -58,7 +58,7 @@
in { in {
inherit lib; inherit lib;
packages.x86_64-linux.default = fenix.packages.x86_64-linux.minimal.toolchain; packages.x86_64-linux.default = fenix.packages.x86_64-linux.minimal.toolchain;
devShells = forEachSystem (pkgs: import ./core/shell/dev.nix {inherit pkgs;}); devShells = forEachSystem (pkgs: import ./nixos/core/shells/dev.nix {inherit inputs pkgs;});
formatter = forEachSystem (pkgs: pkgs.alejandra); formatter = forEachSystem (pkgs: pkgs.alejandra);
nixosConfigurations = { nixosConfigurations = {

View File

@@ -1,61 +1,24 @@
{ {
pkgs,
inputs, inputs,
pkgs ? import <nixpkgs> {},
... ...
}: let }: let
minimalMkShell = import ./_minimal.nix {inherit pkgs;};
# 16 is broken: https://github.com/NixOS/nixpkgs/issues/244609 # 16 is broken: https://github.com/NixOS/nixpkgs/issues/244609
# llvmPackages = pkgs.llvmPackages_16; # llvmPackages = pkgs.llvmPackages_16;
llvmPackages = pkgs.llvmPackages_15; llvmPackages = pkgs.llvmPackages_15;
gstreamerPath = _rustBuildFenix = inputs.fenix.packages.${pkgs.stdenv.hostPlatform.system}.latest.withComponents [
""
+ ":"
+ "${pkgs.gst_all_1.gst-plugins-base}/lib/gstreamer-1.0"
+ ":"
+ "${pkgs.gst_all_1.gst-plugins-good}/lib/gstreamer-1.0"
+ ":"
+ "${pkgs.gst_all_1.gst-plugins-bad}/lib/gstreamer-1.0"
+ ":"
+ "${pkgs.gst_all_1.gst-plugins-ugly}/lib/gstreamer-1.0";
_rustBuildFenix = (
inputs.fenix.packages.${pkgs.stdenv.hostPlatform.system}.latest.withComponents [
"cargo" "cargo"
"clippy" "clippy"
"rust-src" "rust-src"
"rustc" "rustc"
"rustfmt" "rustfmt"
"rust-analyzer" "rust-analyzer"
]
);
_rustBuildOxalica = inputs.rust-overlay.packages.${pkgs.stdenv.hostPlatform.system}.rust.override {
extensions = [
"rust-src"
"rust-analyzer"
"clippy"
]; ];
};
# so far I can't tell a big difference...
_rustBuild = _rustBuildFenix; _rustBuild = _rustBuildFenix;
in in {
# _rustBuild = _rustBuildFenix; default = pkgs.mkShell {
minimalMkShell {
name = "cnst-nixcfg-dev";
hardeningDisable = ["fortify"];
shellHook = ''
exec nu
'';
LD_LIBRARY_PATH = "${pkgs.libglvnd}/lib";
LIBCLANG_PATH = "${llvmPackages.libclang.lib}/lib";
RUST_BACKTRACE = 1;
GST_PLUGIN_SYSTEM_PATH = gstreamerPath;
nativeBuildInputs = with pkgs; [ nativeBuildInputs = with pkgs; [
_rustBuild _rustBuild
llvmPackages.lldb llvmPackages.lldb
@@ -164,4 +127,5 @@ in
xorg.xcbutilkeysyms xorg.xcbutilkeysyms
xorg.xcbutilimage # wezterm xorg.xcbutilimage # wezterm
]; ];
};
} }