From d332d768b53fa5526978e22347ab55837ecc5724 Mon Sep 17 00:00:00 2001 From: Tuomas Tynkkynen Date: Sun, 21 May 2017 20:10:41 +0300 Subject: [PATCH 1/4] darwin: Add recurseForDerivations --- pkgs/top-level/all-packages.nix | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/pkgs/top-level/all-packages.nix b/pkgs/top-level/all-packages.nix index a31aefbab694..c3f570b80899 100644 --- a/pkgs/top-level/all-packages.nix +++ b/pkgs/top-level/all-packages.nix @@ -11763,7 +11763,7 @@ with pkgs; darwin = let apple-source-releases = callPackage ../os-specific/darwin/apple-source-releases { }; - in apple-source-releases // rec { + in recurseIntoAttrs (apple-source-releases // rec { cctools = callPackage ../os-specific/darwin/cctools/port.nix { inherit libobjc; stdenv = if stdenv.isDarwin then stdenv else libcxxStdenv; @@ -11807,7 +11807,7 @@ with pkgs; usr-include = callPackage ../os-specific/darwin/usr-include {}; DarwinTools = callPackage ../os-specific/darwin/DarwinTools {}; - }; + }); devicemapper = lvm2; From 3e9f76774ab03c0aa06267dcfa1c7d7f6c984cf2 Mon Sep 17 00:00:00 2001 From: Tuomas Tynkkynen Date: Sat, 20 May 2017 19:44:20 +0300 Subject: [PATCH 2/4] nixpkgs release: Fix Darwin-only jobs Currently the logic of generating nixpkgs Hydra jobs is to walk through the pkgs evaluated for system = "x86_64-linux", collect any derivations and their meta.platforms values. However, that doesn't work for packages whose meta.platforms doesn't include x86_64-linux, as just evaluating their meta attribute raises an error so they get skipped completely. As a less-intrusive fix (i.e. anything than rewriting the current package enumeration logic), allow passing `config.allowUnsupportedSystem = true` to permit evaluating packages regardless of their platform and use that in the package listing phase. Fixes #25200 --- pkgs/stdenv/generic/check-meta.nix | 4 +++- pkgs/top-level/release-lib.nix | 2 +- 2 files changed, 4 insertions(+), 2 deletions(-) diff --git a/pkgs/stdenv/generic/check-meta.nix b/pkgs/stdenv/generic/check-meta.nix index 8b2cf01f169b..8544d932f81c 100644 --- a/pkgs/stdenv/generic/check-meta.nix +++ b/pkgs/stdenv/generic/check-meta.nix @@ -40,6 +40,8 @@ let allowBroken = config.allowBroken or false || builtins.getEnv "NIXPKGS_ALLOW_BROKEN" == "1"; + allowUnsupportedSystem = config.allowUnsupportedSystem or false; + isUnfree = licenses: lib.lists.any (l: !l.free or true || l == "unfree" || l == "unfree-redistributable") licenses; @@ -177,7 +179,7 @@ let { valid = false; reason = "blacklisted"; errormsg = "has a blacklisted license (‘${showLicense attrs.meta.license}’)"; } else if !allowBroken && attrs.meta.broken or false then { valid = false; reason = "broken"; errormsg = "is marked as broken"; } - else if !allowBroken && attrs.meta.platforms or null != null && !lib.lists.elem system attrs.meta.platforms then + else if !allowUnsupportedSystem && !allowBroken && attrs.meta.platforms or null != null && !lib.lists.elem system attrs.meta.platforms then { valid = false; reason = "broken"; errormsg = "is not supported on ‘${system}’"; } else if !(hasAllowedInsecure attrs) then { valid = false; reason = "insecure"; errormsg = "is marked as insecure"; } diff --git a/pkgs/top-level/release-lib.nix b/pkgs/top-level/release-lib.nix index ddc449ae59c1..c852ace7d7c6 100644 --- a/pkgs/top-level/release-lib.nix +++ b/pkgs/top-level/release-lib.nix @@ -13,7 +13,7 @@ rec { allPackages = args: packageSet (args // nixpkgsArgs); - pkgs = pkgsFor "x86_64-linux"; + pkgs = packageSet (lib.recursiveUpdate { system = "x86_64-linux"; config.allowUnsupportedSystem = true; } nixpkgsArgs); inherit lib; From 0065365bdf7d9487fb396a2a5a335d0257a79b73 Mon Sep 17 00:00:00 2001 From: Matthew Bauer Date: Sat, 12 Aug 2017 20:38:35 -0700 Subject: [PATCH 3/4] nixpkgs release: remove macOS hack was needed for testing previously see: https://github.com/NixOS/nixpkgs/pull/28174#pullrequestreview-55944725 --- pkgs/top-level/release.nix | 3 --- 1 file changed, 3 deletions(-) diff --git a/pkgs/top-level/release.nix b/pkgs/top-level/release.nix index f59b2debe86c..4a946a93003c 100644 --- a/pkgs/top-level/release.nix +++ b/pkgs/top-level/release.nix @@ -126,9 +126,6 @@ let pandas = unix; scikitlearn = unix; }; - - # hack around broken eval of non-linux packages for now. - tests.macOSSierraShared = darwin; } )); in jobs From 10241b3c5981d434cea1ad3f6360f84316eff466 Mon Sep 17 00:00:00 2001 From: Matthew Bauer Date: Thu, 17 Aug 2017 14:12:51 -0700 Subject: [PATCH 4/4] release.nix: disable private apple sdks in release MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit we shouldn’t let it get into the release. This includes: - darwin.cf-private - darwin.osx_private_sdk - xcode --- pkgs/top-level/release.nix | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/pkgs/top-level/release.nix b/pkgs/top-level/release.nix index 4a946a93003c..86f98d7662e4 100644 --- a/pkgs/top-level/release.nix +++ b/pkgs/top-level/release.nix @@ -126,6 +126,12 @@ let pandas = unix; scikitlearn = unix; }; + + darwin = packagePlatforms pkgs.darwin // { + cf-private = {}; + osx_private_sdk = {}; + xcode = {}; + }; } )); in jobs