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