4a7f99d55d
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
52 lines
971 B
Nix
52 lines
971 B
Nix
{ lib, stdenv
|
|
, fetchFromGitLab
|
|
, meson
|
|
, ninja
|
|
, gettext
|
|
, pkg-config
|
|
, libxml2
|
|
, gtk3
|
|
, libportal
|
|
, wrapGAppsHook
|
|
}:
|
|
|
|
stdenv.mkDerivation rec {
|
|
pname = "gcolor3";
|
|
version = "2.4.0";
|
|
|
|
src = fetchFromGitLab {
|
|
domain = "gitlab.gnome.org";
|
|
owner = "World";
|
|
repo = "gcolor3";
|
|
rev = "v${version}";
|
|
sha256 = "rHIAjk2m3Lkz11obgNZaapa1Zr2GDH7XzgzuAJmq+MU=";
|
|
};
|
|
|
|
nativeBuildInputs = [
|
|
meson
|
|
ninja
|
|
gettext
|
|
pkg-config
|
|
libxml2 # xml-stripblanks preprocessing of GResource
|
|
wrapGAppsHook
|
|
];
|
|
|
|
buildInputs = [
|
|
gtk3
|
|
libportal
|
|
];
|
|
|
|
postPatch = ''
|
|
chmod +x meson_install.sh # patchShebangs requires executable file
|
|
patchShebangs meson_install.sh
|
|
'';
|
|
|
|
meta = with lib; {
|
|
description = "A simple color chooser written in GTK3";
|
|
homepage = "https://gitlab.gnome.org/World/gcolor3";
|
|
license = licenses.gpl2Plus;
|
|
maintainers = with maintainers; [ jtojnar ];
|
|
platforms = platforms.unix;
|
|
};
|
|
}
|