depot/third_party/nixpkgs/pkgs/development/octave-modules/octclip/default.nix
Default email 75ca762b89 Project import generated by Copybara.
GitOrigin-RevId: 29b0d4d0b600f8f5dd0b86e3362a33d4181938f9
2021-03-09 11:18:52 +08:00

29 lines
897 B
Nix

{ buildOctavePackage
, lib
, fetchurl
}:
buildOctavePackage rec {
pname = "octclip";
version = "2.0.1";
src = fetchurl {
url = "mirror://sourceforge/octave/${pname}-${version}.tar.gz";
sha256 = "05ijh3izgfaan84n6zp690nap9vnz0zicjd0cgvd1c6askm7vxql";
};
# The only compilation problem is that no formatting specifier was provided
# for the error function. Because errorText is a string, I provide such a
# formatting specifier.
patchPhase = ''
sed -i s/"error(errorText)"/"error(\"%s\", errorText)"/g src/*.cc
'';
meta = with lib; {
name = "GNU Octave Clipping Polygons Tool";
homepage = "https://octave.sourceforge.io/octclip/index.html";
license = with licenses; [ gpl3Plus ]; # modified BSD?
maintainers = with maintainers; [ KarlJoad ];
description = "Perform boolean operations with polygons using the Greiner-Hormann algorithm";
};
}