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

View File

@@ -1,61 +1,24 @@
{
pkgs,
inputs,
pkgs ? import <nixpkgs> {},
...
}: let
minimalMkShell = import ./_minimal.nix {inherit pkgs;};
# 16 is broken: https://github.com/NixOS/nixpkgs/issues/244609
# llvmPackages = pkgs.llvmPackages_16;
llvmPackages = pkgs.llvmPackages_15;
gstreamerPath =
""
+ ":"
+ "${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"
"clippy"
"rust-src"
"rustc"
"rustfmt"
"rust-analyzer"
];
_rustBuildFenix = (
inputs.fenix.packages.${pkgs.stdenv.hostPlatform.system}.latest.withComponents [
"cargo"
"clippy"
"rust-src"
"rustc"
"rustfmt"
"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;
in
# _rustBuild = _rustBuildFenix;
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;
in {
default = pkgs.mkShell {
nativeBuildInputs = with pkgs; [
_rustBuild
llvmPackages.lldb
@@ -164,4 +127,5 @@ in
xorg.xcbutilkeysyms
xorg.xcbutilimage # wezterm
];
}
};
}