about summary refs log tree commit diff
path: root/pkgs/development/octave-modules/octproj/default.nix
blob: bc0dd4ea2132efc1440cc0a050c5e02466a01c9e (plain) (blame)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
{ buildOctavePackage
, lib
, fetchFromBitbucket
, proj # >= 6.3.0
}:

buildOctavePackage rec {
  pname = "octproj";
  version = "3.0.2";

  src = fetchFromBitbucket {
    owner = "jgpallero";
    repo = pname;
    rev = "OctPROJ-${version}";
    sha256 = "sha256-d/Zf172Etj+GA0cnGsQaKMjOmirE7Hwyj4UECpg7QFM=";
  };

  # 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";
  };
}