mirror of
https://github.com/nix-community/nix-on-droid.git
synced 2025-11-08 19:46:07 +01:00
ci: replace ci.nix with build of bootstrapZip
bootstrapZip builds all derivations transitively.
This commit is contained in:
parent
7cea00a1c7
commit
2b88cb5957
2 changed files with 9 additions and 29 deletions
12
.github/workflows/cachix.yml
vendored
12
.github/workflows/cachix.yml
vendored
|
|
@ -1,4 +1,4 @@
|
||||||
name: Build ci.nix and push to cachix
|
name: Build bootstrap packages and push to cachix
|
||||||
on:
|
on:
|
||||||
pull_request:
|
pull_request:
|
||||||
push:
|
push:
|
||||||
|
|
@ -21,5 +21,11 @@ jobs:
|
||||||
name: nix-on-droid
|
name: nix-on-droid
|
||||||
signingKey: "${{ secrets.CACHIX_SIGNING_KEY }}"
|
signingKey: "${{ secrets.CACHIX_SIGNING_KEY }}"
|
||||||
|
|
||||||
- name: Build ci.nix
|
- name: Build bootstrap zip
|
||||||
run: nix-build ci.nix
|
run: |
|
||||||
|
nix \
|
||||||
|
--log-format bar-with-logs \
|
||||||
|
--option keep-going true \
|
||||||
|
--show-trace \
|
||||||
|
build .#bootstrapZip \
|
||||||
|
--impure
|
||||||
|
|
|
||||||
26
ci.nix
26
ci.nix
|
|
@ -1,26 +0,0 @@
|
||||||
# Copyright (c) 2019-2020, see AUTHORS. Licensed under MIT License, see LICENSE.
|
|
||||||
|
|
||||||
with import <nixpkgs> { };
|
|
||||||
|
|
||||||
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
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue