1
0
Fork 1
mirror of https://github.com/NixOS/nixpkgs.git synced 2024-09-11 15:08:33 +01:00
nixpkgs/pkgs/data/themes/flat-remix-gnome/default.nix
2021-11-13 18:50:47 +08:00

45 lines
1.2 KiB
Nix

{ stdenv
, fetchFromGitHub
, glib
, lib
, writeScriptBin
}:
let
# make install will use dconf to find desktop background file uri.
# consider adding an args to allow specify pictures manually.
# https://github.com/daniruiz/flat-remix-gnome/blob/20211113/Makefile#L38
fake-dconf = writeScriptBin "dconf" "echo -n";
in
stdenv.mkDerivation rec {
pname = "flat-remix-gnome";
version = "20211113";
src = fetchFromGitHub {
owner = "daniruiz";
repo = pname;
rev = version;
hash = "sha256-A9aiaS4CXRpr4+Y8+tyvWYRbR9STFS9TuplGksPfqtU=";
};
nativeBuildInputs = [ glib fake-dconf ];
makeFlags = [ "PREFIX=$(out)" ];
preInstall = ''
# make install will back up this file, it will fail if the file doesn't exist.
# https://github.com/daniruiz/flat-remix-gnome/blob/20211113/Makefile#L56
mkdir -p $out/share/gnome-shell/
touch $out/share/gnome-shell/gnome-shell-theme.gresource
'';
postInstall = ''
rm $out/share/gnome-shell/gnome-shell-theme.gresource.old
'';
meta = with lib; {
description = "GNOME Shell theme inspired by material design.";
homepage = "https://drasite.com/flat-remix-gnome";
license = licenses.cc-by-sa-40;
platforms = platforms.linux;
maintainers = [ maintainers.vanilla ];
};
}