nixpkgs mirror (for testing)
github.com/NixOS/nixpkgs
nix
1{ stdenv
2, fetchFromGitHub
3, glib
4, lib
5, writeScriptBin
6}:
7let
8 # make install will use dconf to find desktop background file uri.
9 # consider adding an args to allow specify pictures manually.
10 # https://github.com/daniruiz/flat-remix-gnome/blob/20221107/Makefile#L38
11 fake-dconf = writeScriptBin "dconf" "echo -n";
12in
13stdenv.mkDerivation rec {
14 pname = "flat-remix-gnome";
15 version = "20221107";
16
17 src = fetchFromGitHub {
18 owner = "daniruiz";
19 repo = pname;
20 rev = version;
21 hash = "sha256-5V3ECbQe3/5bhHnMR1pzvehs1eh0u9U7E1voDiqo9cY=";
22 };
23
24 nativeBuildInputs = [ glib fake-dconf ];
25 makeFlags = [ "PREFIX=$(out)" ];
26
27 # make install will back up this file, it will fail if the file doesn't exist.
28 # https://github.com/daniruiz/flat-remix-gnome/blob/20221107/Makefile#L56
29 preInstall = ''
30 mkdir -p $out/share/gnome-shell/
31 touch $out/share/gnome-shell/gnome-shell-theme.gresource
32 '';
33
34 postInstall = ''
35 rm $out/share/gnome-shell/gnome-shell-theme.gresource.old
36 '';
37
38 meta = with lib; {
39 description = "GNOME Shell theme inspired by material design.";
40 homepage = "https://drasite.com/flat-remix-gnome";
41 license = licenses.cc-by-sa-40;
42 platforms = platforms.linux;
43 maintainers = [ maintainers.vanilla ];
44 };
45}