Winter a19cd4ffb1 Revert "treewide: replace rev with tag"
This reverts commit 65a333600d5c88a98d674f637d092807cfc12253.

This wasn't tested for correctness with something like fodwatch [0],
and should not have been (self-)merged so quickly, especially without
further review.

It also resulted in the breakage of at least one package [1] (and that's
the one we know of and was caught).

A few packages that were updated in between this commit and this revert
were not reverted back to using `rev`, but other than that, this is a
1:1 revert.

[0]: https://codeberg.org/raphaelr/fodwatch
[1]: https://github.com/NixOS/nixpkgs/pull/396904 / 758551e4587d75882aebc21a04bee960418f8ce9
2025-04-08 02:57:25 -04:00

81 lines
1.8 KiB
Nix

{
stdenvNoCC,
lib,
fetchFromGitHub,
gtk3,
getent,
papirus-icon-theme,
accent ? "frostblue1",
}:
let
validAccents = [
"auroragreen"
"auroragreenb"
"auroramagenta"
"auroramagentab"
"auroraorange"
"auroraorangeb"
"aurorared"
"auroraredb"
"aurorayellow"
"aurorayellowb"
"frostblue1"
"frostblue2"
"frostblue3"
"frostblue4"
"polarnight1"
"polarnight2"
"polarnight3"
"polarnight3"
"snowstorm1"
"snowstorm1b"
];
pname = "papirus-nord";
version = "3.2.0";
in
lib.checkListOfEnum "${pname}: accent colors" validAccents [ accent ]
stdenvNoCC.mkDerivation
{
inherit pname version;
src = fetchFromGitHub {
owner = "adapta-projects";
repo = "papirus-nord";
rev = version;
sha256 = "sha256-KwwTDGJQ4zN9XH/pKFQDQ+EgyuSCFhN2PQAI35G+3YM=";
};
nativeBuildInputs = [
gtk3
getent
];
postPatch = ''
patchShebangs ./papirus-folders
'';
installPhase = ''
runHook preInstall
mkdir -p $out/share/icons
cp -r --no-preserve=mode ${papirus-icon-theme}/share/icons/Papirus* $out/share/icons
for size in 64x64 48x48 32x32 24x24 22x22; do
cp -f Icons/$size/* $out/share/icons/Papirus/$size/places
done
for theme in $out/share/icons/*; do
USER_HOME=$HOME DISABLE_UPDATE_ICON_CACHE=1 \
./papirus-folders -t $theme -o -C ${accent}
gtk-update-icon-cache --force $theme
done
runHook postInstall
'';
meta = with lib; {
description = "Nord version of Papirus Icon Theme";
homepage = "https://github.com/Adapta-Projects/Papirus-Nord";
license = licenses.gpl2Plus;
platforms = platforms.linux;
maintainers = with maintainers; [ aacebedo ];
};
}