From 2b88cb59572493f6b4449e42e8f00897d6a4fb1c Mon Sep 17 00:00:00 2001 From: Tobias Happ Date: Sat, 24 Sep 2022 14:57:14 +0200 Subject: [PATCH] ci: replace ci.nix with build of bootstrapZip bootstrapZip builds all derivations transitively. --- .github/workflows/cachix.yml | 12 +++++++++--- ci.nix | 26 -------------------------- 2 files changed, 9 insertions(+), 29 deletions(-) delete mode 100644 ci.nix diff --git a/.github/workflows/cachix.yml b/.github/workflows/cachix.yml index b0ac82a..47a9485 100644 --- a/.github/workflows/cachix.yml +++ b/.github/workflows/cachix.yml @@ -1,4 +1,4 @@ -name: Build ci.nix and push to cachix +name: Build bootstrap packages and push to cachix on: pull_request: push: @@ -21,5 +21,11 @@ jobs: name: nix-on-droid signingKey: "${{ secrets.CACHIX_SIGNING_KEY }}" - - name: Build ci.nix - run: nix-build ci.nix + - name: Build bootstrap zip + run: | + nix \ + --log-format bar-with-logs \ + --option keep-going true \ + --show-trace \ + build .#bootstrapZip \ + --impure diff --git a/ci.nix b/ci.nix deleted file mode 100644 index b8ab27b..0000000 --- a/ci.nix +++ /dev/null @@ -1,26 +0,0 @@ -# Copyright (c) 2019-2020, see AUTHORS. Licensed under MIT License, see LICENSE. - -with import { }; - -with lib; - -let - pkgs = (import ./pkgs { }) // { recurseForDerivations = true; }; - isCacheable = p: !(p.preferLocalBuild or false); - shouldRecurseForDerivations = p: isAttrs p && p.recurseForDerivations or false; - - flattenPkgs = s: - let - f = p: - if shouldRecurseForDerivations p then flattenPkgs p - else if isDerivation p then [ p ] - else [ ]; - in - concatMap f (attrValues s); - - cachePkgs = filter isCacheable (flattenPkgs pkgs); - - outputsOf = p: map (o: p.${o}) p.outputs; -in - -concatMap outputsOf cachePkgs