1{
2 lib,
3 stdenv,
4 fetchFromGitHub,
5 makeWrapper,
6 coreutils,
7 gawk,
8}:
9
10stdenv.mkDerivation rec {
11 pname = "theme-sh";
12 version = "1.1.5";
13
14 src = fetchFromGitHub {
15 owner = "lemnos";
16 repo = "theme.sh";
17 rev = "v${version}";
18 sha256 = "sha256-zDw8WGBzO4/HRCgN7yoUxT49ibTz+QkRa5WpBQbl1nI=";
19 };
20
21 nativeBuildInputs = [ makeWrapper ];
22
23 dontBuild = true;
24
25 installPhase = ''
26 runHook preInstall
27
28 mkdir -p $out/bin
29 install -Dm755 bin/theme.sh $out/bin
30 wrapProgram $out/bin/theme.sh \
31 --prefix PATH : ${
32 lib.makeBinPath [
33 coreutils
34 gawk
35 ]
36 }
37
38 runHook postInstall
39 '';
40
41 meta = with lib; {
42 description = "Script which lets you set your $terminal theme";
43 homepage = "https://github.com/lemnos/theme.sh";
44 license = licenses.mit;
45 platforms = platforms.all;
46 maintainers = with maintainers; [ figsoda ];
47 mainProgram = "theme.sh";
48 };
49}