diff options
Diffstat (limited to 'nixpkgs/pkgs/development/libraries/shapelib')
-rw-r--r-- | nixpkgs/pkgs/development/libraries/shapelib/default.nix | 35 |
1 files changed, 35 insertions, 0 deletions
diff --git a/nixpkgs/pkgs/development/libraries/shapelib/default.nix b/nixpkgs/pkgs/development/libraries/shapelib/default.nix new file mode 100644 index 000000000000..fe17da91e581 --- /dev/null +++ b/nixpkgs/pkgs/development/libraries/shapelib/default.nix @@ -0,0 +1,35 @@ +{ lib +, stdenv +, fetchurl +, fetchpatch +}: + +stdenv.mkDerivation rec { + pname = "shapelib"; + version = "1.5.0"; + + src = fetchurl { + url = "https://download.osgeo.org/shapelib/shapelib-${version}.tar.gz"; + sha256 = "1qfsgb8b3yiqwvr6h9m81g6k9fjhfys70c22p7kzkbick20a9h0z"; + }; + + patches = [ + (fetchpatch { + name = "CVE-2022-0699.patch"; + url = "https://github.com/OSGeo/shapelib/commit/c75b9281a5b9452d92e1682bdfe6019a13ed819f.patch"; + sha256 = "sha256-zJ7JHUtInA5q/RbkSs1DqVK+UQi2vIw2t1jqxocnQQI="; + }) + ]; + + doCheck = true; + preCheck = '' + patchShebangs tests contrib/tests + ''; + + meta = with lib; { + description = "C Library for reading, writing and updating ESRI Shapefiles"; + homepage = "http://shapelib.maptools.org/"; + license = licenses.gpl2; + maintainers = with maintainers; teams.geospatial.members ++ [ ehmry ]; + }; +} |