try: 0.2.0 -> 0.2.0-unstable-2025-02-25

This commit is contained in:
Ezri Zhu
2025-05-16 14:17:03 -07:00
parent de3f4171df
commit d058b730b7
+45 -9
View File
@@ -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;
};