61 lines
1.9 KiB
Nix
61 lines
1.9 KiB
Nix
{
|
|
description = "Pre-built CPU-only OpenCV packages for Python. ";
|
|
inputs = {
|
|
nixpkgs.url = "github:NixOS/nixpkgs/nixpkgs-unstable";
|
|
flake-utils.url = "github:numtide/flake-utils";
|
|
};
|
|
|
|
outputs = { self, nixpkgs, flake-utils }:
|
|
flake-utils.lib.eachDefaultSystem (system:
|
|
let
|
|
pkgs = nixpkgs.legacyPackages.${system};
|
|
pythonPackages = pkgs.python312Packages;
|
|
python-path = pkgs.python3Packages.buildPythonPackage rec {
|
|
# pname = "opencv-python";
|
|
# version = "4.10.0.84";
|
|
|
|
version = "16.14.0";
|
|
pname = "path";
|
|
|
|
pyproject = true;
|
|
|
|
# disabled = pythonOlder "3.7";
|
|
|
|
src = pkgs.python3Packages.fetchPypi {
|
|
inherit pname version;
|
|
hash = "sha256-26qn79RgL9a6jYKJDceCPWnl3nQKboQtmRmw+q8rao4=";
|
|
# hash = "";
|
|
};
|
|
|
|
nativeBuildInputs =
|
|
[ pythonPackages.setuptools pythonPackages.setuptools-scm ];
|
|
|
|
nativeCheckInputs =
|
|
[ pythonPackages.more-itertools pythonPackages.pytestCheckHook ];
|
|
|
|
disabledTests = [
|
|
# creates a file, checks when it was last accessed/modified
|
|
# AssertionError: assert 1650036414.0 == 1650036414.960688
|
|
"test_utime"
|
|
];
|
|
|
|
pythonImportsCheck = [ "path" ];
|
|
|
|
meta = with pkgs.lib; {
|
|
description = "Object-oriented file system path manipulation";
|
|
homepage = "https://github.com/jaraco/path";
|
|
changelog =
|
|
"https://github.com/jaraco/path/blob/v${version}/NEWS.rst";
|
|
license = pkgs.lib.licenses.mit;
|
|
maintainers = with maintainers; [ ];
|
|
};
|
|
};
|
|
|
|
env = pkgs.python312.withPackages (ps: [ python-path ]);
|
|
|
|
in {
|
|
packages = { default = pkgs.python312Packages.path; };
|
|
devShells.default = pkgs.mkShell { buildInputs = with pkgs; [ env ]; };
|
|
});
|
|
}
|