Merge pull request #218030 from MangoIV/mangoiv/update-nushell

nushell: 0.75.0 -> 0.76.0
This commit is contained in:
Weijia Wang 2023-03-03 16:15:45 +02:00 committed by GitHub
commit f5ffd57877
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
2 changed files with 17 additions and 46 deletions

View File

@ -16,43 +16,45 @@
, Security , Security
, nghttp2 , nghttp2
, libgit2 , libgit2
, withExtraFeatures ? true , doCheck ? true
, withDefaultFeatures ? true
, additionalFeatures ? (p: p)
, testers , testers
, nushell , nushell
, nix-update-script , nix-update-script
}: }:
rustPlatform.buildRustPackage rec { rustPlatform.buildRustPackage (
pname = "nushell"; let
version = "0.75.0"; version = "0.76.0";
pname = "nushell";
in {
inherit version pname;
src = fetchFromGitHub { src = fetchFromGitHub {
owner = pname; owner = pname;
repo = pname; repo = pname;
rev = version; rev = version;
sha256 = "sha256-u8/SvuR/RpJaBX4Dr3Onrk0AVpIAeVb+399+NUpgkfI="; sha256 = "sha256-dGsnbKsg0nQFFXZDRDei2uGhGWEQSeSHGpXJp+8QUC8=";
}; };
cargoSha256 = "sha256-hnSumfZd9ylEx3dkTGW2s4VSv107MHOn21ytOcimhPw="; cargoSha256 = "sha256-9oXMojQA4tSoIxY1lwMPGhQz3WHcxEKtwl+4LsAYbDo=";
# enable pkg-config feature of zstd
cargoPatches = [ ./zstd-pkg-config.patch ];
nativeBuildInputs = [ pkg-config ] nativeBuildInputs = [ pkg-config ]
++ lib.optionals (withExtraFeatures && stdenv.isLinux) [ python3 ] ++ lib.optionals (withDefaultFeatures && stdenv.isLinux) [ python3 ]
++ lib.optionals stdenv.isDarwin [ rustPlatform.bindgenHook ]; ++ lib.optionals stdenv.isDarwin [ rustPlatform.bindgenHook ];
buildInputs = [ openssl zstd ] buildInputs = [ openssl zstd ]
++ lib.optionals stdenv.isDarwin [ zlib libiconv Libsystem Security ] ++ lib.optionals stdenv.isDarwin [ zlib libiconv Libsystem Security ]
++ lib.optionals (withExtraFeatures && stdenv.isLinux) [ xorg.libX11 ] ++ lib.optionals (withDefaultFeatures && stdenv.isLinux) [ xorg.libX11 ]
++ lib.optionals (withExtraFeatures && stdenv.isDarwin) [ AppKit nghttp2 libgit2 ]; ++ 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 # TODO investigate why tests are broken on darwin
# failures show that tests try to write to paths # failures show that tests try to write to paths
# outside of TMPDIR # outside of TMPDIR
doCheck = ! stdenv.isDarwin; doCheck = doCheck && !stdenv.isDarwin;
checkPhase = '' checkPhase = ''
runHook preCheck runHook preCheck
@ -76,4 +78,4 @@ rustPlatform.buildRustPackage rec {
}; };
updateScript = nix-update-script { }; updateScript = nix-update-script { };
}; };
} })

View File

@ -1,31 +0,0 @@
diff --git a/Cargo.lock b/Cargo.lock
index 7376ffe6a..a7d3335cc 100644
--- a/Cargo.lock
+++ b/Cargo.lock
@@ -2751,6 +2751,7 @@ dependencies = [
"which",
"windows",
"winreg",
+ "zstd",
]
[[package]]
@@ -5881,4 +5882,5 @@ checksum = "9fd07cbbc53846d9145dbffdf6dd09a7a0aa52be46741825f5c97bdd4f73f12b"
dependencies = [
"cc",
"libc",
+ "pkg-config",
]
diff --git a/crates/nu-command/Cargo.toml b/crates/nu-command/Cargo.toml
index d293f3e39..a462d67dc 100644
--- a/crates/nu-command/Cargo.toml
+++ b/crates/nu-command/Cargo.toml
@@ -93,6 +93,8 @@ wax = { version = "0.5.0", features = ["diagnostics"] }
rusqlite = { version = "0.28.0", features = ["bundled"], optional = true }
sqlparser = { version = "0.23.0", features = ["serde"], optional = true }
+zstd = { version = "*", features = [ "pkg-config" ] }
+
[target.'cfg(windows)'.dependencies]
winreg = "0.10.1"