From 06967a84064cb81e5a4f05c1a32f5d1b2f4870fb Mon Sep 17 00:00:00 2001 From: 1adept <69433209+1adept@users.noreply.github.com> Date: Thu, 19 Sep 2024 16:02:11 +0200 Subject: [PATCH 1/2] nushell: remove update script Just use the provided update scripts. This is not needed --- pkgs/shells/nushell/update.sh | 70 ----------------------------------- 1 file changed, 70 deletions(-) delete mode 100644 pkgs/shells/nushell/update.sh diff --git a/pkgs/shells/nushell/update.sh b/pkgs/shells/nushell/update.sh deleted file mode 100644 index 9a8015e74600f..0000000000000 --- a/pkgs/shells/nushell/update.sh +++ /dev/null @@ -1,70 +0,0 @@ -#!/usr/bin/env nix-shell -#!nix-shell -i bash -#!nix-shell -p git nix-update nixpkgs-review nixfmt-rfc-style - -set -euxo pipefail - -basedir="$(git rev-parse --show-toplevel)" -cd "$basedir" - -branch="update-nushell" -nuPath="pkgs/shells/nushell" - -function staged() { - if git status --porcelain | grep -q -E "^[AM].? +$1"; then - return 0 - else - return 1 - fi -} - -function version() { - grep '\s*version = ' "$nuPath/default.nix" | cut -d'"' -f 2 | head --lines 1 -} - -git checkout -B "$branch" - -version_old=$(version) -if ! staged "$nuPath/default.nix"; then - nix-update nushell - git add "$nuPath/default.nix" -fi -version_new=$(version) - -declare -a plugins=(formats query polars gstat) -for plugin in "${plugins[@]}"; do - attr="nushellPlugins.$plugin" - pluginPath="$nuPath/plugins/$plugin.nix" - - if staged "$pluginPath"; then - echo "Skipping '$plugin' because it's alredy staged" - continue - fi - - echo "Attempting to build $attr" - - set +e - newHash=$(nix build ".#$attr" 2> \ - >(grep got | - awk -F' ' '{ print $2 }')) - set -e - - # New hash ? - if [ -n "$newHash" ]; then - # Add the new hash - sed -i "s!cargoHash = ".*";!cargoHash = \"$newHash\";!" "$pluginPath" - nixfmt "$pluginPath" - - echo "Building $plugin again with new hash $newHash" - nix build ".#$attr" - git add "$pluginPath" - echo "Plugin $plugin built sucessfully" - else - echo "No new hash for '$plugin'" - fi -done - -git commit -m "nushell: $version_old -> $version_new" - -echo "Starting nixpkgs-review" -nixpkgs-review rev "$branch" From 1061e2e141078556edee8e97d74ff65bf744efab Mon Sep 17 00:00:00 2001 From: 1adept <69433209+1adept@users.noreply.github.com> Date: Thu, 19 Sep 2024 20:32:45 +0200 Subject: [PATCH 2/2] nushell: 0.97.1 -> 0.98.0 changelog: https://www.nushell.sh/blog/2024-09-17-nushell_0_98_0.html --- pkgs/shells/nushell/default.nix | 6 +++--- pkgs/shells/nushell/plugins/formats.nix | 2 +- pkgs/shells/nushell/plugins/gstat.nix | 2 +- pkgs/shells/nushell/plugins/polars.nix | 2 +- pkgs/shells/nushell/plugins/query.nix | 2 +- 5 files changed, 7 insertions(+), 7 deletions(-) diff --git a/pkgs/shells/nushell/default.nix b/pkgs/shells/nushell/default.nix index a391ac6999eb4..b763526dda601 100644 --- a/pkgs/shells/nushell/default.nix +++ b/pkgs/shells/nushell/default.nix @@ -21,7 +21,7 @@ }: let - version = "0.97.1"; + version = "0.98.0"; in rustPlatform.buildRustPackage { @@ -32,10 +32,10 @@ rustPlatform.buildRustPackage { owner = "nushell"; repo = "nushell"; rev = version; - hash = "sha256-hrcPWJ5OXFozfNux6iR/nEw/1z64N5BV4DD/JWhlH2U="; + hash = "sha256-0XN26onR4Tk8Ejc/UntdL+b5FPBOoBmDQM0DRommIMo="; }; - cargoHash = "sha256-iGmAgrj1oy0t8SsSuCNiUoqWXDFA2CdsPnYYYOpXofs="; + cargoHash = "sha256-43V0TnYGG2tyWRIGaohIaoN7dxnY1fle2Bp5lDiFlWg="; nativeBuildInputs = [ pkg-config ] ++ lib.optionals (withDefaultFeatures && stdenv.isLinux) [ python3 ] diff --git a/pkgs/shells/nushell/plugins/formats.nix b/pkgs/shells/nushell/plugins/formats.nix index f713957f27d25..a74721ad90314 100644 --- a/pkgs/shells/nushell/plugins/formats.nix +++ b/pkgs/shells/nushell/plugins/formats.nix @@ -12,7 +12,7 @@ rustPlatform.buildRustPackage rec { pname = "nushell_plugin_formats"; inherit (nushell) version src; - cargoHash = "sha256-pWtQYraMJ8nXJiTQPXxu/kEg4ftQy8YAjhUj9WPEYS8="; + cargoHash = "sha256-Lcgf6+Li1STl4Sko81oBHAnX09A6F7dwYmHJiF2CZ3s="; nativeBuildInputs = [ pkg-config ] ++ lib.optionals stdenv.cc.isClang [ rustPlatform.bindgenHook ]; buildInputs = lib.optionals stdenv.isDarwin [ diff --git a/pkgs/shells/nushell/plugins/gstat.nix b/pkgs/shells/nushell/plugins/gstat.nix index c2b12073b727e..e430820247dcd 100644 --- a/pkgs/shells/nushell/plugins/gstat.nix +++ b/pkgs/shells/nushell/plugins/gstat.nix @@ -12,7 +12,7 @@ rustPlatform.buildRustPackage rec { pname = "nushell_plugin_gstat"; inherit (nushell) version src; - cargoHash = "sha256-f7gH5Kxz8vsYQluvIl/VNklFh80kFKCZEyJvH5eD9Qk="; + cargoHash = "sha256-NLGEaIGUqgyGegzVyZloLckVGYmfMjwhzVXh327kxRA="; nativeBuildInputs = [ pkg-config ] ++ lib.optionals stdenv.cc.isClang [ rustPlatform.bindgenHook ]; buildInputs = [ openssl ] ++ lib.optionals stdenv.isDarwin [ Security ]; diff --git a/pkgs/shells/nushell/plugins/polars.nix b/pkgs/shells/nushell/plugins/polars.nix index 88c29e0ccbda3..7e9e1623bea6d 100644 --- a/pkgs/shells/nushell/plugins/polars.nix +++ b/pkgs/shells/nushell/plugins/polars.nix @@ -14,7 +14,7 @@ rustPlatform.buildRustPackage rec { pname = "nushell_plugin_polars"; inherit (nushell) version src; - cargoHash = "sha256-agUuDPv8LJixj3cBrvhW8UdPLQHNVYpSlPGvioxZoDU="; + cargoHash = "sha256-LfD0b9ZDWA1apKR36eHx1gKFiKSGAr2tqbZKTc2rMIE="; nativeBuildInputs = [ pkg-config ] ++ lib.optionals stdenv.cc.isClang [ rustPlatform.bindgenHook ]; buildInputs = diff --git a/pkgs/shells/nushell/plugins/query.nix b/pkgs/shells/nushell/plugins/query.nix index c3440a7295de0..85520b32e0e3e 100644 --- a/pkgs/shells/nushell/plugins/query.nix +++ b/pkgs/shells/nushell/plugins/query.nix @@ -14,7 +14,7 @@ rustPlatform.buildRustPackage { pname = "nushell_plugin_query"; inherit (nushell) version src; - cargoHash = "sha256-ygzHnrQ3zO1+lxzRUFO1+0XocGBemJKoDa4oiCjCe+0="; + cargoHash = "sha256-7E4CCs4xyNGwjk6B2CwIFf1x0o5uNQArZpyxXEKLXMI="; nativeBuildInputs = [ pkg-config ] ++ lib.optionals stdenv.cc.isClang [ rustPlatform.bindgenHook ]; buildInputs =