diff options
author | Kasper Gałkowski <k@galkowski.xyz> | 2023-03-14 17:03:07 +0100 |
---|---|---|
committer | Kasper Gałkowski <k@galkowski.xyz> | 2023-03-14 17:07:39 +0100 |
commit | e5eb0322a2f7c235c64662b4dce720b62111fc88 (patch) | |
tree | 71ebb5b481e62b15362414a03c7f3fe1bfc1e67c /pkgs/shells/nushell/default.nix | |
parent | 97ec9764a4c2a23eef5c505183c858a3ae80606c (diff) | |
parent | 9e91539bb454af74b2e8f012e1aae08cb8abd9ff (diff) |
merge master
Diffstat (limited to 'pkgs/shells/nushell/default.nix')
-rw-r--r-- | pkgs/shells/nushell/default.nix | 32 |
1 files changed, 17 insertions, 15 deletions
diff --git a/pkgs/shells/nushell/default.nix b/pkgs/shells/nushell/default.nix index a5f9ae2f94e59..e1355062ddc94 100644 --- a/pkgs/shells/nushell/default.nix +++ b/pkgs/shells/nushell/default.nix @@ -16,43 +16,45 @@ , Security , nghttp2 , libgit2 -, withExtraFeatures ? true +, doCheck ? true +, withDefaultFeatures ? true +, additionalFeatures ? (p: p) , testers , nushell , nix-update-script }: -rustPlatform.buildRustPackage rec { - pname = "nushell"; - version = "0.75.0"; +rustPlatform.buildRustPackage ( + let + version = "0.76.0"; + pname = "nushell"; + in { + inherit version pname; src = fetchFromGitHub { owner = pname; repo = pname; rev = version; - sha256 = "sha256-u8/SvuR/RpJaBX4Dr3Onrk0AVpIAeVb+399+NUpgkfI="; + sha256 = "sha256-dGsnbKsg0nQFFXZDRDei2uGhGWEQSeSHGpXJp+8QUC8="; }; - cargoSha256 = "sha256-hnSumfZd9ylEx3dkTGW2s4VSv107MHOn21ytOcimhPw="; - - # enable pkg-config feature of zstd - cargoPatches = [ ./zstd-pkg-config.patch ]; + cargoSha256 = "sha256-9oXMojQA4tSoIxY1lwMPGhQz3WHcxEKtwl+4LsAYbDo="; nativeBuildInputs = [ pkg-config ] - ++ lib.optionals (withExtraFeatures && stdenv.isLinux) [ python3 ] + ++ lib.optionals (withDefaultFeatures && stdenv.isLinux) [ python3 ] ++ lib.optionals stdenv.isDarwin [ rustPlatform.bindgenHook ]; buildInputs = [ openssl zstd ] ++ lib.optionals stdenv.isDarwin [ zlib libiconv Libsystem Security ] - ++ lib.optionals (withExtraFeatures && stdenv.isLinux) [ xorg.libX11 ] - ++ lib.optionals (withExtraFeatures && stdenv.isDarwin) [ AppKit nghttp2 libgit2 ]; + ++ lib.optionals (withDefaultFeatures && stdenv.isLinux) [ xorg.libX11 ] + ++ lib.optionals (withDefaultFeatures && stdenv.isDarwin) [ AppKit nghttp2 libgit2 ]; - buildFeatures = lib.optional withExtraFeatures "extra"; + buildFeatures = additionalFeatures [ (lib.optional withDefaultFeatures "default") ]; # TODO investigate why tests are broken on darwin # failures show that tests try to write to paths # outside of TMPDIR - doCheck = ! stdenv.isDarwin; + doCheck = doCheck && !stdenv.isDarwin; checkPhase = '' runHook preCheck @@ -76,4 +78,4 @@ rustPlatform.buildRustPackage rec { }; updateScript = nix-update-script { }; }; -} +}) |