mirror of
https://github.com/NixOS/nixpkgs.git
synced 2025-02-23 20:44:12 +00:00
nixFlakes: enable flakes,nix-command via patch
This commit is contained in:
parent
118ef67e07
commit
f94876e77b
@ -227,13 +227,8 @@ in rec {
|
||||
inherit storeDir stateDir confDir boehmgc;
|
||||
});
|
||||
|
||||
nixFlakes = callPackage ({ makeWrapper, runCommand, ... }:
|
||||
runCommand "nix-flakes" { buildInputs = [ makeWrapper ]; } ''
|
||||
mkdir -p $out/bin
|
||||
for bin in ${nixUnstable}/bin/*; do
|
||||
makeWrapper $bin $out/bin/$(basename $bin) \
|
||||
--suffix NIX_CONFIG "\n" "experimental-features = nix-command flakes"
|
||||
done;
|
||||
'') {};
|
||||
nixFlakes = nixUnstable.overrideAttrs (prev: {
|
||||
patches = (prev.patches or []) ++ [ ./enable-flakes.patch ];
|
||||
});
|
||||
|
||||
}
|
||||
|
14
pkgs/tools/package-management/nix/enable-flakes.patch
Normal file
14
pkgs/tools/package-management/nix/enable-flakes.patch
Normal file
@ -0,0 +1,14 @@
|
||||
diff --git a/src/libstore/globals.hh b/src/libstore/globals.hh
|
||||
index 3e4ead76c..81d407236 100644
|
||||
--- a/src/libstore/globals.hh
|
||||
+++ b/src/libstore/globals.hh
|
||||
@@ -923,7 +923,8 @@ public:
|
||||
value.
|
||||
)"};
|
||||
|
||||
- Setting<Strings> experimentalFeatures{this, {}, "experimental-features",
|
||||
+ Setting<Strings> experimentalFeatures{
|
||||
+ this, {"flakes", "nix-command"}, "experimental-features",
|
||||
"Experimental Nix features to enable."};
|
||||
|
||||
bool isExperimentalFeatureEnabled(const std::string & name);
|
Loading…
Reference in New Issue
Block a user