nixpkgs/pkgs/applications/office/timetrap/default.nix

Ignoring revisions in .git-blame-ignore-revs. Click here to bypass and see the normal blame view.

56 lines
1.1 KiB
Nix
Raw Normal View History

2023-08-30 19:10:58 +00:00
{ stdenv
, lib
, pkgs
, bundlerEnv
, bundlerApp
, bundlerUpdateScript
, installShellFiles
}:
2016-05-30 03:02:41 +00:00
2023-08-30 19:10:58 +00:00
let
ttBundlerApp = bundlerApp {
pname = "timetrap";
gemdir = ./.;
exes = [ "t" "timetrap" ];
2016-05-30 03:02:41 +00:00
2023-08-30 19:10:58 +00:00
passthru.updateScript = bundlerUpdateScript "timetrap";
};
ttGem = bundlerEnv {
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;
'';
2018-02-22 15:13:37 +00:00
meta = with lib; {
description = "A simple command line time tracker written in ruby";
homepage = "https://github.com/samg/timetrap";
2019-04-30 16:55:17 +00:00
license = licenses.mit;
maintainers = with maintainers; [ jerith666 manveru nicknovitski ];
2019-04-30 16:55:17 +00:00
platforms = platforms.unix;
2016-05-30 03:02:41 +00:00
};
}