forked from DGNum/infrastructure
28 lines
661 B
Nix
28 lines
661 B
Nix
|
{ pkgs, lib, ... }:
|
||
|
|
||
|
let
|
||
|
mkWordpressAddon = { name, version, type, hash ? lib.fakeHash }:
|
||
|
pkgs.stdenv.mkDerivation {
|
||
|
inherit name version;
|
||
|
|
||
|
src = pkgs.fetchzip {
|
||
|
url = "https://downloads.wordpress.org/${type}/${name}.${version}.zip";
|
||
|
inherit hash;
|
||
|
};
|
||
|
|
||
|
installPhase = "mkdir -p $out; cp -R * $out/";
|
||
|
};
|
||
|
in {
|
||
|
themes = builtins.mapAttrs (name: attrs:
|
||
|
mkWordpressAddon ({
|
||
|
inherit name;
|
||
|
type = "theme";
|
||
|
} // attrs)) (import ./themes.nix);
|
||
|
|
||
|
plugins = builtins.mapAttrs (name: attrs:
|
||
|
mkWordpressAddon ({
|
||
|
inherit name;
|
||
|
type = "plugin";
|
||
|
} // attrs)) (import ./plugins.nix);
|
||
|
}
|