2022-10-20 22:32:37 +00:00
|
|
|
{ lib
|
|
|
|
, stdenv
|
|
|
|
, fetchurl
|
|
|
|
, fetchpatch
|
|
|
|
}:
|
2017-03-17 17:05:34 +00:00
|
|
|
|
|
|
|
stdenv.mkDerivation rec {
|
2021-11-09 21:14:04 +00:00
|
|
|
pname = "shapelib";
|
|
|
|
version = "1.5.0";
|
2017-03-17 17:05:34 +00:00
|
|
|
|
|
|
|
src = fetchurl {
|
2021-11-09 21:14:04 +00:00
|
|
|
url = "https://download.osgeo.org/shapelib/shapelib-${version}.tar.gz";
|
2019-03-03 00:03:14 +00:00
|
|
|
sha256 = "1qfsgb8b3yiqwvr6h9m81g6k9fjhfys70c22p7kzkbick20a9h0z";
|
2017-03-17 17:05:34 +00:00
|
|
|
};
|
|
|
|
|
2022-10-20 22:32:37 +00:00
|
|
|
patches = [
|
|
|
|
(fetchpatch {
|
|
|
|
name = "CVE-2022-0699.patch";
|
|
|
|
url = "https://github.com/OSGeo/shapelib/commit/c75b9281a5b9452d92e1682bdfe6019a13ed819f.patch";
|
|
|
|
sha256 = "sha256-zJ7JHUtInA5q/RbkSs1DqVK+UQi2vIw2t1jqxocnQQI=";
|
|
|
|
})
|
|
|
|
];
|
|
|
|
|
2022-10-20 23:09:07 +00:00
|
|
|
doCheck = true;
|
|
|
|
preCheck = ''
|
|
|
|
patchShebangs tests contrib/tests
|
|
|
|
'';
|
|
|
|
|
2021-01-21 17:00:13 +00:00
|
|
|
meta = with lib; {
|
2017-03-17 17:05:34 +00:00
|
|
|
description = "C Library for reading, writing and updating ESRI Shapefiles";
|
2020-04-01 01:11:51 +00:00
|
|
|
homepage = "http://shapelib.maptools.org/";
|
2017-03-17 17:05:34 +00:00
|
|
|
license = licenses.gpl2;
|
|
|
|
maintainers = [ maintainers.ehmry ];
|
|
|
|
};
|
|
|
|
}
|