1 { pkgs ? import <nixpkgs> { }, lint ? false }:
5 # Remove after https://github.com/NixOS/nixpkgs/pull/93377 reaches stable
6 backoff-fallback = { lib, buildPythonPackage, fetchFromGitHub, pytestCheckHook
7 , poetry, pytest-asyncio, }:
8 buildPythonPackage rec {
11 src = fetchFromGitHub {
15 sha256 = "1jj0l6pjx747d2yyvnzd3qbm4qr73sq6cc56dhvd8wqfbp5279x0";
18 nativeBuildInputs = [ poetry ];
19 checkInputs = [ pytestCheckHook pytest-asyncio ];
22 git-cache-fallback = { buildPythonPackage, fetchgit, git, backoff, mypy, }:
23 buildPythonPackage rec {
27 url = "https://git.scottworley.com/pub/git/git-cache";
29 sha256 = "0ml1myhmd9mw1z5bwni9fhvx7h9dknhmqq4nyci9n5lvrhbmcdc9";
31 propagatedBuildInputs = [ backoff ];
32 checkInputs = [ git mypy ];
34 checkPhase = "./test.sh";
37 in pkgs.python3Packages.callPackage ({ lib, buildPythonPackage, nix_2_3, git
38 , autopep8, makeWrapper, mypy, pylint, git-cache, }:
39 buildPythonPackage rec {
41 version = "3.0.10-pre";
42 src = lib.cleanSource ./.;
43 buildInputs = [ makeWrapper ];
44 propagatedBuildInputs = [ git-cache ];
45 checkInputs = [ nix_2_3 git mypy ] ++ lib.optionals lint [ autopep8 pylint ];
47 wrapProgram "$out/bin/pinch" --prefix PATH : ${nix_2_3}/bin
50 checkPhase = "./test.sh";
53 pkgs.python3Packages.git-cache or (pkgs.python3Packages.callPackage
56 pkgs.python3Packages.backoff or (pkgs.python3Packages.callPackage
57 backoff-fallback { });
59 nix_2_3 = pkgs.nix_2_3 or pkgs.nix;