1
0
Fork 1
mirror of https://github.com/NixOS/nixpkgs.git synced 2024-11-20 12:42:24 +00:00

Merge pull request #131145 from romildo/upd.mojave-gtk-theme

This commit is contained in:
Sandro 2021-07-26 07:30:50 +00:00 committed by GitHub
commit dbd3701383
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23

View file

@ -1,15 +1,27 @@
{ lib, stdenv, fetchFromGitHub, fetchurl, glib, gtk-engine-murrine, gtk_engines, inkscape, optipng, sassc, which }:
{ lib
, stdenv
, fetchFromGitHub
, fetchurl
, glib
, gtk-engine-murrine
, gtk_engines
, inkscape
, jdupes
, optipng
, sassc
, which
}:
stdenv.mkDerivation rec {
pname = "mojave-gtk-theme";
version = "2020-11-29";
version = "2021-07-20";
srcs = [
(fetchFromGitHub {
owner = "vinceliuice";
repo = pname;
rev = version;
sha256 = "07lcg28y0scpii29j85343kmcga4wyaayjpx9a118z838mnvb757";
sha256 = "08j70kmjhvh06c3ahcracarrfq4vpy0zsp6zkcivbw4nf3bzp2zc";
})
(fetchurl {
url = "https://github.com/vinceliuice/Mojave-gtk-theme/raw/11741a99d96953daf9c27e44c94ae50a7247c0ed/macOS_Mojave_Wallpapers.tar.xz";
@ -19,40 +31,61 @@ stdenv.mkDerivation rec {
sourceRoot = "source";
nativeBuildInputs = [ glib inkscape optipng sassc which ];
nativeBuildInputs = [
glib
inkscape
jdupes
optipng
sassc
which
];
buildInputs = [ gtk_engines ];
buildInputs = [
gtk_engines
];
propagatedUserEnvPkgs = [ gtk-engine-murrine ];
propagatedUserEnvPkgs = [
gtk-engine-murrine
];
# These fixup steps are slow and unnecessary.
dontPatchELF = true;
dontRewriteSymlinks = true;
postPatch = ''
patchShebangs .
for f in render-assets.sh \
src/assets/gtk-2.0/render-assets.sh \
src/assets/gtk-3.0/common-assets/render-assets.sh \
src/assets/gtk-3.0/windows-assets/render-assets.sh \
src/assets/metacity-1/render-assets.sh \
src/assets/xfwm4/render-assets.sh
for f in \
render-assets.sh \
src/assets/cinnamon/thumbnails/render-thumbnails.sh \
src/assets/gtk-2.0/render-assets.sh \
src/assets/gtk/common-assets/render-assets.sh \
src/assets/gtk/thumbnails/render-thumbnails.sh \
src/assets/gtk/windows-assets/render-alt-assets.sh \
src/assets/gtk/windows-assets/render-alt-small-assets.sh \
src/assets/gtk/windows-assets/render-assets.sh \
src/assets/gtk/windows-assets/render-small-assets.sh \
src/assets/metacity-1/render-assets.sh \
src/assets/xfwm4/render-assets.sh
do
substituteInPlace $f \
--replace /usr/bin/inkscape ${inkscape}/bin/inkscape \
--replace /usr/bin/optipng ${optipng}/bin/optipng
done
# Shut up inkscape's warnings
export HOME="$NIX_BUILD_ROOT"
'';
installPhase = ''
name= ./install.sh -d $out/share/themes
runHook preInstall
name= ./install.sh --theme all --dest $out/share/themes
install -D -t $out/share/wallpapers ../"macOS Mojave Wallpapers"/*
jdupes -l -r $out/share
runHook postInstall
'';
meta = with lib; {
description = "Mac OSX Mojave like theme for GTK based desktop environments";
homepage = "https://github.com/vinceliuice/Mojave-gtk-theme";
license = licenses.gpl3;
license = licenses.gpl3Only;
platforms = platforms.unix;
maintainers = [ maintainers.romildo ];
};