aboutsummaryrefslogtreecommitdiff
path: root/utils.nix
diff options
context:
space:
mode:
authorEuAndreh <eu@euandre.org>2019-06-12 22:25:05 -0300
committerEuAndreh <eu@euandre.org>2019-06-12 22:25:05 -0300
commitb48400a6b1ab7595ac0c2dbac461d02217d18888 (patch)
tree732e633a7e44eb5b2ec74fa1be9ceddf7bcd3c77 /utils.nix
parentdeploy.sh: assert dir before running finish-phase (diff)
downloadtoph-b48400a6b1ab7595ac0c2dbac461d02217d18888.tar.gz
toph-b48400a6b1ab7595ac0c2dbac461d02217d18888.tar.xz
default.nix: Use shell helper functions from utils.nix
Diffstat (limited to 'utils.nix')
-rw-r--r--utils.nix14
1 files changed, 14 insertions, 0 deletions
diff --git a/utils.nix b/utils.nix
index 3167399..438a5d8 100644
--- a/utils.nix
+++ b/utils.nix
@@ -81,6 +81,20 @@ in rec {
touch $out
'';
});
+ shellEnvironmentBuild = shellBuildInputs:
+ baseTask.overrideAttrs (baseAttrs: {
+ name = "${baseAttrs.name}-shell-build-inputs";
+ buildPhase = ''
+ echo "Can build shell environment for shellBuildInputs!"
+ echo noop > $out
+ '';
+ });
+ shellEnvironment = shellBuildInputs:
+ baseTask.overrideAttrs (baseAttrs:
+ pkgs.mkshell {
+ name = "${baseAttrs.name}-shell";
+ buildInputs = shellBuildInputs;
+ });
overwritingPublishScript = { docsDerivation, overwrite ? true }:
pkgs.writeShellScriptBin "publish.sh" ''
set -euo pipefail