Skip to content

Commit

Permalink
nixBuildAll: ability to build subflakes
Browse files Browse the repository at this point in the history
Resolves #27
  • Loading branch information
srid committed Jul 3, 2023
1 parent b7223ed commit 24db005
Show file tree
Hide file tree
Showing 3 changed files with 26 additions and 273 deletions.
281 changes: 14 additions & 267 deletions flake.lock

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

14 changes: 9 additions & 5 deletions nix/jenkins/features/nix/nixBuildAll.groovy
Original file line number Diff line number Diff line change
@@ -1,11 +1,15 @@
#!/usr/bin/env groovy

def call(Map args = [:]) {
system = args["system"] ?: null
systemStr = (system == null) ? "default" : system
stage ("Nix Build All (${systemStr})") {
nixArgs = (system == null) ? "" : "--option system ${system}"
flakeOutputs = sh script: "nix-build-all ${nixArgs}",
system = args["system"]
flakeDir = args["flakeDir"] ?: "."
overrideInputs = args["overrideInputs"] ?: [:]
stage ("""Nix Build All (${system ?: "default"})""") {
nixArgs = [
system ? "--option system ${system}" : "",
(overrideInputs.collect { k, v -> "--override-input flake/${k} ${v}"}.join(" "))
]
flakeOutputs = sh script: """nix-build-all ${flakeDir} ${nixArgs.join(" ")}""",
returnStdout: true
echo flakeOutputs
env.FLAKE_OUTPUTS = flakeOutputs.trim()
Expand Down
Loading

0 comments on commit 24db005

Please sign in to comment.