about summary refs log tree commit diff
path: root/pkgs/by-name/ca
diff options
context:
space:
mode:
authorJohn Titor <50095635+JohnRTitor@users.noreply.github.com>2024-05-30 13:14:14 +0530
committerJohn Titor <50095635+JohnRTitor@users.noreply.github.com>2024-06-01 10:31:48 +0530
commit895a9ca48cea67f0f06e1eb9a9c5d0bd930fb984 (patch)
treebfa95e6d7f7522178546513379da5eec5e4595fe /pkgs/by-name/ca
parent5114e98b1f82ee557c7212db7e02828c008866cc (diff)
catppuccin-plymouth: cleanup
move to finalAttrs
use `lib.` explicitly
format with nixfmt-rfc-style
remove hardcodeZeroVersion per #316264
Diffstat (limited to 'pkgs/by-name/ca')
-rw-r--r--pkgs/by-name/ca/catppuccin-plymouth/package.nix93
1 files changed, 49 insertions, 44 deletions
diff --git a/pkgs/by-name/ca/catppuccin-plymouth/package.nix b/pkgs/by-name/ca/catppuccin-plymouth/package.nix
index 06281a47001dc..dcd4602705df6 100644
--- a/pkgs/by-name/ca/catppuccin-plymouth/package.nix
+++ b/pkgs/by-name/ca/catppuccin-plymouth/package.nix
@@ -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
+      ];
+    };
+  })