diff options
author | EuAndreh <eu@euandre.org> | 2019-06-15 13:26:45 -0300 |
---|---|---|
committer | EuAndreh <eu@euandre.org> | 2019-06-15 13:26:45 -0300 |
commit | a5b03bbdfea059633f4ddefd4257e19d56e9e3bb (patch) | |
tree | f35a6ab757d2e6a163e38eb71c68175111fed344 | |
parent | Move ./env.sh to ./docs/env.sh (diff) | |
download | euandre.org-a5b03bbdfea059633f4ddefd4257e19d56e9e3bb.tar.gz euandre.org-a5b03bbdfea059633f4ddefd4257e19d56e9e3bb.tar.xz |
utils.nix: Add shell helper derivation functions
-rw-r--r-- | utils.nix | 13 |
1 files changed, 13 insertions, 0 deletions
@@ -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 |