Merge pull request #37460 from obsidiansystems/host-meta-platforms-fixes

treewide: `meta.platforms` fixes now that it tracks the host platform
This commit is contained in:
John Ericson 2018-03-20 13:08:54 -04:00 committed by GitHub
commit 0c52fe9702
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
3 changed files with 9 additions and 6 deletions

View File

@ -4,8 +4,8 @@ let
inherit (lib.systems.inspect) patterns; inherit (lib.systems.inspect) patterns;
in rec { in rec {
inherit (lib.systems.doubles) all mesaPlatforms; all = [ {} ]; # `{}` matches anything
none = []; none = [];
arm = [ patterns.isArm ]; arm = [ patterns.isArm ];
aarch64 = [ patterns.isAarch64 ]; aarch64 = [ patterns.isAarch64 ];
@ -24,4 +24,7 @@ in rec {
netbsd = [ patterns.isNetBSD ]; netbsd = [ patterns.isNetBSD ];
openbsd = [ patterns.isOpenBSD ]; openbsd = [ patterns.isOpenBSD ];
unix = patterns.isUnix; # Actually a list unix = patterns.isUnix; # Actually a list
windows = [ patterns.isWindows ];
inherit (lib.systems.doubles) mesaPlatforms;
} }

View File

@ -34,8 +34,8 @@ in
, enableStaticLibraries ? true , enableStaticLibraries ? true
, extraLibraries ? [], librarySystemDepends ? [], executableSystemDepends ? [] , extraLibraries ? [], librarySystemDepends ? [], executableSystemDepends ? []
, homepage ? "http://hackage.haskell.org/package/${pname}" , homepage ? "http://hackage.haskell.org/package/${pname}"
, platforms ? ghc.meta.platforms , platforms ? with stdenv.lib.platforms; unix ++ windows # GHC can cross-compile
, hydraPlatforms ? platforms , hydraPlatforms ? null
, hyperlinkSource ? true , hyperlinkSource ? true
, isExecutable ? false, isLibrary ? !isExecutable , isExecutable ? false, isLibrary ? !isExecutable
, jailbreak ? false , jailbreak ? false
@ -404,7 +404,7 @@ stdenv.mkDerivation ({
// optionalAttrs broken { inherit broken; } // optionalAttrs broken { inherit broken; }
// optionalAttrs (description != "") { inherit description; } // optionalAttrs (description != "") { inherit description; }
// optionalAttrs (maintainers != []) { inherit maintainers; } // optionalAttrs (maintainers != []) { inherit maintainers; }
// optionalAttrs (hydraPlatforms != platforms) { inherit hydraPlatforms; } // optionalAttrs (hydraPlatforms != null) { inherit hydraPlatforms; }
; ;
} }

View File

@ -28,6 +28,6 @@ stdenv.mkDerivation rec {
description = ''A library for semi-portable access to hardware-provided atomic memory update operations''; description = ''A library for semi-portable access to hardware-provided atomic memory update operations'';
license = stdenv.lib.licenses.gpl2Plus ; license = stdenv.lib.licenses.gpl2Plus ;
maintainers = [stdenv.lib.maintainers.raskin]; maintainers = [stdenv.lib.maintainers.raskin];
platforms = stdenv.lib.platforms.unix; platforms = with stdenv.lib.platforms; unix ++ windows;
}; };
} }