diff options
author | slwst <email@slw.st> | 2023-02-09 17:56:49 -0500 |
---|---|---|
committer | slwst <email@slw.st> | 2023-03-09 12:57:22 -0500 |
commit | d8747030598e9072b381a96d90a708b9599aac4f (patch) | |
tree | 7f64a2021187a8ea0dffdfe1f8ea43b5099afee8 /pkgs/data/themes/adi1090x-plymouth-themes/default.nix | |
parent | d2c34a858330ae01a9424be3293ddee66fe6a0e7 (diff) | |
download | nixpkgs-d8747030598e9072b381a96d90a708b9599aac4f.tar nixpkgs-d8747030598e9072b381a96d90a708b9599aac4f.tar.gz nixpkgs-d8747030598e9072b381a96d90a708b9599aac4f.tar.bz2 nixpkgs-d8747030598e9072b381a96d90a708b9599aac4f.tar.lz nixpkgs-d8747030598e9072b381a96d90a708b9599aac4f.tar.xz nixpkgs-d8747030598e9072b381a96d90a708b9599aac4f.tar.zst nixpkgs-d8747030598e9072b381a96d90a708b9599aac4f.zip |
adi1090x-plymouth-themes: init at unstable-2020-12-28
Diffstat (limited to 'pkgs/data/themes/adi1090x-plymouth-themes/default.nix')
-rw-r--r-- | pkgs/data/themes/adi1090x-plymouth-themes/default.nix | 63 |
1 files changed, 63 insertions, 0 deletions
diff --git a/pkgs/data/themes/adi1090x-plymouth-themes/default.nix b/pkgs/data/themes/adi1090x-plymouth-themes/default.nix new file mode 100644 index 00000000000..10356feed62 --- /dev/null +++ b/pkgs/data/themes/adi1090x-plymouth-themes/default.nix @@ -0,0 +1,63 @@ +{ + stdenv, + fetchurl, + lib, + unzip, + # To select only certain themes, pass `selected_themes` as a list of strings. + # reference ./shas.nix for available themes + selected_themes ? [], +}: let + version = "2020-12-28"; + # this file is generated via ./update.sh + # borrowed from pkgs/data/fonts/nerdfonts + themeShas = import ./shas.nix; + knownThemes = builtins.attrNames themeShas; + selectedThemes = + if (selected_themes == []) + then knownThemes + else let + unknown = lib.subtractLists knownThemes selected_themes; + in + if (unknown != []) + then throw "Unknown theme(s): ${lib.concatStringsSep " " unknown}" + else selected_themes; + srcs = lib.lists.forEach selectedThemes ( + name: (fetchurl { + url = themeShas.${name}.url; + sha256 = themeShas.${name}.sha; + }) + ); +in + stdenv.mkDerivation { + pname = "adi1090x-plymouth-themes"; + inherit version srcs; + + nativeBuildInputs = [ + unzip + ]; + + sourceRoot = "."; + unpackCmd = "tar xzf $curSrc"; + + installPhase = '' + mkdir -p $out/share/plymouth/themes + for theme in ${toString selectedThemes}; do + mv $theme $out/share/plymouth/themes/$theme + done + find $out/share/plymouth/themes/ -name \*.plymouth -exec sed -i "s@\/usr\/@$out\/@" {} \; + ''; + + meta = with lib; { + description = "Plymouth boot themes from adi1090x"; + longDescription = '' + A variety of plymouth boot screens by adi1090x. Using the default value + of `selected_themes` will install all themes (~524M). Consider overriding + this with a list of the string names of each theme to install. Check + ./shas.nix for available themes. + ''; + homepage = "https://github.com/adi1090x/plymouth-themes"; + license = licenses.gpl3; + platforms = platforms.linux; + maintainers = with maintainers; [slwst]; + }; + } |