From a5b03bbdfea059633f4ddefd4257e19d56e9e3bb Mon Sep 17 00:00:00 2001 From: EuAndreh Date: Sat, 15 Jun 2019 13:26:45 -0300 Subject: utils.nix: Add shell helper derivation functions --- utils.nix | 13 +++++++++++++ 1 file changed, 13 insertions(+) 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 -- cgit v1.2.3