summary refs log tree commit diff
path: root/pkgs/shells/nushell/default.nix
diff options
context:
space:
mode:
authorMario Rodas <marsam@users.noreply.github.com>2019-11-12 04:20:00 -0500
committerMario Rodas <marsam@users.noreply.github.com>2019-11-12 04:20:00 -0500
commita8942c6cbd737c4ce989caab5a5ae2a05b9a5d43 (patch)
tree80feb96b9cb9872bee259bb1a78254d1c2b3c8c3 /pkgs/shells/nushell/default.nix
parent10246893188f6aff33a251f7febdf04a3c4e5b8b (diff)
downloadnixpkgs-a8942c6cbd737c4ce989caab5a5ae2a05b9a5d43.tar
nixpkgs-a8942c6cbd737c4ce989caab5a5ae2a05b9a5d43.tar.gz
nixpkgs-a8942c6cbd737c4ce989caab5a5ae2a05b9a5d43.tar.bz2
nixpkgs-a8942c6cbd737c4ce989caab5a5ae2a05b9a5d43.tar.lz
nixpkgs-a8942c6cbd737c4ce989caab5a5ae2a05b9a5d43.tar.xz
nixpkgs-a8942c6cbd737c4ce989caab5a5ae2a05b9a5d43.tar.zst
nixpkgs-a8942c6cbd737c4ce989caab5a5ae2a05b9a5d43.zip
nushell: add withAllFeatures flag
Co-authored-by: Evan Stoll <evanjs@users.noreply.github.com>
Diffstat (limited to 'pkgs/shells/nushell/default.nix')
-rw-r--r--pkgs/shells/nushell/default.nix13
1 files changed, 11 insertions, 2 deletions
diff --git a/pkgs/shells/nushell/default.nix b/pkgs/shells/nushell/default.nix
index 6e075b7ceee..91684504774 100644
--- a/pkgs/shells/nushell/default.nix
+++ b/pkgs/shells/nushell/default.nix
@@ -3,8 +3,12 @@
 , rustPlatform
 , openssl
 , pkg-config
+, python3
+, xorg
 , libiconv
+, AppKit
 , Security
+, withAllFeatures ? true
 }:
 
 rustPlatform.buildRustPackage rec {
@@ -20,10 +24,15 @@ rustPlatform.buildRustPackage rec {
 
   cargoSha256 = "0b8alc3si6y4xmn812izknbkfkz64kz7kcnq4xaqws6iqn7pqidp";
 
-  nativeBuildInputs = [ pkg-config ];
+  nativeBuildInputs = [ pkg-config ]
+    ++ stdenv.lib.optionals (withAllFeatures && stdenv.isLinux) [ python3 ];
 
   buildInputs = stdenv.lib.optionals stdenv.isLinux [ openssl ]
-    ++ stdenv.lib.optionals stdenv.isDarwin [ libiconv Security ];
+    ++ stdenv.lib.optionals stdenv.isDarwin [ libiconv Security ]
+    ++ stdenv.lib.optionals (withAllFeatures && stdenv.isLinux) [ xorg.libX11 ]
+    ++ stdenv.lib.optionals (withAllFeatures && stdenv.isDarwin) [ AppKit ];
+
+  cargoBuildFlags = stdenv.lib.optionals withAllFeatures [ "--features" "all" ];
 
   preCheck = ''
     export HOME=$TMPDIR