about summary refs log tree commit diff
path: root/nixpkgs/pkgs/development/octave-modules/control/default.nix
blob: 74df9fcda085755ae8fef603c63111d3e1dfd819 (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
35
36
37
38
39
40
41
42
43
44
45
46
47
{ buildOctavePackage
, lib
, fetchFromGitHub
, gfortran
, lapack, blas
, autoreconfHook
}:

buildOctavePackage rec {
  pname = "control";
  version = "3.5.2";

  src = fetchFromGitHub {
    owner = "gnu-octave";
    repo = "pkg-control";
    rev = "${pname}-${version}";
    sha256 = "sha256-isUHovpknIFclspHjAtUxGLkrdxitdWSnQMED9n+R3s=";
  };

  # Running autoreconfHook inside the src directory fixes a compile issue about
  # the config.h header for control missing.
  # This is supposed to be handled by control's top-level Makefile, but does not
  # appear to be working. This manually forces it instead.
  preAutoreconf = ''
    pushd src
  '';

  postAutoreconf = ''
    popd
  '';

  nativeBuildInputs = [
    gfortran
    autoreconfHook
  ];

  buildInputs = [
    lapack blas
  ];

  meta = with lib; {
    homepage = "https://gnu-octave.github.io/packages/control/";
    license = licenses.gpl3Plus;
    maintainers = with maintainers; [ KarlJoad ];
    description = "Computer-Aided Control System Design (CACSD) Tools for GNU Octave, based on the proven SLICOT Library";
  };
}