/
default.nix
48 lines (41 loc) · 1.07 KB
/
default.nix
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
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
{ lib
, fetchurl
, stdenvNoCC
, coreutils
, bash
, binSh ? "${bash}/bin/bash"
, gnused
, less
}:
stdenvNoCC.mkDerivation rec {
pname = "colorless";
version = "109";
src = fetchurl {
url = "http://software.kimmo.suominen.com/${pname}-${version}.tar.gz";
sha256 = "039a140fa11cf153cc4d03e4f753b7ff142cab88ff116b7600ccf9edee81927c";
};
makeFlags = [
"TOOLPATH=${lib.makeBinPath [ coreutils gnused less ]}"
"PREFIX=$(out)"
"SHELL=${binSh}"
];
preInstall = ''
mkdir -p $out/bin $out/share/man/man1
'';
postInstall = ''
install -Dm644 -t $out/share/doc/colorless LICENSE README.md
'';
strictDeps = true;
meta = with lib; {
homepage = "https://kimmo.suominen.com/sw/colorless";
description = "Enable colorised command output and pipe it to less";
longDescription = ''
colorless is a wrapper that enables colorised output of commands and
pipes the output to less(1).
'';
license = licenses.bsd2;
maintainers = with maintainers; [ suominen ];
platforms = platforms.unix;
mainProgram = "colorless";
};
}