summary refs log tree commit diff
path: root/pkgs/applications/science/electronics/dsview/default.nix
blob: d188365db1dcc7e404570db9387b07361bca78e6 (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
{ stdenv, fetchFromGitHub, pkgconfig, cmake,
libzip, boost, fftw, qtbase,
libusb, wrapQtAppsHook, libsigrok4dsl, libsigrokdecode4dsl
}:

stdenv.mkDerivation rec {
  pname = "dsview";

  version = "0.99";

  src = fetchFromGitHub {
      owner = "DreamSourceLab";
      repo = "DSView";
      rev = version;
      sha256 = "189i3baqgn8k3aypalayss0g489xi0an9hmvyggvxmgg1cvcwka2";
  };

  postUnpack = ''
    export sourceRoot=$sourceRoot/DSView
  '';

  patches = [
    # Fix absolute install paths
    ./install.patch
  ];

  nativeBuildInputs = [ cmake pkgconfig wrapQtAppsHook ];

  buildInputs = [
   boost fftw qtbase libusb libzip libsigrokdecode4dsl libsigrok4dsl
  ];

  enableParallelBuilding = true;

  meta = with stdenv.lib; {
    description = "A GUI program for supporting various instruments from DreamSourceLab, including logic analyzer, oscilloscope, etc";
    homepage = https://www.dreamsourcelab.com/;
    license = licenses.gpl3Plus;
    platforms = platforms.linux;
    maintainers = [ maintainers.bachp ];
  };
}