From 292d4464001063ee5319e30d923e8851f8cc5f6f Mon Sep 17 00:00:00 2001 From: Will Dietz Date: Mon, 1 Oct 2018 09:25:52 -0500 Subject: [PATCH 1/2] tetra-gtk-theme: init at 1.6 --- pkgs/misc/themes/tetra/default.nix | 39 ++++++++++++++++++++++++++++++ pkgs/top-level/all-packages.nix | 2 ++ 2 files changed, 41 insertions(+) create mode 100644 pkgs/misc/themes/tetra/default.nix diff --git a/pkgs/misc/themes/tetra/default.nix b/pkgs/misc/themes/tetra/default.nix new file mode 100644 index 000000000000..f899ddd8717d --- /dev/null +++ b/pkgs/misc/themes/tetra/default.nix @@ -0,0 +1,39 @@ +{ stdenv, fetchFromGitHub, gtk3, sassc, optipng, inkscape, which }: + +let + pname = "tetra-gtk-theme"; +in + +stdenv.mkDerivation rec { + name = "${pname}-${version}"; + version = "0.1.6"; + + src = fetchFromGitHub { + owner = "hrdwrrsk"; + repo = pname; + rev = version; + sha256 = "0jdgj7ac9842cgrjnzdqlf1f3hlf9v7xk377pvqcz2lwcr1dfaxz"; + }; + + preBuild = '' + # Shut up inkscape's warnings + export HOME="$NIX_BUILD_ROOT" + ''; + + nativeBuildInputs = [ sassc optipng inkscape which ]; + buildInputs = [ gtk3 ]; + + postPatch = "patchShebangs ."; + + buildPhase = "./render-assets.sh"; + + installPhase = "./install.sh -d $out"; + + meta = with stdenv.lib; { + description = "Adwaita-based gtk+ theme with design influence from elementary OS and Vertex gtk+ theme."; + homepage = https://github.com/hrdwrrsk/tetra-gtk-theme; + license = licenses.gpl3; + maintainers = with maintainers; [ dtzWill ]; + platforms = platforms.linux; + }; +} diff --git a/pkgs/top-level/all-packages.nix b/pkgs/top-level/all-packages.nix index e4177bce4d22..23b2b7ac91b0 100644 --- a/pkgs/top-level/all-packages.nix +++ b/pkgs/top-level/all-packages.nix @@ -22157,6 +22157,8 @@ with pkgs; tetex = callPackage ../tools/typesetting/tex/tetex { libpng = libpng12; }; + tetra-gtk-theme = callPackage ../misc/themes/tetra { }; + tewi-font = callPackage ../data/fonts/tewi {}; texFunctions = callPackage ../tools/typesetting/tex/nix pkgs; From 894872c96ab4e800b538ba28a19826908a4912dd Mon Sep 17 00:00:00 2001 From: Will Dietz Date: Mon, 1 Oct 2018 09:29:28 -0500 Subject: [PATCH 2/2] tetra-gtk-theme: simplify a bit --- pkgs/misc/themes/tetra/default.nix | 11 ++++++----- 1 file changed, 6 insertions(+), 5 deletions(-) diff --git a/pkgs/misc/themes/tetra/default.nix b/pkgs/misc/themes/tetra/default.nix index f899ddd8717d..079cf19440bb 100644 --- a/pkgs/misc/themes/tetra/default.nix +++ b/pkgs/misc/themes/tetra/default.nix @@ -1,4 +1,4 @@ -{ stdenv, fetchFromGitHub, gtk3, sassc, optipng, inkscape, which }: +{ stdenv, fetchFromGitHub, gtk3, sassc }: let pname = "tetra-gtk-theme"; @@ -20,14 +20,15 @@ stdenv.mkDerivation rec { export HOME="$NIX_BUILD_ROOT" ''; - nativeBuildInputs = [ sassc optipng inkscape which ]; + nativeBuildInputs = [ sassc ]; buildInputs = [ gtk3 ]; postPatch = "patchShebangs ."; - buildPhase = "./render-assets.sh"; - - installPhase = "./install.sh -d $out"; + installPhase = '' + mkdir -p $out/share/themes + ./install.sh -d $out/share/themes + ''; meta = with stdenv.lib; { description = "Adwaita-based gtk+ theme with design influence from elementary OS and Vertex gtk+ theme.";