@@ -0,0 +1,36 @@
1+{ stdenv, fetchFromGitHub, theme, lib }:
2+
3+stdenv.mkDerivation rec {
4+ pname = "gtk-theme-framework";
5+ version = "0.2.3";
6+
7+ src = fetchFromGitHub {
8+ owner = "jaxwilko";
9+ repo = pname;
10+ rev = "v${version}";
11+ sha256 = "1z5s5rsgiypanf2z0avaisbflnvwrc8aiy5qskrsvbbaja63jy3s";
12+ };
13+
14+ postPatch = ''
15+ substituteInPlace main.sh \
16+ --replace "#!/usr/bin/env bash" "#!/bin/sh"
17+
18+ substituteInPlace scripts/install.sh \
19+ --replace "#!/usr/bin/env bash" "#!/bin/sh"
20+ '';
21+
22+ installPhase = ''
23+ runHook preInstall
24+
25+ mkdir -p $out/share/themes
26+ ./main.sh -i -t ${theme} -d $out/share/themes
27+
28+ runHook postInstall
29+ '';
30+
31+ meta = with lib; {
32+ homepage = "https://github.com/jaxwilko/gtk-theme-framework";
33+ license = licenses.gpl3Only;
34+ maintainers = with maintainers; [ flexagoon ];
35+ };
36+}