From 83b22a85d773ae66e6492c6b968a9cde1b681981 Mon Sep 17 00:00:00 2001 From: tdro Date: Sun, 24 Sep 2023 14:20:13 -0400 Subject: .config/nixpkgs/helpers: Remove No longer needed --- .config/nixpkgs/helpers/mkShellPure.nix | 59 --------------------------------- 1 file changed, 59 deletions(-) delete mode 100644 .config/nixpkgs/helpers/mkShellPure.nix diff --git a/.config/nixpkgs/helpers/mkShellPure.nix b/.config/nixpkgs/helpers/mkShellPure.nix deleted file mode 100644 index 8ffa941..0000000 --- a/.config/nixpkgs/helpers/mkShellPure.nix +++ /dev/null @@ -1,59 +0,0 @@ -### Experimental pure version of mkShellMinimal that clears all environment variables. -### Derived Source: https://github.com/NixOS/nixpkgs/commit/459771518d44f60b59a19381d07b12297908215d -### Article: https://fzakaria.com/2021/08/02/a-minimal-nix-shell.html -### Usage: - -# let -# -# name = "nix-shell.pure"; -# pkgs = import { }; -# -# mkShellPure = pkgs.callPackage (builtins.fetchurl { -# url = "https://raw.githubusercontent.com/tdro/dotfiles/b710281b132056105709c03dda1899a6afc68a93/.config/nixpkgs/helpers/mkShellPure.nix"; -# sha256 = "1ciwifsx2hrp0ymm077zfb5q8ravrk545bda1q249y2spw9np4ms"; -# }) { }; -# -# in mkShellPure { -# packages = [ pkgs.hello pkgs.coreutils ]; -# shellHook = '' -# export ENV=ENV -# env -# hello -# export PS1='\h (${name}) \W \$ ' -# ''; -# } - -{ writeTextFile, writeScript, system }: - -{ shellHook ? "", packages ? [ ], ... }@attrs: -derivation ({ - inherit system; - - name = "pure-nix-shell"; - - "stdenv" = writeTextFile rec { - name = "setup"; - executable = true; - destination = "/${name}"; - text = '' - set -e - NEW_PATH= - for package in ${toString packages}; do - export NEW_PATH=$package/bin:$NEW_PATH - done - exec /usr/bin/env --ignore-environment /bin/sh -c " - export PATH=$NEW_PATH - ${shellHook} - /bin/sh - " - ''; - }; - - builder = writeScript "builder.sh" '' - #!/bin/sh - echo - echo "This derivation is not meant to be built, unless you want to capture the dependency closure."; - echo - export > $out - ''; -} // attrs) -- cgit v1.2.3