Merge pull request #183712 from shanesveller/package-nushell-0.66.2

nushell: 0.65.0 -> 0.67.0

authored by

Mario Rodas and committed by
GitHub
4b9e3d12 2b3aedb4

+60 -23
+27 -22
pkgs/shells/nushell/default.nix
··· 1 1 { stdenv 2 2 , lib 3 3 , fetchFromGitHub 4 + , runCommand 4 5 , rustPlatform 5 6 , openssl 6 7 , zlib ··· 10 11 , xorg 11 12 , libiconv 12 13 , AppKit 14 + , Foundation 13 15 , Security 16 + # darwin.apple_sdk.sdk 17 + , sdk 14 18 , nghttp2 15 19 , libgit2 16 - , cargo-edit 17 20 , withExtraFeatures ? true 18 21 , testers 19 22 , nushell ··· 21 24 22 25 rustPlatform.buildRustPackage rec { 23 26 pname = "nushell"; 24 - version = "0.65.0"; 27 + version = "0.67.0"; 25 28 26 29 src = fetchFromGitHub { 27 30 owner = pname; 28 31 repo = pname; 29 32 rev = version; 30 - sha256 = "sha256-KgXhmAOJaAvmNuDqSaW+h6GF5rWYgj8/wn+vz9V9S7M="; 33 + sha256 = "sha256-O5uM27DvcpwlZStFFLYRDRtFXzAzUdG7v0phK9LJsSo="; 31 34 }; 32 35 33 - cargoSha256 = "sha256-YqtM/1p6oP0+E0rYSFPeCbof06E81eC2PZIwkU7J0I4="; 34 - # Since 0.34, nu has an indirect dependency on `zstd-sys` (via `polars` and 35 - # `parquet`, for dataframe support), which by default has an impure build 36 - # (git submodule for the `zstd` C library). The `pkg-config` feature flag 37 - # fixes this, but it's hard to invoke this in the right place, because of 38 - # the indirect dependencies. So add a direct dependency on `zstd-sys` here 39 - # at the top level, along with this feature flag, to ensure that when 40 - # `zstd-sys` is transitively invoked, it triggers a pure build using the 41 - # system `zstd` library provided above. 42 - depsExtraArgs = { nativeBuildInputs = [ cargo-edit ]; }; 43 - # cargo add has been merged in to cargo so the above can be removed once 1.62.0 is available in nixpkgs 44 - # https://github.com/rust-lang/cargo/pull/10472 45 - cargoUpdateHook = '' 46 - cargo add zstd-sys --features pkg-config --offline 47 - # write the change to the lockfile 48 - cargo update --package zstd-sys --offline 49 - ''; 36 + cargoSha256 = "sha256-eGUI+/Vmqv+BCIQCGoF4Egf3oNyonM3tpt1R3EjIocQ="; 37 + 38 + # enable pkg-config feature of zstd 39 + cargoPatches = [ ./zstd-pkg-config.patch ]; 50 40 51 41 nativeBuildInputs = [ pkg-config ] 52 - ++ lib.optionals (withExtraFeatures && stdenv.isLinux) [ python3 ]; 42 + ++ lib.optionals (withExtraFeatures && stdenv.isLinux) [ python3 ] 43 + ++ lib.optionals stdenv.isDarwin [ rustPlatform.bindgenHook ]; 53 44 54 45 buildInputs = [ openssl zstd ] 55 46 ++ lib.optionals stdenv.isDarwin [ zlib libiconv Security ] 56 - ++ lib.optionals (withExtraFeatures && stdenv.isLinux) [ xorg.libX11 ] 47 + ++ lib.optionals (stdenv.isDarwin && stdenv.isx86_64) [ 48 + Foundation 49 + ( 50 + # Pull a header that contains a definition of proc_pid_rusage(). 51 + # (We pick just that one because using the other headers from `sdk` is not 52 + # compatible with our C++ standard library. This header is already in 53 + # the standard library on aarch64) 54 + # See also: 55 + # https://github.com/shanesveller/nixpkgs/tree/90ed23b1b23c8ee67928937bdec7ddcd1a0050f5/pkgs/development/libraries/webkitgtk/default.nix 56 + # https://github.com/shanesveller/nixpkgs/blob/90ed23b1b23c8ee67928937bdec7ddcd1a0050f5/pkgs/tools/system/btop/default.nix#L32-L38 57 + runCommand "${pname}_headers" { } '' 58 + install -Dm444 "${lib.getDev sdk}"/include/libproc.h "$out"/include/libproc.h 59 + '' 60 + ) 61 + ] ++ lib.optionals (withExtraFeatures && stdenv.isLinux) [ xorg.libX11 ] 57 62 ++ lib.optionals (withExtraFeatures && stdenv.isDarwin) [ AppKit nghttp2 libgit2 ]; 58 63 59 64 buildFeatures = lib.optional withExtraFeatures "extra";
+31
pkgs/shells/nushell/zstd-pkg-config.patch
··· 1 + diff --git a/Cargo.lock b/Cargo.lock 2 + index d4c2ebe3a..bc78478c3 100644 3 + --- a/Cargo.lock 4 + +++ b/Cargo.lock 5 + @@ -2641,6 +2641,7 @@ dependencies = [ 6 + "wax", 7 + "which", 8 + "windows", 9 + + "zstd", 10 + ] 11 + 12 + [[package]] 13 + @@ -5604,4 +5605,5 @@ checksum = "9fd07cbbc53846d9145dbffdf6dd09a7a0aa52be46741825f5c97bdd4f73f12b" 14 + dependencies = [ 15 + "cc", 16 + "libc", 17 + + "pkg-config", 18 + ] 19 + diff --git a/crates/nu-command/Cargo.toml b/crates/nu-command/Cargo.toml 20 + index 8a9d29562..374ffa153 100644 21 + --- a/crates/nu-command/Cargo.toml 22 + +++ b/crates/nu-command/Cargo.toml 23 + @@ -89,6 +89,8 @@ wax = { version = "0.5.0", features = ["diagnostics"] } 24 + rusqlite = { version = "0.28.0", features = ["bundled"], optional = true } 25 + sqlparser = { version = "0.16.0", features = ["serde"], optional = true } 26 + 27 + +zstd = { version = "*", features = [ "pkg-config" ] } 28 + + 29 + [target.'cfg(unix)'.dependencies] 30 + umask = "2.0.0" 31 + users = "0.11.0"
+2 -1
pkgs/top-level/all-packages.nix
··· 24487 24487 nsh = callPackage ../shells/nsh { }; 24488 24488 24489 24489 nushell = callPackage ../shells/nushell { 24490 - inherit (darwin.apple_sdk.frameworks) AppKit Security; 24490 + inherit (darwin.apple_sdk.frameworks) AppKit Foundation Security; 24491 + inherit (darwin.apple_sdk) sdk; 24491 24492 }; 24492 24493 24493 24494 nettools = if stdenv.isLinux