-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathpackage.nix
More file actions
30 lines (25 loc) · 761 Bytes
/
package.nix
File metadata and controls
30 lines (25 loc) · 761 Bytes
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
{ lib, pkgs, stdenv, ... }:
stdenv.mkDerivation {
name = "ts";
src = ./.;
buildInputs = [ pkgs.pcre2 ];
nativeBuildInputs = [ pkgs.installShellFiles pkgs.pkg-config ];
buildPhase = ''
make clean
make
'';
installPhase = ''
mkdir -p $out/bin
make INSTALL_BINDIR=$out/bin install
mkdir -p $out/share/man/man1
cp ./share/man/man1/ts.1 $out/share/man/man1/ts.1
sed -i "s/@VERSION@/1.0/g" $out/share/man/man1/ts.1
sed -i "s/@DATE@/$(date +%FT%T)/g" $out/share/man/man1/ts.1
installShellCompletion --zsh --name _ts ./share/zsh/site-functions/_ts
'';
meta = {
description = "Timestamp standard input.";
license = lib.licenses.gpl2;
maintainers = [ lib.mkMaintainer { name = "frobware"; } ];
};
}