From d058b730b751214bdcaaf45745c5bf19d64155af Mon Sep 17 00:00:00 2001 From: Ezri Zhu Date: Fri, 16 May 2025 14:17:03 -0700 Subject: [PATCH] try: 0.2.0 -> 0.2.0-unstable-2025-02-25 --- pkgs/by-name/tr/try/package.nix | 54 +++++++++++++++++++++++++++------ 1 file changed, 45 insertions(+), 9 deletions(-) diff --git a/pkgs/by-name/tr/try/package.nix b/pkgs/by-name/tr/try/package.nix index 7211abbc775f..6194046ad4f5 100644 --- a/pkgs/by-name/tr/try/package.nix +++ b/pkgs/by-name/tr/try/package.nix @@ -1,37 +1,73 @@ { - stdenvNoCC, + stdenv, + autoreconfHook, lib, fetchFromGitHub, - fuse-overlayfs, util-linux, + mergerfs, + attr, makeWrapper, + pandoc, + kmod, + installShellFiles, + versionCheckHook, }: -stdenvNoCC.mkDerivation rec { +stdenv.mkDerivation { pname = "try"; - version = "0.2.0"; + version = "0.2.0-unstable-2025-02-25"; src = fetchFromGitHub { owner = "binpash"; repo = "try"; - rev = "v${version}"; - hash = "sha256-2EDRVwW4XzQhd7rAM2rDuR94Fkaq4pH5RTooFEBBh5g="; + rev = "67052d8f20725f3cdc22ffaec33f7b7c14f1eb6b"; + hash = "sha256-8mfCmqN50pRAeNTJUlRVrRQulWon4b2OL4Ug/ygBhB0="; }; - nativeBuildInputs = [ makeWrapper ]; + nativeBuildInputs = [ + makeWrapper + autoreconfHook + pandoc + attr + util-linux + kmod + installShellFiles + ]; + # Trigger a overlay run to load the overlayfs module, required by ./configure + preConfigure = '' + mkdir lower upper work merged + unshare -r --mount mount -t overlay overlay -o lowerdir=lower,upperdir=upper,workdir=work merged + rm -rf lower upper work merged + ''; installPhase = '' runHook preInstall install -Dt $out/bin try + install -Dt $out/bin utils/try-commit + install -Dt $out/bin utils/try-summary wrapProgram $out/bin/try --prefix PATH : ${ lib.makeBinPath [ - fuse-overlayfs util-linux + mergerfs + attr ] } + installManPage man/try.1.gz + installShellCompletion --bash --name try.bash completions/try.bash runHook postInstall ''; + doInstallCheck = true; + nativeInstallCheckInputs = [ + versionCheckHook + ]; + preVersionCheck = '' + export version=0.2.0 + ''; + versionCheckProgramArg = "-v"; meta = with lib; { homepage = "https://github.com/binpash/try"; description = "Lets you run a command and inspect its effects before changing your live system"; mainProgram = "try"; - maintainers = with maintainers; [ pasqui23 ]; + maintainers = with maintainers; [ + pasqui23 + ezrizhu + ]; license = with licenses; [ mit ]; platforms = platforms.linux; };