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": {
"lastModified": 1720790404,
"narHash": "sha256-9qe2eVsUAIZIf9aDa7PVui77cr1RW4CpZbWTwOdtXrI=",
"lastModified": 1720832575,
"narHash": "sha256-BJfwOsxQ8PYBB2Of9jK+42QE/M6JaDXi4xAptEjXC3w=",
"owner": "nix-community",
"repo": "flake-firefox-nightly",
"rev": "20773f6a9a6bb52444f5fe7495932740f840fe6d",
"rev": "887871e3232eb03be0f2a08ab4e68c03aa9f8323",
"type": "github"
},
"original": {

View File

@@ -58,7 +58,7 @@
in {
inherit lib;
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);
nixosConfigurations = {

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 [
_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
];
}
};
}