a5b03bbdfea059633f4ddefd4257e19d56e9e3bb — EuAndreh 2 months ago 833ded2
utils.nix: Add shell helper derivation functions
1 files changed, 13 insertions(+), 0 deletions(-)

M utils.nix
M utils.nix => utils.nix +13 -0
@@ 81,6 81,19 @@ 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