simplify flakes cmdline api

This commit is contained in:
DavHau 2021-05-22 21:49:39 +07:00
parent ad45c36495
commit 97d744887b
3 changed files with 1 additions and 5 deletions

View file

@ -101,7 +101,6 @@ rec {
# expose dot interface for flakes cmdline
"with" = pythonWith;
pythonWith = (withDot (__mkPython "'.pythonWith'")).pythonWith;
shellWith = (withDot (__mkPython "'.shellWith'")).shellWith;
dockerImageWith = (withDot (__mkPython "'.dockerImageWith'")).dockerImageWith;
# expose mach-nix' nixpkgs

View file

@ -19,7 +19,7 @@
true
else
false;
usageGen = "usage: nix (build|develop) mach-nix#gen.(python|shell|docker).package1.package2...";
usageGen = "usage: nix (build|shell) mach-nix#gen.(python|docker).package1.package2...";
in
(flake-utils.lib.eachDefaultSystem (system:
let
@ -49,11 +49,9 @@
src = throw usageGen;
passthru = {
python = mach-nix-default.pythonWith;
shell = mach-nix-default.shellWith;
docker = mach-nix-default.dockerImageWith;
inherit (mach-nix-default)
pythonWith
shellWith
dockerImageWith;
};
};

View file

@ -23,6 +23,5 @@ let
in
{
"pythonWith" = gen "" [];
"shellWith" = gen "env" [];
"dockerImageWith" = gen "dockerImage" [];
}