picoscope: 7.1.46-1r4685 -> 7.2.6.7136

+158 -173
+87 -137
pkgs/by-name/pi/picoscope/package.nix
··· 1 1 { 2 - stdenv, 3 - lib, 4 - fetchurl, 2 + cacert, 5 3 dpkg, 6 - makeWrapper, 7 - mono, 8 - gtk-sharp-3_0, 4 + fetchurl, 5 + gdk-pixbuf, 9 6 glib, 7 + glibc, 8 + gtk3, 9 + icu, 10 + lib, 11 + libcap, 12 + librsvg, 10 13 libusb1, 11 - zlib, 12 - gtk3-x11, 13 - callPackage, 14 + makeWrapper, 15 + openssl, 16 + patchelf, 17 + stdenv, 18 + systemdMinimal, 19 + tbb, 14 20 writeTextDir, 15 - scopes ? [ 16 - "picocv" 17 - "ps2000" 18 - "ps2000a" 19 - "ps3000" 20 - "ps3000a" 21 - "ps4000" 22 - "ps4000a" 23 - "ps5000" 24 - "ps5000a" 25 - "ps6000" 26 - "ps6000a" 27 - ], 28 21 }: 29 22 30 23 let 31 - shared_meta = lib: { 32 - homepage = "https://www.picotech.com/downloads/linux"; 33 - maintainers = with lib.maintainers; [ wirew0rm ]; 34 - teams = [ lib.teams.lumiguide ]; 35 - platforms = [ "x86_64-linux" ]; 36 - license = lib.licenses.unfree; 37 - }; 38 - 39 - libpicoipp = callPackage ( 40 - { 41 - stdenv, 42 - lib, 43 - fetchurl, 44 - autoPatchelfHook, 45 - dpkg, 46 - }: 47 - stdenv.mkDerivation { 48 - pname = "libpicoipp"; 49 - inherit (sources.libpicoipp) version; 50 - src = fetchurl { inherit (sources.libpicoipp) url sha256; }; 51 - nativeBuildInputs = [ 52 - dpkg 53 - autoPatchelfHook 54 - ]; 55 - buildInputs = [ (lib.getLib stdenv.cc.cc) ]; 56 - 57 - installPhase = '' 58 - runHook preInstall 59 - mkdir -p $out/lib 60 - cp -d opt/picoscope/lib/* $out/lib 61 - install -Dt $out/usr/share/doc/libpicoipp usr/share/doc/libpicoipp/copyright 62 - runHook postInstall 63 - ''; 64 - meta = shared_meta lib // { 65 - sourceProvenance = with lib.sourceTypes; [ binaryNativeCode ]; 66 - description = "Library for picotech oscilloscope software"; 67 - }; 68 - } 69 - ) { }; 70 - 71 - # If we don't have a platform available, put a dummy version here, so at 72 - # least evaluation succeeds. 73 24 sources = 74 25 (lib.importJSON ./sources.json).${stdenv.system} or (throw "unsupported system ${stdenv.system}"); 75 26 76 - scopePkg = 77 - name: 78 - { 79 - url, 80 - version, 81 - sha256, 82 - }: 83 - stdenv.mkDerivation { 84 - pname = "lib${name}"; 85 - inherit version; 86 - src = fetchurl { inherit url sha256; }; 87 - # picoscope does a signature check, so we can't patchelf these 88 - nativeBuildInputs = [ dpkg ]; 89 - installPhase = '' 90 - runHook preInstall 91 - mkdir -p $out/lib 92 - cp -d opt/picoscope/lib/* $out/lib 93 - runHook postInstall 94 - ''; 95 - meta = 96 - with lib; 97 - shared_meta lib 98 - // { 99 - description = "Library for picotech oscilloscope ${name} series"; 100 - }; 101 - }; 27 + libraryPath = lib.makeLibraryPath libraries; 28 + libraries = [ 29 + gdk-pixbuf 30 + glibc 31 + gtk3 32 + icu 33 + libcap 34 + librsvg 35 + libusb1 36 + openssl 37 + stdenv.cc.cc.lib 38 + systemdMinimal 39 + tbb 40 + ]; 102 41 103 - scopePkgs = lib.mapAttrs scopePkg sources; 42 + gdkLoadersCache = "${gdk-pixbuf.out}/${gdk-pixbuf.moduleDir}.cache"; 104 43 105 44 in 106 - stdenv.mkDerivation rec { 45 + stdenv.mkDerivation { 107 46 pname = "picoscope"; 108 47 inherit (sources.picoscope) version; 109 48 110 - src = fetchurl { inherit (sources.picoscope) url sha256; }; 49 + srcs = lib.mapAttrsToList (_: src: fetchurl { inherit (src) url sha256; }) sources; 50 + 51 + unpackPhase = '' 52 + for src in $srcs; do 53 + dpkg-deb -x "$src" . 54 + done 55 + ''; 111 56 112 57 nativeBuildInputs = [ 113 58 dpkg 114 59 makeWrapper 115 60 ]; 116 - buildInputs = [ 117 - gtk-sharp-3_0 118 - mono 119 - glib 120 - libusb1 121 - zlib 122 - ]; 123 61 124 - scopeLibs = lib.attrVals (map (x: "lib${x}") scopes) scopePkgs; 125 - MONO_PATH = 126 - "${gtk-sharp-3_0}/lib/mono/gtk-sharp-3.0:" 127 - + (lib.makeLibraryPath ( 128 - [ 129 - glib 130 - gtk3-x11 131 - gtk-sharp-3_0 132 - libusb1 133 - zlib 134 - libpicoipp 135 - ] 136 - ++ scopeLibs 137 - )); 62 + buildInputs = libraries; 138 63 139 64 installPhase = '' 140 65 runHook preInstall 141 66 mkdir -p $out/ 142 - cp -dr usr/share $out/share 143 67 cp -dr opt/picoscope/* $out/ 144 - makeWrapper "$(command -v mono)" $out/bin/picoscope \ 145 - --add-flags $out/lib/PicoScope.GTK.exe \ 146 - --prefix MONO_PATH : "$MONO_PATH" \ 147 - --prefix LD_LIBRARY_PATH : "$MONO_PATH" \ 148 - --set LANG C 68 + chmod +x $out/lib/PicoScope.GTK 69 + 70 + # Patch all ELF files to prefer Pico libs then our curated runtime 71 + # Set dynamic loader to Nix's glibc ld.so 72 + for f in $out/lib/{PicoScope.GTK,CrashReporter} $(find $out/lib -type f -name 'lib*.so*'); do 73 + ${patchelf}/bin/patchelf \ 74 + --set-interpreter ${glibc.out}/lib/ld-linux-x86-64.so.2 \ 75 + --set-rpath "$out/lib:${libraryPath}" \ 76 + "$f" || true 77 + done 78 + 79 + # LD_LIBRARY_PATH: not strictly needed for the main exe (rpath already covers it), but required 80 + # for dlopened plugins that ignore rpath or use absolute sonames. 81 + # GDK_PIXBUF_MODULE_FILE: points gdk-pixbuf to Nix’s loader cache so image loaders (gif/svg/png) 82 + # come from our matched version, not the host. This fixes the “g_module_*” symbol errors. 83 + # GIO_MODULE_DIR: restricts GIO to GLib’s core modules only (no dconf/gvfs host bleed-through). 84 + # SSL_CERT_DIR/SSL_CERT_FILE: Gives OpenSSL a known CA bundle so any HTTPS inside the app works 85 + # without querying host paths. 86 + makeWrapper $out/lib/PicoScope.GTK $out/bin/picoscope \ 87 + --set LD_LIBRARY_PATH "$out/lib:${libraryPath}" \ 88 + --set GDK_PIXBUF_MODULE_FILE "${gdkLoadersCache}" \ 89 + --set GIO_MODULE_DIR "${glib.out}/lib/gio/modules" \ 90 + --set SSL_CERT_DIR "${cacert}/etc/ssl/certs" \ 91 + --set SSL_CERT_FILE "${cacert}/etc/ssl/certs/ca-bundle.crt" 149 92 runHook postInstall 150 93 ''; 94 + 95 + # Stripping causes the following error: 96 + # Failure processing application bundle; possible file corruption. 97 + # Arithmetic overflow while reading bundle. 98 + # A fatal error occurred while processing application bundle 99 + dontStrip = true; 151 100 152 101 # usage: 153 102 # services.udev.packages = [ pkgs.picoscope.rules ]; ··· 157 106 SUBSYSTEMS=="usb", ATTRS{idVendor}=="0ce9", MODE="664",GROUP="pico" 158 107 ''; 159 108 160 - meta = 161 - with lib; 162 - shared_meta lib 163 - // { 164 - description = "Oscilloscope application that works with all PicoScope models"; 165 - longDescription = '' 166 - PicoScope for Linux is a powerful oscilloscope application that works 167 - with all PicoScope models. The most important features from PicoScope 168 - for Windows are included—scope, spectrum analyzer, advanced triggers, 169 - automated measurements, interactive zoom, persistence modes and signal 170 - generator control. More features are being added all the time. 109 + meta = { 110 + homepage = "https://www.picotech.com/downloads/linux"; 111 + maintainers = with lib.maintainers; [ wirew0rm ] ++ lib.teams.lumiguide.members; 112 + platforms = [ "x86_64-linux" ]; 113 + license = lib.licenses.unfree; 114 + sourceProvenance = with lib.sourceTypes; [ binaryBytecode ]; 115 + description = "Oscilloscope application that works with all PicoScope models"; 116 + longDescription = '' 117 + PicoScope for Linux is a powerful oscilloscope application that works 118 + with all PicoScope models. The most important features from PicoScope 119 + for Windows are included—scope, spectrum analyzer, advanced triggers, 120 + automated measurements, interactive zoom, persistence modes and signal 121 + generator control. More features are being added all the time. 171 122 172 - Waveform captures can be saved for off-line analysis, and shared with 173 - PicoScope for Linux, PicoScope for macOS and PicoScope for Windows 174 - users, or exported in text, CSV and MathWorks MATLAB 4 formats. 175 - ''; 176 - sourceProvenance = with sourceTypes; [ binaryBytecode ]; 177 - }; 123 + Waveform captures can be saved for off-line analysis, and shared with 124 + PicoScope for Linux, PicoScope for macOS and PicoScope for Windows 125 + users, or exported in text, CSV and MathWorks MATLAB 4 formats. 126 + ''; 127 + }; 178 128 }
+71 -36
pkgs/by-name/pi/picoscope/sources.json
··· 1 1 { 2 2 "x86_64-linux": { 3 3 "libpicocv": { 4 - "sha256": "c0c5bec33c2c7fdd0f26b035ed942175f87012e33d6764c3abf1da31b5626037", 5 - "url": "https://labs.picotech.com/rc/picoscope7/debian/pool/main/libp/libpicocv/libpicocv_1.1.34-beta2r172_amd64.deb", 6 - "version": "1.1.34-beta2r172" 4 + "sha256": "cff2f4b4460ce58d97a8e4dfde55386cd1836b463b551c17928757493089e475", 5 + "url": "https://labs.picotech.com/rc/picoscope7/debian/pool/main/libp/libpicocv/libpicocv_1.1.43-1r443_amd64.deb", 6 + "version": "1.1.43-1r443" 7 + }, 8 + "libpicohrdl": { 9 + "sha256": "920c529b8f49cfff3d1050f45753fa8bfca3f2d8e87c9712447c8f4fc766d60a", 10 + "url": "https://labs.picotech.com/rc/picoscope7/debian/pool/main/libp/libpicohrdl/libpicohrdl_2.0.150-1r6187_amd64.deb", 11 + "version": "2.0.150-1r6187" 7 12 }, 8 13 "libpicoipp": { 9 14 "sha256": "4a84f0af7f4e8cba91fad620eac0cd23c36b2fdda4637904be564286b10ffe1d", 10 15 "url": "https://labs.picotech.com/rc/picoscope7/debian/pool/main/libp/libpicoipp/libpicoipp_1.4.0-4r161_amd64.deb", 11 16 "version": "1.4.0-4r161" 12 17 }, 18 + "libpl1000": { 19 + "sha256": "5f81971fb54dc12ddb3654c95b085cc6d750e932b759cdfaae47d8ad1a1bcaaf", 20 + "url": "https://labs.picotech.com/rc/picoscope7/debian/pool/main/libp/libpl1000/libpl1000_2.0.150-1r6187_amd64.deb", 21 + "version": "2.0.150-1r6187" 22 + }, 23 + "libplcm3": { 24 + "sha256": "82a962c4a1a3049b4c258cf419e8468326f7931bdd3d5288af697271ed39a261", 25 + "url": "https://labs.picotech.com/rc/picoscope7/debian/pool/main/libp/libplcm3/libplcm3_2.0.150-1r6187_amd64.deb", 26 + "version": "2.0.150-1r6187" 27 + }, 13 28 "libps2000": { 14 - "sha256": "473b065e79a7414c1e2b8c8468c8d2654333ac28f3a8c33b535626b33c60d2ca", 15 - "url": "https://labs.picotech.com/rc/picoscope7/debian/pool/main/libp/libps2000/libps2000_3.0.127-3r5552_amd64.deb", 16 - "version": "3.0.127-3r5552" 29 + "sha256": "e51a2870450b9921c9b4a2a26d579b9d44047cf015ef0c51d8a19c9f26309983", 30 + "url": "https://labs.picotech.com/rc/picoscope7/debian/pool/main/libp/libps2000/libps2000_3.0.150-3r6187_amd64.deb", 31 + "version": "3.0.150-3r6187" 17 32 }, 18 33 "libps2000a": { 19 - "sha256": "8eba0052f9c7ef327710f2fba5aa11bec0c20225b39d77bb7b69cf80055c039c", 20 - "url": "https://labs.picotech.com/rc/picoscope7/debian/pool/main/libp/libps2000a/libps2000a_2.1.127-5r5552_amd64.deb", 21 - "version": "2.1.127-5r5552" 34 + "sha256": "19be0c046dbd2725e236f3508af45141a6723ec51b0fcf9a2d7bcd818d53a0b1", 35 + "url": "https://labs.picotech.com/rc/picoscope7/debian/pool/main/libp/libps2000a/libps2000a_2.2.154-5r6530_amd64.deb", 36 + "version": "2.2.154-5r6530" 22 37 }, 23 38 "libps3000": { 24 - "sha256": "4e786036b8de0dd0f922aed947f30a53d31bed46b2df5132e8c9480c8a5d93e9", 25 - "url": "https://labs.picotech.com/rc/picoscope7/debian/pool/main/libp/libps3000/libps3000_4.0.127-3r5552_amd64.deb", 26 - "version": "4.0.127-3r5552" 39 + "sha256": "41bbabe8abc39245612996cbc10053dfe06275b819ab57f9fbf48ef798c18a1a", 40 + "url": "https://labs.picotech.com/rc/picoscope7/debian/pool/main/libp/libps3000/libps3000_4.0.149-3r6187_amd64.deb", 41 + "version": "4.0.149-3r6187" 27 42 }, 28 43 "libps3000a": { 29 - "sha256": "d2bb1e5bb151b0953ed30ca5421bb93d05dab898c33cdc89927e943ea991867a", 30 - "url": "https://labs.picotech.com/rc/picoscope7/debian/pool/main/libp/libps3000a/libps3000a_2.1.127-6r5552_amd64.deb", 31 - "version": "2.1.127-6r5552" 44 + "sha256": "7a01aedb064c366405e9b5d9af5b1adfc27b6b782bda1d0bd3b3bee3e595a41a", 45 + "url": "https://labs.picotech.com/rc/picoscope7/debian/pool/main/libp/libps3000a/libps3000a_2.2.157-6r7555_amd64.deb", 46 + "version": "2.2.157-6r7555" 32 47 }, 33 48 "libps4000": { 34 - "sha256": "4c127e67949835b5ab5c5c8caa55f73c69df354d761aa53d6df99c8f8ac39009", 35 - "url": "https://labs.picotech.com/rc/picoscope7/debian/pool/main/libp/libps4000/libps4000_2.1.127-2r5552_amd64.deb", 36 - "version": "2.1.127-2r5552" 49 + "sha256": "0d1dff842e806e8f193ee319f88203b8fbb0391d53188e77fa9601bbbf8d2ef6", 50 + "url": "https://labs.picotech.com/rc/picoscope7/debian/pool/main/libp/libps4000/libps4000_2.1.151-2r6187_amd64.deb", 51 + "version": "2.1.151-2r6187" 37 52 }, 38 53 "libps4000a": { 39 - "sha256": "26df82bc946e5bb30d599c4c365247bdbaa01e830d4d00630b46a6abcc1eef04", 40 - "url": "https://labs.picotech.com/rc/picoscope7/debian/pool/main/libp/libps4000a/libps4000a_2.1.127-2r5552_amd64.deb", 41 - "version": "2.1.127-2r5552" 54 + "sha256": "1d2ab448ed2b92f305410dbea452268071cb096edb88855e60dd627be7faed45", 55 + "url": "https://labs.picotech.com/rc/picoscope7/debian/pool/main/libp/libps4000a/libps4000a_2.2.206-2r7757_amd64.deb", 56 + "version": "2.2.206-2r7757" 42 57 }, 43 58 "libps5000": { 44 - "sha256": "106ef17862e98c3621f95c377f271c843664f481f84ef918d9eadd013561cd1b", 45 - "url": "https://labs.picotech.com/rc/picoscope7/debian/pool/main/libp/libps5000/libps5000_2.1.127-3r5552_amd64.deb", 46 - "version": "2.1.127-3r5552" 59 + "sha256": "e3dbd0534d1acf5c81b5170d276dcb8d0b612c3fd55f5cc212581d51734079cd", 60 + "url": "https://labs.picotech.com/rc/picoscope7/debian/pool/main/libp/libps5000/libps5000_2.1.151-3r6187_amd64.deb", 61 + "version": "2.1.151-3r6187" 47 62 }, 48 63 "libps5000a": { 49 - "sha256": "fe9def134ef9df6654485911f14ece7b2ee3d79113aeee7826dd6e36bb5de3b4", 50 - "url": "https://labs.picotech.com/rc/picoscope7/debian/pool/main/libp/libps5000a/libps5000a_2.1.127-5r5552_amd64.deb", 51 - "version": "2.1.127-5r5552" 64 + "sha256": "f17ab24eb77df24d4957b848f64815a47227d5eb246c31a111d7eadb43d04cf4", 65 + "url": "https://labs.picotech.com/rc/picoscope7/debian/pool/main/libp/libps5000a/libps5000a_2.2.11-5r5086_amd64.deb", 66 + "version": "2.2.11-5r5086" 52 67 }, 53 68 "libps6000": { 54 - "sha256": "9b08c5b7fb2d34b0e2e98f2e0452a59105f612cd445a9e45d3cac14d931d18f2", 55 - "url": "https://labs.picotech.com/rc/picoscope7/debian/pool/main/libp/libps6000/libps6000_2.1.127-6r5552_amd64.deb", 56 - "version": "2.1.127-6r5552" 69 + "sha256": "01716b5d24f670ca709ca6e0947f3ca1cebb225d3b1037eee692ef049dc1946c", 70 + "url": "https://labs.picotech.com/rc/picoscope7/debian/pool/main/libp/libps6000/libps6000_2.1.151-6r6187_amd64.deb", 71 + "version": "2.1.151-6r6187" 57 72 }, 58 73 "libps6000a": { 59 - "sha256": "2a23ccad72b9be83b87d449b6bb8ded23fd29c85ec9f78a45b6d45b38ccf335b", 60 - "url": "https://labs.picotech.com/rc/picoscope7/debian/pool/main/libp/libps6000a/libps6000a_1.0.127-0r5552_amd64.deb", 61 - "version": "1.0.127-0r5552" 74 + "sha256": "4ecf9543d388c6b972e78d3b2caa09f9a314e9cb6fd54b24c1e227fcaa3f8f12", 75 + "url": "https://labs.picotech.com/rc/picoscope7/debian/pool/main/libp/libps6000a/libps6000a_2.0.156-0r167_amd64.deb", 76 + "version": "2.0.156-0r167" 77 + }, 78 + "libpsospa": { 79 + "sha256": "adaf1f555b8b6f0950731cd642488bd8707a09291e0f1fb7a79ed22867203eb4", 80 + "url": "https://labs.picotech.com/rc/picoscope7/debian/pool/main/libp/libpsospa/libpsospa_1.0.149-0r5787_amd64.deb", 81 + "version": "1.0.149-0r5787" 82 + }, 83 + "libusbdrdaq": { 84 + "sha256": "0906429cd32b34aaaaa41ae9f60f6b47ecbdc0b53e49275a3349141f2e79d806", 85 + "url": "https://labs.picotech.com/rc/picoscope7/debian/pool/main/libu/libusbdrdaq/libusbdrdaq_2.0.150-1r6187_amd64.deb", 86 + "version": "2.0.150-1r6187" 87 + }, 88 + "libusbpt104": { 89 + "sha256": "a73a175dcced17e59ade58edb760c8e11551300841e5c30c16cbd7c1bfe6c540", 90 + "url": "https://labs.picotech.com/rc/picoscope7/debian/pool/main/libu/libusbpt104/libusbpt104_2.0.150-1r6187_amd64.deb", 91 + "version": "2.0.150-1r6187" 92 + }, 93 + "libusbtc08": { 94 + "sha256": "551f3f290d7ee672a4e0533ffebeab746ba552c3a4d0c857edaf7c2494a96659", 95 + "url": "https://labs.picotech.com/rc/picoscope7/debian/pool/main/libu/libusbtc08/libusbtc08_2.0.150-1r6187_amd64.deb", 96 + "version": "2.0.150-1r6187" 62 97 }, 63 98 "picoscope": { 64 - "sha256": "d95f269171da7273b596dae95452789e889f12ef0f15c3baea26dd1b3a8117fc", 65 - "url": "https://labs.picotech.com/rc/picoscope7/debian/pool/main/p/picoscope/picoscope_7.1.17-1r17318_amd64.deb", 66 - "version": "7.1.17-1r17318" 99 + "sha256": "ab4a0db634b93bd5dcf7cb7fca52591c03130d57451d3ddb3942a0e663c4ffd7", 100 + "url": "https://labs.picotech.com/rc/picoscope7/debian/pool/main/p/picoscope/picoscope_7.2.6.7136_amd64.deb", 101 + "version": "7.2.6.7136" 67 102 } 68 103 } 69 104 }