2021-02-05 17:12:51 +00:00
|
|
|
{ lib, mkDerivation, fetchFromGitHub, pkg-config, cmake
|
2020-11-30 08:33:03 +00:00
|
|
|
, libzip, boost, fftw, qtbase, libusb1, libsigrok4dsl
|
|
|
|
, libsigrokdecode4dsl, python3, fetchpatch
|
2020-04-24 23:36:52 +00:00
|
|
|
}:
|
|
|
|
|
2020-11-30 08:33:03 +00:00
|
|
|
mkDerivation rec {
|
2020-04-24 23:36:52 +00:00
|
|
|
pname = "dsview";
|
|
|
|
|
2020-11-30 08:33:03 +00:00
|
|
|
version = "1.12";
|
2020-04-24 23:36:52 +00:00
|
|
|
|
|
|
|
src = fetchFromGitHub {
|
|
|
|
owner = "DreamSourceLab";
|
|
|
|
repo = "DSView";
|
2020-11-30 08:33:03 +00:00
|
|
|
rev = "v${version}";
|
|
|
|
sha256 = "q7F4FuK/moKkouXTNPZDVon/W/ZmgtNHJka4MiTxA0U=";
|
2020-04-24 23:36:52 +00:00
|
|
|
};
|
|
|
|
|
2020-11-30 08:33:03 +00:00
|
|
|
sourceRoot = "source/DSView";
|
2020-04-24 23:36:52 +00:00
|
|
|
|
|
|
|
patches = [
|
|
|
|
# Fix absolute install paths
|
|
|
|
./install.patch
|
2020-11-30 08:33:03 +00:00
|
|
|
|
|
|
|
# Fix buld with Qt5.15 already merged upstream for future release
|
|
|
|
# Using local file instead of content of commit #33e3d896a47 because
|
|
|
|
# sourceRoot make it unappliable
|
|
|
|
./qt515.patch
|
2021-06-06 07:54:09 +00:00
|
|
|
|
|
|
|
# Change from upstream master that removes extern-C scopes which
|
|
|
|
# cause failures with modern glib. This can likely be removed if
|
|
|
|
# there is an upstream release >1.12
|
|
|
|
(fetchpatch {
|
|
|
|
name = "fix-extern-c.patch";
|
|
|
|
url = "https://github.com/DreamSourceLab/DSView/commit/33cc733abe19872bf5ed08540a94b798d0d4ecf4.patch";
|
|
|
|
sha256 = "sha256-TLfLQa3sdyNHTpMMvId/V6uUuOFihOZMFJOj9frnDoY=";
|
|
|
|
stripLen = 2;
|
|
|
|
extraPrefix = "";
|
|
|
|
})
|
2020-04-24 23:36:52 +00:00
|
|
|
];
|
|
|
|
|
2021-02-05 17:12:51 +00:00
|
|
|
nativeBuildInputs = [ cmake pkg-config ];
|
2020-04-24 23:36:52 +00:00
|
|
|
|
|
|
|
buildInputs = [
|
2020-11-30 08:33:03 +00:00
|
|
|
boost fftw qtbase libusb1 libzip libsigrokdecode4dsl libsigrok4dsl
|
|
|
|
python3
|
2020-04-24 23:36:52 +00:00
|
|
|
];
|
|
|
|
|
2020-11-30 08:33:03 +00:00
|
|
|
meta = with lib; {
|
2020-04-24 23:36:52 +00:00
|
|
|
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;
|
2020-11-30 08:33:03 +00:00
|
|
|
maintainers = with maintainers; [ bachp ];
|
2020-04-24 23:36:52 +00:00
|
|
|
};
|
|
|
|
}
|