From 0c3e18ace8f1391174c739eee90646a5fca3f5f2 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Jan=20Christian=20Gr=C3=BCnhage?= Date: Fri, 8 Apr 2022 11:59:02 +0200 Subject: [PATCH] nushell: update to 0.63.1. --- .../patches/0001-use-system-libraries.patch | 72 +++++++++++++++++++ .../0002-allow-building-without-git.patch | 26 +++++++ .../nushell/patches/system-libraries.patch | 40 ----------- srcpkgs/nushell/template | 4 +- 4 files changed, 100 insertions(+), 42 deletions(-) create mode 100644 srcpkgs/nushell/patches/0001-use-system-libraries.patch create mode 100644 srcpkgs/nushell/patches/0002-allow-building-without-git.patch delete mode 100644 srcpkgs/nushell/patches/system-libraries.patch diff --git a/srcpkgs/nushell/patches/0001-use-system-libraries.patch b/srcpkgs/nushell/patches/0001-use-system-libraries.patch new file mode 100644 index 000000000000..b6786032b006 --- /dev/null +++ b/srcpkgs/nushell/patches/0001-use-system-libraries.patch @@ -0,0 +1,72 @@ +From 4c05448f1c6a40583b6649cadc23d417bb90d2ef Mon Sep 17 00:00:00 2001 +From: =?UTF-8?q?Jan=20Christian=20Gr=C3=BCnhage?= + +Date: Wed, 8 Jun 2022 16:15:55 +0200 +Subject: [PATCH 1/2] use system libraries + +--- + Cargo.lock | 2 ++ + Cargo.toml | 4 ++++ + crates/old/nu_plugin_from_sqlite/Cargo.toml | 2 +- + crates/old/nu_plugin_to_sqlite/Cargo.toml | 2 +- + 4 files changed, 8 insertions(+), 2 deletions(-) + +diff --git a/Cargo.lock b/Cargo.lock +index bed0c1c50..95f833fbc 100644 +--- a/Cargo.lock ++++ b/Cargo.lock +@@ -2488,6 +2488,7 @@ dependencies = [ + "serial_test", + "tempfile", + "winres", ++ "zstd", + ] + + [[package]] +@@ -5490,4 +5491,5 @@ checksum = "9fd07cbbc53846d9145dbffdf6dd09a7a0aa52be46741825f5c97bdd4f73f12b" + dependencies = [ + "cc", + "libc", ++ "pkg-config", + ] +diff --git a/Cargo.toml b/Cargo.toml +index 26df23417..98209824c 100644 +--- a/Cargo.toml ++++ b/Cargo.toml +@@ -118,3 +118,7 @@ debug = false + [[bin]] + name = "nu" + path = "src/main.rs" ++ ++[dependencies.zstd] ++features = ["pkg-config"] ++version = ">=0.0.0" +diff --git a/crates/old/nu_plugin_from_sqlite/Cargo.toml b/crates/old/nu_plugin_from_sqlite/Cargo.toml +index c805ef8eb..fd7565c7c 100644 +--- a/crates/old/nu_plugin_from_sqlite/Cargo.toml ++++ b/crates/old/nu_plugin_from_sqlite/Cargo.toml +@@ -18,7 +18,7 @@ nu-source = { path="../nu-source", version = "0.63.1" } + tempfile = "3.2.0" + + [dependencies.rusqlite] +-features = ["bundled", "blob"] ++features = ["blob"] + version = "0.26.1" + + [build-dependencies] +diff --git a/crates/old/nu_plugin_to_sqlite/Cargo.toml b/crates/old/nu_plugin_to_sqlite/Cargo.toml +index 7146b4c33..78ad01ab0 100644 +--- a/crates/old/nu_plugin_to_sqlite/Cargo.toml ++++ b/crates/old/nu_plugin_to_sqlite/Cargo.toml +@@ -18,7 +18,7 @@ nu-source = { path="../nu-source", version = "0.63.1" } + tempfile = "3.2.0" + + [dependencies.rusqlite] +-features = ["bundled", "blob"] ++features = ["blob"] + version = "0.26.1" + + [build-dependencies] +-- +2.36.1 + diff --git a/srcpkgs/nushell/patches/0002-allow-building-without-git.patch b/srcpkgs/nushell/patches/0002-allow-building-without-git.patch new file mode 100644 index 000000000000..ced015759646 --- /dev/null +++ b/srcpkgs/nushell/patches/0002-allow-building-without-git.patch @@ -0,0 +1,26 @@ +From 4b4cbe8cb0c735cf79432d8cc8b8b578dcea9aa3 Mon Sep 17 00:00:00 2001 +From: =?UTF-8?q?Jan=20Christian=20Gr=C3=BCnhage?= + +Date: Wed, 8 Jun 2022 16:25:15 +0200 +Subject: [PATCH 2/2] allow building without git + +--- + crates/nu-command/build.rs | 2 +- + 1 file changed, 1 insertion(+), 1 deletion(-) + +diff --git a/crates/nu-command/build.rs b/crates/nu-command/build.rs +index 67343c24b..02c51d9cb 100644 +--- a/crates/nu-command/build.rs ++++ b/crates/nu-command/build.rs +@@ -3,7 +3,7 @@ use std::process::Command; + fn main() -> shadow_rs::SdResult<()> { + // Look up the current Git commit ourselves instead of relying on shadow_rs, + // because shadow_rs does it in a really slow-to-compile way (it builds libgit2) +- let hash = get_git_hash().expect("failed to get latest git commit hash"); ++ let hash = get_git_hash().unwrap_or("0000000000000000000000000000000000000000".to_owned()); + println!("cargo:rustc-env=NU_COMMIT_HASH={}", hash); + + shadow_rs::new() +-- +2.36.1 + diff --git a/srcpkgs/nushell/patches/system-libraries.patch b/srcpkgs/nushell/patches/system-libraries.patch deleted file mode 100644 index 6cf71782e4ca..000000000000 --- a/srcpkgs/nushell/patches/system-libraries.patch +++ /dev/null @@ -1,40 +0,0 @@ -diff --git a/Cargo.toml.orig b/Cargo.toml -index 7c53d6d1ed..510ef7698b 100644 ---- a/Cargo.toml.orig -+++ b/Cargo.toml -@@ -227,3 +227,7 @@ required-features = ["sqlite"] - [[bin]] - name = "nu" - path = "src/main.rs" -+ -+[dependencies.zstd] -+features = ["pkg-config"] -+version = ">=0.0.0" -==== -diff --git a/crates/nu_plugin_from_sqlite/Cargo.toml.orig b/crates/nu_plugin_from_sqlite/Cargo.toml -index ef28788f42..ad439b5fd3 100644 ---- a/crates/nu_plugin_from_sqlite/Cargo.toml.orig -+++ b/crates/nu_plugin_from_sqlite/Cargo.toml -@@ -18,7 +18,7 @@ nu-source = { path="../nu-source", version = "0.42.0" } - tempfile = "3.2.0" - - [dependencies.rusqlite] --features = ["bundled", "blob"] -+features = ["blob"] - version = "0.26.1" - - [build-dependencies] -==== -diff --git a/crates/nu_plugin_to_sqlite/Cargo.toml.orig b/crates/nu_plugin_to_sqlite/Cargo.toml -index 6e26ec5fda..a551200402 100644 ---- a/crates/nu_plugin_to_sqlite/Cargo.toml.orig -+++ b/crates/nu_plugin_to_sqlite/Cargo.toml -@@ -18,7 +18,7 @@ nu-source = { path="../nu-source", version = "0.42.0" } - tempfile = "3.2.0" - - [dependencies.rusqlite] --features = ["bundled", "blob"] -+features = ["blob"] - version = "0.26.1" - - [build-dependencies] diff --git a/srcpkgs/nushell/template b/srcpkgs/nushell/template index cce3d5f3b6fb..fa11f7b91c17 100644 --- a/srcpkgs/nushell/template +++ b/srcpkgs/nushell/template @@ -1,6 +1,6 @@ # Template file for 'nushell' pkgname=nushell -version=0.44.0 +version=0.63.1 revision=1 build_style=cargo configure_args="--features=extra" @@ -14,7 +14,7 @@ license="MIT" homepage="https://www.nushell.sh/" changelog="https://www.nushell.sh/blog/" distfiles="https://github.com/nushell/nushell/archive/refs/tags/${version}.tar.gz" -checksum=94bb003fd05b604a174a686c40286fef460bc06616a7d273c387a54a07576ecc +checksum=42775905a757e170f374635f0d33801b81c3eb61984a6b7599832548d625acf6 register_shell="/usr/bin/nu" # all tests fail with argument --target make_check=no