[user/malte] Update gtk theme/icons

This commit is contained in:
Malte Tammena 2022-05-06 22:59:56 +02:00
parent 03f6e8ae06
commit c8bbfd4dd9
4 changed files with 30 additions and 38 deletions

View file

@ -286,22 +286,6 @@
"url": "https://git.sr.ht/~megamanmalte/GLaDOS"
}
},
"gruvbox-material-gtk": {
"flake": false,
"locked": {
"lastModified": 1627185282,
"narHash": "sha256-1O34p9iZelqRFBloOSZkxV0Z/7Jffciptpj3fwXPHbc=",
"owner": "sainnhe",
"repo": "gruvbox-material-gtk",
"rev": "cc255d43322ad646bb35924accb0778d5e959626",
"type": "github"
},
"original": {
"owner": "sainnhe",
"repo": "gruvbox-material-gtk",
"type": "github"
}
},
"home-manager": {
"inputs": {
"nixpkgs": [
@ -770,7 +754,6 @@
"fend": "fend",
"fenix": "fenix",
"glados": "glados",
"gruvbox-material-gtk": "gruvbox-material-gtk",
"home-manager": "home-manager",
"hydra": "hydra",
"mensa": "mensa",

View file

@ -55,10 +55,6 @@
url = "github:NixOS/nix/5fe4fe823c193cbb7bfa05a468de91eeab09058d";
};
gruvbox-material-gtk = {
url = "github:sainnhe/gruvbox-material-gtk";
flake = false;
};
rip = {
url = "github:nivekuil/rip";
flake = false;

View file

@ -2,34 +2,47 @@
lib,
stdenv,
fetchFromGitHub,
gtk3,
breeze-icons,
hicolor-icon-theme,
hiDPI ? false,
}: let
lock = builtins.fromJSON (builtins.readFile ../flake.lock);
name = "gruvbox-material-gtk";
rev = "cc255d43322ad646bb35924accb0778d5e959626";
sha256 = "1O34p9iZelqRFBloOSZkxV0Z/7Jffciptpj3fwXPHbc=";
variant =
if hiDPI
then "Gruvbox-Material-Dark-HIDPI"
else "Gruvbox-Material-Dark";
in
stdenv.mkDerivation rec {
pname = lock.nodes.gruvbox-material-gtk.locked.repo;
version = lock.nodes.gruvbox-material-gtk.locked.rev;
stdenv.mkDerivation {
pname = name;
version = rev;
src = fetchFromGitHub {
owner = lock.nodes.gruvbox-material-gtk.locked.owner;
repo = lock.nodes.gruvbox-material-gtk.locked.repo;
rev = lock.nodes.gruvbox-material-gtk.locked.rev;
sha256 = lock.nodes.gruvbox-material-gtk.locked.narHash;
inherit rev sha256;
owner = "TheGreatMcPain";
repo = name;
};
nativeBuildInputs = [gtk3];
propagatedBuildInputs = [breeze-icons hicolor-icon-theme];
installPhase = ''
mkdir -p $out/share/themes/gruvbox-material
rm -rf README.md LICENSE demo.png icons
cp -r themes/${variant}/* $out/share/themes/gruvbox-material
rm -rf README.md LICENSE demo.png
mkdir -p $out/share/themes/Gruvbox-Material-Dark
cp -r themes/${variant}/* $out/share/themes/Gruvbox-Material-Dark
mkdir -p $out/share/icons/Gruvbox-Material-Dark
cp -r icons/Gruvbox-Material-Dark/* $out/share/icons/Gruvbox-Material-Dark
gtk-update-icon-cache $out/share/icons/Gruvbox-Material-Dark
'';
dontDropIconThemeCache = true;
meta = with lib; {
description = "Gruvbox Material for GTK";
homepage = "https://github.com/sainnhe/gruvbox-material-gtk";
homepage = "https://github.com/TheGreatMcPain/gruvbox-material-gtk";
license = licenses.mit;
platforms = platforms.unix;
maintainers = [];

View file

@ -5,6 +5,7 @@
...
}: let
hiDPI = nixosConfig.hardware.video.hidpi.enable;
pkg = pkgs.callPackage ../../pkgs/gruvbox-material-gtk.nix {inherit hiDPI;};
in rec {
home.packages = with pkgs; [
numix-cursor-theme
@ -14,13 +15,12 @@ in rec {
gtk = {
enable = true;
theme = {
package =
pkgs.callPackage ../../pkgs/gruvbox-material-gtk.nix {inherit hiDPI;};
name = "gruvbox-material";
package = pkg;
name = "Gruvbox-Material-Dark";
};
iconTheme = {
package = pkgs.paper-icon-theme;
name = "Paper-Mono-Dark";
package = pkg;
name = "Gruvbox-Material-Dark";
};
gtk2 = {