diff options
Diffstat (limited to 'flake.nix')
| -rw-r--r-- | flake.nix | 21 |
1 files changed, 11 insertions, 10 deletions
@@ -11,14 +11,19 @@ pkgs = nixpkgs.legacyPackages.${system}; subpackages = pkgs.lib.filterAttrs (nm: _: builtins.pathExists ./${nm}/packages.nix) (builtins.readDir ./.); lcq = builtins.mapAttrs (nm: _: (import ./${nm}/packages.nix) pkgs lcq) subpackages; - shells = builtins.mapAttrs (nm: d: pkgs.mkShell { - hardeningDisable = ["all"]; - NIX_ENFORCE_NO_NATIVE = "0"; - buildInputs = [ + defaultShell = { + nativeBuildInputs = [ pkgs.musl pkgs.valgrind pkgs.universal-ctags - ] ++ d.native.buildInputs; + ]; + buildInputs = []; + }; + shells = builtins.mapAttrs (nm: d: pkgs.mkShell { + hardeningDisable = ["all"]; + NIX_ENFORCE_NO_NATIVE = "0"; + nativeBuildInputs = defaultShell.nativeBuildInputs ++ d.native.nativeBuildInputs; + buildInputs = defaultShell.buildInputs ++ d.native.buildInputs; }) lcq; in { isPackage = p: (builtins.readDir ./${p}) ? "packages.nix"; @@ -27,11 +32,7 @@ default = pkgs.mkShell { hardeningDisable = ["all"]; NIX_ENFORCE_NO_NATIVE = "0"; - buildInputs = [ - pkgs.musl - pkgs.valgrind - pkgs.universal-ctags - ]; + inherit (defaultShell) nativeBuildInputs buildInputs; }; } // shells; } |
