2021-01-11 08:54:33 +01:00
|
|
|
{ lib, stdenv, fetchFromGitHub, fetchpatch, makeFontsConf
|
2020-09-10 20:38:25 +02:00
|
|
|
, inkscape, xcursorgen, bc }:
|
2018-07-31 23:47:31 +02:00
|
|
|
|
|
|
|
stdenv.mkDerivation rec {
|
2019-03-11 01:24:39 +01:00
|
|
|
pname = "capitaine-cursors";
|
2020-03-08 20:21:28 +01:00
|
|
|
version = "4";
|
2018-07-31 23:47:31 +02:00
|
|
|
|
|
|
|
src = fetchFromGitHub {
|
|
|
|
owner = "keeferrourke";
|
2019-03-11 01:24:39 +01:00
|
|
|
repo = pname;
|
2018-07-31 23:47:31 +02:00
|
|
|
rev = "r${version}";
|
2020-03-08 20:21:28 +01:00
|
|
|
sha256 = "0652ydy73x29z7wc6ccyqihmfg4bk0ksl7yryycln6c7i0iqfmc9";
|
2018-07-31 23:47:31 +02:00
|
|
|
};
|
|
|
|
|
2020-11-02 21:10:53 +01:00
|
|
|
patches = [
|
|
|
|
# Fixes the build on inscape => 1.0, without this it generates empty cursor files
|
|
|
|
(fetchpatch {
|
|
|
|
name = "inkscape-1.0-compat";
|
|
|
|
url = "https://github.com/keeferrourke/capitaine-cursors/commit/9da0b53e6098ed023c5c24c6ef6bfb1f68a79924.patch";
|
|
|
|
sha256 = "0lx5i60ahy6a2pir4zzlqn5lqsv6claqg8mv17l1a028h9aha3cv";
|
|
|
|
})
|
|
|
|
];
|
|
|
|
|
2018-07-31 23:47:31 +02:00
|
|
|
postPatch = ''
|
|
|
|
patchShebangs .
|
|
|
|
'';
|
|
|
|
|
2020-11-02 21:10:53 +01:00
|
|
|
# Complains about not being able to find the fontconfig config file otherwise
|
|
|
|
FONTCONFIG_FILE = makeFontsConf { fontDirectories = [ ]; };
|
|
|
|
|
|
|
|
buildInputs = [
|
2020-09-10 20:38:25 +02:00
|
|
|
inkscape
|
2018-07-31 23:47:31 +02:00
|
|
|
xcursorgen
|
2020-03-08 20:21:28 +01:00
|
|
|
bc
|
2018-07-31 23:47:31 +02:00
|
|
|
];
|
|
|
|
|
|
|
|
buildPhase = ''
|
2020-03-08 20:21:28 +01:00
|
|
|
for variant in dark light ; do
|
2018-07-31 23:47:31 +02:00
|
|
|
# https://github.com/NixOS/nixpkgs/blob/master/pkgs/data/fonts/emojione/default.nix#L16
|
2020-03-08 20:21:28 +01:00
|
|
|
HOME="$NIX_BUILD_ROOT" ./build.sh --max-dpi xhd --type $variant
|
|
|
|
done
|
2018-07-31 23:47:31 +02:00
|
|
|
'';
|
|
|
|
|
|
|
|
installPhase = ''
|
|
|
|
install -dm 0755 $out/share/icons
|
2020-03-08 20:21:28 +01:00
|
|
|
cp -pr dist/dark $out/share/icons/capitaine-cursors
|
|
|
|
cp -pr dist/light $out/share/icons/capitaine-cursors-white
|
2018-07-31 23:47:31 +02:00
|
|
|
'';
|
|
|
|
|
2021-01-11 08:54:33 +01:00
|
|
|
meta = with lib; {
|
2020-11-02 21:10:53 +01:00
|
|
|
description = "An x-cursor theme inspired by macOS and based on KDE Breeze";
|
2020-03-08 20:21:28 +01:00
|
|
|
homepage = "https://github.com/keeferrourke/capitaine-cursors";
|
2018-07-31 23:47:31 +02:00
|
|
|
license = licenses.lgpl3;
|
|
|
|
platforms = platforms.linux;
|
2020-11-02 21:10:53 +01:00
|
|
|
maintainers = with maintainers; [ eadwu ];
|
2018-07-31 23:47:31 +02:00
|
|
|
};
|
|
|
|
}
|