aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorEuAndreh <eu@euandre.org>2019-06-15 13:26:45 -0300
committerEuAndreh <eu@euandre.org>2019-06-15 13:26:45 -0300
commita5b03bbdfea059633f4ddefd4257e19d56e9e3bb (patch)
treef35a6ab757d2e6a163e38eb71c68175111fed344
parentMove ./env.sh to ./docs/env.sh (diff)
downloadeuandre.org-a5b03bbdfea059633f4ddefd4257e19d56e9e3bb.tar.gz
euandre.org-a5b03bbdfea059633f4ddefd4257e19d56e9e3bb.tar.xz
utils.nix: Add shell helper derivation functions
-rw-r--r--utils.nix13
1 files changed, 13 insertions, 0 deletions
diff --git a/utils.nix b/utils.nix
index 3167399..ac49ac2 100644
--- a/utils.nix
+++ b/utils.nix
@@ -81,6 +81,19 @@ 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:
+ pkgs.mkShell {
+ name = "${baseName}-shell";
+ buildInputs = shellBuildInputs;
+ };
overwritingPublishScript = { docsDerivation, overwrite ? true }:
pkgs.writeShellScriptBin "publish.sh" ''
set -euo pipefail