1
0
Fork 1
mirror of https://github.com/NixOS/nixpkgs.git synced 2024-11-26 07:31:20 +00:00

Merge pull request #51796 from bachp/dsview-0.99

dsview: init at 0.99
This commit is contained in:
Dmitry Kalinkin 2018-12-21 17:40:40 -05:00 committed by GitHub
commit 62aea9510c
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
5 changed files with 123 additions and 0 deletions

View file

@ -0,0 +1,47 @@
{ stdenv, fetchFromGitHub, pkgconfig, cmake, autoreconfHook,
glib, libzip, boost, fftw, qtbase,
libusb, makeWrapper, libsigrok4dsl, libsigrokdecode4dsl
}:
stdenv.mkDerivation rec {
name = "dsview-${version}";
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 makeWrapper ];
buildInputs = [
boost fftw qtbase libusb libzip libsigrokdecode4dsl libsigrok4dsl
];
enableParallelBuilding = true;
postFixup = ''
wrapProgram $out/bin/DSView --suffix QT_PLUGIN_PATH : \
${qtbase.bin}/${qtbase.qtPluginPrefix}
'';
meta = with stdenv.lib; {
description = "A GUI program for supporting various instruments from DreamSourceLab, including logic analyzer, oscilloscope, etc";
homepage = http://www.dreamsourcelab.com/;
license = licenses.gpl3Plus;
platforms = platforms.linux;
maintainers = [ maintainers.bachp ];
};
}

View file

@ -0,0 +1,15 @@
diff --git a/CMakeLists.txt b/CMakeLists.txt
index c1c33e1..208a184 100644
--- a/CMakeLists.txt
+++ b/CMakeLists.txt
@@ -403,8 +403,8 @@ install(DIRECTORY res DESTINATION share/${PROJECT_NAME})
install(FILES icons/logo.png DESTINATION share/${PROJECT_NAME} RENAME logo.png)
install(FILES ../NEWS DESTINATION share/${PROJECT_NAME} RENAME NEWS)
install(FILES ../ug.pdf DESTINATION share/${PROJECT_NAME} RENAME ug.pdf)
-install(FILES DreamSourceLab.rules DESTINATION /etc/udev/rules.d/)
-install(FILES DSView.desktop DESTINATION /usr/share/applications/)
+install(FILES DreamSourceLab.rules DESTINATION etc/udev/rules.d/)
+install(FILES DSView.desktop DESTINATION share/applications/)
#===============================================================================
#= Packaging (handled by CPack)

View file

@ -0,0 +1,28 @@
{ stdenv, pkgconfig, autoreconfHook,
glib, libzip, libserialport, check, libusb, libftdi,
systemd, alsaLib, dsview
}:
stdenv.mkDerivation rec {
inherit (dsview) version src;
name = "libsigrok4dsl-${version}";
postUnpack = ''
export sourceRoot=$sourceRoot/libsigrok4DSL
'';
nativeBuildInputs = [ pkgconfig autoreconfHook ];
buildInputs = [
glib libzip libserialport libusb libftdi systemd check alsaLib
];
meta = with stdenv.lib; {
description = "A fork of the sigrok library for usage with DSView";
homepage = http://www.dreamsourcelab.com/;
license = licenses.gpl3Plus;
platforms = platforms.linux;
maintainers = [ maintainers.bachp ];
};
}

View file

@ -0,0 +1,27 @@
{ stdenv, pkgconfig, autoreconfHook,
glib, check, python3, dsview
}:
stdenv.mkDerivation rec {
inherit (dsview) version src;
name = "libsigrokdecode4dsl-${version}";
postUnpack = ''
export sourceRoot=$sourceRoot/libsigrokdecode4DSL
'';
nativeBuildInputs = [ pkgconfig autoreconfHook ];
buildInputs = [
python3 glib check
];
meta = with stdenv.lib; {
description = "A fork of the sigrokdecode library for usage with DSView";
homepage = http://www.dreamsourcelab.com/;
license = licenses.gpl3Plus;
platforms = platforms.linux;
maintainers = [ maintainers.bachp ];
};
}

View file

@ -2361,6 +2361,8 @@ in
dropbear = callPackage ../tools/networking/dropbear { };
dsview = libsForQt5.callPackage ../applications/science/electronics/dsview { };
dtach = callPackage ../tools/misc/dtach { };
dtc = callPackage ../development/compilers/dtc { };
@ -8534,6 +8536,10 @@ in
libsigrokdecode = callPackage ../development/tools/libsigrokdecode { };
# special forks used for dsview
libsigrok4dsl = callPackage ../applications/science/electronics/dsview/libsigrok4dsl.nix { };
libsigrokdecode4dsl = callPackage ../applications/science/electronics/dsview/libsigrokdecode4dsl.nix { };
dcadec = callPackage ../development/tools/dcadec { };
dejagnu = callPackage ../development/tools/misc/dejagnu { };