static-nix-shell.mkYsh: init
This commit is contained in:
@@ -3,6 +3,7 @@
|
|||||||
bash,
|
bash,
|
||||||
lib,
|
lib,
|
||||||
makeBinaryWrapper,
|
makeBinaryWrapper,
|
||||||
|
oils-for-unix,
|
||||||
python3,
|
python3,
|
||||||
stdenv,
|
stdenv,
|
||||||
zsh,
|
zsh,
|
||||||
@@ -148,6 +149,18 @@ in rec {
|
|||||||
} // (removeAttrs attrs [ "bash" "pkgs" ])
|
} // (removeAttrs attrs [ "bash" "pkgs" ])
|
||||||
);
|
);
|
||||||
|
|
||||||
|
# `mkShell` specialization for `nix-shell -i ysh` (oil) scripts.
|
||||||
|
mkYsh = { pkgs ? {}, ...}@attrs:
|
||||||
|
let
|
||||||
|
pkgsAsAttrs = pkgsToAttrs "" pkgs' pkgs;
|
||||||
|
pkgsEnv = [ oils-for-unix ] ++ (builtins.attrValues pkgsAsAttrs);
|
||||||
|
pkgExprs = insertTopo "oils-for-unix" (builtins.attrNames pkgsAsAttrs);
|
||||||
|
in mkShell ({
|
||||||
|
inherit pkgsEnv pkgExprs;
|
||||||
|
interpreter = lib.getExe' oils-for-unix "ysh";
|
||||||
|
} // (removeAttrs attrs [ "oils-for-unix" "pkgs" ])
|
||||||
|
);
|
||||||
|
|
||||||
# `mkShell` specialization for `nix-shell -i zsh` scripts.
|
# `mkShell` specialization for `nix-shell -i zsh` scripts.
|
||||||
mkZsh = { pkgs ? {}, ...}@attrs:
|
mkZsh = { pkgs ? {}, ...}@attrs:
|
||||||
let
|
let
|
||||||
|
Reference in New Issue
Block a user