From a3665a7c1449aeb04d5f27d14765db4bfc7d5237 Mon Sep 17 00:00:00 2001 From: Fabian Affolter Date: Mon, 19 Feb 2024 14:44:13 +0100 Subject: [PATCH] python311Packages.bitsandbytes: add changelog to meta - equalize content - refactor --- .../python-modules/bitsandbytes/default.nix | 19 ++++++++++++++----- 1 file changed, 14 insertions(+), 5 deletions(-) diff --git a/pkgs/development/python-modules/bitsandbytes/default.nix b/pkgs/development/python-modules/bitsandbytes/default.nix index 3f8c03ab2f8f..189b8a9c6c27 100644 --- a/pkgs/development/python-modules/bitsandbytes/default.nix +++ b/pkgs/development/python-modules/bitsandbytes/default.nix @@ -43,13 +43,13 @@ let in buildPythonPackage { inherit pname version; - format = "pyproject"; + pyproject = true; disabled = pythonOlder "3.7"; src = fetchFromGitHub { owner = "TimDettmers"; - repo = pname; + repo = "bitsandbytes"; rev = "refs/tags/${version}"; hash = "sha256-PZxsFJ6WpfeQqRQrRRBZfZfNY6/TfJFLBeknX24OXcU="; }; @@ -73,8 +73,16 @@ buildPythonPackage { else ''make CUDA_VERSION=CPU cpuonly''; - nativeBuildInputs = [ setuptools wheel ] ++ lib.optionals torch.cudaSupport [ cuda-native-redist ]; - buildInputs = lib.optionals torch.cudaSupport [ cuda-redist ]; + nativeBuildInputs = [ + setuptools + wheel + ] ++ lib.optionals torch.cudaSupport [ + cuda-native-redist + ]; + + buildInputs = lib.optionals torch.cudaSupport [ + cuda-redist + ]; propagatedBuildInputs = [ scipy @@ -88,8 +96,9 @@ buildPythonPackage { ]; meta = with lib; { - homepage = "https://github.com/TimDettmers/bitsandbytes"; description = "8-bit CUDA functions for PyTorch"; + homepage = "https://github.com/TimDettmers/bitsandbytes"; + changelog = "https://github.com/TimDettmers/bitsandbytes/releases/tag/${version}"; license = licenses.mit; maintainers = with maintainers; [ bcdarwin ]; };