commit 1eb6fa36a3b9b14ee105484a3d915f88fefe747e Author: didier amyot Date: Sat Oct 12 12:18:14 2024 -0400 started flake diff --git a/.gitignore b/.gitignore new file mode 100644 index 0000000..b2be92b --- /dev/null +++ b/.gitignore @@ -0,0 +1 @@ +result diff --git a/flake.lock b/flake.lock new file mode 100644 index 0000000..376f488 --- /dev/null +++ b/flake.lock @@ -0,0 +1,61 @@ +{ + "nodes": { + "flake-utils": { + "inputs": { + "systems": "systems" + }, + "locked": { + "lastModified": 1726560853, + "narHash": "sha256-X6rJYSESBVr3hBoH0WbKE5KvhPU5bloyZ2L4K60/fPQ=", + "owner": "numtide", + "repo": "flake-utils", + "rev": "c1dfcf08411b08f6b8615f7d8971a2bfa81d5e8a", + "type": "github" + }, + "original": { + "owner": "numtide", + "repo": "flake-utils", + "type": "github" + } + }, + "nixpkgs": { + "locked": { + "lastModified": 1728538411, + "narHash": "sha256-f0SBJz1eZ2yOuKUr5CA9BHULGXVSn6miBuUWdTyhUhU=", + "owner": "NixOS", + "repo": "nixpkgs", + "rev": "b69de56fac8c2b6f8fd27f2eca01dcda8e0a4221", + "type": "github" + }, + "original": { + "owner": "NixOS", + "ref": "nixpkgs-unstable", + "repo": "nixpkgs", + "type": "github" + } + }, + "root": { + "inputs": { + "flake-utils": "flake-utils", + "nixpkgs": "nixpkgs" + } + }, + "systems": { + "locked": { + "lastModified": 1681028828, + "narHash": "sha256-Vy1rq5AaRuLzOxct8nz4T6wlgyUR7zLU309k9mBC768=", + "owner": "nix-systems", + "repo": "default", + "rev": "da67096a3b9bf56a91d16901293e51ba5b49a27e", + "type": "github" + }, + "original": { + "owner": "nix-systems", + "repo": "default", + "type": "github" + } + } + }, + "root": "root", + "version": 7 +} diff --git a/flake.nix b/flake.nix new file mode 100644 index 0000000..9bf068f --- /dev/null +++ b/flake.nix @@ -0,0 +1,55 @@ +{ + 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 = "path"; + version = "16.14.0"; + pyproject = true; + + # disabled = pythonOlder "3.7"; + + src = pkgs.python3Packages.fetchPypi { + inherit pname version; + hash = "sha256-26qn79RgL9a6jYKJDceCPWnl3nQKboQtmRmw+q8rao4="; + }; + + 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; [ ]; + }; + }; + + in { + packages = { + default = pkgs.python312Packages.path; + python-path = python-path; + }; + }); +}