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