@@ -1,15 +1,24 @@
1−{ stdenv, fetchurl, buildPythonPackage }:
2−
1+{ stdenv, fetchFromGitHub, buildPythonPackage, pytest }:
2+
33buildPythonPackage rec {
44 name = "${pname}-${version}";
55 pname = "iso3166";
66 version = "0.8";
77
8− src = fetchurl {
9− url = "mirror://pypi/i/${pname}/${name}.tar.gz";
10− sha256 = "fbeb17bed90d15b1f6d6794aa2ea458e5e273a1d29b6f4939423c97640e14933";
8+ src = fetchFromGitHub {
9+ owner = "deactivated";
10+ repo = "python-iso3166";
11+ # repo has no version tags
12+ rev = "f04e499447bbff10af701cf3dd81f6bcdf02f7d7";
13+ sha256 = "0zs9za9dr2nl5srxir08yibmp6nffcapmzala0fgh8ny7y6rafrx";
1114 };
1215
16+ buildInputs = [ pytest ];
17+
18+ checkPhase = ''
19+ py.test
20+ '';
21+
1322 meta = with stdenv.lib; {
1423 homepage = https://github.com/deactivated/python-iso3166;
1524 description = "Self-contained ISO 3166-1 country definitions";