Clone of https://github.com/NixOS/nixpkgs.git (to stress-test knotserver)
at python-updates 54 lines 1.3 kB view raw
1{ 2 stdenvNoCC, 3 lib, 4 fetchurl, 5 variants ? [ ], 6}: 7 8let 9 sources = import ./sources.nix; 10 knownVariants = builtins.attrNames sources; 11 selectedVariants = 12 if (variants == [ ]) then 13 knownVariants 14 else 15 let 16 unknownVariants = lib.subtractLists knownVariants variants; 17 in 18 if (unknownVariants != [ ]) then 19 throw "Unknown variant(s): ${lib.concatStringsSep unknownVariants}" 20 else 21 variants; 22in 23stdenvNoCC.mkDerivation (finalAttrs: { 24 pname = "xcursor-pro"; 25 version = "2.0.2"; 26 srcs = map (variant: fetchurl { inherit (sources.${variant}) url sha256; }) selectedVariants; 27 28 sourceRoot = "."; 29 30 installPhase = '' 31 runHook preInstall 32 33 for theme in XCursor-Pro-{${lib.concatStringsSep "," selectedVariants}}; do 34 mkdir -p $out/share/icons/$theme/cursors 35 cp -a $theme/cursors/* $out/share/icons/$theme/cursors/ 36 install -m644 $theme/index.theme $out/share/icons/$theme/index.theme 37 done 38 39 runHook postInstall 40 ''; 41 42 passthru.updateScript = ./update.sh; 43 44 meta = { 45 homepage = "https://github.com/ful1e5/XCursor-pro"; 46 description = "Modern XCursors"; 47 license = lib.licenses.gpl3; 48 platforms = lib.platforms.unix; 49 maintainers = with lib.maintainers; [ 50 lactose 51 midischwarz12 52 ]; 53 }; 54})