refactor: static-nix-shell: remove unused options

This commit is contained in:
Colin 2024-02-25 17:28:00 +00:00
parent c9c1181242
commit 953dd98b0f

View File

@ -10,10 +10,7 @@
let
inherit (builtins) attrNames attrValues concatStringsSep foldl' map typeOf;
inherit (lib) concatMapAttrs;
bash' = bash;
pkgs' = pkgs;
python3' = python3;
zsh' = zsh;
# create an attrset of
# <name> = expected string in the nix-shell invocation
# <value> = package to provide
@ -86,7 +83,7 @@ in rec {
);
# `mkShell` specialization for `nix-shell -i bash` scripts.
mkBash = { pname, pkgs ? {}, srcPath ? pname, bash ? bash', ...}@attrs:
mkBash = { pname, pkgs ? {}, ...}@attrs:
let
pkgsAsAttrs = pkgsToAttrs "" pkgs' pkgs;
pkgsEnv = attrValues pkgsAsAttrs;
@ -98,7 +95,7 @@ in rec {
);
# `mkShell` specialization for `nix-shell -i zsh` scripts.
mkZsh = { pname, pkgs ? {}, srcPath ? pname, zsh ? zsh', ...}@attrs:
mkZsh = { pname, pkgs ? {}, ...}@attrs:
let
pkgsAsAttrs = pkgsToAttrs "" pkgs' pkgs;
pkgsEnv = attrValues pkgsAsAttrs;
@ -112,7 +109,7 @@ in rec {
# `mkShell` specialization for invocations of `nix-shell -p "python3.withPackages (...)"`
# pyPkgs argument is parsed the same as pkgs, except that names are assumed to be relative to `"ps"` if specified in list form.
# TODO: rename to `mkPython3` for consistency with e.g. `mkBash`
mkPython3Bin = { pname, pkgs ? {}, pyPkgs ? {}, srcPath ? pname, python3 ? python3', ... }@attrs:
mkPython3Bin = { pname, pkgs ? {}, pyPkgs ? {}, ... }@attrs:
let
pyEnv = python3.withPackages (ps: attrValues (
pkgsToAttrs "ps." ps pyPkgs