release-lib: build packages without meta.platforms on all platforms (#351919)

This commit is contained in:
Tristan Ross 2024-10-30 09:35:04 -07:00 committed by GitHub
commit fb01d572b5
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194
7 changed files with 63 additions and 32 deletions

View File

@ -36,6 +36,7 @@ let
cuSPARSE, cuSOLVER, cuFFT, cuRAND, NPP and nvJPEG.
'';
license = lib.licenses.bsd3;
platforms = [ "x86_64-linux" ];
maintainers = with lib.maintainers; [ obsidian-systems-maintenance ] ++ lib.teams.cuda.members;
};
};

View File

@ -73,6 +73,7 @@ backendStdenv.mkDerivation (finalAttrs: {
description = "Samples for CUDA Developers which demonstrates features in CUDA Toolkit";
# CUDA itself is proprietary, but these sample apps are not.
license = lib.licenses.bsd3;
platforms = [ "x86_64-linux" ];
maintainers = with lib.maintainers; [ obsidian-systems-maintenance ] ++ lib.teams.cuda.members;
};
})

View File

@ -1,11 +1,39 @@
{ runCommand }:
{
lib,
stdenv,
runCommand,
getent,
xcbuild,
}:
# Prints information about the state of the build environment for
# assistance debugging Hydra. Feel free to add anything you would find
# useful to this.
runCommand "build-environment-info" { } ''
ulimit -a
runCommand "build-environment-info"
{
nativeBuildInputs = [ getent ] ++ lib.optionals stdenv.buildPlatform.isDarwin [ xcbuild ];
}
''
# Its useful to get more info even if a command fails.
set +e
run() {
echoCmd : "$@"
"$@"
}
run uname -a
${lib.optionalString stdenv.buildPlatform.isDarwin ''
run env SYSTEM_VERSION_COMPAT=0 plutil -p /System/Library/CoreServices/SystemVersion.plist
''}
run id
run getent passwd "$(id -un)"
run ulimit -a
# Always fail so that this job can easily be restarted.
exit 1
run exit 1
''

View File

@ -17,8 +17,7 @@ let
versionSuffix = "test";
label = "test";
};
in lib.optionalAttrs stdenv.hostPlatform.isLinux (
pkgs.recurseIntoAttrs {
in pkgs.recurseIntoAttrs {
nixos-test = (pkgs.nixos {
system.nixos = dummyVersioning;
@ -28,4 +27,3 @@ in lib.optionalAttrs stdenv.hostPlatform.isLinux (
}).toplevel;
}
)

View File

@ -66,6 +66,11 @@ let
'';
# discourage nix-env from matching this package
priority = 10;
platforms = lib.platforms.all;
# These create a large number of jobs, which puts load on Hydra
# without any appreciable benefit (as the combined packages already
# cause them all to be built and cached anyway).
hydraPlatforms = [ ];
} // lib.optionalAttrs (args ? shortdesc) {
description = args.shortdesc;
};

View File

@ -181,8 +181,8 @@ in {
meta = {
description = "PHP upstream extension: ${name}";
inherit (php.meta) maintainers homepage license;
};
inherit (php.meta) maintainers homepage license platforms;
} // args.meta or { };
}));
php = phpPackage;
@ -461,13 +461,6 @@ in {
env = lib.optionalAttrs stdenv.hostPlatform.isDarwin { NIX_LDFLAGS = "-liconv"; };
doCheck = stdenv.hostPlatform.isLinux;
}
{
name = "imap";
buildInputs = [ uwimap openssl pam pcre2 libkrb5 ];
configureFlags = [ "--with-imap=${uwimap}" "--with-imap-ssl" "--with-kerberos" ];
# Using version from PECL on new PHP versions.
enable = lib.versionOlder php.version "8.3";
}
{
name = "intl";
buildInputs = [ icu73 ];
@ -563,7 +556,7 @@ in {
internalDeps = [ php.extensions.pdo ];
configureFlags = [ "--with-pdo-dblib=${freetds}" ];
# Doesn't seem to work on darwin.
enable = (!stdenv.hostPlatform.isDarwin);
meta.broken = (!stdenv.hostPlatform.isDarwin);
doCheck = false;
}
{
@ -658,7 +651,7 @@ in {
buildInputs = [ net-snmp openssl ];
configureFlags = [ "--with-snmp" ];
# net-snmp doesn't build on darwin.
enable = (!stdenv.hostPlatform.isDarwin);
meta.broken = (!stdenv.hostPlatform.isDarwin);
doCheck = false;
}
{
@ -813,6 +806,13 @@ in {
"--with-zlib"
];
}
] ++ lib.optionals (lib.versionOlder php.version "8.3") [
# Using version from PECL on new PHP versions.
{
name = "imap";
buildInputs = [ uwimap openssl pam pcre2 libkrb5 ];
configureFlags = [ "--with-imap=${uwimap}" "--with-imap-ssl" "--with-kerberos" ];
}
];
# Convert the list of attrs:
@ -821,14 +821,12 @@ in {
# [ { name = <name>; value = <extension drv>; } ... ]
#
# which we later use listToAttrs to make all attrs available by name.
#
# Also filter out extensions based on the enable property.
namedExtensions = builtins.map
(drv: {
name = drv.name;
value = mkExtension (builtins.removeAttrs drv [ "enable" ]);
value = mkExtension drv;
})
(builtins.filter (i: i.enable or true) extensionData);
extensionData;
# Produce the final attribute set of all extensions defined.
in

View File

@ -169,7 +169,7 @@ let
if isDerivation value then
value.meta.hydraPlatforms
or (subtractLists (value.meta.badPlatforms or [])
(value.meta.platforms or [ "x86_64-linux" ]))
(value.meta.platforms or supportedSystems))
else if value.recurseForDerivations or false || value.recurseForRelease or false then
packagePlatforms value
else