summary refs log tree commit diff
path: root/pkgs/tools/package-management
diff options
context:
space:
mode:
authorDavHau <hsngrmpf+github@gmail.com>2021-04-22 11:06:03 +0700
committerDavHau <hsngrmpf+github@gmail.com>2021-05-04 17:43:45 +0700
commit118ef67e0743b3b61baab8737e152f31d48b3ddc (patch)
tree7ab6f6fccbb5e2dabbcde723519ec3fce4395306 /pkgs/tools/package-management
parent93c5837be5952bf17d21636a6d0684f094e0e6a8 (diff)
downloadnixpkgs-118ef67e0743b3b61baab8737e152f31d48b3ddc.tar
nixpkgs-118ef67e0743b3b61baab8737e152f31d48b3ddc.tar.gz
nixpkgs-118ef67e0743b3b61baab8737e152f31d48b3ddc.tar.bz2
nixpkgs-118ef67e0743b3b61baab8737e152f31d48b3ddc.tar.lz
nixpkgs-118ef67e0743b3b61baab8737e152f31d48b3ddc.tar.xz
nixpkgs-118ef67e0743b3b61baab8737e152f31d48b3ddc.tar.zst
nixpkgs-118ef67e0743b3b61baab8737e152f31d48b3ddc.zip
nixFlakes: enable flakes
Diffstat (limited to 'pkgs/tools/package-management')
-rw-r--r--pkgs/tools/package-management/nix/default.nix9
1 files changed, 8 insertions, 1 deletions
diff --git a/pkgs/tools/package-management/nix/default.nix b/pkgs/tools/package-management/nix/default.nix
index ac61a64180d..46f11322484 100644
--- a/pkgs/tools/package-management/nix/default.nix
+++ b/pkgs/tools/package-management/nix/default.nix
@@ -227,6 +227,13 @@ in rec {
     inherit storeDir stateDir confDir boehmgc;
   });
 
-  nixFlakes = nixUnstable;
+  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;
+    '') {};
 
 }