mirror of
https://github.com/CHN-beta/nixpkgs.git
synced 2026-01-12 02:40:31 +08:00
nushell: 0.97.1 -> 0.98.0 (#343096)
This commit is contained in:
@@ -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 ]
|
||||
|
||||
@@ -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 [
|
||||
|
||||
@@ -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 ];
|
||||
|
||||
@@ -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 =
|
||||
|
||||
@@ -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 =
|
||||
|
||||
@@ -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"
|
||||
Reference in New Issue
Block a user