Merge remote-tracking branch 'origin/staging-next' into staging

This commit is contained in:
K900
2024-09-20 07:27:56 +03:00
305 changed files with 8216 additions and 4711 deletions

View File

@@ -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 ]

View File

@@ -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 [

View File

@@ -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 ];

View File

@@ -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 =

View File

@@ -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 =

View File

@@ -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"

View File

@@ -1,32 +1,33 @@
{ stdenv
{ stdenvNoCC
, lib
, bash
, coreutils
, findutils
, fetchFromGitHub
, fzf
, gawk
, git
, gnugrep
, gnused
, makeWrapper
}:
stdenv.mkDerivation rec {
stdenvNoCC.mkDerivation (finalAttrs: {
pname = "zsh-forgit";
version = "24.02.0";
version = "24.09.0";
src = fetchFromGitHub {
owner = "wfxr";
repo = "forgit";
rev = version;
sha256 = "sha256-DoOtrnEJwSxkCZtsVek+3w9RZH7j7LTvdleBC88xyfI=";
rev = "refs/tags/${finalAttrs.version}";
hash = "sha256-8QgnEu41BHeX6heP2slQT+X+Dti+7Ij+J2zqmU4dm3I=";
};
strictDeps = true;
postPatch = ''
substituteInPlace forgit.plugin.zsh \
--replace "\$INSTALL_DIR/bin/git-forgit" "$out/bin/git-forgit"
--replace-fail "\$FORGIT_INSTALL_DIR/bin/git-forgit" "$out/bin/git-forgit"
'';
dontBuild = true;
@@ -38,10 +39,9 @@ stdenv.mkDerivation rec {
install -D bin/git-forgit $out/bin/git-forgit
install -D completions/_git-forgit $out/share/zsh/site-functions/_git-forgit
install -D completions/git-forgit.zsh $out/share/zsh/${pname}/git-forgit.zsh
install -D forgit.plugin.zsh $out/share/zsh/${pname}/forgit.plugin.zsh
install -D forgit.plugin.zsh $out/share/zsh/${finalAttrs.pname}/forgit.plugin.zsh
wrapProgram $out/bin/git-forgit \
--prefix PATH : ${lib.makeBinPath [ bash coreutils findutils fzf git gnugrep gnused ]}
--prefix PATH : ${lib.makeBinPath [ bash coreutils findutils fzf gawk git gnugrep gnused ]}
runHook postInstall
'';
@@ -54,4 +54,4 @@ stdenv.mkDerivation rec {
maintainers = with maintainers; [ deejayem ];
platforms = platforms.all;
};
}
})