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
58 lines
1.3 KiB
Nix
58 lines
1.3 KiB
Nix
{
|
|
fetchFromGitHub,
|
|
gawk,
|
|
lib,
|
|
runCommand,
|
|
stdenvNoCC,
|
|
writableTmpDirAsHomeHook,
|
|
}:
|
|
|
|
stdenvNoCC.mkDerivation (finalAttrs: {
|
|
pname = "goto";
|
|
version = "2.1.0-unstable-2020-11-15";
|
|
|
|
src = fetchFromGitHub {
|
|
owner = "iridakos";
|
|
repo = "goto";
|
|
# no tags
|
|
rev = "b7fda54e0817b9cb47e22a78bd00b4571011cf58";
|
|
hash = "sha256-dUxim8LLb+J9cI7HySkmC2DIWbWAKSsH/cTVXmt8zRo=";
|
|
};
|
|
|
|
strictDeps = true;
|
|
|
|
buildInputs = [ gawk ];
|
|
|
|
postInstall = ''
|
|
install -Dm644 goto.sh -t $out/share/
|
|
'';
|
|
|
|
passthru.tests.basic-usage =
|
|
runCommand "goto-basic-usage"
|
|
{
|
|
nativeBuildInputs = [ writableTmpDirAsHomeHook ];
|
|
}
|
|
''
|
|
# Mock `complete` since the builder `pkgs.bash` is not interactive.
|
|
complete() { return; }
|
|
|
|
source ${finalAttrs.finalPackage}/share/goto.sh
|
|
|
|
goto --register pwd .
|
|
cd /
|
|
goto pwd
|
|
goto --unregister pwd
|
|
goto --list
|
|
|
|
touch $out
|
|
'';
|
|
|
|
meta = {
|
|
description = "Alias and navigate to directories with tab completion";
|
|
homepage = "https://github.com/iridakos/goto";
|
|
changelog = "https://github.com/iridakos/goto/blob/${finalAttrs.src.rev}/CHANGELOG.md";
|
|
license = lib.licenses.mit;
|
|
maintainers = [ lib.maintainers.bmrips ];
|
|
};
|
|
})
|