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:
parent
ccbd98db50
commit
b4b1ce2443
@ -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;
|
||||||
|
});
|
||||||
};
|
};
|
||||||
}
|
}
|
||||||
|
Loading…
Reference in New Issue
Block a user