fetchNextcloudApp: meta propagation for licenses, etc.

This improves the metadata propgation for nc4nix-generated packages.

Adds:

- licenses (best effort given spdxId doesn't seem guaranteed here)
- homepage
- longDescription
This commit is contained in:
Raito Bezarius 2023-06-18 14:13:35 +02:00 committed by Maximilian Bosch
parent ccbd98db50
commit b4b1ce2443
No known key found for this signature in database
GPG Key ID: 9A6EEA275CA5BE0A

View File

@ -1,10 +1,20 @@
{ stdenv, fetchzip, applyPatches, ... }: { stdenv, fetchzip, applyPatches, lib, ... }:
{ url { url
, sha256 , sha256
, licenses
, patches ? [ ] , patches ? [ ]
, name ? null , name ? null
, version ? null , version ? null
, description ? null
, homepage ? null
}: }:
let
# TODO: do something better
licenseMap = {
"agpl" = lib.licenses.agpl3Only;
"apache" = lib.licenses.asl20;
};
in
if name != null || version != null then throw '' if name != null || version != null then throw ''
`pkgs.fetchNextcloudApp` has been changed to use `fetchzip`. `pkgs.fetchNextcloudApp` has been changed to use `fetchzip`.
To update, please To update, please
@ -23,5 +33,11 @@ else applyPatches {
fi fi
popd &>/dev/null popd &>/dev/null
''; '';
meta =
({
licenses = map (licenseString: licenseMap.${licenseString}) licenses;
longDescription = description;
inherit homepage;
});
}; };
} }