X-Git-Url: http://git.scottworley.com/pinch/blobdiff_plain/92b08b27dc0960e4d2f6e8305053149fb514f7e9..ec254da5eb66869830f089edf5e43fa2a1011216:/default.nix?ds=inline diff --git a/default.nix b/default.nix index 6618324..cbbab9e 100644 --- a/default.nix +++ b/default.nix @@ -1,13 +1,18 @@ -{ pkgs ? import { }, lint ? false }: +{ + pkgs ? import { }, + lint ? false, +}: let - checkInputsAreNative = pkgs.lib.hasInfix "nativeCheckInputs" - (builtins.readFile ); - checkInputsName = - if checkInputsAreNative then "nativeCheckInputs" else "checkInputs"; - git-cache-fallback = - { buildPythonPackage, setuptools, fetchgit, git, backoff, mypy, }: + { + buildPythonPackage, + setuptools, + fetchgit, + git, + backoff, + mypy, + }: buildPythonPackage rec { pname = "git-cache"; version = "1.5.0"; @@ -19,32 +24,55 @@ let pyproject = true; build-system = [ setuptools ]; propagatedBuildInputs = [ backoff ]; - "${checkInputsName}" = [ git mypy ]; + nativeCheckInputs = [ + git + mypy + ]; doCheck = true; checkPhase = "./test.sh"; }; -in pkgs.python3Packages.callPackage ({ lib, buildPythonPackage, setuptools, nix - , git, autopep8, mypy, pylint, git-cache, }: - buildPythonPackage rec { - pname = "pinch"; - version = "3.3.2-pre"; - src = lib.cleanSource ./.; - pyproject = true; - build-system = [ setuptools ]; - propagatedBuildInputs = [ git-cache ]; - "${checkInputsName}" = [ nix git mypy ] - ++ lib.optionals lint [ autopep8 pylint ]; - doCheck = true; - checkPhase = "./test.sh"; - meta = { - description = "A replacement for `nix-channel --update`"; - homepage = "https://git.scottworley.com/pinch"; - license = pkgs.lib.licenses.gpl3; - maintainers = with pkgs.lib.maintainers; [ chkno ]; - }; - }) { +in +pkgs.python3Packages.callPackage + ( + { + lib, + buildPythonPackage, + setuptools, + nix, + git, + autopep8, + mypy, + pylint, + git-cache, + }: + buildPythonPackage rec { + pname = "pinch"; + version = "3.3.2"; + src = lib.cleanSource ./.; + pyproject = true; + build-system = [ setuptools ]; + propagatedBuildInputs = [ git-cache ]; + nativeCheckInputs = [ + nix + git + mypy + ] + ++ lib.optionals lint [ + autopep8 + pylint + ]; + doCheck = true; + checkPhase = "./test.sh"; + meta = { + description = "A replacement for `nix-channel --update`"; + homepage = "https://git.scottworley.com/pinch"; + license = pkgs.lib.licenses.gpl3; + maintainers = with pkgs.lib.maintainers; [ chkno ]; + }; + } + ) + { git-cache = - pkgs.python3Packages.git-cache or (pkgs.python3Packages.callPackage - git-cache-fallback { }); + pkgs.python3Packages.git-cache or (pkgs.python3Packages.callPackage git-cache-fallback { }); }