Some checks failed
Periodic Merges (6h) / master → staging-nixos (push) Failing after 12m50s
Periodic Merges (6h) / master → staging-next (push) Failing after 12m54s
Periodic Merges (24h) / merge-base(master,staging) → haskell-updates (push) Failing after 11m54s
Periodic Merges (6h) / staging-next → staging (push) Failing after 12m13s
Periodic Merges (24h) / staging-next-25.05 → staging-25.05 (push) Failing after 13m24s
Periodic Merges (24h) / release-25.05 → staging-next-25.05 (push) Failing after 14m28s
77 lines
1.7 KiB
Nix
77 lines
1.7 KiB
Nix
{
|
|
stdenv,
|
|
autoreconfHook,
|
|
lib,
|
|
fetchFromGitHub,
|
|
util-linux,
|
|
mergerfs,
|
|
attr,
|
|
makeWrapper,
|
|
pandoc,
|
|
coreutils,
|
|
installShellFiles,
|
|
versionCheckHook,
|
|
}:
|
|
stdenv.mkDerivation {
|
|
pname = "try";
|
|
version = "0.2.0-unstable-2025-02-25";
|
|
|
|
src = fetchFromGitHub {
|
|
owner = "binpash";
|
|
repo = "try";
|
|
rev = "67052d8f20725f3cdc22ffaec33f7b7c14f1eb6b";
|
|
hash = "sha256-8mfCmqN50pRAeNTJUlRVrRQulWon4b2OL4Ug/ygBhB0=";
|
|
};
|
|
|
|
# skip TRY_REQUIRE_PROG as it detects executable dependencies by running it
|
|
postPatch = ''
|
|
sed -i '/^AC_DEFUN(\[TRY_REQUIRE_PROG\]/,/^])$/c\AC_DEFUN([TRY_REQUIRE_PROG], [])' configure.ac
|
|
'';
|
|
|
|
nativeBuildInputs = [
|
|
makeWrapper
|
|
autoreconfHook
|
|
pandoc
|
|
installShellFiles
|
|
];
|
|
|
|
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 [
|
|
coreutils
|
|
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 = {
|
|
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 lib.maintainers; [
|
|
pasqui23
|
|
ezrizhu
|
|
];
|
|
license = with lib.licenses; [ mit ];
|
|
platforms = lib.platforms.linux;
|
|
};
|
|
}
|