296c0326b97dec3ae06fef6e8d9fedb3b506e3a8 — EuAndreh 3 months ago e1b7709
utils.nix: Add shell derivation helper 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