Files
nixpkgs/pkgs/by-name/ti/timetrap/package.nix
Dark Steveneq 646b892680
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
push sheeet
2025-10-09 14:15:47 +02:00

68 lines
1.3 KiB
Nix

{
stdenv,
lib,
ruby_3_4,
bundlerEnv,
bundlerApp,
bundlerUpdateScript,
installShellFiles,
}:
let
ttBundlerApp = (bundlerApp.override { ruby = ruby_3_4; }) {
pname = "timetrap";
gemdir = ./.;
exes = [
"t"
"timetrap"
];
passthru.updateScript = bundlerUpdateScript "timetrap";
};
ttGem = (bundlerEnv.override { ruby = ruby_3_4; }) {
pname = "timetrap";
gemdir = ./.;
};
in
stdenv.mkDerivation {
name = "timetrap";
dontUnpack = true;
nativeBuildInputs = [ installShellFiles ];
installPhase = ''
mkdir $out
cd $out
mkdir bin; pushd bin
ln -vs ${ttBundlerApp}/bin/t
ln -vs ${ttBundlerApp}/bin/timetrap
popd
for c in t timetrap; do
installShellCompletion --cmd $c --bash ${ttGem}/lib/ruby/gems/*/gems/timetrap*/completions/bash/*
installShellCompletion --cmd $c --zsh ${ttGem}/lib/ruby/gems/*/gems/timetrap*/completions/zsh/*
done
'';
meta = with lib; {
description = "Simple command line time tracker written in ruby";
homepage = "https://github.com/samg/timetrap";
license = licenses.mit;
maintainers = with maintainers; [
jerith666
manveru
nicknovitski
];
platforms = platforms.unix;
};
passthru = {
updateScript = ttBundlerApp.passthru.updateScript;
};
}