catppuccin-plymouth: cleanup
move to finalAttrs use `lib.` explicitly format with nixfmt-rfc-style remove hardcodeZeroVersion per #316264
This commit is contained in:
parent
5114e98b1f
commit
895a9ca48c
@ -1,51 +1,56 @@
|
|||||||
{ stdenvNoCC
|
{
|
||||||
, lib
|
stdenvNoCC,
|
||||||
, fetchFromGitHub
|
lib,
|
||||||
, unstableGitUpdater
|
fetchFromGitHub,
|
||||||
, variant ? "macchiato"
|
unstableGitUpdater,
|
||||||
|
variant ? "macchiato",
|
||||||
}:
|
}:
|
||||||
|
|
||||||
let
|
let
|
||||||
pname = "catppuccin-plymouth";
|
pname = "catppuccin-plymouth";
|
||||||
validVariants = [ "latte" "frappe" "macchiato" "mocha" ];
|
validVariants = [
|
||||||
|
"latte"
|
||||||
|
"frappe"
|
||||||
|
"macchiato"
|
||||||
|
"mocha"
|
||||||
|
];
|
||||||
in
|
in
|
||||||
lib.checkListOfEnum "${pname}: color variant" validVariants [ variant ]
|
lib.checkListOfEnum "${pname}: color variant" validVariants [ variant ]
|
||||||
|
|
||||||
stdenvNoCC.mkDerivation rec {
|
stdenvNoCC.mkDerivation
|
||||||
inherit pname;
|
(finalAttrs: {
|
||||||
version = "0-unstable-2024-05-28";
|
inherit pname;
|
||||||
|
version = "0-unstable-2024-05-28";
|
||||||
|
|
||||||
src = fetchFromGitHub {
|
src = fetchFromGitHub {
|
||||||
owner = "catppuccin";
|
owner = "catppuccin";
|
||||||
repo = "plymouth";
|
repo = "plymouth";
|
||||||
rev = "e13c348a0f47772303b2da1e9396027d8cda160d";
|
rev = "e13c348a0f47772303b2da1e9396027d8cda160d";
|
||||||
hash = "sha256-6DliqhRncvdPuKzL9LJec3PJWmK/jo9BrrML7g6YcH0=";
|
hash = "sha256-6DliqhRncvdPuKzL9LJec3PJWmK/jo9BrrML7g6YcH0=";
|
||||||
};
|
};
|
||||||
|
|
||||||
sourceRoot = "${src.name}/themes/catppuccin-${variant}";
|
sourceRoot = "${finalAttrs.src.name}/themes/catppuccin-${variant}";
|
||||||
|
|
||||||
installPhase = ''
|
installPhase = ''
|
||||||
runHook preInstall
|
runHook preInstall
|
||||||
|
|
||||||
sed -i 's:\(^ImageDir=\)/usr:\1'"$out"':' catppuccin-${variant}.plymouth
|
sed -i 's:\(^ImageDir=\)/usr:\1'"$out"':' catppuccin-${variant}.plymouth
|
||||||
mkdir -p $out/share/plymouth/themes/catppuccin-${variant}
|
mkdir -p $out/share/plymouth/themes/catppuccin-${variant}
|
||||||
cp * $out/share/plymouth/themes/catppuccin-${variant}
|
cp * $out/share/plymouth/themes/catppuccin-${variant}
|
||||||
|
|
||||||
runHook postInstall
|
runHook postInstall
|
||||||
'';
|
'';
|
||||||
|
|
||||||
passthru.updateScript = unstableGitUpdater {
|
passthru.updateScript = unstableGitUpdater { };
|
||||||
hardcodeZeroVersion = true;
|
|
||||||
};
|
|
||||||
|
|
||||||
meta = with lib; {
|
meta = {
|
||||||
description = "Soothing pastel theme for Plymouth";
|
description = "Soothing pastel theme for Plymouth";
|
||||||
homepage = "https://github.com/catppuccin/plymouth";
|
homepage = "https://github.com/catppuccin/plymouth";
|
||||||
license = licenses.mit;
|
license = lib.licenses.mit;
|
||||||
platforms = platforms.linux;
|
platforms = lib.platforms.linux;
|
||||||
maintainers = with maintainers; [
|
maintainers = with lib.maintainers; [
|
||||||
johnrtitor
|
johnrtitor
|
||||||
spectre256
|
spectre256
|
||||||
];
|
];
|
||||||
};
|
};
|
||||||
}
|
})
|
||||||
|
Loading…
Reference in New Issue
Block a user