Change:
The package with that are automatically fetched carry no license. ` cc
Poking upstream does not seem to yield anything. They did indicate they wouldn't support this use case, so what are you expecting from them?
I talked to the authors of wp4nix and they are happy for new contributions. It would be nice if the wp4nix script would somehow handle license informations, for example by manually defining them. Not quite sure yet how to implement it
If we don't know the licenses to these packages we honestly cannot keep them around. For example, it is absolutely unclear, whether we have a license to even redistribute them. Of course upstream will take patches, but they're not exactly in the same boat we are. I think your attitude towards the whole licensing situation around wp4nix/nc4nix and its resulting packages is alarming.
As written : Fixing this for Wordpress packages and themes (wp4nix) and Nextcloud apps (nc4nix) in a foreseeable time exceeds my skills and competence. Therefore I would like to offer to add a flag to these package sets and remove them for the next release 23.11 if it's not resolved by then.
Couldn't we mark them as unfree so they don't get cached on hydra but people can still use them if they want? Unfortunately it seems like the wordpress plugins repository doesn't seem to provide the license information in an easy manner. And I don't know whether it is stored somewhere else or can even be extracted from the derivation without import-from-derivation.
Actuallly we seem to be safe in theory. claims
In an ideal world, that would hold true, but it is up to the user and distributor to validate the final outcome. I therefore think this situation remains unresolved.

Discussion:
generatedJson = { inherit plugins themes languages; }; <ins> sourceJson = { plugins = builtins.fromJSON (builtins.readFile ./wordpress-plugins.json); themes = builtins.fromJSON (builtins.readFile ./wordpress-themes.json); languages = builtins.fromJSON (builtins.readFile ./wordpress-languages.json); }; </ins> in { # Create a generic WordPress package. Most arguments are just passed # to `mkDerivation`. The version is automatically filtered for weird characters. mkWordpressDerivation = self.callPackage ({ stdenvNoCC, lib, filterWPString, gettext, wp-cli }: <del> { type, pname, version, ... }@args: </del> <ins> { type, pname, version, license, ... }@args: </ins> assert lib.any (x: x == type) [ "plugin" "theme" "language" ]; stdenvNoCC.mkDerivation ({ pname = "wordpress-${type}-${pname}";

passthru = { wpName = pname; <ins> }; meta = { license = lib.licenses.${license}; </ins> } // (args.passthru or {}); } // lib.optionalAttrs (type == "language") { nativeBuildInputs = [ gettext wp-cli ];

# Create a derivation from the official wordpress.org packages. # This takes the type, the pname and the data generated from the go tool. mkOfficialWordpressDerivation = self.callPackage ({ mkWordpressDerivation, fetchWordpress }: <del> { type, pname, data }: </del> <ins> { type, pname, data, license }: </ins> mkWordpressDerivation { <del> inherit type pname; </del> <ins> inherit type pname license; </ins> version = data.version; src = fetchWordpress type data;

throw "fetchWordpress: invalid package type ${type}"; }) {}; <del> } // lib.mapAttrs (type: pkgs: lib.makeExtensible (_: lib.mapAttrs (pname: data: self.mkOfficialWordpressDerivation { type = lib.removeSuffix "s" type; inherit pname data; }) pkgs)) generatedJson; </del> <ins> } // lib.mapAttrs ( type: pkgs: lib.makeExtensible (_: lib.mapAttrs (pname: data: self.mkOfficialWordpressDerivation {type = lib.removeSuffix "s" type; inherit pname data; license = sourceJson.${type}.${pname}; }) pkgs)) generatedJson; </ins> # This creates an extensible scope. in lib.recursiveUpdate ((lib.makeExtensible (_: (lib.makeScope newScope packages))).extend (selfWP: superWP: {})) (callPackage ./thirdparty.nix {})

export NIX_PATH=nixpkgs=../../../../.. export WP_VERSION=$(nix $nixFlags '(import <nixpkgs> {}).wordpress.version') <del> PLUGINS=`cat wordpress-plugins.json | jq -r '.[]' | sed -z 's/n/,/g;s/,$/n/'` THEMES=`cat wordpress-themes.json | jq -r '.[]' | sed -z 's/n/,/g;s/,$/n/'` LANGUAGES=`cat wordpress-languages.json | jq -r '.[]' | sed -z 's/n/,/g;s/,$/n/'` </del> <ins> PLUGINS=`cat wordpress-plugins.json | jq -r 'keys|.[]' | sed -z 's/n/,/g;s/,$/n/'` THEMES=`cat wordpress-themes.json | jq -r 'keys|.[]' | sed -z 's/n/,/g;s/,$/n/'` LANGUAGES=`cat wordpress-languages.json | jq -r 'keys|.[]' | sed -z 's/n/,/g;s/,$/n/'` </ins> wp4nix -p $PLUGINS -pl en wp4nix -t $THEMES -tl en

<del> {fetchzip}: { plugins.civicrm = fetchzip rec { name = "civicrm"; </del> <ins> {fetchzip, stdenv, lib}: { plugins.civicrm = stdenv.mkDerivation rec { pname = "civicrm"; </ins> version = "5.56.0"; <del> url = "https://storage.googleapis.com/${name}/${name}-stable/${version}/${name}-${version}-wordpress.zip"; hash = "sha256-XsNFxVL0LF+OHlsqjjTV41x9ERLwMDq9BnKKP3Px2aI="; </del> <ins> src = fetchzip { inherit version; name = pname; url = "https://storage.googleapis.com/${pname}/${pname}-stable/${version}/${pname}-${version}-wordpress.zip"; hash = "sha256-XsNFxVL0LF+OHlsqjjTV41x9ERLwMDq9BnKKP3Px2aI="; }; meta.license = lib.licenses.agpl3Only; </ins> }; <del> themes.geist = fetchzip rec { name = "geist"; </del> <ins> themes.geist = stdenv.mkDerivation rec { pname = "geist"; </ins> version = "2.0.3"; <del> url = "https://github.com/christophery/geist/archive/refs/tags/${version}.zip"; hash = "sha256-c85oRhqu5E5IJlpgqKJRQITur1W7x40obOvHZbPevzU="; </del> <ins> src = fetchzip { inherit version; name = pname; url = "https://github.com/christophery/geist/archive/refs/tags/${version}.zip"; hash = "sha256-c85oRhqu5E5IJlpgqKJRQITur1W7x40obOvHZbPevzU="; }; meta.license = lib.licenses.gpl2Only; </ins> }; }

<del> [ "de_DE" , "fr_FR" , "ro_RO" ] </del> <ins> { "de_DE": "gpl2Plus" , "fr_FR": "gpl2Plus" , "ro_RO": "gpl2Plus" } </ins>

<del> [ "add-widget-after-content" , "akismet" , "antispam-bee" , "async-javascript" , "breeze" , "code-syntax-block" , "cookie-notice" , "co-authors-plus" , "disable-xml-rpc" , "embed-extended" , "gutenberg" , "hello-dolly" , "hkdev-maintenance-mode" , "jetpack" , "jetpack-lite" , "lightbox-photoswipe" , "login-lockdown" , "mailpoet" , "merge-minify-refresh" , "opengraph" , "simple-login-captcha" , "simple-mastodon-verification" , "static-mail-sender-configurator" , "tc-custom-javascript" , "webp-converter-for-media" , "webp-express" , "wordpress-seo" , "worker" , "wp-change-email-sender" , "wp-fastest-cache" , "wp-gdpr-compliance" , "wp-mail-smtp" , "wp-statistics" , "wp-swiper" , "wp-user-avatars" , "wpforms-lite" ] </del> <ins> { "add-widget-after-content": "gpl3Plus" , "akismet": "gpl2Plus" , "antispam-bee": "gpl2Plus" , "async-javascript": "gpl2Plus" , "breeze": "gpl2Plus" , "code-syntax-block": "gpl2Plus" , "cookie-notice": "mit" , "co-authors-plus": "gpl2Plus" , "disable-xml-rpc": "gpl2Plus" , "embed-extended": "gpl2Plus" , "gutenberg": "gpl2Plus" , "hello-dolly": "gpl2Plus" , "hkdev-maintenance-mode": "gpl2Plus" , "jetpack": "gpl2Plus" , "jetpack-lite": "gpl2Only" , "lightbox-photoswipe": "gpl2Only" , "login-lockdown": "gpl2Plus" , "mailpoet": "gpl3Only" , "merge-minify-refresh": "gpl2Plus" , "opengraph": "asl20" , "simple-login-captcha": "gpl2Plus" , "simple-mastodon-verification": "gpl2Plus" , "static-mail-sender-configurator": "mit" , "tc-custom-javascript": "gpl2Plus" , "webp-converter-for-media": "gpl2Plus" , "webp-express": "gpl3Only" , "wordpress-seo": "gpl3Only" , "worker": "gpl3Plus" , "wp-change-email-sender": "gpl2Plus" , "wp-fastest-cache": "gpl2Plus" , "wp-gdpr-compliance": "gpl2Plus" , "wp-mail-smtp": "gpl3Plus" , "wp-statistics": "gpl3Only" , "wp-swiper": "gpl2Plus" , "wp-user-avatars": "gpl2Plus" , "wpforms-lite": "gpl2Plus" } </ins>

<del> [ "twentynineteen" , "twentytwenty" , "twentytwentytwo" , "twentytwentyone" , "twentytwentythree" ] </del> <ins> { "twentynineteen": "gpl2Plus" , "twentytwenty": "gpl2Plus" , "twentytwentytwo": "gpl2Plus" , "twentytwentyone": "gpl2Plus" , "twentytwentythree": "gpl2Plus" } </ins>