Merge pull request #133018 from simonchatts/nushell-35

nushell: 0.33 -> 0.35

authored by Sandro and committed by GitHub 0bf94435 2cd2e75b

+50 -4
+18 -4
pkgs/shells/nushell/default.nix
··· 4 , rustPlatform 5 , openssl 6 , zlib 7 , pkg-config 8 , python3 9 , xorg ··· 17 18 rustPlatform.buildRustPackage rec { 19 pname = "nushell"; 20 - version = "0.33.0"; 21 22 src = fetchFromGitHub { 23 owner = pname; 24 repo = pname; 25 rev = version; 26 - sha256 = "sha256-Asjm3IoAfzphITLQuNh6r/i/pjEM/A+wpCsAB83bu2U="; 27 }; 28 29 - cargoSha256 = "sha256-Ly59mdUzSI2pIPbckWn1WBz/o2zVzpAzaCDROLdjG7Y="; 30 31 nativeBuildInputs = [ pkg-config ] 32 ++ lib.optionals (withExtraFeatures && stdenv.isLinux) [ python3 ]; 33 34 - buildInputs = [ openssl ] 35 ++ lib.optionals stdenv.isDarwin [ zlib libiconv Security ] 36 ++ lib.optionals (withExtraFeatures && stdenv.isLinux) [ xorg.libX11 ] 37 ++ lib.optionals (withExtraFeatures && stdenv.isDarwin) [ AppKit nghttp2 libgit2 ]; 38 39 cargoBuildFlags = lib.optional withExtraFeatures "--features=extra"; 40 41 # TODO investigate why tests are broken on darwin 42 # failures show that tests try to write to paths
··· 4 , rustPlatform 5 , openssl 6 , zlib 7 + , zstd 8 , pkg-config 9 , python3 10 , xorg ··· 18 19 rustPlatform.buildRustPackage rec { 20 pname = "nushell"; 21 + version = "0.35.0"; 22 23 src = fetchFromGitHub { 24 owner = pname; 25 repo = pname; 26 rev = version; 27 + sha256 = "0p5whwx6wk9k7mrxhr7azrppbj9mv53hd4bl1cgygxz231aq8337"; 28 }; 29 30 + cargoSha256 = "0xs0s02zf78pgd94ifh465mg14rrwjfg7qbzmmq8jha758gfwdi3"; 31 32 nativeBuildInputs = [ pkg-config ] 33 ++ lib.optionals (withExtraFeatures && stdenv.isLinux) [ python3 ]; 34 35 + buildInputs = [ openssl zstd ] 36 ++ lib.optionals stdenv.isDarwin [ zlib libiconv Security ] 37 ++ lib.optionals (withExtraFeatures && stdenv.isLinux) [ xorg.libX11 ] 38 ++ lib.optionals (withExtraFeatures && stdenv.isDarwin) [ AppKit nghttp2 libgit2 ]; 39 40 cargoBuildFlags = lib.optional withExtraFeatures "--features=extra"; 41 + 42 + # Since 0.34, nu has an indirect dependency on `zstd-sys` (via `polars` and 43 + # `parquet`, for dataframe support), which by default has an impure build 44 + # (git submodule for the `zstd` C library). The `pkg-config` feature flag 45 + # fixes this, but it's hard to invoke this in the right place, because of 46 + # the indirect dependencies. So add a direct dependency on `zstd-sys` here 47 + # at the top level, along with this feature flag, to ensure that when 48 + # `zstd-sys` is transitively invoked, it triggers a pure build using the 49 + # system `zstd` library provided above. 50 + # 51 + # (If this patch needs updating, in a nushell repo add the zstd-sys line to 52 + # Cargo.toml, then `cargo update --package zstd-sys` to update Cargo.lock.) 53 + cargoPatches = [ ./use-system-zstd-lib.diff ]; 54 55 # TODO investigate why tests are broken on darwin 56 # failures show that tests try to write to paths
+32
pkgs/shells/nushell/use-system-zstd-lib.diff
···
··· 1 + diff --git a/Cargo.lock b/Cargo.lock 2 + index 8833c3e5..0c90d2fe 100644 3 + --- a/Cargo.lock 4 + +++ b/Cargo.lock 5 + @@ -3188,6 +3188,7 @@ dependencies = [ 6 + "nu_plugin_xpath", 7 + "rstest", 8 + "serial_test", 9 + + "zstd-sys", 10 + ] 11 + 12 + [[package]] 13 + @@ -6954,4 +6955,5 @@ checksum = "615120c7a2431d16cf1cf979e7fc31ba7a5b5e5707b29c8a99e5dbf8a8392a33" 14 + dependencies = [ 15 + "cc", 16 + "libc", 17 + + "pkg-config", 18 + ] 19 + diff --git a/Cargo.toml b/Cargo.toml 20 + index 89e8a311..4cc2331a 100644 21 + --- a/Cargo.toml 22 + +++ b/Cargo.toml 23 + @@ -63,6 +63,9 @@ serial_test = "0.5.1" 24 + hamcrest2 = "0.3.0" 25 + rstest = "0.10.0" 26 + 27 + +# Specify that the indirect dependency ztsd-sys should pick up the system zstd C library 28 + +zstd-sys = { version = "1", features = [ "pkg-config" ] } 29 + + 30 + [build-dependencies] 31 + 32 + [features]