mirror of
https://github.com/NixOS/nixpkgs.git
synced 2024-12-02 03:43:06 +00:00
571c71e6f7
We are migrating packages that meet below requirements: 1. using `callPackage` 2. called path is a directory 3. overriding set is empty (`{ }`) 4. not containing path expressions other than relative path (to makenixpkgs-vet happy) 5. not referenced by nix files outside of the directory, other than`pkgs/top-level/all-packages.nix` 6. not referencing nix files outside of the directory 7. not referencing `default.nix` (since it's changed to `package.nix`) 8. `outPath` doesn't change after migration The tool is here: https://github.com/Aleksanaa/by-name-migrate.
76 lines
1.7 KiB
Nix
76 lines
1.7 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 ];
|
|
};
|
|
}
|