diff --git a/pkgs/by-name/sp/spade/package.nix b/pkgs/by-name/sp/spade/package.nix index 49b0443fbb4de2b..b312ce8683a4034 100644 --- a/pkgs/by-name/sp/spade/package.nix +++ b/pkgs/by-name/sp/spade/package.nix @@ -3,6 +3,8 @@ rustPlatform, fetchFromGitLab, stdenv, + _experimental-update-script-combinators, + nix-update-script, nix-update, writeScript, git, @@ -30,16 +32,23 @@ rustPlatform.buildRustPackage rec { }; }; - # rust + gitlab is a rare combo - passthru.updateScript = [ + # TODO: somehow respect https://nixos.org/manual/nixpkgs/stable/#var-passthru-updateScript-commit + passthru.updateScript = _experimental-update-script-combinators.sequence [ + # rust + gitlab + fetchgit is a rare combo (writeScript "update-spade" '' VERSION="$( ${lib.getExe git} ls-remote --tags --sort -version:refname ${lib.escapeShellArg src.gitRepoUrl} \ | cut -f2 | grep ^refs/tags/v | cut -d/ -f3- | cut -c2- \ | sort --version-sort --reverse | head -n1 )" - exec ${lib.getExe nix-update} --version "$VERSION" "$@" + exec ${lib.getExe nix-update} spade --version "$VERSION" "$@" --commit '') + (nix-update-script { + extraArgs = [ + "swim" + "--commit" + ]; + }) ]; buildInputs = lib.optionals stdenv.hostPlatform.isDarwin [ python312 ]; diff --git a/pkgs/by-name/sw/swim/package.nix b/pkgs/by-name/sw/swim/package.nix index 56e943da211d5ce..3fd19809f90734a 100644 --- a/pkgs/by-name/sw/swim/package.nix +++ b/pkgs/by-name/sw/swim/package.nix @@ -8,8 +8,6 @@ stdenv, darwin, git, - _experimental-update-script-combinators, - nix-update-script, }: rustPlatform.buildRustPackage rec { @@ -56,10 +54,9 @@ rustPlatform.buildRustPackage rec { "--skip=plugin::test::deny_changes_to_plugins::restores_work" ]; - passthru.updateScript = _experimental-update-script-combinators.sequence [ - (nix-update-script { extraArgs = [ "spade" "--commit" "--use-update-script" "--update-script-args" "--argstr skip-prompt true" ]; }) - (nix-update-script { extraArgs = [ "swim" ]; }) - ]; + passthru = { + inherit (spade) updateScript; + }; meta = { description = "Build tool for spade";