nixpkgs/pkgs/data/themes/pop-gtk/default.nix
Profpatsch 4a7f99d55d treewide: with stdenv.lib; in meta -> with lib;
Part of: https://github.com/NixOS/nixpkgs/issues/108938

meta = with stdenv.lib;

is a widely used pattern. We want to slowly remove
the `stdenv.lib` indirection and encourage people
to use `lib` directly. Thus let’s start with the meta
field.

This used a rewriting script to mostly automatically
replace all occurances of this pattern, and add the
`lib` argument to the package header if it doesn’t
exist yet.

The script in its current form is available at
https://cs.tvl.fyi/depot@2f807d7f141068d2d60676a89213eaa5353ca6e0/-/blob/users/Profpatsch/nixpkgs-rewriter/default.nix
2021-01-11 10:38:22 +01:00

64 lines
1.2 KiB
Nix

{ lib, stdenv
, fetchFromGitHub
, meson
, ninja
, sassc
, gtk3
, inkscape
, optipng
, gtk-engine-murrine
, gdk-pixbuf
, librsvg
, python3
}:
stdenv.mkDerivation rec {
pname = "pop-gtk-theme";
version = "2020-06-30";
src = fetchFromGitHub {
owner = "pop-os";
repo = "gtk-theme";
rev = "8c31be9f9257375bf7a049069cb4ecbac7d281a1";
sha256 = "16dxxazpllcxlbiblynqq4b65wfn9k1jab8dl69l819v73z303ky";
};
nativeBuildInputs = [
meson
ninja
sassc
gtk3
inkscape
optipng
python3
];
buildInputs = [
gdk-pixbuf
librsvg
];
propagatedUserEnvPkgs = [
gtk-engine-murrine
];
postPatch = ''
patchShebangs .
for file in $(find -name render-\*.sh); do
substituteInPlace "$file" \
--replace 'INKSCAPE="/usr/bin/inkscape"' \
'INKSCAPE="${inkscape}/bin/inkscape"' \
--replace 'OPTIPNG="/usr/bin/optipng"' \
'OPTIPNG="${optipng}/bin/optipng"'
done
'';
meta = with lib; {
description = "System76 Pop GTK+ Theme";
homepage = "https://github.com/pop-os/gtk-theme";
license = with licenses; [ gpl3 lgpl21 cc-by-sa-40 ];
platforms = platforms.linux;
maintainers = with maintainers; [ elyhaka ];
};
}