Merge pull request #229083 from sikmir/pulseview

pulseview: enable on darwin

authored by

Weijia Wang and committed by
GitHub
41bfa33d 51b7d000

+15 -14
+15 -14
pkgs/applications/science/electronics/pulseview/default.nix
··· 1 - { mkDerivation, lib, fetchurl, fetchpatch, pkg-config, cmake, glib, boost, libsigrok 1 + { lib, stdenv, fetchurl, fetchpatch, pkg-config, cmake, glib, boost, libsigrok 2 2 , libsigrokdecode, libserialport, libzip, udev, libusb1, libftdi1, glibmm 3 - , pcre, python3, qtbase, qtsvg, qttools 3 + , pcre, python3, qtsvg, qttools, wrapQtAppsHook, desktopToDarwinBundle 4 4 }: 5 5 6 - mkDerivation rec { 6 + stdenv.mkDerivation rec { 7 7 pname = "pulseview"; 8 8 version = "0.4.2"; 9 9 10 10 src = fetchurl { 11 - url = "https://sigrok.org/download/source/pulseview/${pname}-${version}.tar.gz"; 12 - sha256 = "1jxbpz1h3m1mgrxw74rnihj8vawgqdpf6c33cqqbyd8v7rxgfhph"; 11 + url = "https://sigrok.org/download/source/pulseview/pulseview-${version}.tar.gz"; 12 + hash = "sha256-8EL3ej4bNb8wZmMw427Dj6uNJIw2k8N7fjXUAcO/q8s="; 13 13 }; 14 14 15 - nativeBuildInputs = [ cmake pkg-config ]; 15 + nativeBuildInputs = [ cmake pkg-config qttools wrapQtAppsHook ] 16 + ++ lib.optional stdenv.isDarwin desktopToDarwinBundle; 16 17 17 18 buildInputs = [ 18 - glib boost libsigrok libsigrokdecode libserialport libzip udev libusb1 libftdi1 glibmm 19 + glib boost libsigrok libsigrokdecode libserialport libzip libusb1 libftdi1 glibmm 19 20 pcre python3 20 - qtbase qtsvg qttools 21 - ]; 21 + qtsvg 22 + ] ++ lib.optional stdenv.isLinux udev; 22 23 23 24 patches = [ 24 25 # Allow building with glib 2.68 25 26 # PR at https://github.com/sigrokproject/pulseview/pull/39 26 27 (fetchpatch { 27 28 url = "https://github.com/sigrokproject/pulseview/commit/fb89dd11f2a4a08b73c498869789e38677181a8d.patch"; 28 - sha256 = "07ifsis9jlc0jjp2d11f7hvw9kaxcbk0a57h2m4xsv1d7vzl9yfh"; 29 + hash = "sha256-0PlE/z4tbN1JFfAUBeZiXc3ENzwuhCaulIBRmXTULh4="; 29 30 }) 30 31 # Fixes replaced/obsolete Qt methods 31 32 (fetchpatch { 32 - url = "https://github.com/sigrokproject/pulseview/commit/ae726b70a7ada9a4be5808e00f0c951318479684.patch"; 33 - sha256 = "sha256-6bFXFAnTO+MBUmslw55gWWSCCPwnejqKGpHeJOoH0e8="; 34 - }) 33 + url = "https://github.com/sigrokproject/pulseview/commit/ae726b70a7ada9a4be5808e00f0c951318479684.patch"; 34 + hash = "sha256-6bFXFAnTO+MBUmslw55gWWSCCPwnejqKGpHeJOoH0e8="; 35 + }) 35 36 ]; 36 37 37 38 meta = with lib; { ··· 39 40 homepage = "https://sigrok.org/"; 40 41 license = licenses.gpl3Plus; 41 42 maintainers = with maintainers; [ bjornfor ]; 42 - platforms = platforms.linux; 43 + platforms = platforms.unix; 43 44 }; 44 45 }