diff options
-rw-r--r-- | pkgs/shells/nushell/default.nix | 13 | ||||
-rw-r--r-- | pkgs/top-level/all-packages.nix | 2 |
2 files changed, 12 insertions, 3 deletions
diff --git a/pkgs/shells/nushell/default.nix b/pkgs/shells/nushell/default.nix index 6e075b7ceee5..916845047740 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 diff --git a/pkgs/top-level/all-packages.nix b/pkgs/top-level/all-packages.nix index 71910a316377..f267e3f743ff 100644 --- a/pkgs/top-level/all-packages.nix +++ b/pkgs/top-level/all-packages.nix @@ -16569,7 +16569,7 @@ in musl = callPackage ../os-specific/linux/musl { }; nushell = callPackage ../shells/nushell { - inherit (darwin.apple_sdk.frameworks) Security; + inherit (darwin.apple_sdk.frameworks) AppKit Security; }; nettools = if stdenv.isLinux then callPackage ../os-specific/linux/net-tools { } |