Unverified Commit 0d51e920 authored by Wolfgang Walther's avatar Wolfgang Walther
Browse files

top-level/release-outpaths: move to ci/eval

These files are tightly coupled with the code in ci/eval and not used
anywhere else. They are subject to the same backporting requirements as
the remaining CI code. They are better placed next here.
parent 98a86cad
Loading
Loading
Loading
Loading
+4 −4
Original line number Diff line number Diff line
@@ -2,7 +2,7 @@
# *superset* of all attrpaths of derivations which might be
# part of a release on *any* platform.
#
# Both this expression and what ofborg uses (release-outpaths.nix)
# Both this expression and what ofborg uses (outpaths.nix)
# are essentially single-threaded (under the current cppnix
# implementation).
#
@@ -19,7 +19,7 @@
#
# To dump the attrnames:
#
#   nix-instantiate --eval --strict --json pkgs/top-level/release-attrpaths-superset.nix -A names
#   nix-instantiate --eval --strict --json ci/eval/attrpaths.nix -A names
#
{
  lib ? import (path + "/lib"),
@@ -81,7 +81,7 @@ let
    in
    if !trace then result else lib.trace "** ${lib.concatStringsSep "." path}" result;

  releaseOutpaths = import ./release-outpaths.nix {
  outpaths = import ./outpaths.nix {
    inherit checkMeta;
    attrNamesOnly = true;
    inherit path;
@@ -104,7 +104,7 @@ let
      "stdenv"
    ]
  ]
  ++ justAttrNames [ ] releaseOutpaths;
  ++ justAttrNames [ ] outpaths;

  names = map (path: (lib.concatStringsSep "." path)) paths;

+2 −3
Original line number Diff line number Diff line
# This file works in tandem with ../../ci/eval/default.nix
# It turns ./release-outpaths.nix into chunks of a fixed size
# This turns ./outpaths.nix into chunks of a fixed size.
{
  lib ? import ../../lib,
  path ? ../..,
@@ -16,7 +15,7 @@ let
  attrpaths = lib.importJSON attrpathFile;
  myAttrpaths = lib.sublist (chunkSize * myChunk) chunkSize attrpaths;

  unfiltered = import ./release-outpaths.nix {
  unfiltered = import ./outpaths.nix {
    inherit path;
    inherit checkMeta includeBroken systems;
  };
+7 −4
Original line number Diff line number Diff line
@@ -26,6 +26,11 @@ let
      root = ../..;
      fileset = unions (
        map (lib.path.append ../..) [
          ".version"
          "ci/supportedSystems.json"
          "ci/eval/attrpaths.nix"
          "ci/eval/chunk.nix"
          "ci/eval/outpaths.nix"
          "default.nix"
          "doc"
          "lib"
@@ -33,8 +38,6 @@ let
          "modules"
          "nixos"
          "pkgs"
          ".version"
          "ci/supportedSystems.json"
        ]
      );
    };
@@ -60,7 +63,7 @@ let
        export GC_INITIAL_HEAP_SIZE=4g
        command time -f "Attribute eval done [%MKB max resident, %Es elapsed] %C" \
          nix-instantiate --eval --strict --json --show-trace \
            "$src/pkgs/top-level/release-attrpaths-superset.nix" \
            "$src/ci/eval/attrpaths.nix" \
            -A paths \
            -I "$src" \
            --option restrict-eval true \
@@ -99,7 +102,7 @@ let
        set +e
        command time -o "$outputDir/timestats/$myChunk" \
          -f "Chunk $myChunk on $system done [%MKB max resident, %Es elapsed] %C" \
          nix-env -f "${nixpkgs}/pkgs/top-level/release-outpaths-parallel.nix" \
          nix-env -f "${nixpkgs}/ci/eval/chunk.nix" \
          --eval-system "$system" \
          --option restrict-eval true \
          --option allow-import-from-derivation false \
+3 −3
Original line number Diff line number Diff line
#!/usr/bin/env nix-shell
# When using as a callable script, passing `--argstr path some/path` overrides $PWD.
#!nix-shell -p nix -i "nix-env -qaP --no-name --out-path --arg checkMeta true -f pkgs/top-level/release-outpaths.nix"
#!nix-shell -p nix -i "nix-env -qaP --no-name --out-path --arg checkMeta true -f ci/eval/outpaths.nix"

# Vendored from:
#   https://raw.githubusercontent.com/NixOS/ofborg/74f38efa7ef6f0e8e71ec3bfc675ae4fb57d7491/ofborg/src/outpaths.nix
@@ -9,11 +9,11 @@
  includeBroken ? true, # set this to false to exclude meta.broken packages from the output
  path ? ./../..,

  # used by pkgs/top-level/release-attrnames-superset.nix
  # used by ./attrpaths.nix
  attrNamesOnly ? false,

  # Set this to `null` to build for builtins.currentSystem only
  systems ? builtins.fromJSON (builtins.readFile ../../ci/supportedSystems.json),
  systems ? builtins.fromJSON (builtins.readFile ../supportedSystems.json),
}:
let
  lib = import (path + "/lib");
+4 −6
Original line number Diff line number Diff line
@@ -57,12 +57,10 @@
  # resulting tree of attributes to *not* have a ".${system}"
  # suffixed upon every job name like Hydra expects.
  #
  # This flag exists mainly for use by
  # pkgs/top-level/release-attrnames-superset.nix; see that file for
  # full details.  The exact behavior of this flag may change; it
  # should be considered an internal implementation detail of
  # pkgs/top-level/.
  #
  # This flag exists mainly for use by ci/eval/attrpaths.nix; see
  # that file for full details.  The exact behavior of this flag
  # may change; it should be considered an internal implementation
  # detail of ci/eval.
  attrNamesOnly ? false,
}: