Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
3 changes: 1 addition & 2 deletions ci/eval/default.nix
Original file line number Diff line number Diff line change
Expand Up @@ -64,8 +64,7 @@ let
-I "$src" \
--option restrict-eval true \
--option allow-import-from-derivation false \
--option eval-system "${evalSystem}" \
--arg enableWarnings false > $out/paths.json
--option eval-system "${evalSystem}" > $out/paths.json
'';

singleSystem =
Expand Down
4 changes: 2 additions & 2 deletions pkgs/by-name/bm/bmake/package.nix
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@
fetchurl,
getopt,
ksh,
pkgsMusl,
pkgsMusl ? { },
stdenv,
tzdata,
}:
Expand Down Expand Up @@ -107,7 +107,7 @@ stdenv.mkDerivation (finalAttrs: {

passthru = {
tests = {
bmakeMusl = pkgsMusl.bmake;
bmakeMusl = pkgsMusl.bmake or null;
};
};

Expand Down
8 changes: 3 additions & 5 deletions pkgs/top-level/all-packages.nix
Original file line number Diff line number Diff line change
Expand Up @@ -113,12 +113,10 @@ with pkgs;

stringsWithDeps = lib.stringsWithDeps;

### Evaluating the entire Nixpkgs naively will fail, make failure fast
### Evaluating the entire Nixpkgs naively will likely fail, make failure fast
AAAAAASomeThingsFailToEvaluate = throw ''
Please be informed that this pseudo-package is not the only part
of Nixpkgs that fails to evaluate. You should not evaluate
entire Nixpkgs without some special measures to handle failing
packages, like using pkgs/top-level/release-attrpaths-superset.nix.
This pseudo-package is likely not the only part of Nixpkgs that fails to evaluate.
You should not evaluate entire Nixpkgs without measures to handle failing packages.
'';

tests = callPackages ../test { };
Expand Down
18 changes: 4 additions & 14 deletions pkgs/top-level/release-attrpaths-superset.nix
Original file line number Diff line number Diff line change
Expand Up @@ -24,7 +24,6 @@
{
lib ? import (path + "/lib"),
trace ? false,
enableWarnings ? true,
checkMeta ? true,
path ? ./../..,
}:
Expand Down Expand Up @@ -125,8 +124,10 @@ let
justAttrNames =
path: value:
let
attempt =
if
result =
if path == [ "AAAAAASomeThingsFailToEvaluate" ] then
[ ]
else if
lib.isDerivation value
&&
# in some places we have *derivations* with jobsets as subattributes, ugh
Expand Down Expand Up @@ -162,17 +163,6 @@ let
builtins.attrValues
builtins.concatLists
];

seq = builtins.deepSeq attempt attempt;
tried = builtins.tryEval seq;

result =
if tried.success then
tried.value
else if enableWarnings && path != [ "AAAAAASomeThingsFailToEvaluate" ] then
lib.warn "tryEval failed at: ${lib.concatStringsSep "." path}" [ ]
else
[ ];
in
if !trace then result else lib.trace "** ${lib.concatStringsSep "." path}" result;

Expand Down
1 change: 1 addition & 0 deletions pkgs/top-level/release-outpaths.nix
Original file line number Diff line number Diff line change
Expand Up @@ -29,6 +29,7 @@ let
allowBroken = includeBroken;
allowUnfree = true;
allowInsecurePredicate = x: true;
allowVariants = !attrNamesOnly;
checkMeta = checkMeta;

handleEvalIssue =
Expand Down
22 changes: 0 additions & 22 deletions pkgs/top-level/stage.nix
Original file line number Diff line number Diff line change
Expand Up @@ -276,28 +276,6 @@ let
else
throw "i686 Linux package set can only be used with the x86 family.";

# x86_64-darwin packages for aarch64-darwin users to use with Rosetta for incompatible packages
pkgsx86_64Darwin =
if stdenv.hostPlatform.isDarwin then
nixpkgsFun {
overlays = [
(self': super': {
pkgsx86_64Darwin = super';
})
]
++ overlays;
localSystem = {
config = lib.systems.parse.tripleFromSystem (
stdenv.hostPlatform.parsed
// {
cpu = lib.systems.parse.cpuTypes.x86_64;
}
);
};
}
else
throw "x86_64 Darwin package set can only be used on Darwin systems.";

# If already linux: the same package set unaltered
# Otherwise, return a natively built linux package set for the current cpu architecture string.
# (ABI and other details will be set to the default for the cpu/os pair)
Expand Down
22 changes: 22 additions & 0 deletions pkgs/top-level/variants.nix
Original file line number Diff line number Diff line change
Expand Up @@ -90,6 +90,28 @@ self: super: {
else
throw "Musl libc only supports 64-bit Linux systems.";

# x86_64-darwin packages for aarch64-darwin users to use with Rosetta for incompatible packages
pkgsx86_64Darwin =
if stdenv.hostPlatform.isDarwin then
nixpkgsFun {
overlays = [
(self': super': {
pkgsx86_64Darwin = super';
})
]
++ overlays;
localSystem = {
config = lib.systems.parse.tripleFromSystem (
stdenv.hostPlatform.parsed
// {
cpu = lib.systems.parse.cpuTypes.x86_64;
}
);
};
}
else
throw "x86_64 Darwin package set can only be used on Darwin systems.";

# Full package set with rocm on cuda off
# Mostly useful for asserting pkgs.pkgsRocm.torchWithRocm == pkgs.torchWithRocm and similar
pkgsRocm = nixpkgsFun ({
Expand Down
Loading