nixpkgs/pkgs/development/python-modules/snug/default.nix
Linus Heckemann 5aa4b19946 treewide: mark some broken packages as broken
Refs:
e6754980264fe927320d5ff2dbd24ca4fac9a160
1e9cc5b9844ef603fe160e9f671178f96200774f
793a2fe1e8bb886ca2096c5904e1193dc3268b6d
c19cf65261639f749012454932a532aa7c681e4b
f6544d618f30fae0bc4798c4387a8c7c9c047a7c
2019-10-08 17:14:26 +02:00

40 lines
1.1 KiB
Nix

{ buildPythonPackage, lib, fetchFromGitHub, glibcLocales
, pytest, pytest-mock, gentools
, typing, singledispatch, pythonOlder
, isPy3k
}:
buildPythonPackage rec {
pname = "snug";
version = "1.3.4";
disabled = isPy3k;
# Pypi doesn't ship the tests, so we fetch directly from GitHub
src = fetchFromGitHub {
owner = "ariebovenberg";
repo = "snug";
rev = "v${version}";
sha256 = "0jmg0sivz9ljazlnsrrqaizrb3r7asy5pa0dj3idx49gbig4589i";
};
# Prevent unicode decoding error in setup.py
# while reading README.rst and HISTORY.rst
buildInputs = [ glibcLocales ];
LC_ALL = "en_US.UTF-8";
propagatedBuildInputs =
lib.optionals (pythonOlder "3.4") [ singledispatch ] ++
lib.optionals (pythonOlder "3.5") [ typing ];
checkInputs = [ pytest pytest-mock gentools ];
checkPhase = "pytest";
meta = with lib; {
description = "Tiny toolkit for writing reusable interactions with web APIs";
license = licenses.mit;
homepage = https://snug.readthedocs.io/en/latest/;
maintainers = with maintainers; [ mredaelli ];
};
}