diff --git a/pkgs/by-name/se/serpl/package.nix b/pkgs/by-name/se/serpl/package.nix index 24cc7ae109c5..3fe8d61ac8e8 100644 --- a/pkgs/by-name/se/serpl/package.nix +++ b/pkgs/by-name/se/serpl/package.nix @@ -2,14 +2,15 @@ lib, rustPlatform, fetchFromGitHub, - gitUpdater, + nix-update-script, makeWrapper, ast-grep, ripgrep, + versionCheckHook, }: let pname = "serpl"; - version = "0.3.3"; + version = "0.3.4"; in rustPlatform.buildRustPackage { inherit pname version; @@ -17,7 +18,7 @@ rustPlatform.buildRustPackage { owner = "yassinebridi"; repo = "serpl"; rev = version; - hash = "sha256-koD5aFqL+XVxc5Iq3reTYIHiPm0z7hAQ4K59IfbY4Hg="; + hash = "sha256-lEvUS1RlZ4CvervzyfODsFqRJAiA6PyLNUVWhSoPMDY="; }; buildFeatures = [ "ast_grep" ]; @@ -25,7 +26,7 @@ rustPlatform.buildRustPackage { nativeBuildInputs = [ makeWrapper ]; useFetchCargoVendor = true; - cargoHash = "sha256-YfSxjlpUyRwpSoKmHOZrULGIIWTQ14JJwbsNB807WYQ="; + cargoHash = "sha256-reeJsSNifPeDzqMKVpS1Pmyn9x1F+Vin/xy81d5rKVs="; postFixup = '' # Serpl needs ripgrep to function properly. @@ -38,7 +39,14 @@ rustPlatform.buildRustPackage { }" ''; - passthru.updateScript = gitUpdater { }; + nativeInstallCheckInputs = [ + versionCheckHook + ]; + doInstallCheck = true; + versionCheckProgram = "${placeholder "out"}/bin/serpl"; + versionCheckProgramArg = "--version"; + + passthru.updateScript = nix-update-script { }; meta = { description = "Simple terminal UI for search and replace, ala VS Code";