rPackages: allow overriding of platforms

This commit is contained in:
Justin Bedo 2021-12-02 13:20:21 +11:00
parent b9adefed54
commit e4a127c171
No known key found for this signature in database
GPG Key ID: 2C18202C56C182BD

View File

@ -15,7 +15,7 @@ let
#
# some packages, e.g. cncaGUI, require X running while installation,
# so that we use xvfb-run if requireX is true.
mkDerive = {mkHomepage, mkUrls, hydraPlatforms ? R.meta.platforms}: args:
mkDerive = {mkHomepage, mkUrls, hydraPlatforms ? null}: args:
let hydraPlatforms' = hydraPlatforms; in
lib.makeOverridable ({
name, version, sha256,
@ -23,7 +23,8 @@ let
doCheck ? true,
requireX ? false,
broken ? false,
hydraPlatforms ? hydraPlatforms',
platforms ? R.meta.platforms,
hydraPlatforms ? if hydraPlatforms' != null then hydraPlatforms' else platforms,
maintainers ? []
}: buildRPackage {
name = "${name}-${version}";
@ -35,7 +36,7 @@ let
propagatedBuildInputs = depends;
nativeBuildInputs = depends;
meta.homepage = mkHomepage (args // { inherit name; });
meta.platforms = R.meta.platforms;
meta.platforms = platforms;
meta.hydraPlatforms = hydraPlatforms;
meta.broken = broken;
meta.maintainers = maintainers;