git.iko.soy/typeable/nixpkgs
on master help sign in
Merge pull request #37460 from obsidiansystems/host-meta-platforms-fixes

treewide: `meta.platforms` fixes now that it tracks the host platform

commit0c52fe9702714706fb515b25540c42901bca5459 authorJohn Ericson <Ericson2314@yahoo.com> dateTue 20 Mar 2018, 13:08 (9 years ago) parentec8c3c865e24f2
3 files changed+9−6
lib/systems/for-meta.nix+5−2 pkgs/development/haskell-modules/generic-builder.nix+3−3 pkgs/development/libraries/libatomic_ops/default.nix+1−1
lib/systems/for-meta.nix+5−2
@@ -4,8 +4,8 @@ let
44 inherit (lib.systems.inspect) patterns;
55
66in rec {
7− inherit (lib.systems.doubles) all mesaPlatforms;
8− none = [];
7+ all = [ {} ]; # `{}` matches anything
8+ none = [];
99
1010 arm = [ patterns.isArm ];
1111 aarch64 = [ patterns.isAarch64 ];
@@ -24,4 +24,7 @@ in rec {
2424 netbsd = [ patterns.isNetBSD ];
2525 openbsd = [ patterns.isOpenBSD ];
2626 unix = patterns.isUnix; # Actually a list
27+ windows = [ patterns.isWindows ];
28+
29+ inherit (lib.systems.doubles) mesaPlatforms;
2730}
pkgs/development/haskell-modules/generic-builder.nix+3−3
@@ -34,8 +34,8 @@ in
3434, enableStaticLibraries ? true
3535, extraLibraries ? [], librarySystemDepends ? [], executableSystemDepends ? []
3636, homepage ? "http://hackage.haskell.org/package/${pname}"
37−, platforms ? ghc.meta.platforms
38−, hydraPlatforms ? platforms
37+, platforms ? with stdenv.lib.platforms; unix ++ windows # GHC can cross-compile
38+, hydraPlatforms ? null
3939, hyperlinkSource ? true
4040, isExecutable ? false, isLibrary ? !isExecutable
4141, jailbreak ? false
@@ -404,7 +404,7 @@ stdenv.mkDerivation ({
404404 // optionalAttrs broken { inherit broken; }
405405 // optionalAttrs (description != "") { inherit description; }
406406 // optionalAttrs (maintainers != []) { inherit maintainers; }
407− // optionalAttrs (hydraPlatforms != platforms) { inherit hydraPlatforms; }
407+ // optionalAttrs (hydraPlatforms != null) { inherit hydraPlatforms; }
408408 ;
409409
410410}
pkgs/development/libraries/libatomic_ops/default.nix+1−1
@@ -28,6 +28,6 @@ stdenv.mkDerivation rec {
2828 description = ''A library for semi-portable access to hardware-provided atomic memory update operations'';
2929 license = stdenv.lib.licenses.gpl2Plus ;
3030 maintainers = [stdenv.lib.maintainers.raskin];
31− platforms = stdenv.lib.platforms.unix;
31+ platforms = with stdenv.lib.platforms; unix ++ windows;
3232 };
3333}