Files
nixpkgs/pkgs/by-name/xc/xcursor-pro/package.nix
Dark Steveneq 646b892680
Some checks failed
Periodic Merges (6h) / master → staging-nixos (push) Failing after 12m50s
Periodic Merges (6h) / master → staging-next (push) Failing after 12m54s
Periodic Merges (24h) / merge-base(master,staging) → haskell-updates (push) Failing after 11m54s
Periodic Merges (6h) / staging-next → staging (push) Failing after 12m13s
Periodic Merges (24h) / staging-next-25.05 → staging-25.05 (push) Failing after 13m24s
Periodic Merges (24h) / release-25.05 → staging-next-25.05 (push) Failing after 14m28s
push sheeet
2025-10-09 14:15:47 +02:00

55 lines
1.3 KiB
Nix

{
stdenvNoCC,
lib,
fetchurl,
variants ? [ ],
}:
let
sources = import ./sources.nix;
knownVariants = builtins.attrNames sources;
selectedVariants =
if (variants == [ ]) then
knownVariants
else
let
unknownVariants = lib.subtractLists knownVariants variants;
in
if (unknownVariants != [ ]) then
throw "Unknown variant(s): ${lib.concatStringsSep unknownVariants}"
else
variants;
in
stdenvNoCC.mkDerivation (finalAttrs: {
pname = "xcursor-pro";
version = "2.0.2";
srcs = map (variant: fetchurl { inherit (sources.${variant}) url sha256; }) selectedVariants;
sourceRoot = ".";
installPhase = ''
runHook preInstall
for theme in XCursor-Pro-{${lib.concatStringsSep "," selectedVariants}}; do
mkdir -p $out/share/icons/$theme/cursors
cp -a $theme/cursors/* $out/share/icons/$theme/cursors/
install -m644 $theme/index.theme $out/share/icons/$theme/index.theme
done
runHook postInstall
'';
passthru.updateScript = ./update.sh;
meta = {
homepage = "https://github.com/ful1e5/XCursor-pro";
description = "Modern XCursors";
license = lib.licenses.gpl3;
platforms = lib.platforms.unix;
maintainers = with lib.maintainers; [
lactose
midischwarz12
];
};
})