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

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

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

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