From 8ab1d22a82b0cda5acc06c3d6404b4c6c9c8e267 Mon Sep 17 00:00:00 2001 From: Robert Helgesson Date: Fri, 30 Aug 2019 00:52:09 +0200 Subject: [PATCH] home-manager: support `--option` argument Fixes #784 --- doc/man-home-manager.xml | 16 ++++++++++++++++ home-manager/home-manager | 5 +++++ 2 files changed, 21 insertions(+) diff --git a/doc/man-home-manager.xml b/doc/man-home-manager.xml index 3b8993944..a0f55d110 100644 --- a/doc/man-home-manager.xml +++ b/doc/man-home-manager.xml @@ -102,6 +102,10 @@ + + --option name value + + --cores number @@ -370,6 +374,18 @@ + + + + + + + Passed on to + nix-build + 1 . + + + diff --git a/home-manager/home-manager b/home-manager/home-manager index 2e7f8c72e..6fe4f13c7 100644 --- a/home-manager/home-manager +++ b/home-manager/home-manager @@ -429,6 +429,7 @@ function doHelp() { echo " --keep-failed" echo " --keep-going" echo " --max-jobs NUM" + echo " --option NAME VALUE" echo " --show-trace" echo echo "Commands" @@ -498,6 +499,10 @@ while [[ $# -gt 0 ]]; do -n|--dry-run) export DRY_RUN=1 ;; + --option) + PASSTHROUGH_OPTS+=("$opt" "$1" "$2") + shift 2 + ;; --max-jobs|--cores) PASSTHROUGH_OPTS+=("$opt" "$1") shift