1{
2 buildOctavePackage,
3 lib,
4 fetchFromBitbucket,
5 proj, # >= 6.3.0
6}:
7
8buildOctavePackage rec {
9 pname = "octproj";
10 version = "3.0.2";
11
12 src = fetchFromBitbucket {
13 owner = "jgpallero";
14 repo = pname;
15 rev = "OctPROJ-${version}";
16 sha256 = "sha256-d/Zf172Etj+GA0cnGsQaKMjOmirE7Hwyj4UECpg7QFM=";
17 };
18
19 # The sed changes below allow for the package to be compiled.
20 patchPhase = ''
21 sed -i s/"error(errorText)"/"error(\"%s\", errorText)"/g src/*.cc
22 sed -i s/"warning(errorText)"/"warning(\"%s\", errorText)"/g src/*.cc
23 '';
24
25 propagatedBuildInputs = [
26 proj
27 ];
28
29 meta = {
30 homepage = "https://gnu-octave.github.io/packages/octproj/";
31 license = lib.licenses.gpl3Plus;
32 maintainers = with lib.maintainers; [ KarlJoad ];
33 description = "GNU Octave bindings to PROJ library for cartographic projections and CRS transformations";
34 };
35}