This repository has been archived on 2024-10-13. You can view files and clone it, but cannot push or open issues or pull requests.
nix-packages/web/wordpress-themes/default.nix

33 lines
708 B
Nix
Raw Normal View History

2023-04-27 09:28:50 +00:00
{
stdenv,
fetchurl,
lib,
unzip,
}:
with builtins;
with lib; let
themes = lists.init (splitString "\n" (readFile ./themes));
in
listToAttrs (map (name: {
inherit name;
value = let
source = importJSON ./${name}.json;
in
stdenv.mkDerivation {
inherit (source) pname version;
src = fetchurl {
inherit (source) url sha256;
};
nativeBuildInputs = [unzip];
unpackPhase = ''
unzip $src
'';
installPhase = "mkdir -p $out; cp -R $pname/* $out/";
meta = {inherit (source) description;};
};
})
themes)
2023-06-25 13:25:50 +00:00
// {
passthru.updateScript = ./update.sh;
}