From d956922c41d333efb67dd07d3b64b311a5eb7b2c Mon Sep 17 00:00:00 2001 From: Thiago Kenji Okada Date: Tue, 3 May 2022 21:55:21 +0100 Subject: [PATCH] python3Packages.hy: add passthru.withPackages attribute --- pkgs/development/python-modules/hy/default.nix | 15 +++++++++++---- pkgs/top-level/all-packages.nix | 2 +- 2 files changed, 12 insertions(+), 5 deletions(-) diff --git a/pkgs/development/python-modules/hy/default.nix b/pkgs/development/python-modules/hy/default.nix index e37923afad3..cb6fc48aa6d 100644 --- a/pkgs/development/python-modules/hy/default.nix +++ b/pkgs/development/python-modules/hy/default.nix @@ -10,7 +10,8 @@ , pythonOlder , rply , testers -, hyDefinedPythonPackages ? python-packages: [] /* Packages like with python.withPackages */ +, toPythonApplication +, hyDefinedPythonPackages ? python-packages: [ ] /* Packages like with python.withPackages */ }: buildPythonPackage rec { @@ -55,9 +56,15 @@ buildPythonPackage rec { pythonImportsCheck = [ "hy" ]; - passthru.tests.version = testers.testVersion { - package = hy; - command = "hy -v"; + passthru = { + tests.version = testers.testVersion { + package = hy; + command = "hy -v"; + }; + # also for backwards compatibility with removed pkgs/development/interpreters/hy + withPackages = python-packages: (toPythonApplication hy).override { + hyDefinedPythonPackages = python-packages; + }; }; meta = with lib; { diff --git a/pkgs/top-level/all-packages.nix b/pkgs/top-level/all-packages.nix index 763b563b405..88aac1bbaab 100644 --- a/pkgs/top-level/all-packages.nix +++ b/pkgs/top-level/all-packages.nix @@ -35047,7 +35047,7 @@ with pkgs; simplenote = callPackage ../applications/misc/simplenote { }; - hy = with python3Packages; toPythonApplication hy; + hy = python3Packages.hy.withPackages (python-packages: [ ]); wmic-bin = callPackage ../servers/monitoring/plugins/wmic-bin.nix { };