diff options
author | tdro <tdro@users.noreply.github.com> | 2023-02-21 08:30:43 -0500 |
---|---|---|
committer | tdro <tdro@users.noreply.github.com> | 2023-02-21 08:30:43 -0500 |
commit | 15517f45a584b329ddb6baaaed0941e2dc49bb43 (patch) | |
tree | 9a8c5b1812e7d5e3b6ea396bd4ea18da21e0a25c /.config | |
parent | e2f0774130f319d3d9f8b9bb7c115913d591c2be (diff) | |
download | dotfiles-15517f45a584b329ddb6baaaed0941e2dc49bb43.tar.gz dotfiles-15517f45a584b329ddb6baaaed0941e2dc49bb43.tar.bz2 dotfiles-15517f45a584b329ddb6baaaed0941e2dc49bb43.zip |
.config/nixpkgs/shells: Move shells to own folder
mkShellMinimal not needed anymore.
Diffstat (limited to '.config')
-rw-r--r-- | .config/nixpkgs/helpers/mkShellMinimal.nix | 83 | ||||
-rw-r--r-- | .config/nixpkgs/shells/ansible/shell.nix (renamed from .config/nixpkgs/shells/ansible.nix) | 0 | ||||
-rw-r--r-- | .config/nixpkgs/shells/cake/shell.nix (renamed from .config/nixpkgs/shells/cake.nix) | 0 | ||||
-rw-r--r-- | .config/nixpkgs/shells/coreboot/shell.nix (renamed from .config/nixpkgs/shells/coreboot.nix) | 0 | ||||
-rw-r--r-- | .config/nixpkgs/shells/falcon/shell.nix (renamed from .config/nixpkgs/shells/falcon.nix) | 0 | ||||
-rw-r--r-- | .config/nixpkgs/shells/pure/shell.nix (renamed from .config/nixpkgs/shells/pure.nix) | 0 |
6 files changed, 0 insertions, 83 deletions
diff --git a/.config/nixpkgs/helpers/mkShellMinimal.nix b/.config/nixpkgs/helpers/mkShellMinimal.nix deleted file mode 100644 index 54d0e68..0000000 --- a/.config/nixpkgs/helpers/mkShellMinimal.nix +++ /dev/null @@ -1,83 +0,0 @@ -### 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.minimal"; -# pkgs = import <nixpkgs> { }; -# -# mkShellMinimal = pkgs.callPackage (builtins.fetchurl { -# url = "https://raw.githubusercontent.com/tdro/dotfiles/0aac4414559235f8cd8c454acce30c0471e0f6b1/.config/nixpkgs/helpers/mkShellMinimal.nix"; -# sha256 = "06vbyyhaam3nmzimzasz6la590ni9cbdql3jy29hhw9ln0xf09yy"; -# }) { }; -# -# in mkShellMinimal { -# buildInputs = [ pkgs.coreutils pkgs.hello pkgs.gnugrep pkgs.which ]; -# ENV = "ENV"; -# shellHook = '' -# hello -# printf "%s\n" "$ENV" -# which mkdir -# printf "\nPATH is $PATH\n\n" -# grep --version -# export PS1='\h (${name}) \W \$ ' -# ''; -# } - -{ lib }: - -{ packages ? [ ], inputsFrom ? [ ], buildInputs ? [ ], nativeBuildInputs ? [ ] -, propagatedBuildInputs ? [ ], propagatedNativeBuildInputs ? [ ], ... }@attrs: -let - mergeInputs = name: - (attrs.${name} or [ ]) ++ (lib.subtractLists inputsFrom - (lib.flatten (lib.catAttrs name inputsFrom))); - - rest = builtins.removeAttrs attrs [ - "packages" - "inputsFrom" - "buildInputs" - "nativeBuildInputs" - "propagatedBuildInputs" - "propagatedNativeBuildInputs" - "shellHook" - ]; - - 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.coreutils; - extraNativeBuildInputs = [ ]; - }; - -in stdenv.mkDerivation ({ - name = "nix-shell"; - phases = [ "nobuildPhase" ]; - - buildInputs = mergeInputs "buildInputs"; - nativeBuildInputs = packages ++ (mergeInputs "nativeBuildInputs"); - propagatedBuildInputs = mergeInputs "propagatedBuildInputs"; - propagatedNativeBuildInputs = mergeInputs "propagatedNativeBuildInputs"; - - shellHook = '' - PATH=${stdenv.initialPath}/bin - for package in ${toString buildInputs}; do - export PATH=$package/bin:$PATH - done - '' + lib.concatStringsSep "\n" - (lib.catAttrs "shellHook" (lib.reverseList inputsFrom ++ [ attrs ])); - - nobuildPhase = '' - echo - echo "This derivation is not meant to be built, aborting"; - echo - exit 1 - ''; -} // rest) diff --git a/.config/nixpkgs/shells/ansible.nix b/.config/nixpkgs/shells/ansible/shell.nix index 33f0836..33f0836 100644 --- a/.config/nixpkgs/shells/ansible.nix +++ b/.config/nixpkgs/shells/ansible/shell.nix diff --git a/.config/nixpkgs/shells/cake.nix b/.config/nixpkgs/shells/cake/shell.nix index 1649559..1649559 100644 --- a/.config/nixpkgs/shells/cake.nix +++ b/.config/nixpkgs/shells/cake/shell.nix diff --git a/.config/nixpkgs/shells/coreboot.nix b/.config/nixpkgs/shells/coreboot/shell.nix index 242c621..242c621 100644 --- a/.config/nixpkgs/shells/coreboot.nix +++ b/.config/nixpkgs/shells/coreboot/shell.nix diff --git a/.config/nixpkgs/shells/falcon.nix b/.config/nixpkgs/shells/falcon/shell.nix index 7bd0b54..7bd0b54 100644 --- a/.config/nixpkgs/shells/falcon.nix +++ b/.config/nixpkgs/shells/falcon/shell.nix diff --git a/.config/nixpkgs/shells/pure.nix b/.config/nixpkgs/shells/pure/shell.nix index 2e58365..2e58365 100644 --- a/.config/nixpkgs/shells/pure.nix +++ b/.config/nixpkgs/shells/pure/shell.nix |