fork
Configure Feed
Select the types of activity you want to include in your feed.
nixpkgs mirror (for testing)
github.com/NixOS/nixpkgs
nix
fork
Configure Feed
Select the types of activity you want to include in your feed.
1# This expression will, as efficiently as possible, dump a
2# *superset* of all attrpaths of derivations which might be
3# part of a release on *any* platform.
4#
5# This expression runs single-threaded under all current Nix
6# implementations, but much faster and with much less memory
7# used than ./outpaths.nix itself.
8#
9# Once you have the list of attrnames you can split it up into
10# $NUM_CORES batches and evaluate the outpaths separately for each
11# batch, in parallel.
12#
13# To dump the attrnames:
14#
15# nix-instantiate --eval --strict --json ci/eval/attrpaths.nix -A names
16#
17{
18 lib ? import (path + "/lib"),
19 trace ? false,
20 path ? ./../..,
21 extraNixpkgsConfigJson ? "{}",
22}:
23let
24
25 # TODO: Use mapAttrsToListRecursiveCond when this PR lands:
26 # https://github.com/NixOS/nixpkgs/pull/395160
27 justAttrNames =
28 path: value:
29 let
30 result =
31 if path == [ "AAAAAASomeThingsFailToEvaluate" ] || !(lib.isAttrs value) then
32 [ ]
33 else if lib.isDerivation value then
34 [ path ]
35 else
36 lib.pipe value [
37 (lib.mapAttrsToList (
38 name: value:
39 lib.addErrorContext "while evaluating package set attribute path '${
40 lib.showAttrPath (path ++ [ name ])
41 }'" (justAttrNames (path ++ [ name ]) value)
42 ))
43 lib.concatLists
44 ];
45 in
46 lib.traceIf trace "** ${lib.showAttrPath path}" result;
47
48 outpaths = import ./outpaths.nix {
49 inherit path;
50 extraNixpkgsConfig = builtins.fromJSON extraNixpkgsConfigJson;
51 attrNamesOnly = true;
52 };
53
54 paths = [
55 # Some of the following are based on variants, which are disabled with `attrNamesOnly = true`.
56 # Until these have been removed from release.nix / hydra, we manually add them to the list.
57 [
58 "pkgsLLVM"
59 "stdenv"
60 ]
61 [
62 "pkgsArocc"
63 "stdenv"
64 ]
65 [
66 "pkgsZig"
67 "stdenv"
68 ]
69 [
70 "pkgsStatic"
71 "stdenv"
72 ]
73 [
74 "pkgsMusl"
75 "stdenv"
76 ]
77 ]
78 ++ justAttrNames [ ] outpaths;
79
80 names = map lib.showAttrPath paths;
81
82in
83{
84 inherit paths names;
85}