@@ -0,0 +1,40 @@
1+{ buildPythonPackage, fetchFromGitHub, lib, passlib, pytestCheckHook, setuptools
2+, setuptools-git, twine, webtest }:
3+
4+buildPythonPackage rec {
5+ pname = "pypiserver";
6+ version = "1.4.2";
7+
8+ src = fetchFromGitHub {
9+ owner = pname;
10+ repo = pname;
11+ rev = "v${version}";
12+ sha256 = "1z5rsmqgin98m6ihy1ww42fxxr6jb4hzldn8vlc9ssv7sawdz8vz";
13+ };
14+
15+ nativeBuildInputs = [ setuptools-git ];
16+
17+ propagatedBuildInputs = [ setuptools ];
18+
19+ preCheck = ''
20+ export HOME=$TMPDIR
21+ '';
22+
23+ checkInputs = [ passlib pytestCheckHook twine webtest ];
24+
25+ # These tests try to use the network
26+ disabledTests = [
27+ "test_pipInstall_openOk"
28+ "test_pipInstall_authedOk"
29+ "test_hash_algos"
30+ ];
31+
32+ pythonImportsCheck = [ "pypiserver" ];
33+
34+ meta = with lib; {
35+ homepage = "https://github.com/pypiserver/pypiserver";
36+ description = "Minimal PyPI server for use with pip/easy_install";
37+ license = with licenses; [ mit zlib ];
38+ maintainers = [ maintainers.austinbutler ];
39+ };
40+}