nixpkgs mirror (for testing)
github.com/NixOS/nixpkgs
nix
1{ buildOctavePackage
2, lib
3, fetchurl
4, cfitsio
5, hdf5
6, pkg-config
7}:
8
9buildOctavePackage rec {
10 pname = "fits";
11 version = "1.0.7";
12
13 src = fetchurl {
14 url = "mirror://sourceforge/octave/${pname}-${version}.tar.gz";
15 sha256 = "0jab5wmrpifqphmrfkqcyrlpc0h4y4m735yc3avqqjajz1rl24lm";
16 };
17
18 # Found here: https://build.opensuse.org/package/view_file/science/octave-forge-fits/octave-forge-fits.spec?expand=1
19 patchPhase = ''
20 sed -i -s -e 's/D_NINT/octave::math::x_nint/g' src/*.cc
21 '';
22
23 nativeBuildInputs = [
24 pkg-config
25 ];
26
27 buildInputs = [
28 hdf5
29 ];
30
31 propagatedBuildInputs = [
32 cfitsio
33 ];
34
35 meta = with lib; {
36 homepage = "https://octave.sourceforge.io/fits/index.html";
37 license = licenses.gpl3Plus;
38 maintainers = with maintainers; [ KarlJoad ];
39 description = "Functions for reading, and writing FITS (Flexible Image Transport System) files using cfitsio";
40 };
41}