aboutsummaryrefslogtreecommitdiff
path: root/nixpkgs/pkgs/development/python-modules/us/default.nix
diff options
context:
space:
mode:
Diffstat (limited to 'nixpkgs/pkgs/development/python-modules/us/default.nix')
-rw-r--r--nixpkgs/pkgs/development/python-modules/us/default.nix36
1 files changed, 36 insertions, 0 deletions
diff --git a/nixpkgs/pkgs/development/python-modules/us/default.nix b/nixpkgs/pkgs/development/python-modules/us/default.nix
new file mode 100644
index 00000000000..53b5bc9ad16
--- /dev/null
+++ b/nixpkgs/pkgs/development/python-modules/us/default.nix
@@ -0,0 +1,36 @@
+{ lib
+, buildPythonPackage
+, fetchPypi
+, jellyfish
+}:
+
+buildPythonPackage rec {
+ pname = "us";
+ version = "1.0.0";
+
+ propagatedBuildInputs = [ jellyfish ];
+
+ src = fetchPypi {
+ inherit pname version;
+ sha256 = "1niglalkp7pinibzbxjdz9mxx9qmwkrh8884dag3kr72cfkrpp09";
+ };
+
+ # Upstream requires jellyfish==0.5.6 but we have 0.6.1
+ postPatch = ''
+ substituteInPlace setup.py --replace "jellyfish==" "jellyfish>="
+ '';
+
+ doCheck = false; # pypi version doesn't include tests
+
+ meta = {
+ description = "A package for easily working with US and state metadata";
+ longDescription = ''
+ all US states and territories, postal abbreviations, Associated Press style
+ abbreviations, FIPS codes, capitals, years of statehood, time zones, phonetic
+ state name lookup, is contiguous or continental, URLs to shapefiles for state,
+ census, congressional districts, counties, and census tracts
+ '';
+ homepage = https://github.com/unitedstates/python-us/;
+ license = lib.licenses.bsd3;
+ };
+}