From 38d2fe86726fe41b42be108b4c0643ec0fb33aed Mon Sep 17 00:00:00 2001 From: Daiderd Jordan Date: Wed, 4 Apr 2018 23:13:56 +0200 Subject: [PATCH] add shell.nix argument for nix version --- shell.nix | 13 +++++++------ 1 file changed, 7 insertions(+), 6 deletions(-) diff --git a/shell.nix b/shell.nix index 7ec2848..9843aec 100644 --- a/shell.nix +++ b/shell.nix @@ -1,7 +1,6 @@ +{ pkgs ? import ./nix {}, useNix1 ? true }: + let - pkgs = import ./nix {}; - - inherit (pkgs) stdenv; phpEnv = stdenv.mkDerivation rec { @@ -11,12 +10,12 @@ let nix-prefetch-git php phpPackages.composer - nix git php curl bash - ]; + ] + ++ stdenv.lib.optional useNix1 nix; # HISTFILE = "${src}/.bash_hist"; }; @@ -32,7 +31,9 @@ let openssl.dev pkgconfig git - ] ++ (lib.optional stdenv.isDarwin pkgs.darwin.Security); + ] + ++ stdenv.lib.optional useNix1 nix + ++ stdenv.lib.optional stdenv.isDarwin pkgs.darwin.Security; HISTFILE = "${toString ./.}/.bash_hist"; passthru.phpEnv = phpEnv;