-
-
Notifications
You must be signed in to change notification settings - Fork 14.7k
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
move to finalAttrs use `lib.` explicitly format with nixfmt-rfc-style remove hardcodeZeroVersion per #316264 (cherry picked from commit 895a9ca)
- Loading branch information
1 parent
ac7dea9
commit 6647262
Showing
1 changed file
with
49 additions
and
44 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,51 +1,56 @@ | ||
{ stdenvNoCC | ||
, lib | ||
, fetchFromGitHub | ||
, unstableGitUpdater | ||
, variant ? "macchiato" | ||
{ | ||
stdenvNoCC, | ||
lib, | ||
fetchFromGitHub, | ||
unstableGitUpdater, | ||
variant ? "macchiato", | ||
}: | ||
|
||
let | ||
pname = "catppuccin-plymouth"; | ||
validVariants = [ "latte" "frappe" "macchiato" "mocha" ]; | ||
validVariants = [ | ||
"latte" | ||
"frappe" | ||
"macchiato" | ||
"mocha" | ||
]; | ||
in | ||
lib.checkListOfEnum "${pname}: color variant" validVariants [ variant ] | ||
|
||
stdenvNoCC.mkDerivation rec { | ||
inherit pname; | ||
version = "0-unstable-2024-05-28"; | ||
|
||
src = fetchFromGitHub { | ||
owner = "catppuccin"; | ||
repo = "plymouth"; | ||
rev = "e13c348a0f47772303b2da1e9396027d8cda160d"; | ||
hash = "sha256-6DliqhRncvdPuKzL9LJec3PJWmK/jo9BrrML7g6YcH0="; | ||
}; | ||
|
||
sourceRoot = "${src.name}/themes/catppuccin-${variant}"; | ||
|
||
installPhase = '' | ||
runHook preInstall | ||
sed -i 's:\(^ImageDir=\)/usr:\1'"$out"':' catppuccin-${variant}.plymouth | ||
mkdir -p $out/share/plymouth/themes/catppuccin-${variant} | ||
cp * $out/share/plymouth/themes/catppuccin-${variant} | ||
runHook postInstall | ||
''; | ||
|
||
passthru.updateScript = unstableGitUpdater { | ||
hardcodeZeroVersion = true; | ||
}; | ||
|
||
meta = with lib; { | ||
description = "Soothing pastel theme for Plymouth"; | ||
homepage = "https://github.com/catppuccin/plymouth"; | ||
license = licenses.mit; | ||
platforms = platforms.linux; | ||
maintainers = with maintainers; [ | ||
johnrtitor | ||
spectre256 | ||
]; | ||
}; | ||
} | ||
stdenvNoCC.mkDerivation | ||
(finalAttrs: { | ||
inherit pname; | ||
version = "0-unstable-2024-05-28"; | ||
|
||
src = fetchFromGitHub { | ||
owner = "catppuccin"; | ||
repo = "plymouth"; | ||
rev = "e13c348a0f47772303b2da1e9396027d8cda160d"; | ||
hash = "sha256-6DliqhRncvdPuKzL9LJec3PJWmK/jo9BrrML7g6YcH0="; | ||
}; | ||
|
||
sourceRoot = "${finalAttrs.src.name}/themes/catppuccin-${variant}"; | ||
|
||
installPhase = '' | ||
runHook preInstall | ||
sed -i 's:\(^ImageDir=\)/usr:\1'"$out"':' catppuccin-${variant}.plymouth | ||
mkdir -p $out/share/plymouth/themes/catppuccin-${variant} | ||
cp * $out/share/plymouth/themes/catppuccin-${variant} | ||
runHook postInstall | ||
''; | ||
|
||
passthru.updateScript = unstableGitUpdater { }; | ||
|
||
meta = { | ||
description = "Soothing pastel theme for Plymouth"; | ||
homepage = "https://github.com/catppuccin/plymouth"; | ||
license = lib.licenses.mit; | ||
platforms = lib.platforms.linux; | ||
maintainers = with lib.maintainers; [ | ||
johnrtitor | ||
spectre256 | ||
]; | ||
}; | ||
}) |