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

41 lines
917 B
Nix

{ buildOctavePackage
, lib
, fetchurl
, cfitsio
, hdf5
, pkg-config
}:
buildOctavePackage rec {
pname = "fits";
version = "1.0.7";
src = fetchurl {
url = "mirror://sourceforge/octave/${pname}-${version}.tar.gz";
sha256 = "0jab5wmrpifqphmrfkqcyrlpc0h4y4m735yc3avqqjajz1rl24lm";
};
# Found here: https://build.opensuse.org/package/view_file/science/octave-forge-fits/octave-forge-fits.spec?expand=1
patchPhase = ''
sed -i -s -e 's/D_NINT/octave::math::x_nint/g' src/*.cc
'';
nativeBuildInputs = [
pkg-config
];
buildInputs = [
hdf5
];
propagatedBuildInputs = [
cfitsio
];
meta = with lib; {
homepage = "https://octave.sourceforge.io/fits/index.html";
license = licenses.gpl3Plus;
maintainers = with maintainers; [ KarlJoad ];
description = "Functions for reading, and writing FITS (Flexible Image Transport System) files using cfitsio";
};
}