From 5dbd9c8e021f100c13795d047abf7b1c63d125bb Mon Sep 17 00:00:00 2001 From: Daniel Nagy Date: Mon, 17 Oct 2022 10:58:24 +0200 Subject: [PATCH] hy.withPackages: override meta.mainProgram This drops the user in a hy shell instead of a python shell. --- pkgs/development/python-modules/hy/default.nix | 9 ++++++++- 1 file changed, 8 insertions(+), 1 deletion(-) diff --git a/pkgs/development/python-modules/hy/default.nix b/pkgs/development/python-modules/hy/default.nix index c40ba37cec6..096e1d4aa07 100644 --- a/pkgs/development/python-modules/hy/default.nix +++ b/pkgs/development/python-modules/hy/default.nix @@ -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; {