@@ -0,0 +1,47 @@
1+{ stdenv, fetchFromGitHub, pkgconfig, cmake, autoreconfHook,
2+glib, libzip, boost, fftw, qtbase,
3+libusb, makeWrapper, libsigrok4dsl, libsigrokdecode4dsl
4+}:
5+
6+stdenv.mkDerivation rec {
7+ name = "dsview-${version}";
8+
9+ version = "0.99";
10+
11+ src = fetchFromGitHub {
12+ owner = "DreamSourceLab";
13+ repo = "DSView";
14+ rev = version;
15+ sha256 = "189i3baqgn8k3aypalayss0g489xi0an9hmvyggvxmgg1cvcwka2";
16+ };
17+
18+ postUnpack = ''
19+ export sourceRoot=$sourceRoot/DSView
20+ '';
21+
22+ patches = [
23+ # Fix absolute install paths
24+ ./install.patch
25+ ];
26+
27+ nativeBuildInputs = [ cmake pkgconfig makeWrapper ];
28+
29+ buildInputs = [
30+ boost fftw qtbase libusb libzip libsigrokdecode4dsl libsigrok4dsl
31+ ];
32+
33+ enableParallelBuilding = true;
34+
35+ postFixup = ''
36+ wrapProgram $out/bin/DSView --suffix QT_PLUGIN_PATH : \
37+ ${qtbase.bin}/${qtbase.qtPluginPrefix}
38+ '';
39+
40+ meta = with stdenv.lib; {
41+ description = "A GUI program for supporting various instruments from DreamSourceLab, including logic analyzer, oscilloscope, etc";
42+ homepage = http://www.dreamsourcelab.com/;
43+ license = licenses.gpl3Plus;
44+ platforms = platforms.linux;
45+ maintainers = [ maintainers.bachp ];
46+ };
47+}