2021-07-23 00:01:41 +01:00
|
|
|
{ lib
|
|
|
|
, stdenv
|
|
|
|
, fetchFromGitHub
|
|
|
|
, fetchurl
|
|
|
|
, glib
|
|
|
|
, gtk-engine-murrine
|
|
|
|
, gtk_engines
|
|
|
|
, inkscape
|
|
|
|
, jdupes
|
|
|
|
, optipng
|
|
|
|
, sassc
|
|
|
|
, which
|
|
|
|
}:
|
2019-01-02 22:23:49 +00:00
|
|
|
|
|
|
|
stdenv.mkDerivation rec {
|
|
|
|
pname = "mojave-gtk-theme";
|
2021-07-23 00:01:41 +01:00
|
|
|
version = "2021-07-20";
|
2019-01-02 22:23:49 +00:00
|
|
|
|
2019-12-13 12:57:14 +00:00
|
|
|
srcs = [
|
|
|
|
(fetchFromGitHub {
|
|
|
|
owner = "vinceliuice";
|
|
|
|
repo = pname;
|
|
|
|
rev = version;
|
2021-07-23 00:01:41 +01:00
|
|
|
sha256 = "08j70kmjhvh06c3ahcracarrfq4vpy0zsp6zkcivbw4nf3bzp2zc";
|
2019-12-13 12:57:14 +00:00
|
|
|
})
|
|
|
|
(fetchurl {
|
|
|
|
url = "https://github.com/vinceliuice/Mojave-gtk-theme/raw/11741a99d96953daf9c27e44c94ae50a7247c0ed/macOS_Mojave_Wallpapers.tar.xz";
|
|
|
|
sha256 = "18zzkwm1kqzsdaj8swf0xby1n65gxnyslpw4lnxcx1rphip0rwf7";
|
|
|
|
})
|
|
|
|
];
|
|
|
|
|
|
|
|
sourceRoot = "source";
|
2019-01-02 22:23:49 +00:00
|
|
|
|
2021-07-23 00:01:41 +01:00
|
|
|
nativeBuildInputs = [
|
|
|
|
glib
|
|
|
|
inkscape
|
|
|
|
jdupes
|
|
|
|
optipng
|
|
|
|
sassc
|
|
|
|
which
|
|
|
|
];
|
2020-03-19 11:51:48 +00:00
|
|
|
|
2021-07-23 00:01:41 +01:00
|
|
|
buildInputs = [
|
|
|
|
gtk_engines
|
|
|
|
];
|
2019-01-02 22:23:49 +00:00
|
|
|
|
2021-07-23 00:01:41 +01:00
|
|
|
propagatedUserEnvPkgs = [
|
|
|
|
gtk-engine-murrine
|
|
|
|
];
|
|
|
|
|
|
|
|
# These fixup steps are slow and unnecessary.
|
|
|
|
dontPatchELF = true;
|
|
|
|
dontRewriteSymlinks = true;
|
2019-01-02 22:23:49 +00:00
|
|
|
|
2020-03-19 11:51:48 +00:00
|
|
|
postPatch = ''
|
2019-01-02 22:23:49 +00:00
|
|
|
patchShebangs .
|
2020-03-19 11:51:48 +00:00
|
|
|
|
2021-07-23 00:01:41 +01:00
|
|
|
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
|
2020-03-19 11:51:48 +00:00
|
|
|
do
|
|
|
|
substituteInPlace $f \
|
2020-09-10 19:38:25 +01:00
|
|
|
--replace /usr/bin/inkscape ${inkscape}/bin/inkscape \
|
2020-03-19 11:51:48 +00:00
|
|
|
--replace /usr/bin/optipng ${optipng}/bin/optipng
|
|
|
|
done
|
|
|
|
'';
|
|
|
|
|
|
|
|
installPhase = ''
|
2021-07-23 00:01:41 +01:00
|
|
|
runHook preInstall
|
|
|
|
name= ./install.sh --theme all --dest $out/share/themes
|
2019-12-13 12:57:14 +00:00
|
|
|
install -D -t $out/share/wallpapers ../"macOS Mojave Wallpapers"/*
|
2021-07-23 00:01:41 +01:00
|
|
|
jdupes -l -r $out/share
|
|
|
|
runHook postInstall
|
2019-01-02 22:23:49 +00:00
|
|
|
'';
|
|
|
|
|
2021-01-11 07:54:33 +00:00
|
|
|
meta = with lib; {
|
2019-01-02 22:23:49 +00:00
|
|
|
description = "Mac OSX Mojave like theme for GTK based desktop environments";
|
2020-04-01 02:11:51 +01:00
|
|
|
homepage = "https://github.com/vinceliuice/Mojave-gtk-theme";
|
2021-07-23 00:01:41 +01:00
|
|
|
license = licenses.gpl3Only;
|
2019-01-02 22:23:49 +00:00
|
|
|
platforms = platforms.unix;
|
|
|
|
maintainers = [ maintainers.romildo ];
|
|
|
|
};
|
|
|
|
}
|