hy.withPackages: override meta.mainProgram

This drops the user in a hy shell instead of a python shell.
This commit is contained in:
Daniel Nagy 2022-10-17 10:58:24 +02:00
parent 8856bab955
commit 5dbd9c8e02
No known key found for this signature in database
GPG Key ID: 1B8E8DCB576FB671

View File

@ -61,7 +61,14 @@ buildPythonPackage rec {
# For backwards compatibility with removed pkgs/development/interpreters/hy
# Example usage:
# hy.withPackages (ps: with ps; [ hyrule requests ])
withPackages = python-packages: python.withPackages (ps: (python-packages ps) ++ [ ps.hy ]);
withPackages = python-packages:
(python.withPackages
(ps: (python-packages ps) ++ [ ps.hy ])).overrideAttrs (old: {
name = "${hy.name}-env";
meta = lib.mergeAttrs (builtins.removeAttrs hy.meta [ "license" ]) {
mainProgram = "hy";
};
});
};
meta = with lib; {