2021-01-06 17:45:14 +00:00
|
|
|
{ buildOctavePackage
|
|
|
|
, lib
|
2022-12-23 16:49:46 +00:00
|
|
|
, fetchFromBitbucket
|
2021-01-06 17:45:14 +00:00
|
|
|
, proj # >= 6.3.0
|
|
|
|
}:
|
|
|
|
|
|
|
|
buildOctavePackage rec {
|
|
|
|
pname = "octproj";
|
2022-12-23 16:48:21 +00:00
|
|
|
version = "3.0.2";
|
2021-01-06 17:45:14 +00:00
|
|
|
|
2022-12-23 16:49:46 +00:00
|
|
|
src = fetchFromBitbucket {
|
|
|
|
owner = "jgpallero";
|
|
|
|
repo = pname;
|
|
|
|
rev = "OctPROJ-${version}";
|
|
|
|
sha256 = "sha256-d/Zf172Etj+GA0cnGsQaKMjOmirE7Hwyj4UECpg7QFM=";
|
2021-01-06 17:45:14 +00:00
|
|
|
};
|
|
|
|
|
|
|
|
# The sed changes below allow for the package to be compiled.
|
|
|
|
patchPhase = ''
|
|
|
|
sed -i s/"error(errorText)"/"error(\"%s\", errorText)"/g src/*.cc
|
|
|
|
sed -i s/"warning(errorText)"/"warning(\"%s\", errorText)"/g src/*.cc
|
|
|
|
'';
|
|
|
|
|
|
|
|
propagatedBuildInputs = [
|
|
|
|
proj
|
|
|
|
];
|
|
|
|
|
|
|
|
meta = with lib; {
|
|
|
|
homepage = "https://octave.sourceforge.io/octproj/index.html";
|
|
|
|
license = licenses.gpl3Plus;
|
|
|
|
maintainers = with maintainers; [ KarlJoad ];
|
|
|
|
description = "GNU Octave bindings to PROJ library for cartographic projections and CRS transformations";
|
|
|
|
};
|
|
|
|
}
|