diff options
author | tdro <tdro@users.noreply.github.com> | 2022-02-18 01:31:33 -0500 |
---|---|---|
committer | tdro <tdro@users.noreply.github.com> | 2022-02-18 01:46:26 -0500 |
commit | 83b77bf625613a01c47d82e2b08974bfdf219c51 (patch) | |
tree | 1bfed9bfae3606c95df6f1bb74f0e07366af47aa /.config/nixpkgs | |
parent | 7a4011cb49b65c5d80b9defa5339761906e7d46a (diff) | |
download | dotfiles-83b77bf625613a01c47d82e2b08974bfdf219c51.tar.gz dotfiles-83b77bf625613a01c47d82e2b08974bfdf219c51.tar.bz2 dotfiles-83b77bf625613a01c47d82e2b08974bfdf219c51.zip |
.config/nixpkgs/helpers: Add experimental minimal mkShell
Diffstat (limited to '.config/nixpkgs')
-rw-r--r-- | .config/nixpkgs/helpers/minimal-mkShell.nix | 31 |
1 files changed, 31 insertions, 0 deletions
diff --git a/.config/nixpkgs/helpers/minimal-mkShell.nix b/.config/nixpkgs/helpers/minimal-mkShell.nix new file mode 100644 index 0000000..609c179 --- /dev/null +++ b/.config/nixpkgs/helpers/minimal-mkShell.nix @@ -0,0 +1,31 @@ +### Derived from https://fzakaria.com/2021/08/02/a-minimal-nix-shell.html +### Usage Example: + +# let +# pkgs = import <nixpkgs> { }; +# minimal = import (builtins.fetchurl { +# url = "https://raw.githubusercontent.com/tdro/dotfiles/master/.config/nixpkgs/helpers/minimal-mkShell.nix"; +# sha256 = pkgs.lib.fakeSha256; +# }); +# in minimal.mkShell { +# name = "minimal-shell"; +# buildInputs = [ ]; +# shellHook = ""; +# } + +rec { + pkgs = import (builtins.fetchTarball { + url = "https://releases.nixos.org/nixos/21.05/nixos-21.05.1510.a165aeceda9/nixexprs.tar.xz"; + sha256 = "124s05b0xk97arw0vvq8b4wcvsw6024dfdzwcx9qjxf3a2zszmam"; + }) { }; + + stdenv = pkgs.stdenvNoCC.override { + cc = null; + preHook = ""; + allowedRequisites = null; + initialPath = [ pkgs.busybox ]; + extraNativeBuildInputs = [ ]; + }; + + mkShell = pkgs.mkShell.override { inherit stdenv; }; +} |