mirror of
https://github.com/NixOS/nixpkgs.git
synced 2024-12-03 12:23:02 +00:00
02dab4ab5c
Long term we should move everything over to `pyproject = true`, but in the mean time we can work towards deprecating the implicit `format` paremeter. cc https://github.com/NixOS/nixpkgs/issues/253154 cc @mweinelt @figsoda
55 lines
1.3 KiB
Nix
55 lines
1.3 KiB
Nix
{ buildPythonPackage
|
|
, fetchFromGitHub
|
|
, lib
|
|
, libjpeg
|
|
, numba
|
|
, opencv4
|
|
, pandas
|
|
, pkg-config
|
|
, pytorch-pfn-extras
|
|
, terminaltables
|
|
, tqdm
|
|
}:
|
|
|
|
buildPythonPackage rec {
|
|
pname = "ffcv";
|
|
version = "1.0.0";
|
|
format = "setuptools";
|
|
|
|
src = fetchFromGitHub {
|
|
owner = "libffcv";
|
|
repo = pname;
|
|
rev = "refs/tags/v${version}";
|
|
hash = "sha256-L2mwGFivq/gtAw+1D6U2jbW6VxYgetHX7OUrjwyybqE=";
|
|
};
|
|
|
|
# See https://github.com/libffcv/ffcv/issues/159.
|
|
postPatch = ''
|
|
substituteInPlace setup.py \
|
|
--replace "'assertpy'," "" \
|
|
--replace "'fastargs'," "" \
|
|
--replace "'imgcat'," "" \
|
|
--replace "'matplotlib'," "" \
|
|
--replace "'psutil'," "" \
|
|
--replace "'sklearn'," "" \
|
|
--replace "'webdataset'," ""
|
|
'';
|
|
|
|
nativeBuildInputs = [ pkg-config ];
|
|
buildInputs = [ libjpeg ];
|
|
propagatedBuildInputs = [ opencv4 numba pandas pytorch-pfn-extras terminaltables tqdm ];
|
|
|
|
# `ffcv._libffcv*.so` cannot be loaded in the nix build environment for some
|
|
# reason. See https://github.com/NixOS/nixpkgs/pull/160441#issuecomment-1045204722.
|
|
doCheck = false;
|
|
|
|
pythonImportsCheck = [ "ffcv" ];
|
|
|
|
meta = with lib; {
|
|
description = "FFCV: Fast Forward Computer Vision";
|
|
homepage = "https://ffcv.io";
|
|
license = licenses.asl20;
|
|
maintainers = with maintainers; [ samuela ];
|
|
};
|
|
}
|