From 42774708bafe48aefe411fab4ca4d75407f9d1d6 Mon Sep 17 00:00:00 2001 From: Théo Zimmermann Date: Thu, 5 Jul 2018 11:44:43 +0200 Subject: [pkg:nix] Stop using lib.inNixShell. --- default.nix | 7 +++++-- shell.nix | 4 ++-- 2 files changed, 7 insertions(+), 4 deletions(-) diff --git a/default.nix b/default.nix index c791706db4..d9317bccaf 100644 --- a/default.nix +++ b/default.nix @@ -30,6 +30,9 @@ , buildIde ? true , buildDoc ? true , doInstallCheck ? true +, shell ? false + # We don't use lib.inNixShell because that would also apply + # when in a nix-shell of some package depending on this one. }: with pkgs; @@ -58,13 +61,13 @@ stdenv.mkDerivation rec { optional (!versionAtLeast ocaml.version "4.07") ncurses ++ [ ocamlPackages.ounit rsync which ] ) - ++ optionals lib.inNixShell ( + ++ optionals shell ( [ jq curl git gnupg ] # Dependencies of the merging script ++ (with ocamlPackages; [ merlin ocp-indent ocp-index ]) # Dev tools ); src = - if lib.inNixShell then null + if shell then null else with builtins; filterSource (path: _: diff --git a/shell.nix b/shell.nix index 45070b2bae..3201c50501 100644 --- a/shell.nix +++ b/shell.nix @@ -1,4 +1,4 @@ # Some developers don't want a pinned nix-shell by default. # If you want to use the pin nix-shell or a more sophisticated set of arguments: -# $ nix-shell default.nix -import ./default.nix { pkgs = import {}; } +# $ nix-shell default.nix --arg shell true +import ./default.nix { pkgs = import {}; shell = true; } -- cgit v1.2.3