Files
nixpkgs/pkgs/development/python-modules/clip-anytorch/default.nix
T
Robert Schütz 1a04744f74 treewide: remove superfluous disabled
There is no need to disable Python packages for Python versions that are
no longer in Nixpkgs.
This change was generated using the following script:

    pattern='^\s*disabled\s*=\s*pythonOlder\s*"3\.\([0-9]\|10\)"\s*;\s*$'
    for f in $(find -name '*.nix'); do
        grep -q "$pattern" "$f" || continue
        sed -i "/$pattern/d" "$f"
        if [ $(grep -c pythonOlder "$f") == 1 ]; then
            sed -i '/^\s*pythonOlder,\s*$/d' "$f"
        fi
        nixfmt "$f"
    done
2026-01-11 09:34:20 -08:00

59 lines
1.1 KiB
Nix

{
lib,
buildPythonPackage,
fetchFromGitHub,
fetchpatch,
ftfy,
packaging,
regex,
setuptools,
torch,
torchvision,
tqdm,
}:
buildPythonPackage rec {
pname = "clip-anytorch";
version = "2.6.0";
pyproject = true;
src = fetchFromGitHub {
owner = "rom1504";
repo = "CLIP";
tag = version;
hash = "sha256-4A8R9aEiOWC05uhMQslhVSkQ4hyjs6VsqkFi76miodY=";
};
patches = [
# Import packaging to be compatible with setuptools==70.0.0, https://github.com/rom1504/CLIP/pull/10
(fetchpatch {
name = "setuptools-comp.patch";
url = "https://github.com/rom1504/CLIP/pull/10/commits/8137d899035d889623f6b0a0a0faae88c549dc50.patch";
hash = "sha256-CIcuDk4QH+0g8YEa6TbKGjIcKJQqFviymVH68sKmsyk=";
})
];
build-system = [ setuptools ];
dependencies = [
ftfy
regex
packaging
tqdm
torch
torchvision
];
pythonImportsCheck = [ "clip" ];
# All tests require network access
doCheck = false;
meta = {
description = "Contrastive Language-Image Pretraining";
homepage = "https://github.com/rom1504/CLIP";
license = lib.licenses.mit;
teams = [ lib.teams.tts ];
};
}