From 8c9a5a09f92f28e116723ba3d928af868f71474d Mon Sep 17 00:00:00 2001 From: Joe Hermaszewski Date: Sat, 8 May 2021 15:08:21 +0800 Subject: [PATCH 01/31] picoscope: init at 6.14.44-4r5870 Based on https://github.com/wirew0rm/nixpkgs/tree/pkg/picoscope Sadly it comes with its own version of mono, problems with Nixpkgs' mono described here: https://discourse.nixos.org/t/picoscope-oscilloscope-drivers-and-mono-application/10899 Currently only 2000 series scopes have been tested. --- .../science/electronics/picoscope/default.nix | 131 ++++++++++++++++++ pkgs/top-level/all-packages.nix | 2 + 2 files changed, 133 insertions(+) create mode 100644 pkgs/applications/science/electronics/picoscope/default.nix diff --git a/pkgs/applications/science/electronics/picoscope/default.nix b/pkgs/applications/science/electronics/picoscope/default.nix new file mode 100644 index 000000000000..902ed1fae0d6 --- /dev/null +++ b/pkgs/applications/science/electronics/picoscope/default.nix @@ -0,0 +1,131 @@ +{ stdenv, lib, fetchurl, dpkg, makeWrapper, buildFHSUserEnvBubblewrap }: + +with lib; + +let + pkg = stdenv.mkDerivation rec { + pname = "picoscope"; + # Make sure to update the dependencies to the correct versions when + # updating here! + version = "6.14.44-4r5870"; + + srcs = let base = "https://labs.picotech.com/debian/pool/main"; + in [ + (fetchurl { + url = "${base}/p/picoscope/${pname}_${version}_all.deb"; + sha256 = "05ryzchk6xwcv6cssik05mxhi7bp8i7szc05gjrff60bnaygx324"; + }) + (fetchurl { + url = "${base}/libp/libpicoipp/libpicoipp_1.3.0-4r78_amd64.deb"; + sha256 = "0qd7kdiw3dxfrnd9hyxab3bb3sahyrn0pqnv0x6ca7sg47955h67"; + }) + (fetchurl { + url = "${base}/libu/libusbdrdaq/libusbdrdaq_2.0.61-1r2597_amd64.deb"; + sha256 = "1qacqzg8mh6f3pbjnkzdq1ffj9wbmgykf75x29vd9cbdhxpxpfj4"; + }) + (fetchurl { + url = "${base}/p/picomono/picomono_4.6.2.16-1r02_amd64.deb"; + sha256 = "0cq4pfpsx2kfqn5x4v66zc7q5czcp4r5lm4mwgbfhzkj9rz93brb"; + }) + (fetchurl { + url = "${base}/libp/libpl1000/libpl1000_2.0.61-1r2597_amd64.deb"; + sha256 = "1b4h6wl5kan5vrwgn88mrhiimb5r2hly8a1f3j1cz9r9c68vpdy6"; + }) + (fetchurl { + url = "${base}/libp/libps2000/libps2000_3.0.63-3r2621_amd64.deb"; + sha256 = "1b2mj9825h7mvq12mxpqxga1j5bksgn3dq46cc2wrn2kgyhgfjlv"; + }) + (fetchurl { + url = "${base}/libp/libps2000a/libps2000a_2.1.61-5r2597_amd64.deb"; + sha256 = "12ggs2j29av33pgyclr87fd28yig35rrk730x0wl82ik0inbzv6g"; + }) + (fetchurl { + url = "${base}/libp/libps3000/libps3000_4.0.63-3r2621_amd64.deb"; + sha256 = "0pnq4igblvcilgmfk5sja3hmh1rbdia4sjcg267wg59y8rrbhlkh"; + }) + (fetchurl { + url = "${base}/libp/libps3000a/libps3000a_2.1.61-6r2597_amd64.deb"; + sha256 = "03dvvw0bj0p1mgf89g6f589ff6c8aq9m3ff53mz8nshwfdv4iipv"; + }) + (fetchurl { + url = "${base}/libp/libps4000/libps4000_2.1.61-2r2597_amd64.deb"; + sha256 = "1hc3nd2wvlrhvcbilm0r7alwh72fjhgnxwym27pp7zyj0ng2kk44"; + }) + (fetchurl { + url = "${base}/libp/libps4000a/libps4000a_2.1.61-2r2597_amd64.deb"; + sha256 = "0c7fziq09vk4r6gn8hpl8p6fpvbqbprlv34ibx1pdvkx81adcf8q"; + }) + (fetchurl { + url = "${base}/libp/libps5000/libps5000_2.1.61-3r2597_amd64.deb"; + sha256 = "12nhjpn10ap193kzmndb5lsgfzzwh674p0igla9qxncgy0kxcazd"; + }) + (fetchurl { + url = "${base}/libp/libps5000a/libps5000a_2.1.61-5r2597_amd64.deb"; + sha256 = "0pkccacn81mkn200igy1441mxrknzr3yi1m8ggsrhw41qyxjizbq"; + }) + (fetchurl { + url = "${base}/libp/libps6000/libps6000_2.1.61-6r2597_amd64.deb"; + sha256 = "1bk67w8plxbp9czpsws2kzcysymw2j18467nvss7p0qvcqawy1dv"; + }) + (fetchurl { + url = "${base}/libp/libps6000a/libps6000a_1.0.61-0r2608_amd64.deb"; + sha256 = "1ircb3ilqavm4xbpnw1ic23k1ynqi1yzy5cyf8rnhbqcwckiglsg"; + }) + ]; + + nativeBuildInputs = [ dpkg makeWrapper ]; + + dontConfigure = true; + dontBuild = true; + + unpackPhase = '' + for source in ${toString srcs}; do + echo "unpacking $source" + dpkg-deb -x $source . + done + ''; + + installPhase = '' + mkdir -p "$out" + mv etc opt usr "$out" + + mkdir -p "$out/bin" + makeWrapper "$out/opt/picomono/bin/mono" "$out/bin/picoscope" \ + --add-flags "$out/opt/picoscope/lib/PicoScope.GTK.exe" \ + --prefix LD_LIBRARY_PATH : ${ + lib.makeLibraryPath [ "$out/opt/picoscope" ] + } + ''; + + meta = with lib; { + description = "Oscilloscope application that works with all PicoScope models"; + longDescription = '' + PicoScope for Linux is a powerful oscilloscope application that works + with all PicoScope models. The most important features from PicoScope + for Windows are included—scope, spectrum analyzer, advanced triggers, + automated measurements, interactive zoom, persistence modes and signal + generator control. More features are being added all the time. + + Waveform captures can be saved for off-line analysis, and shared with + PicoScope for Linux, PicoScope for macOS and PicoScope for Windows + users, or exported in text, CSV and MathWorks MATLAB 4 formats. + ''; + homepage = "https://www.picotech.com/downloads/linux"; + license = licenses.unfree; + platforms = platforms.linux; + maintainers = with maintainers; [ expipiplus1 wirew0rm ]; + }; + } + + ; + +in buildFHSUserEnvBubblewrap { + name = "picoscope"; + targetPkgs = pkgs: + (with pkgs; [ pkg glib gtk2 libusb1 gtk-sharp-2_0 libpng12 ]); + runScript = "${pkg}/bin/${pkg.pname}"; + extraBuildCommands = '' + ln -s ${pkg}/opt + ''; +} + diff --git a/pkgs/top-level/all-packages.nix b/pkgs/top-level/all-packages.nix index 06664e9216c3..08d7877af6a2 100644 --- a/pkgs/top-level/all-packages.nix +++ b/pkgs/top-level/all-packages.nix @@ -3980,6 +3980,8 @@ in tk = tk-8_5; }; + picoscope = callPackage ../applications/science/electronics/picoscope { }; + picotts = callPackage ../tools/audio/picotts { }; wgetpaste = callPackage ../tools/text/wgetpaste { }; From 85fce57861bec51fbf154ebb25b91cccab2f5976 Mon Sep 17 00:00:00 2001 From: Yorick van Pelt Date: Tue, 18 May 2021 13:32:48 +0200 Subject: [PATCH 02/31] picoscope: use nixpkgs mono, generated sources.json --- .../science/electronics/picoscope/default.nix | 220 +++++++++--------- .../electronics/picoscope/sources.json | 146 ++++++++++++ .../science/electronics/picoscope/update.py | 44 ++++ 3 files changed, 302 insertions(+), 108 deletions(-) create mode 100644 pkgs/applications/science/electronics/picoscope/sources.json create mode 100755 pkgs/applications/science/electronics/picoscope/update.py diff --git a/pkgs/applications/science/electronics/picoscope/default.nix b/pkgs/applications/science/electronics/picoscope/default.nix index 902ed1fae0d6..038d98f4e0a8 100644 --- a/pkgs/applications/science/electronics/picoscope/default.nix +++ b/pkgs/applications/science/electronics/picoscope/default.nix @@ -1,104 +1,124 @@ -{ stdenv, lib, fetchurl, dpkg, makeWrapper, buildFHSUserEnvBubblewrap }: - -with lib; +{ stdenv, lib, fetchurl, dpkg, makeWrapper , mono, gtk-sharp-2_0 +, glib, libusb1 , zlib, gtk2-x11, gnome2, callPackage +, scopes ? [ + "pl1000" + "ps2000" + "ps2000a" + "ps3000" + "ps3000a" + "ps4000" + "ps4000a" + "ps5000" + "ps5000a" + "ps6000" + "ps6000a" + "usbdrdaq" +] }: let - pkg = stdenv.mkDerivation rec { - pname = "picoscope"; - # Make sure to update the dependencies to the correct versions when - # updating here! - version = "6.14.44-4r5870"; + shared_meta = lib: + with lib; { + homepage = "https://www.picotech.com/downloads/linux"; + maintainers = with maintainers; [ expipiplus1 yorickvp wirew0rm ]; + platforms = [ "x86_64-linux" "armv7l-linux" ]; + license = licenses.unfree; + }; - srcs = let base = "https://labs.picotech.com/debian/pool/main"; - in [ - (fetchurl { - url = "${base}/p/picoscope/${pname}_${version}_all.deb"; - sha256 = "05ryzchk6xwcv6cssik05mxhi7bp8i7szc05gjrff60bnaygx324"; - }) - (fetchurl { - url = "${base}/libp/libpicoipp/libpicoipp_1.3.0-4r78_amd64.deb"; - sha256 = "0qd7kdiw3dxfrnd9hyxab3bb3sahyrn0pqnv0x6ca7sg47955h67"; - }) - (fetchurl { - url = "${base}/libu/libusbdrdaq/libusbdrdaq_2.0.61-1r2597_amd64.deb"; - sha256 = "1qacqzg8mh6f3pbjnkzdq1ffj9wbmgykf75x29vd9cbdhxpxpfj4"; - }) - (fetchurl { - url = "${base}/p/picomono/picomono_4.6.2.16-1r02_amd64.deb"; - sha256 = "0cq4pfpsx2kfqn5x4v66zc7q5czcp4r5lm4mwgbfhzkj9rz93brb"; - }) - (fetchurl { - url = "${base}/libp/libpl1000/libpl1000_2.0.61-1r2597_amd64.deb"; - sha256 = "1b4h6wl5kan5vrwgn88mrhiimb5r2hly8a1f3j1cz9r9c68vpdy6"; - }) - (fetchurl { - url = "${base}/libp/libps2000/libps2000_3.0.63-3r2621_amd64.deb"; - sha256 = "1b2mj9825h7mvq12mxpqxga1j5bksgn3dq46cc2wrn2kgyhgfjlv"; - }) - (fetchurl { - url = "${base}/libp/libps2000a/libps2000a_2.1.61-5r2597_amd64.deb"; - sha256 = "12ggs2j29av33pgyclr87fd28yig35rrk730x0wl82ik0inbzv6g"; - }) - (fetchurl { - url = "${base}/libp/libps3000/libps3000_4.0.63-3r2621_amd64.deb"; - sha256 = "0pnq4igblvcilgmfk5sja3hmh1rbdia4sjcg267wg59y8rrbhlkh"; - }) - (fetchurl { - url = "${base}/libp/libps3000a/libps3000a_2.1.61-6r2597_amd64.deb"; - sha256 = "03dvvw0bj0p1mgf89g6f589ff6c8aq9m3ff53mz8nshwfdv4iipv"; - }) - (fetchurl { - url = "${base}/libp/libps4000/libps4000_2.1.61-2r2597_amd64.deb"; - sha256 = "1hc3nd2wvlrhvcbilm0r7alwh72fjhgnxwym27pp7zyj0ng2kk44"; - }) - (fetchurl { - url = "${base}/libp/libps4000a/libps4000a_2.1.61-2r2597_amd64.deb"; - sha256 = "0c7fziq09vk4r6gn8hpl8p6fpvbqbprlv34ibx1pdvkx81adcf8q"; - }) - (fetchurl { - url = "${base}/libp/libps5000/libps5000_2.1.61-3r2597_amd64.deb"; - sha256 = "12nhjpn10ap193kzmndb5lsgfzzwh674p0igla9qxncgy0kxcazd"; - }) - (fetchurl { - url = "${base}/libp/libps5000a/libps5000a_2.1.61-5r2597_amd64.deb"; - sha256 = "0pkccacn81mkn200igy1441mxrknzr3yi1m8ggsrhw41qyxjizbq"; - }) - (fetchurl { - url = "${base}/libp/libps6000/libps6000_2.1.61-6r2597_amd64.deb"; - sha256 = "1bk67w8plxbp9czpsws2kzcysymw2j18467nvss7p0qvcqawy1dv"; - }) - (fetchurl { - url = "${base}/libp/libps6000a/libps6000a_1.0.61-0r2608_amd64.deb"; - sha256 = "1ircb3ilqavm4xbpnw1ic23k1ynqi1yzy5cyf8rnhbqcwckiglsg"; - }) - ]; + libpicoipp = callPackage ({ stdenv, lib, fetchurl, autoPatchelfHook, dpkg }: + stdenv.mkDerivation rec { + pname = "libpicoipp"; + inherit (sources.libpicoipp) version; + src = fetchurl { inherit (sources.libpicoipp) url sha256; }; + nativeBuildInputs = [ dpkg autoPatchelfHook ]; + buildInputs = [ stdenv.cc.cc.lib ]; + sourceRoot = "."; + unpackCmd = "dpkg-deb -x $src ."; + installPhase = '' + runHook preInstall + mkdir -p $out/lib + cp -d opt/picoscope/lib/* $out/lib + install -Dt $out/usr/share/doc/libpicoipp usr/share/doc/libpicoipp/copyright + runHook postInstall + ''; + meta = with lib; + shared_meta lib // { + description = "library for picotech oscilloscope software"; + }; + }) { }; + sources = + (builtins.fromJSON (builtins.readFile ./sources.json)).${stdenv.system}; + scopePkg = name: + { url, version, sha256 }: + stdenv.mkDerivation rec { + pname = "lib${name}"; + inherit version; + src = fetchurl { inherit url sha256; }; + # picoscope does a signature check, so we can't patchelf these + nativeBuildInputs = [ dpkg ]; + sourceRoot = "."; + unpackCmd = "dpkg-deb -x $src ."; + installPhase = '' + runHook preInstall + mkdir -p $out/lib + cp -d opt/picoscope/lib/* $out/lib + runHook postInstall + ''; + meta = with lib; + shared_meta lib // { + description = "library for picotech oscilloscope ${name} series"; + }; + }; - nativeBuildInputs = [ dpkg makeWrapper ]; + scopePkgs = lib.mapAttrs scopePkg sources; - dontConfigure = true; - dontBuild = true; +in stdenv.mkDerivation rec { + pname = "picoscope"; + inherit (sources.picoscope) version; - unpackPhase = '' - for source in ${toString srcs}; do - echo "unpacking $source" - dpkg-deb -x $source . - done - ''; + src = fetchurl { inherit (sources.picoscope) url sha256; }; - installPhase = '' - mkdir -p "$out" - mv etc opt usr "$out" + nativeBuildInputs = [ dpkg makeWrapper ]; + buildInputs = [ gtk-sharp-2_0 mono glib libusb1 zlib ]; - mkdir -p "$out/bin" - makeWrapper "$out/opt/picomono/bin/mono" "$out/bin/picoscope" \ - --add-flags "$out/opt/picoscope/lib/PicoScope.GTK.exe" \ - --prefix LD_LIBRARY_PATH : ${ - lib.makeLibraryPath [ "$out/opt/picoscope" ] - } - ''; + unpackCmd = "dpkg-deb -x $src ."; + sourceRoot = "."; + scopeLibs = lib.attrVals (map (x: "lib${x}") scopes) scopePkgs; + MONO_PATH = "${gtk-sharp-2_0}/lib/mono/gtk-sharp-2.0:" + (lib.makeLibraryPath + ([ + glib + gtk2-x11 + gnome2.libglade + gtk-sharp-2_0 + libpicoipp + libusb1 + zlib + stdenv.cc.cc.lib + ] ++ scopeLibs)); - meta = with lib; { - description = "Oscilloscope application that works with all PicoScope models"; + installPhase = '' + runHook preInstall + mkdir -p $out/ + cp -dr usr/share $out/share + cp -dr opt/picoscope/* $out/ + makeWrapper "$(command -v mono)" $out/bin/picoscope \ + --add-flags $out/lib/PicoScope.GTK.exe \ + --prefix MONO_PATH : "$MONO_PATH" \ + --prefix LD_LIBRARY_PATH : "$MONO_PATH" + runHook postInstall + ''; + + # usage: + # services.udev.packages = [ pkgs.picoscope.rules ]; + # users.groups.pico = {}; + # users.users.you.extraGroups = [ "pico" ]; + passthru.rules = lib.writeTextDir "lib/udev/rules.d/95-pico.rules" '' + SUBSYSTEMS=="usb", ATTRS{idVendor}=="0ce9", MODE="664",GROUP="pico" + ''; + + meta = with lib; + shared_meta lib // { + description = + "Oscilloscope application that works with all PicoScope models"; longDescription = '' PicoScope for Linux is a powerful oscilloscope application that works with all PicoScope models. The most important features from PicoScope @@ -110,22 +130,6 @@ let PicoScope for Linux, PicoScope for macOS and PicoScope for Windows users, or exported in text, CSV and MathWorks MATLAB 4 formats. ''; - homepage = "https://www.picotech.com/downloads/linux"; - license = licenses.unfree; - platforms = platforms.linux; - maintainers = with maintainers; [ expipiplus1 wirew0rm ]; }; - } - - ; - -in buildFHSUserEnvBubblewrap { - name = "picoscope"; - targetPkgs = pkgs: - (with pkgs; [ pkg glib gtk2 libusb1 gtk-sharp-2_0 libpng12 ]); - runScript = "${pkg}/bin/${pkg.pname}"; - extraBuildCommands = '' - ln -s ${pkg}/opt - ''; } diff --git a/pkgs/applications/science/electronics/picoscope/sources.json b/pkgs/applications/science/electronics/picoscope/sources.json new file mode 100644 index 000000000000..d4116260c2d4 --- /dev/null +++ b/pkgs/applications/science/electronics/picoscope/sources.json @@ -0,0 +1,146 @@ +{ + "armv7l-linux": { + "libpl1000": { + "sha256": "10827029023fb1fd8085f216fc75e09010acb081fdaa4a65f81cfd7436bed84b", + "url": "https://labs.picotech.com/debian/pool/main/libp/libpl1000/libpl1000_2.0.61-1r2597_armhf.deb", + "version": "2.0.61-1r2597" + }, + "libps2000": { + "sha256": "21d09b8a792ad7c6cd90dc51ba073c21c7dbd17ec6e5c88752b7c2c5a15be73f", + "url": "https://labs.picotech.com/debian/pool/main/libp/libps2000/libps2000_3.0.63-3r2621_armhf.deb", + "version": "3.0.63-3r2621" + }, + "libps2000a": { + "sha256": "8293fe86d6d0f12dcefc67d3bf694ec7922dd28c80baab8aa6bc5a01a152e0a9", + "url": "https://labs.picotech.com/debian/pool/main/libp/libps2000a/libps2000a_2.1.61-5r2597_armhf.deb", + "version": "2.1.61-5r2597" + }, + "libps3000": { + "sha256": "3289ad3671767ab767f9308106d664a57a09578142a82fc62ec4b68df23e8ef1", + "url": "https://labs.picotech.com/debian/pool/main/libp/libps3000/libps3000_4.0.63-3r2621_armhf.deb", + "version": "4.0.63-3r2621" + }, + "libps3000a": { + "sha256": "e5c8c1dc94cc9924ec08a821fd92351c8ef05df8bb53bd2855e59d81358a33d6", + "url": "https://labs.picotech.com/debian/pool/main/libp/libps3000a/libps3000a_2.1.61-6r2597_armhf.deb", + "version": "2.1.61-6r2597" + }, + "libps4000": { + "sha256": "5c2abeb819964c2902e5a17b22ecf184d5fb78cd399cf56b3d0301428f7e4631", + "url": "https://labs.picotech.com/debian/pool/main/libp/libps4000/libps4000_2.1.61-2r2597_armhf.deb", + "version": "2.1.61-2r2597" + }, + "libps4000a": { + "sha256": "fd3a37c9d22137bed5c7a7013e0afc408e7dc9abac759b900ac23733fcd736e8", + "url": "https://labs.picotech.com/debian/pool/main/libp/libps4000a/libps4000a_2.1.61-2r2597_armhf.deb", + "version": "2.1.61-2r2597" + }, + "libps5000": { + "sha256": "5554829e24778b77da4a4ea30d074859bec30b56c1400aa4771429961050a7d6", + "url": "https://labs.picotech.com/debian/pool/main/libp/libps5000/libps5000_2.1.61-3r2597_armhf.deb", + "version": "2.1.61-3r2597" + }, + "libps5000a": { + "sha256": "ee88e0c5f4f1f398c62b9672c30a08a94b14e1402d4769b66ed90c3dd9368d38", + "url": "https://labs.picotech.com/debian/pool/main/libp/libps5000a/libps5000a_2.1.61-5r2597_armhf.deb", + "version": "2.1.61-5r2597" + }, + "libps6000": { + "sha256": "1470ca16d2b48141d0385e903d5aab883164fa6c9f29abd79713b52abc532442", + "url": "https://labs.picotech.com/debian/pool/main/libp/libps6000/libps6000_2.1.61-6r2597_armhf.deb", + "version": "2.1.61-6r2597" + }, + "libps6000a": { + "sha256": "7eb5668fe22c6f042a63a218e1b2eed983d8d9d92bfc525a98bd95a37f3de3ef", + "url": "https://labs.picotech.com/debian/pool/main/libp/libps6000a/libps6000a_1.0.61-0r2608_armhf.deb", + "version": "1.0.61-0r2608" + }, + "libusbdrdaq": { + "sha256": "3dc7c4ea506eb0384d2b81214c00f39951bfaf196988ccf373a3e3e2dd342c41", + "url": "https://labs.picotech.com/debian/pool/main/libu/libusbdrdaq/libusbdrdaq_2.0.61-1r2597_armhf.deb", + "version": "2.0.61-1r2597" + }, + "picoscope": { + "sha256": "448cfebcb20b18e7b27c05b0af4f44779d087b2d6046ad99d98c773321fb3e17", + "url": "https://labs.picotech.com/debian/pool/main/p/picoscope/picoscope_6.14.44-4r5870_all.deb", + "version": "6.14.44-4r5870" + } + }, + "x86_64-linux": { + "libpicoipp": { + "sha256": "c7c052d2214f1fc54c07dbe20b6cf650e9b1d658aa7b989acdaeb7c1639ba761", + "url": "https://labs.picotech.com/debian/pool/main/libp/libpicoipp/libpicoipp_1.3.0-4r78_amd64.deb", + "version": "1.3.0-4r78" + }, + "libpl1000": { + "sha256": "c6b7bb916129a7cf821c2e28e42914b9ac1a23cc1521fb78dec5aa59283790ac", + "url": "https://labs.picotech.com/debian/pool/main/libp/libpl1000/libpl1000_2.0.61-1r2597_amd64.deb", + "version": "2.0.61-1r2597" + }, + "libps2000": { + "sha256": "9b4af7a07f53d8cc056386e036ecd3731519d4ebf8f62a02def5c022509255ac", + "url": "https://labs.picotech.com/debian/pool/main/libp/libps2000/libps2000_3.0.63-3r2621_amd64.deb", + "version": "3.0.63-3r2621" + }, + "libps2000a": { + "sha256": "cfecbf6c04330a4439e8609c9973192f7a249a3b2853e6df1d63ab24a4d0ef89", + "url": "https://labs.picotech.com/debian/pool/main/libp/libps2000a/libps2000a_2.1.61-5r2597_amd64.deb", + "version": "2.1.61-5r2597" + }, + "libps3000": { + "sha256": "7052b872463e95c78f118f494d546c2b0758e1505297e9eaa3916dba5e24d85e", + "url": "https://labs.picotech.com/debian/pool/main/libp/libps3000/libps3000_4.0.63-3r2621_amd64.deb", + "version": "4.0.63-3r2621" + }, + "libps3000a": { + "sha256": "fbc64876731c6a8b7e1dc5b95113568819e7122acebc84dcabe102b900dfbb0d", + "url": "https://labs.picotech.com/debian/pool/main/libp/libps3000a/libps3000a_2.1.61-6r2597_amd64.deb", + "version": "2.1.61-6r2597" + }, + "libps4000": { + "sha256": "84cc299e05d2ff73ef11d5f36e1f944e1cc8a93a19541a17db30d3cd45b383c1", + "url": "https://labs.picotech.com/debian/pool/main/libp/libps4000/libps4000_2.1.61-2r2597_amd64.deb", + "version": "2.1.61-2r2597" + }, + "libps4000a": { + "sha256": "1839d654407dee76435f918c4df35d78edebcc45f442649fc964ee0470fcee30", + "url": "https://labs.picotech.com/debian/pool/main/libp/libps4000a/libps4000a_2.1.61-2r2597_amd64.deb", + "version": "2.1.61-2r2597" + }, + "libps5000": { + "sha256": "ed2bd627f08fd98e93a22f824b8e81fc7ff7342dabd9fae748e12a10ec95d08a", + "url": "https://labs.picotech.com/debian/pool/main/libp/libps5000/libps5000_2.1.61-3r2597_amd64.deb", + "version": "2.1.61-3r2597" + }, + "libps5000a": { + "sha256": "78fd28bbc7817098f57ba886e847fe76e65e0321c1bf0880b0b3066499626c5e", + "url": "https://labs.picotech.com/debian/pool/main/libp/libps5000a/libps5000a_2.1.61-5r2597_amd64.deb", + "version": "2.1.61-5r2597" + }, + "libps6000": { + "sha256": "bb05cf15661b837bb4def618828214bc7aedd99f42737d3f4b77757a113f66ae", + "url": "https://labs.picotech.com/debian/pool/main/libp/libps6000/libps6000_2.1.61-6r2597_amd64.deb", + "version": "2.1.61-6r2597" + }, + "libps6000a": { + "sha256": "4fd31727e30c2f6833729e15ff7d88d8fa30876031707b5727752b4ce3582cc7", + "url": "https://labs.picotech.com/debian/pool/main/libp/libps6000a/libps6000a_1.0.61-0r2608_amd64.deb", + "version": "1.0.61-0r2608" + }, + "libusbdrdaq": { + "sha256": "44badb6f876db1d47612bd1c37fdab8b27e95cc0ed4f2bd71dcec08adec74ce1", + "url": "https://labs.picotech.com/debian/pool/main/libu/libusbdrdaq/libusbdrdaq_2.0.61-1r2597_amd64.deb", + "version": "2.0.61-1r2597" + }, + "picomono": { + "sha256": "2baf917e4e727ee8d6e395545a32b9ecb3820ffbc66cd28bc56e8aaeafbb0433", + "url": "https://labs.picotech.com/debian/pool/main/p/picomono/picomono_4.6.2.16-1r02_amd64.deb", + "version": "4.6.2.16-1r02" + }, + "picoscope": { + "sha256": "448cfebcb20b18e7b27c05b0af4f44779d087b2d6046ad99d98c773321fb3e17", + "url": "https://labs.picotech.com/debian/pool/main/p/picoscope/picoscope_6.14.44-4r5870_all.deb", + "version": "6.14.44-4r5870" + } + } +} diff --git a/pkgs/applications/science/electronics/picoscope/update.py b/pkgs/applications/science/electronics/picoscope/update.py new file mode 100755 index 000000000000..0a5e97978d54 --- /dev/null +++ b/pkgs/applications/science/electronics/picoscope/update.py @@ -0,0 +1,44 @@ +#!/usr/bin/env nix-shell +#!nix-shell --pure -i python3 -p "python3.withPackages (ps: with ps; [ requests ])" +import json +import os +import requests +import sys + +def parse_packages(text): + res = [] + for package in resp.text.split("\n\n"): + if not package: continue + pkg = {} + for field in package.split("\n"): + if field.startswith(" "): # multiline string + pkg[k] += "\n" + field[1:] + else: + [k, v] = field.split(": ", 1) + pkg[k] = v + res.append(pkg) + return res + +def generate_sources(packages): + sources_spec = {} + for pkg in pkgs: + sources_spec[pkg['Package']] = { + "url": "https://labs.picotech.com/debian/" + pkg["Filename"], + "sha256": pkg["SHA256"], + "version": pkg["Version"] + } + return sources_spec + +out = {} +for nix_system, release in {"x86_64-linux": "amd64", "armv7l-linux": "armhf"}.items(): + resp = requests.get("https://labs.picotech.com/debian/dists/picoscope/main/binary-"+release+"/Packages") + if resp.status_code != 200: + print("error: could not fetch data for release {} (code {})".format(release, resp.code), file=sys.stderr) + sys.exit(1) + pkgs = parse_packages(resp.text) + out[nix_system] = generate_sources(pkgs) + +with open(os.path.dirname(__file__) + "/sources.json", "w") as f: + json.dump(out, f, indent=2, sort_keys=True) + f.write('\n') + From 81175b442f4e4e3c9c8aa807b92047f73647458e Mon Sep 17 00:00:00 2001 From: pennae Date: Sun, 24 Oct 2021 19:11:45 +0200 Subject: [PATCH 03/31] nixos/mosquitto: refactor test a little --- nixos/tests/mosquitto.nix | 19 ++++++------------- 1 file changed, 6 insertions(+), 13 deletions(-) diff --git a/nixos/tests/mosquitto.nix b/nixos/tests/mosquitto.nix index eb47e97ba04b..bcca5372eaef 100644 --- a/nixos/tests/mosquitto.nix +++ b/nixos/tests/mosquitto.nix @@ -136,9 +136,8 @@ in { def publish(args, user, topic="${topic}", port=${toString port}): return "{} {}".format(mosquitto_cmd("pub", user, topic, port), args) - def subscribe(args, user, topic="${topic}", port=${toString port}): - return "{} -C 1 {}".format(mosquitto_cmd("sub", user, topic, port), args) + return "{} -W 5 -C 1 {}".format(mosquitto_cmd("sub", user, topic, port), args) def parallel(*fns): from threading import Thread @@ -150,17 +149,15 @@ in { start_all() server.wait_for_unit("mosquitto.service") - def check_passwords(): + with subtest("check passwords"): client1.succeed(publish("-m test", "password_store")) client1.succeed(publish("-m test", "password_file")) client1.succeed(publish("-m test", "hashed_store")) client1.succeed(publish("-m test", "hashed_file")) - check_passwords() - - def check_acl(): + with subtest("check acl"): client1.succeed(subscribe("", "reader", topic="$SYS/#")) - client1.fail(subscribe("-W 5", "writer", topic="$SYS/#")) + client1.fail(subscribe("", "writer", topic="$SYS/#")) parallel( lambda: client1.succeed(subscribe("-i 3688cdd7-aa07-42a4-be22-cb9352917e40", "reader")), @@ -170,15 +167,13 @@ in { ]) parallel( - lambda: client1.fail(subscribe("-W 5 -i 24ff16a2-ae33-4a51-9098-1b417153c712", "reader")), + lambda: client1.fail(subscribe("-i 24ff16a2-ae33-4a51-9098-1b417153c712", "reader")), lambda: [ server.wait_for_console_text("24ff16a2-ae33-4a51-9098-1b417153c712"), client2.succeed(publish("-m test", "reader")) ]) - check_acl() - - def check_tls(): + with subtest("check tls"): client1.succeed( subscribe( "--cafile ${snakeOil}/ca.crt " @@ -187,7 +182,5 @@ in { topic="$SYS/#", port=${toString tlsPort}, user="no_such_user")) - - check_tls() ''; }) From d09952fea85538ff72fb25a9fe8e473f853a58ec Mon Sep 17 00:00:00 2001 From: pennae Date: Sun, 24 Oct 2021 19:34:25 +0200 Subject: [PATCH 04/31] nixos/mosquitto: restore passwordless system feature during the rewrite the checkPasswords=false feature of the old module was lost. restore it, and with it systems that allow any client to use any username. --- .../modules/services/networking/mosquitto.nix | 11 ++++++++- nixos/tests/mosquitto.nix | 24 ++++++++++++++++++- 2 files changed, 33 insertions(+), 2 deletions(-) diff --git a/nixos/modules/services/networking/mosquitto.nix b/nixos/modules/services/networking/mosquitto.nix index 5a573cbf4ac9..29c42afefffe 100644 --- a/nixos/modules/services/networking/mosquitto.nix +++ b/nixos/modules/services/networking/mosquitto.nix @@ -264,6 +264,15 @@ let default = {}; }; + omitPasswordAuth = mkOption { + type = bool; + description = '' + Omits password checking, allowing anyone to log in with any user name unless + other mandatory authentication methods (eg TLS client certificates) are configured. + ''; + default = false; + }; + acl = mkOption { type = listOf str; description = '' @@ -294,9 +303,9 @@ let formatListener = idx: listener: [ "listener ${toString listener.port} ${toString listener.address}" - "password_file ${cfg.dataDir}/passwd-${toString idx}" "acl_file ${makeACLFile idx listener.users listener.acl}" ] + ++ optional (! listener.omitPasswordAuth) "password_file ${cfg.dataDir}/passwd-${toString idx}" ++ formatFreeform {} listener.settings ++ concatMap formatAuthPlugin listener.authPlugins; diff --git a/nixos/tests/mosquitto.nix b/nixos/tests/mosquitto.nix index bcca5372eaef..36cc8e3e3d9b 100644 --- a/nixos/tests/mosquitto.nix +++ b/nixos/tests/mosquitto.nix @@ -3,6 +3,7 @@ import ./make-test-python.nix ({ pkgs, lib, ... }: let port = 1888; tlsPort = 1889; + anonPort = 1890; password = "VERY_secret"; hashedPassword = "$7$101$/WJc4Mp+I+uYE9sR$o7z9rD1EYXHPwEP5GqQj6A7k4W1yVbePlb8TqNcuOLV9WNCiDgwHOB0JHC1WCtdkssqTBduBNUnUGd6kmZvDSw=="; topic = "test/foo"; @@ -63,7 +64,7 @@ in { }; in { server = { pkgs, ... }: { - networking.firewall.allowedTCPPorts = [ port tlsPort ]; + networking.firewall.allowedTCPPorts = [ port tlsPort anonPort ]; services.mosquitto = { enable = true; settings = { @@ -112,6 +113,18 @@ in { use_identity_as_username = true; }; } + { + port = anonPort; + omitPasswordAuth = true; + settings.allow_anonymous = true; + acl = [ "pattern read #" ]; + users = { + anonWriter = { + password = "" + password; + acl = [ "write ${topic}" ]; + }; + }; + } ]; }; }; @@ -182,5 +195,14 @@ in { topic="$SYS/#", port=${toString tlsPort}, user="no_such_user")) + + with subtest("check omitPasswordAuth"): + parallel( + lambda: client1.succeed(subscribe("-i fd56032c-d9cb-4813-a3b4-6be0e04c8fc3", + "anonReader", port=${toString anonPort})), + lambda: [ + server.wait_for_console_text("fd56032c-d9cb-4813-a3b4-6be0e04c8fc3"), + client2.succeed(publish("-m test", "anonWriter", port=${toString anonPort})) + ]) ''; }) From 0343045a92d2cff88ad861304f7a979f8e7dcd2d Mon Sep 17 00:00:00 2001 From: pennae Date: Thu, 28 Oct 2021 08:44:32 +0200 Subject: [PATCH 05/31] nixos/mosquitto: add module documentation --- .../modules/services/networking/mosquitto.md | 102 ++++++++++++ .../modules/services/networking/mosquitto.nix | 10 +- .../modules/services/networking/mosquitto.xml | 147 ++++++++++++++++++ 3 files changed, 257 insertions(+), 2 deletions(-) create mode 100644 nixos/modules/services/networking/mosquitto.md create mode 100644 nixos/modules/services/networking/mosquitto.xml diff --git a/nixos/modules/services/networking/mosquitto.md b/nixos/modules/services/networking/mosquitto.md new file mode 100644 index 000000000000..5cdb598151e5 --- /dev/null +++ b/nixos/modules/services/networking/mosquitto.md @@ -0,0 +1,102 @@ +# Mosquitto {#module-services-mosquitto} + +Mosquitto is a MQTT broker often used for IoT or home automation data transport. + +## Quickstart {#module-services-mosquitto-quickstart} + +A minimal configuration for Mosquitto is + +```nix +services.mosquitto = { + enable = true; + listeners = [ { + acl = [ "pattern readwrite #" ]; + omitPasswordAuth = true; + settings.allow_anonymous = true; + } ]; +}; +``` + +This will start a broker on port 1883, listening on all interfaces of the machine, allowing +read/write access to all topics to any user without password requirements. + +User authentication can be configured with the `users` key of listeners. A config that gives +full read access to a user `monitor` and restricted write access to a user `service` could look +like + +```nix +services.mosquitto = { + enable = true; + listeners = [ { + users = { + monitor = { + acl = [ "read #" ]; + password = "monitor"; + }; + service = { + acl = [ "write service/#" ]; + password = "service"; + }; + }; + } ]; +}; +``` + +TLS authentication is configured by setting TLS-related options of the listener: + +```nix +services.mosquitto = { + enable = true; + listeners = [ { + port = 8883; # port change is not required, but helpful to avoid mistakes + # ... + settings = { + cafile = "/path/to/mqtt.ca.pem"; + certfile = "/path/to/mqtt.pem"; + keyfile = "/path/to/mqtt.key"; + }; + } ]; +``` + +## Configuration {#module-services-mosquitto-config} + +The Mosquitto configuration has four distinct types of settings: +the global settings of the daemon, listeners, plugins, and bridges. +Bridges and listeners are part of the global configuration, plugins are part of listeners. +Users of the broker are configured as parts of listeners rather than globally, allowing +configurations in which a given user is only allowed to log in to the broker using specific +listeners (eg to configure an admin user with full access to all topics, but restricted to +localhost). + +Almost all options of Mosquitto are available for configuration at their appropriate levels, some +as NixOS options written in camel case, the remainders under `settings` with their exact names in +the Mosquitto config file. The exceptions are `acl_file` (which is always set according to the +`acl` attributes of a listener and its users) and `per_listener_settings` (which is always set to +`true`). + +### Password authentication {#module-services-mosquitto-config-passwords} + +Mosquitto can be run in two modes, with a password file or without. Each listener has its own +password file, and different listeners may use different password files. Password file generation +can be disabled by setting `omitPasswordAuth = true` for a listener; in this case it is necessary +to either set `settings.allow_anonymous = true` to allow all logins, or to configure other +authentication methods like TLS client certificates with `settings.use_identity_as_username = true`. + +The default is to generate a password file for each listener from the users configured to that +listener. Users with no configured password will not be added to the password file and thus +will not be able to use the broker. + +### ACL format {#module-services-mosquitto-config-acl} + +Every listener has a Mosquitto `acl_file` attached to it. This ACL is configured via two +attributes of the config: + + * the `acl` attribute of the listener configures pattern ACL entries and topic ACL entries + for anonymous users. Each entry must be prefixed with `pattern` or `topic` to distinguish + between these two cases. + * the `acl` attribute of every user configures in the listener configured the ACL for that + given user. Only topic ACLs are supported by Mosquitto in this setting, so no prefix is + required or allowed. + +The default ACL for a listener is empty, disallowing all accesses from all clients. To configure +a completely open ACL, set `acl = [ "pattern readwrite #" ]` in the listener. diff --git a/nixos/modules/services/networking/mosquitto.nix b/nixos/modules/services/networking/mosquitto.nix index 29c42afefffe..2d498d4dbbcf 100644 --- a/nixos/modules/services/networking/mosquitto.nix +++ b/nixos/modules/services/networking/mosquitto.nix @@ -257,7 +257,7 @@ let users = mkOption { type = attrsOf userOptions; - example = { john = { password = "123456"; acl = [ "topic readwrite john/#" ]; }; }; + example = { john = { password = "123456"; acl = [ "readwrite john/#" ]; }; }; description = '' A set of users and their passwords and ACLs. ''; @@ -278,6 +278,7 @@ let description = '' Additional ACL items to prepend to the generated ACL file. ''; + example = [ "pattern read #" "topic readwrite anon/report/#" ]; default = []; }; @@ -654,5 +655,10 @@ in }; - meta.maintainers = with lib.maintainers; [ pennae ]; + meta = { + maintainers = with lib.maintainers; [ pennae ]; + # Don't edit the docbook xml directly, edit the md and generate it: + # `pandoc mosquitto.md -t docbook --top-level-division=chapter --extract-media=media -f markdown+smart > mosquitto.xml` + doc = ./mosquitto.xml; + }; } diff --git a/nixos/modules/services/networking/mosquitto.xml b/nixos/modules/services/networking/mosquitto.xml new file mode 100644 index 000000000000..d16ab28c0269 --- /dev/null +++ b/nixos/modules/services/networking/mosquitto.xml @@ -0,0 +1,147 @@ + + Mosquitto + + Mosquitto is a MQTT broker often used for IoT or home automation + data transport. + +
+ Quickstart + + A minimal configuration for Mosquitto is + + +services.mosquitto = { + enable = true; + listeners = [ { + acl = [ "pattern readwrite #" ]; + omitPasswordAuth = true; + settings.allow_anonymous = true; + } ]; +}; + + + This will start a broker on port 1883, listening on all interfaces + of the machine, allowing read/write access to all topics to any + user without password requirements. + + + User authentication can be configured with the + users key of listeners. A config that gives + full read access to a user monitor and + restricted write access to a user service could + look like + + +services.mosquitto = { + enable = true; + listeners = [ { + users = { + monitor = { + acl = [ "read #" ]; + password = "monitor"; + }; + service = { + acl = [ "write service/#" ]; + password = "service"; + }; + }; + } ]; +}; + + + TLS authentication is configured by setting TLS-related options of + the listener: + + +services.mosquitto = { + enable = true; + listeners = [ { + port = 8883; # port change is not required, but helpful to avoid mistakes + # ... + settings = { + cafile = "/path/to/mqtt.ca.pem"; + certfile = "/path/to/mqtt.pem"; + keyfile = "/path/to/mqtt.key"; + }; + } ]; + +
+
+ Configuration + + The Mosquitto configuration has four distinct types of settings: + the global settings of the daemon, listeners, plugins, and + bridges. Bridges and listeners are part of the global + configuration, plugins are part of listeners. Users of the broker + are configured as parts of listeners rather than globally, + allowing configurations in which a given user is only allowed to + log in to the broker using specific listeners (eg to configure an + admin user with full access to all topics, but restricted to + localhost). + + + Almost all options of Mosquitto are available for configuration at + their appropriate levels, some as NixOS options written in camel + case, the remainders under settings with their + exact names in the Mosquitto config file. The exceptions are + acl_file (which is always set according to the + acl attributes of a listener and its users) and + per_listener_settings (which is always set to + true). + +
+ Password authentication + + Mosquitto can be run in two modes, with a password file or + without. Each listener has its own password file, and different + listeners may use different password files. Password file + generation can be disabled by setting + omitPasswordAuth = true for a listener; in + this case it is necessary to either set + settings.allow_anonymous = true to allow all + logins, or to configure other authentication methods like TLS + client certificates with + settings.use_identity_as_username = true. + + + The default is to generate a password file for each listener + from the users configured to that listener. Users with no + configured password will not be added to the password file and + thus will not be able to use the broker. + +
+
+ ACL format + + Every listener has a Mosquitto acl_file + attached to it. This ACL is configured via two attributes of the + config: + + + + + the acl attribute of the listener + configures pattern ACL entries and topic ACL entries for + anonymous users. Each entry must be prefixed with + pattern or topic to + distinguish between these two cases. + + + + + the acl attribute of every user + configures in the listener configured the ACL for that given + user. Only topic ACLs are supported by Mosquitto in this + setting, so no prefix is required or allowed. + + + + + The default ACL for a listener is empty, disallowing all + accesses from all clients. To configure a completely open ACL, + set acl = [ "pattern readwrite #" ] + in the listener. + +
+
+
From 6d436e18bece8b11c2b76aeff829b69db98a4c9e Mon Sep 17 00:00:00 2001 From: "R. Ryantm" Date: Fri, 29 Oct 2021 01:38:48 +0000 Subject: [PATCH 06/31] riemann_c_client: 1.10.4 -> 1.10.5 --- pkgs/tools/misc/riemann-c-client/default.nix | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/pkgs/tools/misc/riemann-c-client/default.nix b/pkgs/tools/misc/riemann-c-client/default.nix index bce293d7cf8d..1a81372d7f60 100644 --- a/pkgs/tools/misc/riemann-c-client/default.nix +++ b/pkgs/tools/misc/riemann-c-client/default.nix @@ -2,13 +2,13 @@ stdenv.mkDerivation rec { pname = "riemann-c-client"; - version = "1.10.4"; + version = "1.10.5"; src = fetchFromGitHub { owner = "algernon"; repo = "riemann-c-client"; rev = "riemann-c-client-${version}"; - sha256 = "01gzqxqm1xvki2vd78c7my2kgp4fyhkcf5j5fmy8z0l93lgj82rr"; + sha256 = "sha256-LuI9XFDPx0qw/+kkpXd0FOMESERAp31R1+ttkGuJnPA="; }; nativeBuildInputs = [ autoreconfHook pkg-config ]; From 43750fb958839d5c1de3b3a388da02c16585883a Mon Sep 17 00:00:00 2001 From: Lorenz Leutgeb Date: Wed, 27 Oct 2021 15:25:15 +0200 Subject: [PATCH 07/31] gradle: add 7.3-rc-3, 6.8 -> 6.9.1 --- .../tools/build-managers/gradle/default.nix | 21 +++++++++++++------ .../tools/scenebuilder/default.nix | 2 +- pkgs/games/mindustry/default.nix | 2 +- pkgs/top-level/all-packages.nix | 2 +- 4 files changed, 18 insertions(+), 9 deletions(-) diff --git a/pkgs/development/tools/build-managers/gradle/default.nix b/pkgs/development/tools/build-managers/gradle/default.nix index 5e2ef7ef9442..722b7440b6d3 100644 --- a/pkgs/development/tools/build-managers/gradle/default.nix +++ b/pkgs/development/tools/build-managers/gradle/default.nix @@ -63,24 +63,33 @@ rec { }; }; + gradle_7_3 = gradleGen (gradleSpec { + version = "7.3-rc-2"; + nativeVersion = "0.22-milestone-21"; + sha256 = "0ydg26i376bjax5lval9n79v8afng467vkx3zdga0bzxl8dbi9z6"; + }); + gradle_latest = gradle_7; - gradle_7 = gradleGen (gradleSpec { + # NOTE: 7.3 is a candidate. + gradle_7 = gradle_7_2; + + gradle_7_2 = gradleGen (gradleSpec { version = "7.2"; nativeVersion = "0.22-milestone-21"; sha256 = "1pg6w5czysywsgdvmll5bwd2p6y99cn5sn3gw69cps9mkjd710gm"; }); - gradle_6_8 = gradleGen (gradleSpec { - version = "6.8.3"; - nativeVersion = "0.22-milestone-9"; - sha256 = "01fjrk5nfdp6mldyblfmnkq2gv1rz1818kzgr0k2i1wzfsc73akz"; + gradle_6_9 = gradleGen (gradleSpec { + version = "6.9.1"; + nativeVersion = "0.22-milestone-20"; + sha256 = "1zmjfwlh34b65rdx9izgavw3qwqqwm39h5siyj2bf0m55111a4lc"; }); gradle_5_6 = gradleGen (gradleSpec { version = "5.6.4"; nativeVersion = "0.18"; - sha256 = "1f3067073041bc44554d0efe5d402a33bc3d3c93cc39ab684f308586d732a80d"; + sha256 = "03d86bbqd19h9xlanffcjcy3vg1k5905vzhf9mal9g21603nfc0z"; }); gradle_4_10 = gradleGen (gradleSpec { diff --git a/pkgs/development/tools/scenebuilder/default.nix b/pkgs/development/tools/scenebuilder/default.nix index 6bac5a95fcb7..b2e1e69487ed 100644 --- a/pkgs/development/tools/scenebuilder/default.nix +++ b/pkgs/development/tools/scenebuilder/default.nix @@ -1,6 +1,6 @@ { lib, stdenv, fetchFromGitHub, jdk11, gradleGen, makeDesktopItem, copyDesktopItems, perl, writeText, runtimeShell, makeWrapper, glib, wrapGAppsHook }: let - gradle = (gradleGen.override (old: { java = jdk11; })).gradle_6_8; + gradle = (gradleGen.override (old: { java = jdk11; })).gradle_6_9; pname = "scenebuilder"; version = "15.0.1"; diff --git a/pkgs/games/mindustry/default.nix b/pkgs/games/mindustry/default.nix index 732079238395..2dbf32e82575 100644 --- a/pkgs/games/mindustry/default.nix +++ b/pkgs/games/mindustry/default.nix @@ -88,7 +88,7 @@ let ''; # The default one still uses jdk8 (#89731) - gradle_6 = (gradleGen.override (old: { java = jdk; })).gradle_6_8; + gradle_6 = (gradleGen.override (old: { java = jdk; })).gradle_6_9; # fake build to pre-download deps into fixed-output derivation deps = stdenv.mkDerivation { diff --git a/pkgs/top-level/all-packages.nix b/pkgs/top-level/all-packages.nix index ca55821a01eb..0f689bea30a9 100644 --- a/pkgs/top-level/all-packages.nix +++ b/pkgs/top-level/all-packages.nix @@ -14567,7 +14567,7 @@ with pkgs; gradle_4_10 = res.gradleGen.gradle_4_10; gradle_4 = gradle_4_10; gradle_5 = res.gradleGen.gradle_5_6; - gradle_6 = res.gradleGen.gradle_6_8; + gradle_6 = res.gradleGen.gradle_6_9; gradle_7 = res.gradleGen.gradle_7; gperf = callPackage ../development/tools/misc/gperf { }; From 580951d4e2605ce4e10fa70f676a7ff341e0bf5b Mon Sep 17 00:00:00 2001 From: Lorenz Leutgeb Date: Tue, 2 Nov 2021 09:34:17 +0100 Subject: [PATCH 08/31] gradle: Add update.sh maintenance script --- .../tools/build-managers/gradle/default.nix | 22 ++----- .../gradle/gradle-6.9.1-spec.nix | 5 ++ .../build-managers/gradle/gradle-7.2-spec.nix | 5 ++ .../gradle/gradle-7.3-rc-3-spec.nix | 5 ++ .../tools/build-managers/gradle/update.sh | 57 +++++++++++++++++++ 5 files changed, 77 insertions(+), 17 deletions(-) create mode 100644 pkgs/development/tools/build-managers/gradle/gradle-6.9.1-spec.nix create mode 100644 pkgs/development/tools/build-managers/gradle/gradle-7.2-spec.nix create mode 100644 pkgs/development/tools/build-managers/gradle/gradle-7.3-rc-3-spec.nix create mode 100755 pkgs/development/tools/build-managers/gradle/update.sh diff --git a/pkgs/development/tools/build-managers/gradle/default.nix b/pkgs/development/tools/build-managers/gradle/default.nix index 722b7440b6d3..c0c576d6d462 100644 --- a/pkgs/development/tools/build-managers/gradle/default.nix +++ b/pkgs/development/tools/build-managers/gradle/default.nix @@ -63,35 +63,23 @@ rec { }; }; - gradle_7_3 = gradleGen (gradleSpec { - version = "7.3-rc-2"; - nativeVersion = "0.22-milestone-21"; - sha256 = "0ydg26i376bjax5lval9n79v8afng467vkx3zdga0bzxl8dbi9z6"; - }); - gradle_latest = gradle_7; # NOTE: 7.3 is a candidate. gradle_7 = gradle_7_2; - gradle_7_2 = gradleGen (gradleSpec { - version = "7.2"; - nativeVersion = "0.22-milestone-21"; - sha256 = "1pg6w5czysywsgdvmll5bwd2p6y99cn5sn3gw69cps9mkjd710gm"; - }); - - gradle_6_9 = gradleGen (gradleSpec { - version = "6.9.1"; - nativeVersion = "0.22-milestone-20"; - sha256 = "1zmjfwlh34b65rdx9izgavw3qwqqwm39h5siyj2bf0m55111a4lc"; - }); + gradle_7_3 = gradleGen (gradleSpec (import ./gradle-7.3-rc-3-spec.nix)); + gradle_7_2 = gradleGen (gradleSpec (import ./gradle-7.2-spec.nix)); + gradle_6_9 = gradleGen (gradleSpec (import ./gradle-6.9.1-spec.nix)); + # NOTE: No GitHub Release for this release, so update.sh does not work. gradle_5_6 = gradleGen (gradleSpec { version = "5.6.4"; nativeVersion = "0.18"; sha256 = "03d86bbqd19h9xlanffcjcy3vg1k5905vzhf9mal9g21603nfc0z"; }); + # NOTE: No GitHub Release for this release, so update.sh does not work. gradle_4_10 = gradleGen (gradleSpec { version = "4.10.3"; nativeVersion = "0.14"; diff --git a/pkgs/development/tools/build-managers/gradle/gradle-6.9.1-spec.nix b/pkgs/development/tools/build-managers/gradle/gradle-6.9.1-spec.nix new file mode 100644 index 000000000000..d343d6bf2726 --- /dev/null +++ b/pkgs/development/tools/build-managers/gradle/gradle-6.9.1-spec.nix @@ -0,0 +1,5 @@ +{ + version = "6.9.1"; + nativeVersion = "0.22-milestone-20"; + sha256 = "1zmjfwlh34b65rdx9izgavw3qwqqwm39h5siyj2bf0m55111a4lc"; +} diff --git a/pkgs/development/tools/build-managers/gradle/gradle-7.2-spec.nix b/pkgs/development/tools/build-managers/gradle/gradle-7.2-spec.nix new file mode 100644 index 000000000000..1237fb562bdb --- /dev/null +++ b/pkgs/development/tools/build-managers/gradle/gradle-7.2-spec.nix @@ -0,0 +1,5 @@ +{ + version = "7.2"; + nativeVersion = "0.22-milestone-21"; + sha256 = "1pg6w5czysywsgdvmll5bwd2p6y99cn5sn3gw69cps9mkjd710gm"; +} diff --git a/pkgs/development/tools/build-managers/gradle/gradle-7.3-rc-3-spec.nix b/pkgs/development/tools/build-managers/gradle/gradle-7.3-rc-3-spec.nix new file mode 100644 index 000000000000..c9542d98e816 --- /dev/null +++ b/pkgs/development/tools/build-managers/gradle/gradle-7.3-rc-3-spec.nix @@ -0,0 +1,5 @@ +{ + version = "7.3-rc-3"; + nativeVersion = "0.22-milestone-21"; + sha256 = "0401q4qpl36a2vnlrlsblflfiiy3b95gyj2wj62hzc1x00hbfznm"; +} diff --git a/pkgs/development/tools/build-managers/gradle/update.sh b/pkgs/development/tools/build-managers/gradle/update.sh new file mode 100755 index 000000000000..03c914bbdaf4 --- /dev/null +++ b/pkgs/development/tools/build-managers/gradle/update.sh @@ -0,0 +1,57 @@ +#!/usr/bin/env nix-shell +#!nix-shell -i bash -p nix-prefetch curl jq + +# Generates Gradle release specs from GitHub Releases. +# +# As of 2021-11, this script has very poor error handling, +# it is expected to be run by maintainers as one-off job +# only. +# +# NOTE: The earliest Gradle release that has a +# corresponding entry as GitHub Release is 6.8-rc-1. + +for v in $(curl -s "https://api.github.com/repos/gradle/gradle/releases" | jq -r '.[].tag_name' | sort -n -r) +do + # Tag names and download filenames are not the same, + # we modify the tag name slightly to translate it + # to the naming scheme of download filenames. + # This translation assumes a tag naming scheme. + # As of 2021-11 it works from 6.8-rc-1 to 7.3-rc-3. + + # Remove first letter (assumed to be "v"). + v=${v:1} + + # To lower case. + v=${v,,} + + # Add dash after "rc". + v=${v/-rc/-rc-} + + # Remove trailing ".0" + v=${v%.0} + + # Remove trailing ".0" for release candidates. + v=${v/.0-rc/-rc} + + f="gradle-${v}-spec.nix" + + if [ -f "$f" ] + then + echo "$v SKIP" + continue + fi + + url="https://services.gradle.org/distributions/gradle-${v}-bin.zip" + read -d "\n" gradle_hash gradle_path < <(nix-prefetch-url --print-path $url) + + # Prefix and suffix for "native-platform" dependency. + gradle_native_prefix="gradle-$v/lib/native-native-" + gradle_native_suffix=".jar" + gradle_native=$(zipinfo -1 "$gradle_path" "$gradle_native_prefix*$gradle_native_suffix" | head -n1) + gradle_native=${gradle_native#"$gradle_native_prefix"} + gradle_native=${gradle_native%"$gradle_native_suffix"} + + echo -e "{\\n version = \"$v\";\\n nativeVersion = \"$gradle_native\";\\n sha256 = \"$gradle_hash\";\\n}" > $f + + echo "$v DONE" +done From 429e07efe5977f0d2cee0ecc2d4169e24caa3219 Mon Sep 17 00:00:00 2001 From: Sergei Trofimovich Date: Tue, 2 Nov 2021 08:49:30 +0000 Subject: [PATCH 09/31] aewan: fix build against ncurses-6.3 `ncuses-6.3` added printf-style function attributes and now makes it easier to catch cases when user input is used in palce of format string when built with CFLAGS=-Werror=format-security: aewan.c: In function 'paint_screen': aewan.c:147:7: error: format not a string literal and no format arguments [-Werror=format-security] 147 | printw(msg); | ^~~~~~ Let's pull a patch pending upstream inclusion. --- pkgs/applications/editors/aewan/default.nix | 13 ++++++++++++- 1 file changed, 12 insertions(+), 1 deletion(-) diff --git a/pkgs/applications/editors/aewan/default.nix b/pkgs/applications/editors/aewan/default.nix index b9d350cbd438..8472a91c596f 100644 --- a/pkgs/applications/editors/aewan/default.nix +++ b/pkgs/applications/editors/aewan/default.nix @@ -1,4 +1,4 @@ -{ lib, stdenv, fetchurl, zlib, ncurses }: +{ lib, stdenv, fetchurl, fetchpatch, zlib, ncurses }: stdenv.mkDerivation rec { pname = "aewan"; @@ -9,6 +9,17 @@ stdenv.mkDerivation rec { sha256 = "5266dec5e185e530b792522821c97dfa5f9e3892d0dca5e881d0c30ceac21817"; }; + patches = [ + # Pull patch pending upstream inclusion: + # https://sourceforge.net/p/aewan/bugs/13/ + (fetchpatch { + url = "https://sourceforge.net/p/aewan/bugs/13/attachment/aewan-cvs-ncurses-6.3.patch"; + sha256 = "0pgpk1l3d6d5y37lvvavipwnmv9gmpfdy21jkz6baxhlkgf43r4p"; + # patch is in CVS diff format, add 'a/' prefix + extraPrefix = ""; + }) + ]; + buildInputs = [ zlib ncurses ]; meta = { From ff22dd6684ca492fcec69ab04c4f81fb574891f9 Mon Sep 17 00:00:00 2001 From: misuzu Date: Tue, 2 Nov 2021 11:45:19 +0200 Subject: [PATCH 10/31] nixos/libvirtd: use /etc/ethertypes from iptables package This change is part of #81172 and must have been lost during staging cycle. --- nixos/modules/virtualisation/libvirtd.nix | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/nixos/modules/virtualisation/libvirtd.nix b/nixos/modules/virtualisation/libvirtd.nix index 121e7286bc13..ab87394a30ee 100644 --- a/nixos/modules/virtualisation/libvirtd.nix +++ b/nixos/modules/virtualisation/libvirtd.nix @@ -254,7 +254,7 @@ in "allow ${e}") cfg.allowedBridges; systemPackages = with pkgs; [ libressl.nc iptables cfg.package cfg.qemu.package ]; - etc.ethertypes.source = "${pkgs.ebtables}/etc/ethertypes"; + etc.ethertypes.source = "${pkgs.iptables}/etc/ethertypes"; }; boot.kernelModules = [ "tun" ]; From 77c54c908fc71cd6e60e7d3b5233b2168b3b9722 Mon Sep 17 00:00:00 2001 From: Sergei Trofimovich Date: Wed, 3 Nov 2021 08:08:44 +0000 Subject: [PATCH 11/31] bastet: fix build against upcoming ncurses-6.3 On ncurses-6.3 with extra printf() annotations gcc now detects use of user input in place of format strings: Ui.cpp:293:16: error: format not a string literal and no format arguments [-Werror=format-security] 293 | mvwprintw(w,0,0,msg.c_str()); | ~~~~~~~~~^~~~~~~~~~~~~~~~~~~ --- pkgs/games/bastet/default.nix | 8 ++++++++ 1 file changed, 8 insertions(+) diff --git a/pkgs/games/bastet/default.nix b/pkgs/games/bastet/default.nix index 053eca57528b..74d83424f76b 100644 --- a/pkgs/games/bastet/default.nix +++ b/pkgs/games/bastet/default.nix @@ -18,6 +18,14 @@ stdenv.mkDerivation rec { url = "https://github.com/fph/bastet/commit/0e03f8d4d6bc6949cf1c447e632ce0d1b98c4be1.patch"; sha256 = "1475hisbm44jirsrhdlnddppsyn83xmvcx09gfkm9drcix05alzj"; }) + + # Fix pending upstream inclusion for ncurses-6.3: + # https://github.com/fph/bastet/pull/21 + (fetchpatch { + name = "ncurses-6.3"; + url = "https://github.com/fph/bastet/commit/54a6d127351ea2c62f50efafe97c5b02e23e86a7.patch"; + sha256 = "14v95b0m16m6ycd82i3wpp81kbmj6qz029b1m5483dkk6mwz98iy"; + }) ]; installPhase = '' From 72aca77ae534742ce3fc670f29b3ae10deb0b940 Mon Sep 17 00:00:00 2001 From: Sergei Trofimovich Date: Wed, 3 Nov 2021 09:30:28 +0000 Subject: [PATCH 12/31] mcabber: pull upstream fix for upcoming ncurses-6.3 --- .../instant-messengers/mcabber/default.nix | 12 +++++++++++- 1 file changed, 11 insertions(+), 1 deletion(-) diff --git a/pkgs/applications/networking/instant-messengers/mcabber/default.nix b/pkgs/applications/networking/instant-messengers/mcabber/default.nix index 7c5bff940848..2ca94953c4f6 100644 --- a/pkgs/applications/networking/instant-messengers/mcabber/default.nix +++ b/pkgs/applications/networking/instant-messengers/mcabber/default.nix @@ -1,4 +1,4 @@ -{ lib, stdenv, fetchurl, openssl, ncurses, pkg-config, glib, loudmouth, libotr +{ lib, stdenv, fetchurl, fetchpatch, openssl, ncurses, pkg-config, glib, loudmouth, libotr , gpgme }: @@ -11,6 +11,16 @@ stdenv.mkDerivation rec { sha256 = "0q1i5acyghsmzas88qswvki8kkk2nfpr8zapgnxbcd3lwcxl38f4"; }; + patches = [ + # Pull upstream patch for ncurses-6.3. + (fetchpatch { + name = "ncurses-6.3.patch"; + url = "https://github.com/McKael/mcabber/commit/5a0893d69023b77b7671731defbdca5d47731130.patch"; + sha256 = "01bc23z0mva9l9jv587sq2r9w3diachgkmb9ad99hlzgj02fmq4v"; + stripLen = 1; + }) + ]; + nativeBuildInputs = [ pkg-config ]; buildInputs = [ openssl ncurses glib loudmouth libotr gpgme ]; From 60152c5bef92543670653aa77ecfdf9ad887fe2d Mon Sep 17 00:00:00 2001 From: Sergei Trofimovich Date: Wed, 3 Nov 2021 18:50:27 +0000 Subject: [PATCH 13/31] bwm_ng: pull upstream fix for upcoming ncurses-6.3 --- pkgs/tools/networking/bwm-ng/default.nix | 12 ++++++++++++ 1 file changed, 12 insertions(+) diff --git a/pkgs/tools/networking/bwm-ng/default.nix b/pkgs/tools/networking/bwm-ng/default.nix index 97f0d1823af2..cfe0d4176a6f 100644 --- a/pkgs/tools/networking/bwm-ng/default.nix +++ b/pkgs/tools/networking/bwm-ng/default.nix @@ -2,6 +2,7 @@ , stdenv , autoreconfHook , fetchurl +, fetchpatch , ncurses }: @@ -14,6 +15,17 @@ stdenv.mkDerivation rec { sha256 = "0ikzyvnb73msm9n7ripg1dsw9av1i0c7q2hi2173xsj8zyv559f1"; }; + patches = [ + # Pull upstream fix for ncurses-6.3 support. + (fetchpatch { + name = "ncurses-6.3.patch"; + url = "https://github.com/vgropp/bwm-ng/commit/6a2087db6cc7ac5b5f667fcd17c262c079e8dcf2.patch"; + sha256 = "1l5dii9d52v0x0sq458ybw7m9p8aan2vl94gwx5s8mgxsnbcmzzx"; + # accidentally committed changes + excludes = [ "config.h.in~" "configure.in" "configure~" ]; + }) + ]; + nativeBuildInputs = [ autoreconfHook ]; From bd7499ed61717a3936283311147803c07bd06c85 Mon Sep 17 00:00:00 2001 From: Sergei Trofimovich Date: Wed, 3 Nov 2021 22:33:59 +0000 Subject: [PATCH 14/31] Update pkgs/games/bastet/default.nix Co-authored-by: Sandro --- pkgs/games/bastet/default.nix | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/pkgs/games/bastet/default.nix b/pkgs/games/bastet/default.nix index 74d83424f76b..0b9f41507303 100644 --- a/pkgs/games/bastet/default.nix +++ b/pkgs/games/bastet/default.nix @@ -22,7 +22,7 @@ stdenv.mkDerivation rec { # Fix pending upstream inclusion for ncurses-6.3: # https://github.com/fph/bastet/pull/21 (fetchpatch { - name = "ncurses-6.3"; + name = "ncurses-6.3.patch"; url = "https://github.com/fph/bastet/commit/54a6d127351ea2c62f50efafe97c5b02e23e86a7.patch"; sha256 = "14v95b0m16m6ycd82i3wpp81kbmj6qz029b1m5483dkk6mwz98iy"; }) From fa34b0f03a82f996202a31d89751885adb78658c Mon Sep 17 00:00:00 2001 From: Sergei Trofimovich Date: Thu, 4 Nov 2021 09:48:27 +0000 Subject: [PATCH 15/31] toxic: fix build against upcoming ncurses-6.3 On ncurses-6.3 with extra printf() annotations gcc now detects use of user input in place of format strings: toxic/src/game_chess.c:1633:63: error: format not a string literal and no format arguments [-Werror=format-security] 1633 | mvwprintw(win, board->y_bottom_bound + 2, x_mid, state->status_message); | ~~~~~^~~~~~~~~~~~~~~~ --- .../networking/instant-messengers/toxic/default.nix | 11 ++++++++++- 1 file changed, 10 insertions(+), 1 deletion(-) diff --git a/pkgs/applications/networking/instant-messengers/toxic/default.nix b/pkgs/applications/networking/instant-messengers/toxic/default.nix index 3082748a3518..a6d6cac4ac76 100644 --- a/pkgs/applications/networking/instant-messengers/toxic/default.nix +++ b/pkgs/applications/networking/instant-messengers/toxic/default.nix @@ -1,4 +1,4 @@ -{ lib, stdenv, fetchFromGitHub, libsodium, ncurses, curl +{ lib, stdenv, fetchFromGitHub, fetchpatch, libsodium, ncurses, curl , libtoxcore, openal, libvpx, freealut, libconfig, pkg-config, libopus , qrencode, gdk-pixbuf, libnotify }: @@ -13,6 +13,15 @@ stdenv.mkDerivation rec { sha256 = "sha256-5jLXXI+IMrYa7ZtdMjJrah1zB5TJ3GdHfvcMd1TYE4E="; }; + patches = [ + # Pending for upstream inclusion fix for ncurses-6.3 compatibility. + (fetchpatch { + name = "ncurses-6.3.patch"; + url = "https://github.com/JFreegman/toxic/commit/41e93adbdbd56db065166af5a6676a7996e9e451.patch"; + sha256 = "sha256-LYEseB5FmXFNifa1RZUxhkXeWlkEEMm3ASD55IoUPa0="; + }) + ]; + makeFlags = [ "PREFIX=$(out)"]; installFlags = [ "PREFIX=$(out)"]; From 1950562186604c818aff6172c9802c1d748d4510 Mon Sep 17 00:00:00 2001 From: Fabian Affolter Date: Thu, 4 Nov 2021 15:54:54 +0100 Subject: [PATCH 16/31] python3Packages.smbprotocol: 1.8.1 -> 1.8.2 --- pkgs/development/python-modules/smbprotocol/default.nix | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/pkgs/development/python-modules/smbprotocol/default.nix b/pkgs/development/python-modules/smbprotocol/default.nix index a0192ed9acea..50caecaa97cb 100644 --- a/pkgs/development/python-modules/smbprotocol/default.nix +++ b/pkgs/development/python-modules/smbprotocol/default.nix @@ -12,14 +12,14 @@ buildPythonPackage rec { pname = "smbprotocol"; - version = "1.8.1"; + version = "1.8.2"; disabled = pythonOlder "3.6"; src = fetchFromGitHub { owner = "jborean93"; repo = pname; rev = "v${version}"; - sha256 = "sha256-HhyOGRwDnLwrXPjvF04MlgSxGZc0w3nDek9Mnv49cG4="; + sha256 = "sha256-NBwfWW02lzR4Xk+7qodQX+eIXMTtdy9WOtLzsf30d4c="; }; propagatedBuildInputs = [ From 01e9eb40daaf770519b0c7e876c9e6614702cf0d Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Maciej=20Kr=C3=BCger?= Date: Fri, 5 Nov 2021 04:47:31 +0100 Subject: [PATCH 17/31] imgbrd-wrapper: 7.3.2 -> 7.5.1 ZHF: https://github.com/NixOS/nixpkgs/issues/144627 --- pkgs/applications/graphics/imgbrd-grabber/default.nix | 9 +++++++-- 1 file changed, 7 insertions(+), 2 deletions(-) diff --git a/pkgs/applications/graphics/imgbrd-grabber/default.nix b/pkgs/applications/graphics/imgbrd-grabber/default.nix index c0115d95ac80..e9f415f722dc 100644 --- a/pkgs/applications/graphics/imgbrd-grabber/default.nix +++ b/pkgs/applications/graphics/imgbrd-grabber/default.nix @@ -6,6 +6,7 @@ , qttools , qtscript , qtdeclarative +, qtnetworkauth , qtbase , autogen , automake @@ -17,15 +18,16 @@ , rsync , typescript }: + stdenv.mkDerivation rec { pname = "imgbrd-grabber"; + version = "7.5.1"; - version = "7.3.2"; src = fetchFromGitHub { owner = "Bionus"; repo = "imgbrd-grabber"; rev = "v${version}"; - sha256 = "053rwvcr88fcba0447a6r115cgnqsm9rl066z8d5jacqnhdij58k"; + sha256 = "sha256-40JCdtRhAQpz2lBGmYh2MgA9rRzHmOZx7lWW0IbfjP4="; fetchSubmodules = true; }; @@ -41,6 +43,7 @@ stdenv.mkDerivation rec { qtbase qtdeclarative qttools + qtnetworkauth nodejs cmake wrapQtAppsHook @@ -67,6 +70,8 @@ stdenv.mkDerivation rec { # link the catch2 sources from nixpkgs ln -sf ${catch2.src} tests/src/vendor/catch + + sed "s|strict\": true|strict\": false|g" -i ./sites/tsconfig.json ''; postInstall = '' From 72f5f39309f7956b541447bdf7fb63a16eb05ca7 Mon Sep 17 00:00:00 2001 From: Fabian Affolter Date: Fri, 5 Nov 2021 21:22:41 +0100 Subject: [PATCH 18/31] checkov: 2.0.528 -> 2.0.549 --- pkgs/development/tools/analysis/checkov/default.nix | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/pkgs/development/tools/analysis/checkov/default.nix b/pkgs/development/tools/analysis/checkov/default.nix index 19ca44143ff6..9426d6c8f485 100644 --- a/pkgs/development/tools/analysis/checkov/default.nix +++ b/pkgs/development/tools/analysis/checkov/default.nix @@ -56,7 +56,7 @@ with py.pkgs; buildPythonApplication rec { pname = "checkov"; - version = "2.0.528"; + version = "2.0.549"; disabled = python3.pythonOlder "3.7"; @@ -64,7 +64,7 @@ buildPythonApplication rec { owner = "bridgecrewio"; repo = pname; rev = version; - sha256 = "sha256-RcQVm3ppe3c4G/32Dgf6UhwtxJyQWgS4vD5wMYIfwKY="; + sha256 = "sha256-nxvUxjqzBUPbOkMhdQhkdlMRGFj6vhMU3BjXpSwBb8s="; }; nativeBuildInputs = with py.pkgs; [ From 3e368b176a28e0f985d790d72167bc5881b5aff1 Mon Sep 17 00:00:00 2001 From: Fabian Affolter Date: Fri, 5 Nov 2021 21:27:30 +0100 Subject: [PATCH 19/31] metasploit: 6.1.12 -> 6.1.13 --- pkgs/tools/security/metasploit/Gemfile | 2 +- pkgs/tools/security/metasploit/Gemfile.lock | 34 +++++++++--------- pkgs/tools/security/metasploit/default.nix | 4 +-- pkgs/tools/security/metasploit/gemset.nix | 38 ++++++++++----------- 4 files changed, 39 insertions(+), 39 deletions(-) diff --git a/pkgs/tools/security/metasploit/Gemfile b/pkgs/tools/security/metasploit/Gemfile index 9214b7837f75..0c6318dc4353 100644 --- a/pkgs/tools/security/metasploit/Gemfile +++ b/pkgs/tools/security/metasploit/Gemfile @@ -1,4 +1,4 @@ # frozen_string_literal: true source "https://rubygems.org" -gem "metasploit-framework", git: "https://github.com/rapid7/metasploit-framework", ref: "refs/tags/6.1.12" +gem "metasploit-framework", git: "https://github.com/rapid7/metasploit-framework", ref: "refs/tags/6.1.13" diff --git a/pkgs/tools/security/metasploit/Gemfile.lock b/pkgs/tools/security/metasploit/Gemfile.lock index 809c17e914e5..a080cfa68df9 100644 --- a/pkgs/tools/security/metasploit/Gemfile.lock +++ b/pkgs/tools/security/metasploit/Gemfile.lock @@ -1,9 +1,9 @@ GIT remote: https://github.com/rapid7/metasploit-framework - revision: bde342fd8293e49a45ba837ca9a1fdea505bc919 - ref: refs/tags/6.1.12 + revision: 643afb56f7f86a858e3da144fd367575a2f0b2c6 + ref: refs/tags/6.1.13 specs: - metasploit-framework (6.1.12) + metasploit-framework (6.1.13) actionpack (~> 6.0) activerecord (~> 6.0) activesupport (~> 6.0) @@ -31,7 +31,7 @@ GIT metasploit-concern metasploit-credential metasploit-model - metasploit-payloads (= 2.0.58) + metasploit-payloads (= 2.0.60) metasploit_data_models metasploit_payloads-mettle (= 1.0.15) mqtt @@ -128,23 +128,23 @@ GEM arel-helpers (2.12.1) activerecord (>= 3.1.0, < 7) aws-eventstream (1.2.0) - aws-partitions (1.521.0) - aws-sdk-core (3.121.5) + aws-partitions (1.525.0) + aws-sdk-core (3.122.0) aws-eventstream (~> 1, >= 1.0.2) - aws-partitions (~> 1, >= 1.520.1) + aws-partitions (~> 1, >= 1.525.0) aws-sigv4 (~> 1.1) jmespath (~> 1.0) - aws-sdk-ec2 (1.275.0) - aws-sdk-core (~> 3, >= 3.121.2) + aws-sdk-ec2 (1.277.0) + aws-sdk-core (~> 3, >= 3.122.0) aws-sigv4 (~> 1.1) - aws-sdk-iam (1.62.0) - aws-sdk-core (~> 3, >= 3.121.2) + aws-sdk-iam (1.63.0) + aws-sdk-core (~> 3, >= 3.122.0) aws-sigv4 (~> 1.1) - aws-sdk-kms (1.50.0) - aws-sdk-core (~> 3, >= 3.121.2) + aws-sdk-kms (1.51.0) + aws-sdk-core (~> 3, >= 3.122.0) aws-sigv4 (~> 1.1) - aws-sdk-s3 (1.104.0) - aws-sdk-core (~> 3, >= 3.121.2) + aws-sdk-s3 (1.105.1) + aws-sdk-core (~> 3, >= 3.122.0) aws-sdk-kms (~> 1) aws-sigv4 (~> 1.4) aws-sigv4 (1.4.0) @@ -212,7 +212,7 @@ GEM domain_name (~> 0.5) http_parser.rb (0.8.0) httpclient (2.8.3) - i18n (1.8.10) + i18n (1.8.11) concurrent-ruby (~> 1.0) io-console (0.5.9) irb (1.3.6) @@ -247,7 +247,7 @@ GEM activemodel (~> 6.0) activesupport (~> 6.0) railties (~> 6.0) - metasploit-payloads (2.0.58) + metasploit-payloads (2.0.60) metasploit_data_models (5.0.4) activerecord (~> 6.0) activesupport (~> 6.0) diff --git a/pkgs/tools/security/metasploit/default.nix b/pkgs/tools/security/metasploit/default.nix index e0348a156974..9ce3f56b58d8 100644 --- a/pkgs/tools/security/metasploit/default.nix +++ b/pkgs/tools/security/metasploit/default.nix @@ -14,13 +14,13 @@ let }; in stdenv.mkDerivation rec { pname = "metasploit-framework"; - version = "6.1.12"; + version = "6.1.13"; src = fetchFromGitHub { owner = "rapid7"; repo = "metasploit-framework"; rev = version; - sha256 = "sha256-I7wk8DBN7i4zE4bEIMVGcZi4OMIsbh0Ay2RsAh0VRrw="; + sha256 = "sha256-ncmLizpX1yEtr8biUoWVVK4Ziv3QMiKWsj694yubA1M="; }; nativeBuildInputs = [ makeWrapper ]; diff --git a/pkgs/tools/security/metasploit/gemset.nix b/pkgs/tools/security/metasploit/gemset.nix index 91d1e2aa60fb..411be2a11277 100644 --- a/pkgs/tools/security/metasploit/gemset.nix +++ b/pkgs/tools/security/metasploit/gemset.nix @@ -104,60 +104,60 @@ platforms = []; source = { remotes = ["https://rubygems.org"]; - sha256 = "0zfwynw6d4lbq63lwk94insrjmgxwfp1lic4913a9ik00wnf90wd"; + sha256 = "181a2xf9zs0hz77jkpmxidvkjzs65vsyqv1a31fcali7f0kvh4h9"; type = "gem"; }; - version = "1.521.0"; + version = "1.525.0"; }; aws-sdk-core = { groups = ["default"]; platforms = []; source = { remotes = ["https://rubygems.org"]; - sha256 = "0akv0jyr4crs4r5vdzc18j5drqgpcckm0gnpgi0bzpqyyk6m16hq"; + sha256 = "0krx8cfajc72gv6mpyb67vnhd2m2iya19846jgipgfris194gjm2"; type = "gem"; }; - version = "3.121.5"; + version = "3.122.0"; }; aws-sdk-ec2 = { groups = ["default"]; platforms = []; source = { remotes = ["https://rubygems.org"]; - sha256 = "13kbrl8r9cm7i9cb6w5ayji1vqaca6h0inxpyx8bhbrwkscrbh2s"; + sha256 = "0qy318swkl3393gl5031n634z8msb7rghhp7zdnawvs39c0fbmxd"; type = "gem"; }; - version = "1.275.0"; + version = "1.277.0"; }; aws-sdk-iam = { groups = ["default"]; platforms = []; source = { remotes = ["https://rubygems.org"]; - sha256 = "0vnhcgr5pjkkplh4z2lbwp4w13kbwp236p0y1b1qiia28ra2isxv"; + sha256 = "0ms76yn9iprmvjw1ijrgasss70398i8wmkwmgpghn5wc37z59x2s"; type = "gem"; }; - version = "1.62.0"; + version = "1.63.0"; }; aws-sdk-kms = { groups = ["default"]; platforms = []; source = { remotes = ["https://rubygems.org"]; - sha256 = "0prj048lcbkmxc6k2p7vibn3vw7cy1104dljqjvmwz12h9ds1qlf"; + sha256 = "0qac9dd6qriz6ldghkr8ga74zz28jl109kmvhvag74a3qf7k9dwj"; type = "gem"; }; - version = "1.50.0"; + version = "1.51.0"; }; aws-sdk-s3 = { groups = ["default"]; platforms = []; source = { remotes = ["https://rubygems.org"]; - sha256 = "1h8yzrzinckrfs8ahzqg7fs356vs1ksi5bva1bpfp0i65fjh9mw0"; + sha256 = "12j7i6l52b6hsnj59grn0m1s9pn6l38zmra6ad8i12vdsvd185w7"; type = "gem"; }; - version = "1.104.0"; + version = "1.105.1"; }; aws-sigv4 = { groups = ["default"]; @@ -544,10 +544,10 @@ platforms = []; source = { remotes = ["https://rubygems.org"]; - sha256 = "0g2fnag935zn2ggm5cn6k4s4xvv53v2givj1j90szmvavlpya96a"; + sha256 = "0vdd1kii40qhbr9n8qx71k2gskq6rkl8ygy8hw5hfj8bb5a364xf"; type = "gem"; }; - version = "1.8.10"; + version = "1.8.11"; }; io-console = { groups = ["default"]; @@ -664,12 +664,12 @@ platforms = []; source = { fetchSubmodules = false; - rev = "bde342fd8293e49a45ba837ca9a1fdea505bc919"; - sha256 = "1g262lfh4v34rc01svicq8wbi63i8v2j1i462crjxvjd63q29g13"; + rev = "643afb56f7f86a858e3da144fd367575a2f0b2c6"; + sha256 = "0lq3kcmy7g9ynab24cnhzn51kbjljn2m5qn6mwnj3msp7a5qpjcx"; type = "git"; url = "https://github.com/rapid7/metasploit-framework"; }; - version = "6.1.12"; + version = "6.1.13"; }; metasploit-model = { groups = ["default"]; @@ -686,10 +686,10 @@ platforms = []; source = { remotes = ["https://rubygems.org"]; - sha256 = "05z0lqa2w6n1nqw3k2s0cxfbqa7bf1p199gccfahjyxjn9xzhcf7"; + sha256 = "1rg11gjy590cixfy6lmwgd76ai0s2gs4w8m379bkkx2f12lkibhn"; type = "gem"; }; - version = "2.0.58"; + version = "2.0.60"; }; metasploit_data_models = { groups = ["default"]; From b7fceb1fd9a1989e08bc7e4063f823cb4e279573 Mon Sep 17 00:00:00 2001 From: Fabian Affolter Date: Fri, 5 Nov 2021 16:14:30 +0100 Subject: [PATCH 20/31] python3Packages.rdflib: 6.0.1 -> 6.0.2 --- .../python-modules/rdflib/default.nix | 60 +++++++++++++------ 1 file changed, 43 insertions(+), 17 deletions(-) diff --git a/pkgs/development/python-modules/rdflib/default.nix b/pkgs/development/python-modules/rdflib/default.nix index 97a2fe532bc5..5f17bbd03c3e 100644 --- a/pkgs/development/python-modules/rdflib/default.nix +++ b/pkgs/development/python-modules/rdflib/default.nix @@ -1,36 +1,62 @@ -{ buildPythonPackage +{ lib +, buildPythonPackage , fetchPypi -, isodate , html5lib -, SPARQLWrapper +, isodate , networkx , nose -, python +, pyparsing +, tabulate +, pandas +, pytestCheckHook +, pythonOlder +, SPARQLWrapper }: buildPythonPackage rec { pname = "rdflib"; - version = "6.0.1"; + version = "6.0.2"; + format = "setuptools"; + + disabled = pythonOlder "3.7"; src = fetchPypi { inherit pname version; - sha256 = "f071caff0b68634e4a7bd1d66ea3416ac98f1cc3b915938147ea899c32608728"; + sha256 = "sha256-YTauBWABR07ir/X8W5VuYqEcOpxmuw89nAqqX7tWhU4="; }; - propagatedBuildInputs = [isodate html5lib SPARQLWrapper ]; + propagatedBuildInputs = [ + isodate + html5lib + pyparsing + SPARQLWrapper + ]; - checkInputs = [ networkx nose ]; + checkInputs = [ + networkx + pandas + nose + tabulate + pytestCheckHook + ]; - # Python 2 syntax - # Failing doctest - doCheck = false; + disabledTests = [ + # Requires network access + "api_key" + "BerkeleyDBTestCase" + "test_bad_password" + "test_service" + "testGuessFormatForParse" + ]; - checkPhase = '' - ${python.interpreter} run_tests.py - ''; + pythonImportsCheck = [ + "rdflib" + ]; - meta = { - description = "A Python library for working with RDF, a simple yet powerful language for representing information"; - homepage = "http://www.rdflib.net/"; + meta = with lib; { + description = "Python library for working with RDF"; + homepage = "https://rdflib.readthedocs.io"; + license = licenses.bsd3; + maintainers = with maintainers; [ ]; }; } From b228c241fb2bebf38819d31c2876f556c58e3b2a Mon Sep 17 00:00:00 2001 From: Fabian Affolter Date: Fri, 5 Nov 2021 23:28:09 +0100 Subject: [PATCH 21/31] pylode: relax rdflib constraint --- pkgs/misc/pylode/default.nix | 33 +++++++++++++++++++++++---------- 1 file changed, 23 insertions(+), 10 deletions(-) diff --git a/pkgs/misc/pylode/default.nix b/pkgs/misc/pylode/default.nix index 18e112346912..b37ff2366694 100644 --- a/pkgs/misc/pylode/default.nix +++ b/pkgs/misc/pylode/default.nix @@ -1,11 +1,14 @@ { lib -, python3Packages +, python3 , fetchFromGitHub }: -python3Packages.buildPythonApplication rec { - pname = "pyLODE"; +python3.pkgs.buildPythonApplication rec { + pname = "pylode"; version = "2.12.0"; + format = "setuptools"; + + disabled = python3.pythonOlder "3.6"; src = fetchFromGitHub { owner = "RDFLib"; @@ -14,22 +17,32 @@ python3Packages.buildPythonApplication rec { sha256 = "sha256-X/YiJduAJNiceIrlCFwD2PFiMn3HVlzr9NzyDvYcql8="; }; - propagatedBuildInputs = with python3Packages; [ - python-dateutil + propagatedBuildInputs = with python3.pkgs; [ + beautifulsoup4 falcon - gunicorn - isodate jinja2 markdown + python-dateutil rdflib requests - six - beautifulsoup4 + ]; + + postPatch = '' + substituteInPlace requirements.txt \ + --replace "rdflib==6.0.0" "rdflib" + ''; + + # Path issues with the tests + doCheck = false; + + pythonImportsCheck = [ + "pylode" ]; meta = with lib; { - description = "An OWL ontology documentation tool using Python and templating, based on LODE"; + description = "OWL ontology documentation tool using Python and templating, based on LODE"; homepage = "https://github.com/RDFLib/pyLODE"; + # Next release will move to BSD3 license = licenses.gpl3Only; maintainers = with maintainers; [ koslambrou ]; }; From 1a3685370b1ab651a65d5109e6bf765550dd117f Mon Sep 17 00:00:00 2001 From: Fabian Affolter Date: Fri, 5 Nov 2021 20:16:00 +0100 Subject: [PATCH 22/31] python3Packages.proc: disable tests --- pkgs/development/python-modules/prov/default.nix | 9 ++++++++- 1 file changed, 8 insertions(+), 1 deletion(-) diff --git a/pkgs/development/python-modules/prov/default.nix b/pkgs/development/python-modules/prov/default.nix index 9844b018518b..101ea7e2e939 100644 --- a/pkgs/development/python-modules/prov/default.nix +++ b/pkgs/development/python-modules/prov/default.nix @@ -28,8 +28,15 @@ buildPythonPackage rec { pydot ]; + # Multiple tests are out-dated and failing + doCheck = false; + + pythonImportsCheck = [ + "prov" + ]; + meta = with lib; { - description = "A Python library for W3C Provenance Data Model (PROV)"; + description = "Python library for W3C Provenance Data Model (PROV)"; homepage = "https://github.com/trungdong/prov"; license = licenses.mit; maintainers = with maintainers; [ ashgillman ]; From 84d5983fb227d341ff4805924b99b30ef26bf221 Mon Sep 17 00:00:00 2001 From: Fabian Affolter Date: Fri, 5 Nov 2021 22:45:42 +0100 Subject: [PATCH 23/31] python3Packages.mailman-hyperkitty: fix build --- .../mailman-hyperkitty/default.nix | 34 ++++++++++++++++--- 1 file changed, 29 insertions(+), 5 deletions(-) diff --git a/pkgs/development/python-modules/mailman-hyperkitty/default.nix b/pkgs/development/python-modules/mailman-hyperkitty/default.nix index 3bf996fa714a..2d3ec976d64b 100644 --- a/pkgs/development/python-modules/mailman-hyperkitty/default.nix +++ b/pkgs/development/python-modules/mailman-hyperkitty/default.nix @@ -1,26 +1,50 @@ -{ lib, buildPythonPackage, fetchPypi, mailman, mock }: +{ lib +, buildPythonPackage +, fetchPypi +, mailman +, mock +, nose2 +, python +, requests +, zope_interface +}: buildPythonPackage rec { pname = "mailman-hyperkitty"; version = "1.1.0"; + format = "setuptools"; src = fetchPypi { inherit pname version; sha256 = "1lfqa9admhvdv71f528jmz2wl0i5cv77v6l64px2pm4zqr9ckkjx"; }; - propagatedBuildInputs = [ mailman ]; - checkInputs = [ mock ]; + propagatedBuildInputs = [ + mailman + requests + zope_interface + ]; + + checkInputs = [ + mock + nose2 + ]; checkPhase = '' - python -m nose2 -v + ${python.interpreter} -m nose2 -v ''; + + # There is an AssertionError doCheck = false; + pythonImportsCheck = [ + "mailman_hyperkitty" + ]; + meta = with lib; { description = "Mailman archiver plugin for HyperKitty"; homepage = "https://gitlab.com/mailman/mailman-hyperkitty"; - license = licenses.gpl3; + license = licenses.gpl3Plus; maintainers = with maintainers; [ globin qyliss ]; }; } From 5499f32f080874af2b88e691c349aad913e8267e Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Dav=C3=AD=C3=B0=20Steinn=20Geirsson?= Date: Thu, 4 Nov 2021 23:10:37 +0000 Subject: [PATCH 24/31] tor-browser-bundle-bin: Enable content sandbox and hardened malloc Tor browser enables multi-process support in firefox to sandbox each site in its own process. This is a very important security feature. It was disabled in the nixpkgs version, according to a comment due to "crashing tabs", but running with it enabled I have not been able to recreate this. Sandboxing enabled is the upstream default, and if we can't ship a tor browser that way then we should not ship one at all. Also re-enable useHardenedMalloc to use graphene-hardened-malloc. Here there was also a comment, in this case saying it caused "crashes with intel driver". I have also been unable to recreate this on my Intel UHD P630 onboard graphics. I believe neither of these are issues any longer. --- .../browsers/tor-browser-bundle-bin/default.nix | 9 ++++----- 1 file changed, 4 insertions(+), 5 deletions(-) diff --git a/pkgs/applications/networking/browsers/tor-browser-bundle-bin/default.nix b/pkgs/applications/networking/browsers/tor-browser-bundle-bin/default.nix index a512c119d53a..c679b568736b 100644 --- a/pkgs/applications/networking/browsers/tor-browser-bundle-bin/default.nix +++ b/pkgs/applications/networking/browsers/tor-browser-bundle-bin/default.nix @@ -43,12 +43,11 @@ # Hardening , graphene-hardened-malloc -# crashes with intel driver -, useHardenedMalloc ? false +# Whether to use graphene-hardened-malloc +, useHardenedMalloc ? true -# Whether to disable multiprocess support to work around crashing tabs -# TODO: fix the underlying problem instead of this terrible work-around -, disableContentSandbox ? true +# Whether to disable multiprocess support +, disableContentSandbox ? false # Extra preferences , extraPrefs ? "" From 220c819f5306e019b9a12984b5f084694b134e96 Mon Sep 17 00:00:00 2001 From: Sergei Trofimovich Date: Fri, 5 Nov 2021 23:32:12 +0000 Subject: [PATCH 25/31] ecasound: fix build against upcoming ncurses-6.3 On ncurses-6.3 with extra printf() annotations gcc now detects use of user input in place of format strings: ecasignalview.cpp:360:13: error: format not a string literal and no format arguments [-Werror=format-security] 360 | mvprintw(r++, 0, bar); | ~~~~~~~~^~~~~~~~~~~~~ --- pkgs/applications/audio/ecasound/default.nix | 11 +++++++++++ 1 file changed, 11 insertions(+) diff --git a/pkgs/applications/audio/ecasound/default.nix b/pkgs/applications/audio/ecasound/default.nix index 47db22016485..108be8726c50 100644 --- a/pkgs/applications/audio/ecasound/default.nix +++ b/pkgs/applications/audio/ecasound/default.nix @@ -1,5 +1,6 @@ { lib, stdenv , fetchurl +, fetchpatch , pkg-config , alsa-lib , audiofile @@ -28,6 +29,16 @@ stdenv.mkDerivation rec { sha256 = "1m7njfjdb7sqf0lhgc4swihgdr4snkg8v02wcly08wb5ar2fr2s6"; }; + patches = [ + # Pull patch pending upstream inclusion for ncurses-6.3: + # https://sourceforge.net/p/ecasound/bugs/54/ + (fetchpatch { + name = "ncursdes-6.3.patch"; + url = "https://sourceforge.net/p/ecasound/bugs/54/attachment/0001-ecasignalview.cpp-always-use-s-style-format-for-prin.patch"; + sha256 = "1x1gsjzd43lh19mhpmwrbq269h56s8bxgyv0yfi5yf0sqjf9vaq0"; + }) + ]; + nativeBuildInputs = [ pkg-config ]; From 0f840ef488acd32979d243cae98e58cd6ebd69e0 Mon Sep 17 00:00:00 2001 From: Fabian Affolter Date: Sat, 6 Nov 2021 00:39:37 +0100 Subject: [PATCH 26/31] python3Packages.starkbank-ecdsa: 2.0.0 -> 2.0.1 --- pkgs/development/python-modules/starkbank-ecdsa/default.nix | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/pkgs/development/python-modules/starkbank-ecdsa/default.nix b/pkgs/development/python-modules/starkbank-ecdsa/default.nix index df45883b9b05..c22862f53df9 100644 --- a/pkgs/development/python-modules/starkbank-ecdsa/default.nix +++ b/pkgs/development/python-modules/starkbank-ecdsa/default.nix @@ -6,13 +6,13 @@ buildPythonPackage rec { pname = "starkbank-ecdsa"; - version = "2.0.0"; + version = "2.0.1"; src = fetchFromGitHub { owner = "starkbank"; repo = "ecdsa-python"; rev = "v${version}"; - sha256 = "sha256-MTd9aeX6UavRua0hnuy5qY5kltzSoyvv+LcL5EvU5Sc="; + sha256 = "sha256-TYp8eIzO8Bn1hgye7PpIywVEV0tQtJ3HaYjCnn4/57w="; }; checkInputs = [ From ff02ceb9153636d9f6f97e5dc6b0f28350ec2a1c Mon Sep 17 00:00:00 2001 From: Fabian Affolter Date: Sat, 6 Nov 2021 00:52:50 +0100 Subject: [PATCH 27/31] python3Packages.mypy-boto3-s3: 1.19.8 -> 1.19.12 --- pkgs/development/python-modules/mypy-boto3-s3/default.nix | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/pkgs/development/python-modules/mypy-boto3-s3/default.nix b/pkgs/development/python-modules/mypy-boto3-s3/default.nix index 587cf0bd68f3..496a94e776e9 100644 --- a/pkgs/development/python-modules/mypy-boto3-s3/default.nix +++ b/pkgs/development/python-modules/mypy-boto3-s3/default.nix @@ -8,13 +8,13 @@ buildPythonPackage rec { pname = "mypy-boto3-s3"; - version = "1.19.8"; + version = "1.19.12"; disabled = pythonOlder "3.6"; src = fetchPypi { inherit pname version; - sha256 = "60481cae38e01273d09a6159e4ff8c36d5d7e335319117a16cdb3d887928a7b4"; + sha256 = "sha256-xgcGbWcrdFwFPQLJHmgRdY2XbwAiInZxmw6RiFVJ5F4="; }; propagatedBuildInputs = [ From f2de5cf279c3cf0c36f564eb4d8a5fe5f122623a Mon Sep 17 00:00:00 2001 From: Fabian Affolter Date: Fri, 8 Oct 2021 23:57:20 +0200 Subject: [PATCH 28/31] home-assistant: enable efergy tests --- pkgs/servers/home-assistant/default.nix | 1 + 1 file changed, 1 insertion(+) diff --git a/pkgs/servers/home-assistant/default.nix b/pkgs/servers/home-assistant/default.nix index 897057186607..affe1e6c205e 100644 --- a/pkgs/servers/home-assistant/default.nix +++ b/pkgs/servers/home-assistant/default.nix @@ -320,6 +320,7 @@ in with py.pkgs; buildPythonApplication rec { "ecobee" "econet" "ee_brightbox" + "efergy" "elgato" "elkm1" "emonitor" From 9672ef7e0a7ddbfef1cf38cb9936848c11042a3d Mon Sep 17 00:00:00 2001 From: Zane van Iperen Date: Sat, 6 Nov 2021 17:03:36 +1000 Subject: [PATCH 29/31] wine{,64,Wow}Packages: add {stable,unstable,staging}Full --- pkgs/top-level/all-packages.nix | 2 +- pkgs/top-level/wine-packages.nix | 5 +++++ 2 files changed, 6 insertions(+), 1 deletion(-) diff --git a/pkgs/top-level/all-packages.nix b/pkgs/top-level/all-packages.nix index a86c88a068b2..4b4bdce5a188 100644 --- a/pkgs/top-level/all-packages.nix +++ b/pkgs/top-level/all-packages.nix @@ -33028,7 +33028,7 @@ with pkgs; inherit wineBuild; inherit (callPackage ./wine-packages.nix {}) - minimal base full stable unstable staging fonts; + minimal base full stable stableFull unstable unstableFull staging stagingFull fonts; }); winePackages = recurseIntoAttrs (winePackagesFor (config.wine.build or "wine32")); diff --git a/pkgs/top-level/wine-packages.nix b/pkgs/top-level/wine-packages.nix index b26bc361cf5e..fff2d73110c3 100644 --- a/pkgs/top-level/wine-packages.nix +++ b/pkgs/top-level/wine-packages.nix @@ -51,6 +51,11 @@ rec { }; stable = base.override { wineRelease = "stable"; }; + stableFull = full.override { wineRelease = "stable"; }; + unstable = base.override { wineRelease = "unstable"; }; + unstableFull = full.override { wineRelease = "unstable"; }; + staging = base.override { wineRelease = "staging"; }; + stagingFull = full.override { wineRelease = "staging"; }; } From e8815af10e6477bfcba9bd3cfc4494bd43090cbf Mon Sep 17 00:00:00 2001 From: Sergei Trofimovich Date: Tue, 2 Nov 2021 23:50:32 +0000 Subject: [PATCH 30/31] bemenu: fix build against upcoming ncurses-6.3 On ncurses-6.3 with extra printf() annotations gcc now detects use of user input in place of format strings: lib/renderers/curses/curses.c:234:9: error: format not a string literal and no format arguments [-Werror=format-security] 234 | mvprintw(0, 0, menu->title); | ^~~~~~~~ --- pkgs/applications/misc/bemenu/default.nix | 11 ++++++++++- 1 file changed, 10 insertions(+), 1 deletion(-) diff --git a/pkgs/applications/misc/bemenu/default.nix b/pkgs/applications/misc/bemenu/default.nix index 123d839341d6..d230606a3c38 100644 --- a/pkgs/applications/misc/bemenu/default.nix +++ b/pkgs/applications/misc/bemenu/default.nix @@ -1,4 +1,4 @@ -{ stdenv, lib, fetchFromGitHub, cairo, libxkbcommon +{ stdenv, lib, fetchFromGitHub, fetchpatch, cairo, libxkbcommon , pango, fribidi, harfbuzz, pcre, pkg-config , ncursesSupport ? true, ncurses ? null , waylandSupport ? true, wayland ? null, wayland-protocols ? null @@ -20,6 +20,15 @@ stdenv.mkDerivation rec { sha256 = "sha256-U4IMfDvQ0rfEJhE3Uext2c/Cs0mjy1tw+k8uk441Ag8="; }; + patches = [ + # Pull upstream fix for build against ncurses-6.3 + (fetchpatch { + name = "ncurses-6.3.patch"; + url = "https://github.com/Cloudef/bemenu/commit/d31164db756989579468946aba62969e42c7ed28.patch"; + sha256 = "sha256-oyndQI7SaR8cK0IO5wIIxMpmakhfUzwUqLIKRbPkEdw="; + }) + ]; + nativeBuildInputs = [ pkg-config pcre ]; makeFlags = ["PREFIX=$(out)"]; From 03f9ced5124287c9ed9d434a39a8b68f7f084252 Mon Sep 17 00:00:00 2001 From: Ellie Hermaszewska Date: Sat, 6 Nov 2021 13:30:50 +0800 Subject: [PATCH 31/31] picoscope: 6.14.44 -> 7.0.83 --- .../science/electronics/picoscope/default.nix | 27 +-- .../electronics/picoscope/sources.json | 159 +++++------------- .../science/electronics/picoscope/update.py | 6 +- 3 files changed, 58 insertions(+), 134 deletions(-) diff --git a/pkgs/applications/science/electronics/picoscope/default.nix b/pkgs/applications/science/electronics/picoscope/default.nix index 038d98f4e0a8..344d54d10a6d 100644 --- a/pkgs/applications/science/electronics/picoscope/default.nix +++ b/pkgs/applications/science/electronics/picoscope/default.nix @@ -1,7 +1,7 @@ -{ stdenv, lib, fetchurl, dpkg, makeWrapper , mono, gtk-sharp-2_0 -, glib, libusb1 , zlib, gtk2-x11, gnome2, callPackage +{ stdenv, lib, fetchurl, dpkg, makeWrapper , mono, gtk-sharp-3_0 +, glib, libusb1 , zlib, gtk3-x11, callPackage , scopes ? [ - "pl1000" + "picocv" "ps2000" "ps2000a" "ps3000" @@ -12,7 +12,6 @@ "ps5000a" "ps6000" "ps6000a" - "usbdrdaq" ] }: let @@ -20,7 +19,7 @@ let with lib; { homepage = "https://www.picotech.com/downloads/linux"; maintainers = with maintainers; [ expipiplus1 yorickvp wirew0rm ]; - platforms = [ "x86_64-linux" "armv7l-linux" ]; + platforms = [ "x86_64-linux" ]; license = licenses.unfree; }; @@ -45,8 +44,12 @@ let description = "library for picotech oscilloscope software"; }; }) { }; + + # If we don't have a platform available, put a dummy version here, so at + # least evaluation succeeds. sources = - (builtins.fromJSON (builtins.readFile ./sources.json)).${stdenv.system}; + (lib.importJSON ./sources.json).${stdenv.system} or { picoscope.version = "unknown"; }; + scopePkg = name: { url, version, sha256 }: stdenv.mkDerivation rec { @@ -78,21 +81,19 @@ in stdenv.mkDerivation rec { src = fetchurl { inherit (sources.picoscope) url sha256; }; nativeBuildInputs = [ dpkg makeWrapper ]; - buildInputs = [ gtk-sharp-2_0 mono glib libusb1 zlib ]; + buildInputs = [ gtk-sharp-3_0 mono glib libusb1 zlib ]; unpackCmd = "dpkg-deb -x $src ."; sourceRoot = "."; scopeLibs = lib.attrVals (map (x: "lib${x}") scopes) scopePkgs; - MONO_PATH = "${gtk-sharp-2_0}/lib/mono/gtk-sharp-2.0:" + (lib.makeLibraryPath + MONO_PATH = "${gtk-sharp-3_0}/lib/mono/gtk-sharp-3.0:" + (lib.makeLibraryPath ([ glib - gtk2-x11 - gnome2.libglade - gtk-sharp-2_0 - libpicoipp + gtk3-x11 + gtk-sharp-3_0 libusb1 zlib - stdenv.cc.cc.lib + libpicoipp ] ++ scopeLibs)); installPhase = '' diff --git a/pkgs/applications/science/electronics/picoscope/sources.json b/pkgs/applications/science/electronics/picoscope/sources.json index d4116260c2d4..7404259b231e 100644 --- a/pkgs/applications/science/electronics/picoscope/sources.json +++ b/pkgs/applications/science/electronics/picoscope/sources.json @@ -1,146 +1,69 @@ { - "armv7l-linux": { - "libpl1000": { - "sha256": "10827029023fb1fd8085f216fc75e09010acb081fdaa4a65f81cfd7436bed84b", - "url": "https://labs.picotech.com/debian/pool/main/libp/libpl1000/libpl1000_2.0.61-1r2597_armhf.deb", - "version": "2.0.61-1r2597" - }, - "libps2000": { - "sha256": "21d09b8a792ad7c6cd90dc51ba073c21c7dbd17ec6e5c88752b7c2c5a15be73f", - "url": "https://labs.picotech.com/debian/pool/main/libp/libps2000/libps2000_3.0.63-3r2621_armhf.deb", - "version": "3.0.63-3r2621" - }, - "libps2000a": { - "sha256": "8293fe86d6d0f12dcefc67d3bf694ec7922dd28c80baab8aa6bc5a01a152e0a9", - "url": "https://labs.picotech.com/debian/pool/main/libp/libps2000a/libps2000a_2.1.61-5r2597_armhf.deb", - "version": "2.1.61-5r2597" - }, - "libps3000": { - "sha256": "3289ad3671767ab767f9308106d664a57a09578142a82fc62ec4b68df23e8ef1", - "url": "https://labs.picotech.com/debian/pool/main/libp/libps3000/libps3000_4.0.63-3r2621_armhf.deb", - "version": "4.0.63-3r2621" - }, - "libps3000a": { - "sha256": "e5c8c1dc94cc9924ec08a821fd92351c8ef05df8bb53bd2855e59d81358a33d6", - "url": "https://labs.picotech.com/debian/pool/main/libp/libps3000a/libps3000a_2.1.61-6r2597_armhf.deb", - "version": "2.1.61-6r2597" - }, - "libps4000": { - "sha256": "5c2abeb819964c2902e5a17b22ecf184d5fb78cd399cf56b3d0301428f7e4631", - "url": "https://labs.picotech.com/debian/pool/main/libp/libps4000/libps4000_2.1.61-2r2597_armhf.deb", - "version": "2.1.61-2r2597" - }, - "libps4000a": { - "sha256": "fd3a37c9d22137bed5c7a7013e0afc408e7dc9abac759b900ac23733fcd736e8", - "url": "https://labs.picotech.com/debian/pool/main/libp/libps4000a/libps4000a_2.1.61-2r2597_armhf.deb", - "version": "2.1.61-2r2597" - }, - "libps5000": { - "sha256": "5554829e24778b77da4a4ea30d074859bec30b56c1400aa4771429961050a7d6", - "url": "https://labs.picotech.com/debian/pool/main/libp/libps5000/libps5000_2.1.61-3r2597_armhf.deb", - "version": "2.1.61-3r2597" - }, - "libps5000a": { - "sha256": "ee88e0c5f4f1f398c62b9672c30a08a94b14e1402d4769b66ed90c3dd9368d38", - "url": "https://labs.picotech.com/debian/pool/main/libp/libps5000a/libps5000a_2.1.61-5r2597_armhf.deb", - "version": "2.1.61-5r2597" - }, - "libps6000": { - "sha256": "1470ca16d2b48141d0385e903d5aab883164fa6c9f29abd79713b52abc532442", - "url": "https://labs.picotech.com/debian/pool/main/libp/libps6000/libps6000_2.1.61-6r2597_armhf.deb", - "version": "2.1.61-6r2597" - }, - "libps6000a": { - "sha256": "7eb5668fe22c6f042a63a218e1b2eed983d8d9d92bfc525a98bd95a37f3de3ef", - "url": "https://labs.picotech.com/debian/pool/main/libp/libps6000a/libps6000a_1.0.61-0r2608_armhf.deb", - "version": "1.0.61-0r2608" - }, - "libusbdrdaq": { - "sha256": "3dc7c4ea506eb0384d2b81214c00f39951bfaf196988ccf373a3e3e2dd342c41", - "url": "https://labs.picotech.com/debian/pool/main/libu/libusbdrdaq/libusbdrdaq_2.0.61-1r2597_armhf.deb", - "version": "2.0.61-1r2597" - }, - "picoscope": { - "sha256": "448cfebcb20b18e7b27c05b0af4f44779d087b2d6046ad99d98c773321fb3e17", - "url": "https://labs.picotech.com/debian/pool/main/p/picoscope/picoscope_6.14.44-4r5870_all.deb", - "version": "6.14.44-4r5870" - } - }, "x86_64-linux": { - "libpicoipp": { - "sha256": "c7c052d2214f1fc54c07dbe20b6cf650e9b1d658aa7b989acdaeb7c1639ba761", - "url": "https://labs.picotech.com/debian/pool/main/libp/libpicoipp/libpicoipp_1.3.0-4r78_amd64.deb", - "version": "1.3.0-4r78" + "libpicocv": { + "sha256": "c2e74c2b0679df0226993d063b38d0eda5b05ff59f29bbfa12ded5226df37024", + "url": "https://labs.picotech.com/rc/picoscope7/debian/pool/main/libp/libpicocv/libpicocv_1.1.27-1r153_amd64.deb", + "version": "1.1.27-1r153" }, - "libpl1000": { - "sha256": "c6b7bb916129a7cf821c2e28e42914b9ac1a23cc1521fb78dec5aa59283790ac", - "url": "https://labs.picotech.com/debian/pool/main/libp/libpl1000/libpl1000_2.0.61-1r2597_amd64.deb", - "version": "2.0.61-1r2597" + "libpicoipp": { + "sha256": "87ae49cd5e8dda4a73a835b95ea13e4c3fc4d1c4c9d6495c9affdf6fa6b1b4aa", + "url": "https://labs.picotech.com/rc/picoscope7/debian/pool/main/libp/libpicoipp/libpicoipp_1.3.0-4r121_amd64.deb", + "version": "1.3.0-4r121" }, "libps2000": { - "sha256": "9b4af7a07f53d8cc056386e036ecd3731519d4ebf8f62a02def5c022509255ac", - "url": "https://labs.picotech.com/debian/pool/main/libp/libps2000/libps2000_3.0.63-3r2621_amd64.deb", - "version": "3.0.63-3r2621" + "sha256": "792e506c08cebbd617e833e1547d3e5a13a186f93cea3f84608b7ed9451fb077", + "url": "https://labs.picotech.com/rc/picoscope7/debian/pool/main/libp/libps2000/libps2000_3.0.75-3r2957_amd64.deb", + "version": "3.0.75-3r2957" }, "libps2000a": { - "sha256": "cfecbf6c04330a4439e8609c9973192f7a249a3b2853e6df1d63ab24a4d0ef89", - "url": "https://labs.picotech.com/debian/pool/main/libp/libps2000a/libps2000a_2.1.61-5r2597_amd64.deb", - "version": "2.1.61-5r2597" + "sha256": "f31b3a8e9c6af14a59e348e4b302f12f582cdb08a47a3c04d8a6a612b4630305", + "url": "https://labs.picotech.com/rc/picoscope7/debian/pool/main/libp/libps2000a/libps2000a_2.1.75-5r2957_amd64.deb", + "version": "2.1.75-5r2957" }, "libps3000": { - "sha256": "7052b872463e95c78f118f494d546c2b0758e1505297e9eaa3916dba5e24d85e", - "url": "https://labs.picotech.com/debian/pool/main/libp/libps3000/libps3000_4.0.63-3r2621_amd64.deb", - "version": "4.0.63-3r2621" + "sha256": "27dce3c924bb0169768a4964ce567b4a18ce74079537ca1fcba61e9234691580", + "url": "https://labs.picotech.com/rc/picoscope7/debian/pool/main/libp/libps3000/libps3000_4.0.75-3r2957_amd64.deb", + "version": "4.0.75-3r2957" }, "libps3000a": { - "sha256": "fbc64876731c6a8b7e1dc5b95113568819e7122acebc84dcabe102b900dfbb0d", - "url": "https://labs.picotech.com/debian/pool/main/libp/libps3000a/libps3000a_2.1.61-6r2597_amd64.deb", - "version": "2.1.61-6r2597" + "sha256": "31cf00ce136526af6e8b211a44a56b221d137de6eaec4d6fd7f31593b4245d62", + "url": "https://labs.picotech.com/rc/picoscope7/debian/pool/main/libp/libps3000a/libps3000a_2.1.75-6r2957_amd64.deb", + "version": "2.1.75-6r2957" }, "libps4000": { - "sha256": "84cc299e05d2ff73ef11d5f36e1f944e1cc8a93a19541a17db30d3cd45b383c1", - "url": "https://labs.picotech.com/debian/pool/main/libp/libps4000/libps4000_2.1.61-2r2597_amd64.deb", - "version": "2.1.61-2r2597" + "sha256": "c976f09647f1fd2c980aafd1efe7f557bfc7c283fb9c135725c38dd59cc297e9", + "url": "https://labs.picotech.com/rc/picoscope7/debian/pool/main/libp/libps4000/libps4000_2.1.75-2r2957_amd64.deb", + "version": "2.1.75-2r2957" }, "libps4000a": { - "sha256": "1839d654407dee76435f918c4df35d78edebcc45f442649fc964ee0470fcee30", - "url": "https://labs.picotech.com/debian/pool/main/libp/libps4000a/libps4000a_2.1.61-2r2597_amd64.deb", - "version": "2.1.61-2r2597" + "sha256": "727f24fa74759385902d41d52a26a4636b3e3f08a8743901d15cc49622207b97", + "url": "https://labs.picotech.com/rc/picoscope7/debian/pool/main/libp/libps4000a/libps4000a_2.1.75-2r2957_amd64.deb", + "version": "2.1.75-2r2957" }, "libps5000": { - "sha256": "ed2bd627f08fd98e93a22f824b8e81fc7ff7342dabd9fae748e12a10ec95d08a", - "url": "https://labs.picotech.com/debian/pool/main/libp/libps5000/libps5000_2.1.61-3r2597_amd64.deb", - "version": "2.1.61-3r2597" + "sha256": "3237c1dfdb384079b7039d2b4a8e0b0126e804830b29d60e89ae018182667edb", + "url": "https://labs.picotech.com/rc/picoscope7/debian/pool/main/libp/libps5000/libps5000_2.1.75-3r2957_amd64.deb", + "version": "2.1.75-3r2957" }, "libps5000a": { - "sha256": "78fd28bbc7817098f57ba886e847fe76e65e0321c1bf0880b0b3066499626c5e", - "url": "https://labs.picotech.com/debian/pool/main/libp/libps5000a/libps5000a_2.1.61-5r2597_amd64.deb", - "version": "2.1.61-5r2597" + "sha256": "27947f8461a16cf59d64cd23d7a78ddd27826e38dfe9fca3902e3b553591fb19", + "url": "https://labs.picotech.com/rc/picoscope7/debian/pool/main/libp/libps5000a/libps5000a_2.1.75-5r2957_amd64.deb", + "version": "2.1.75-5r2957" }, "libps6000": { - "sha256": "bb05cf15661b837bb4def618828214bc7aedd99f42737d3f4b77757a113f66ae", - "url": "https://labs.picotech.com/debian/pool/main/libp/libps6000/libps6000_2.1.61-6r2597_amd64.deb", - "version": "2.1.61-6r2597" + "sha256": "d65e923db969e306fb9f3f3892229a297d6187574d901dde44375270cc1e1404", + "url": "https://labs.picotech.com/rc/picoscope7/debian/pool/main/libp/libps6000/libps6000_2.1.75-6r2957_amd64.deb", + "version": "2.1.75-6r2957" }, "libps6000a": { - "sha256": "4fd31727e30c2f6833729e15ff7d88d8fa30876031707b5727752b4ce3582cc7", - "url": "https://labs.picotech.com/debian/pool/main/libp/libps6000a/libps6000a_1.0.61-0r2608_amd64.deb", - "version": "1.0.61-0r2608" - }, - "libusbdrdaq": { - "sha256": "44badb6f876db1d47612bd1c37fdab8b27e95cc0ed4f2bd71dcec08adec74ce1", - "url": "https://labs.picotech.com/debian/pool/main/libu/libusbdrdaq/libusbdrdaq_2.0.61-1r2597_amd64.deb", - "version": "2.0.61-1r2597" - }, - "picomono": { - "sha256": "2baf917e4e727ee8d6e395545a32b9ecb3820ffbc66cd28bc56e8aaeafbb0433", - "url": "https://labs.picotech.com/debian/pool/main/p/picomono/picomono_4.6.2.16-1r02_amd64.deb", - "version": "4.6.2.16-1r02" + "sha256": "eff8644ad44f9cc1cf9052e27786a1480a4ab599766c1c01e370fef40a76b224", + "url": "https://labs.picotech.com/rc/picoscope7/debian/pool/main/libp/libps6000a/libps6000a_1.0.75-0r2957_amd64.deb", + "version": "1.0.75-0r2957" }, "picoscope": { - "sha256": "448cfebcb20b18e7b27c05b0af4f44779d087b2d6046ad99d98c773321fb3e17", - "url": "https://labs.picotech.com/debian/pool/main/p/picoscope/picoscope_6.14.44-4r5870_all.deb", - "version": "6.14.44-4r5870" + "sha256": "3d2a0e360c8143fc03c29b394c16bfc2387164e33099a46b6905af992cfab440", + "url": "https://labs.picotech.com/rc/picoscope7/debian/pool/main/p/picoscope/picoscope_7.0.83-1r9320_amd64.deb", + "version": "7.0.83-1r9320" } } } diff --git a/pkgs/applications/science/electronics/picoscope/update.py b/pkgs/applications/science/electronics/picoscope/update.py index 0a5e97978d54..ecbd2292030d 100755 --- a/pkgs/applications/science/electronics/picoscope/update.py +++ b/pkgs/applications/science/electronics/picoscope/update.py @@ -23,15 +23,15 @@ def generate_sources(packages): sources_spec = {} for pkg in pkgs: sources_spec[pkg['Package']] = { - "url": "https://labs.picotech.com/debian/" + pkg["Filename"], + "url": "https://labs.picotech.com/rc/picoscope7/debian/" + pkg["Filename"], "sha256": pkg["SHA256"], "version": pkg["Version"] } return sources_spec out = {} -for nix_system, release in {"x86_64-linux": "amd64", "armv7l-linux": "armhf"}.items(): - resp = requests.get("https://labs.picotech.com/debian/dists/picoscope/main/binary-"+release+"/Packages") +for nix_system, release in {"x86_64-linux": "amd64"}.items(): + resp = requests.get("https://labs.picotech.com/rc/picoscope7/debian//dists/picoscope/main/binary-"+release+"/Packages") if resp.status_code != 200: print("error: could not fetch data for release {} (code {})".format(release, resp.code), file=sys.stderr) sys.exit(1)