mirror of
https://github.com/NixOS/nixpkgs.git
synced 2024-11-26 23:52:33 +00:00
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
44 lines
1.2 KiB
Nix
44 lines
1.2 KiB
Nix
{ lib, stdenv, fetchFromGitHub, fetchpatch, inkscape, xcursorgen }:
|
|
|
|
stdenv.mkDerivation rec {
|
|
version = "1.1";
|
|
package-name = "numix-cursor-theme";
|
|
name = "${package-name}-${version}";
|
|
|
|
src = fetchFromGitHub {
|
|
owner = "numixproject";
|
|
repo = package-name;
|
|
rev = "v${version}";
|
|
sha256 = "0p8h48wsy3z5dz9vdnp01fpn6q8ky0h74l5qgixlip557bsa1spi";
|
|
};
|
|
|
|
nativeBuildInputs = [ inkscape xcursorgen ];
|
|
|
|
patches = [
|
|
# Remove when https://github.com/numixproject/numix-cursor-theme/pull/7 is merged
|
|
(fetchpatch {
|
|
url = "https://github.com/stephaneyfx/numix-cursor-theme/commit/3b647bf768cebb8f127b88e3786f6a9640460197.patch";
|
|
sha256 = "174kmhlvv76wwvndkys78aqc32051sqg3wzc0xg6b7by4agrbg76";
|
|
name = "support-inkscape-1-in-numix-cursor-theme.patch";
|
|
})
|
|
];
|
|
|
|
buildPhase = ''
|
|
patchShebangs .
|
|
HOME=$TMP ./build.sh
|
|
'';
|
|
|
|
installPhase = ''
|
|
install -dm 755 $out/share/icons
|
|
cp -dr --no-preserve='ownership' Numix-Cursor{,-Light} $out/share/icons/
|
|
'';
|
|
|
|
meta = with lib; {
|
|
description = "Numix cursor theme";
|
|
homepage = "https://numixproject.github.io";
|
|
license = licenses.gpl3;
|
|
platforms = platforms.all;
|
|
maintainers = with maintainers; [ offline ];
|
|
};
|
|
}
|