32 homepage = "https://www.picotech.com/downloads/linux";
33 maintainers = with lib.maintainers; [ wirew0rm ] ++ lib.teams.lumiguide.members;
34 platforms = [ "x86_64-linux" ];
35 license = lib.licenses.unfree;
38 libpicoipp = callPackage (
46 stdenv.mkDerivation rec {
48 inherit (sources.libpicoipp) version;
49 src = fetchurl { inherit (sources.libpicoipp) url sha256; };
54 buildInputs = [ (lib.getLib stdenv.cc.cc) ];
59 cp -d opt/picoscope/lib/* $out/lib
60 install -Dt $out/usr/share/doc/libpicoipp usr/share/doc/libpicoipp/copyright
63 meta = shared_meta lib // {
64 sourceProvenance = with lib.sourceTypes; [ binaryNativeCode ];
65 description = "library for picotech oscilloscope software";
70 # If we don't have a platform available, put a dummy version here, so at
71 # least evaluation succeeds.
73 (lib.importJSON ./sources.json).${stdenv.system} or (throw "unsupported system ${stdenv.system}");
82 stdenv.mkDerivation rec {
85 src = fetchurl { inherit url sha256; };
86 # picoscope does a signature check, so we can't patchelf these
87 nativeBuildInputs = [ dpkg ];
91 cp -d opt/picoscope/lib/* $out/lib
98 description = "library for picotech oscilloscope ${name} series";
102 scopePkgs = lib.mapAttrs scopePkg sources;
105 stdenv.mkDerivation rec {
107 inherit (sources.picoscope) version;
109 src = fetchurl { inherit (sources.picoscope) url sha256; };
111 nativeBuildInputs = [
123 scopeLibs = lib.attrVals (map (x: "lib${x}") scopes) scopePkgs;
125 "${gtk-sharp-3_0}/lib/mono/gtk-sharp-3.0:"
126 + (lib.makeLibraryPath (
141 cp -dr usr/share $out/share
142 cp -dr opt/picoscope/* $out/
143 makeWrapper "$(command -v mono)" $out/bin/picoscope \
144 --add-flags $out/lib/PicoScope.GTK.exe \
145 --prefix MONO_PATH : "$MONO_PATH" \
146 --prefix LD_LIBRARY_PATH : "$MONO_PATH" \
152 # services.udev.packages = [ pkgs.picoscope.rules ];
153 # users.groups.pico = {};
154 # users.users.you.extraGroups = [ "pico" ];
155 passthru.rules = writeTextDir "lib/udev/rules.d/95-pico.rules" ''
156 SUBSYSTEMS=="usb", ATTRS{idVendor}=="0ce9", MODE="664",GROUP="pico"
163 description = "Oscilloscope application that works with all PicoScope models";
165 PicoScope for Linux is a powerful oscilloscope application that works
166 with all PicoScope models. The most important features from PicoScope
167 for Windows are included—scope, spectrum analyzer, advanced triggers,
168 automated measurements, interactive zoom, persistence modes and signal
169 generator control. More features are being added all the time.
171 Waveform captures can be saved for off-line analysis, and shared with
172 PicoScope for Linux, PicoScope for macOS and PicoScope for Windows
173 users, or exported in text, CSV and MathWorks MATLAB 4 formats.
175 sourceProvenance = with sourceTypes; [ binaryBytecode ];