Merge pull request #336339 from 1adept/update-nushell

nushell: 0.96.1 -> 0.97.1
This commit is contained in:
Yt
2024-08-21 21:40:28 +00:00
committed by GitHub
6 changed files with 134 additions and 45 deletions
+3 -3
View File
@@ -21,7 +21,7 @@
}:
let
version = "0.96.1";
version = "0.97.1";
in
rustPlatform.buildRustPackage {
@@ -32,10 +32,10 @@ rustPlatform.buildRustPackage {
owner = "nushell";
repo = "nushell";
rev = version;
hash = "sha256-I9cCvm2qTCwnRonfE86ippBV4V1r8U5HFr9OA96wVqI=";
hash = "sha256-hrcPWJ5OXFozfNux6iR/nEw/1z64N5BV4DD/JWhlH2U=";
};
cargoHash = "sha256-XlsK7zu3Pyc5p5SPVCsBqxIyKedaAPF58Ki7keOZRYM=";
cargoHash = "sha256-iGmAgrj1oy0t8SsSuCNiUoqWXDFA2CdsPnYYYOpXofs=";
nativeBuildInputs = [ pkg-config ]
++ lib.optionals (withDefaultFeatures && stdenv.isLinux) [ python3 ]
+19 -13
View File
@@ -1,21 +1,24 @@
{ stdenv
, lib
, rustPlatform
, nushell
, pkg-config
, IOKit
, Foundation
, nix-update-script
{
stdenv,
lib,
rustPlatform,
nushell,
pkg-config,
IOKit,
Foundation,
nix-update-script,
}:
rustPlatform.buildRustPackage rec {
pname = "nushell_plugin_formats";
inherit (nushell) version src;
cargoHash = "sha256-R4a+lD0KkdKrh2l7Fuyf/g/SvluDLjgAkolAF2h3Bl4=";
cargoHash = "sha256-pWtQYraMJ8nXJiTQPXxu/kEg4ftQy8YAjhUj9WPEYS8=";
nativeBuildInputs = [ pkg-config ]
++ lib.optionals stdenv.cc.isClang [ rustPlatform.bindgenHook ];
buildInputs = lib.optionals stdenv.isDarwin [ IOKit Foundation ];
nativeBuildInputs = [ pkg-config ] ++ lib.optionals stdenv.cc.isClang [ rustPlatform.bindgenHook ];
buildInputs = lib.optionals stdenv.isDarwin [
IOKit
Foundation
];
cargoBuildFlags = [ "--package nu_plugin_formats" ];
checkPhase = ''
@@ -32,7 +35,10 @@ rustPlatform.buildRustPackage rec {
mainProgram = "nu_plugin_formats";
homepage = "https://github.com/nushell/nushell/tree/${version}/crates/nu_plugin_formats";
license = licenses.mit;
maintainers = with maintainers; [ viraptor aidalgol ];
maintainers = with maintainers; [
viraptor
aidalgol
];
platforms = with platforms; all;
};
}
+15 -12
View File
@@ -1,20 +1,20 @@
{ stdenv
, lib
, rustPlatform
, openssl
, nushell
, pkg-config
, Security
, nix-update-script
{
stdenv,
lib,
rustPlatform,
openssl,
nushell,
pkg-config,
Security,
nix-update-script,
}:
rustPlatform.buildRustPackage rec {
pname = "nushell_plugin_gstat";
inherit (nushell) version src;
cargoHash = "sha256-lVuCLp18jqeMdpEpIesN5vUgceLTg+un8n7SkGf8xZU=";
cargoHash = "sha256-f7gH5Kxz8vsYQluvIl/VNklFh80kFKCZEyJvH5eD9Qk=";
nativeBuildInputs = [ pkg-config ]
++ lib.optionals stdenv.cc.isClang [ rustPlatform.bindgenHook ];
nativeBuildInputs = [ pkg-config ] ++ lib.optionals stdenv.cc.isClang [ rustPlatform.bindgenHook ];
buildInputs = [ openssl ] ++ lib.optionals stdenv.isDarwin [ Security ];
cargoBuildFlags = [ "--package nu_plugin_gstat" ];
@@ -32,7 +32,10 @@ rustPlatform.buildRustPackage rec {
mainProgram = "nu_plugin_gstat";
homepage = "https://github.com/nushell/nushell/tree/${version}/crates/nu_plugin_gstat";
license = licenses.mit;
maintainers = with maintainers; [ mrkkrp aidalgol ];
maintainers = with maintainers; [
mrkkrp
aidalgol
];
platforms = with platforms; all;
};
}
+1 -1
View File
@@ -14,7 +14,7 @@ rustPlatform.buildRustPackage rec {
pname = "nushell_plugin_polars";
inherit (nushell) version src;
cargoHash = "sha256-Ym/ypm3bUPZkKXYVrym9LEDL0RenJCcruN3urpN2cEQ=";
cargoHash = "sha256-agUuDPv8LJixj3cBrvhW8UdPLQHNVYpSlPGvioxZoDU=";
nativeBuildInputs = [ pkg-config ] ++ lib.optionals stdenv.cc.isClang [ rustPlatform.bindgenHook ];
buildInputs =
+26 -16
View File
@@ -1,24 +1,31 @@
{ stdenv
, lib
, rustPlatform
, nushell
, IOKit
, CoreFoundation
, nix-update-script
, pkg-config
, openssl
, curl
{
stdenv,
lib,
rustPlatform,
nushell,
IOKit,
CoreFoundation,
nix-update-script,
pkg-config,
openssl,
curl,
}:
rustPlatform.buildRustPackage {
pname = "nushell_plugin_query";
inherit (nushell) version src;
cargoHash = "sha256-m5DYMvvNWfd86e7P7JI7KLlp7AjqtKO+n9jjORaW9ss=";
cargoHash = "sha256-ygzHnrQ3zO1+lxzRUFO1+0XocGBemJKoDa4oiCjCe+0=";
nativeBuildInputs = [ pkg-config ]
++ lib.optionals stdenv.cc.isClang [ rustPlatform.bindgenHook ];
buildInputs = [ openssl curl ]
++ lib.optionals stdenv.isDarwin [ IOKit CoreFoundation ];
nativeBuildInputs = [ pkg-config ] ++ lib.optionals stdenv.cc.isClang [ rustPlatform.bindgenHook ];
buildInputs =
[
openssl
curl
]
++ lib.optionals stdenv.isDarwin [
IOKit
CoreFoundation
];
cargoBuildFlags = [ "--package nu_plugin_query" ];
checkPhase = ''
@@ -35,7 +42,10 @@ rustPlatform.buildRustPackage {
mainProgram = "nu_plugin_query";
homepage = "https://github.com/nushell/nushell/tree/${version}/crates/nu_plugin_query";
license = licenses.mit;
maintainers = with maintainers; [ happysalada aidalgol ];
maintainers = with maintainers; [
happysalada
aidalgol
];
platforms = with platforms; all;
};
}
+70
View File
@@ -0,0 +1,70 @@
#!/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"