From 975db4fb866ab8cd4976dc95fa310cadbc4a9735 Mon Sep 17 00:00:00 2001 From: Ingo Blechschmidt Date: Sat, 24 Oct 2020 13:22:19 +0200 Subject: [PATCH 01/18] libreswan: Unbreak the package On current unstable, libreswan compiles but then doesn't run because of an ABI change in NSS. There is an easy fix which is to land in the next version of libreswan, see https://github.com/libreswan/libreswan/issues/334; in the meantime, we can copy this fix so that libreswan works again on unstable. --- pkgs/tools/networking/libreswan/default.nix | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/pkgs/tools/networking/libreswan/default.nix b/pkgs/tools/networking/libreswan/default.nix index 3e7719c40d4..630459f93a9 100644 --- a/pkgs/tools/networking/libreswan/default.nix +++ b/pkgs/tools/networking/libreswan/default.nix @@ -29,6 +29,10 @@ stdenv.mkDerivation rec { "-Wno-error=format-truncation" "-Wno-error=pointer-compare" "-Wno-error=stringop-truncation" + # The following flag allows libreswan v3.32 to work with NSS 3.22, see + # https://github.com/libreswan/libreswan/issues/334. + # This flag should not be needed for libreswan v3.33 (which is not yet released). + "-DNSS_PKCS11_2_0_COMPAT=1" ]; nativeBuildInputs = [ makeWrapper pkgconfig ]; From eff847932aada7fcf6d4dd374a6ceaf09b9659dc Mon Sep 17 00:00:00 2001 From: Ingo Blechschmidt Date: Sat, 24 Oct 2020 14:52:18 +0200 Subject: [PATCH 02/18] libreswan: remove darwin from list of supported platforms See discussion at https://github.com/NixOS/nixpkgs/pull/101543. Currently, this build depends on iproute2 which is not available on darwin. This might be fixed in the future by employing iproute2mac. --- pkgs/tools/networking/libreswan/default.nix | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/pkgs/tools/networking/libreswan/default.nix b/pkgs/tools/networking/libreswan/default.nix index 630459f93a9..7e6f2c475ca 100644 --- a/pkgs/tools/networking/libreswan/default.nix +++ b/pkgs/tools/networking/libreswan/default.nix @@ -86,7 +86,7 @@ stdenv.mkDerivation rec { meta = with stdenv.lib; { homepage = "https://libreswan.org"; description = "A free software implementation of the VPN protocol based on IPSec and the Internet Key Exchange"; - platforms = platforms.linux ++ platforms.darwin ++ platforms.freebsd; + platforms = platforms.linux ++ platforms.freebsd; license = licenses.gpl2; maintainers = [ maintainers.afranchuk ]; }; From 6ac71f593d7c7f81831372cdeefa96236ffb7cb1 Mon Sep 17 00:00:00 2001 From: Eduard Bopp Date: Sun, 20 Dec 2020 14:36:07 +0100 Subject: [PATCH 03/18] linux: backport support for RTL8761b to 5.4 --- pkgs/os-specific/linux/kernel/patches.nix | 7 ++++ .../linux/kernel/rtl8761b-support.patch | 33 +++++++++++++++++++ pkgs/top-level/all-packages.nix | 1 + 3 files changed, 41 insertions(+) create mode 100644 pkgs/os-specific/linux/kernel/rtl8761b-support.patch diff --git a/pkgs/os-specific/linux/kernel/patches.nix b/pkgs/os-specific/linux/kernel/patches.nix index e2805c315b8..23c01d04192 100644 --- a/pkgs/os-specific/linux/kernel/patches.nix +++ b/pkgs/os-specific/linux/kernel/patches.nix @@ -76,6 +76,13 @@ }; }; + # Adapted for Linux 5.4 from: + # https://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git/commit/?id=04896832c94aae4842100cafb8d3a73e1bed3a45 + rtl8761b_support = + { name = "rtl8761b-support"; + patch = ./rtl8761b-support.patch; + }; + export_kernel_fpu_functions = { "4.14" = { name = "export_kernel_fpu_functions"; diff --git a/pkgs/os-specific/linux/kernel/rtl8761b-support.patch b/pkgs/os-specific/linux/kernel/rtl8761b-support.patch new file mode 100644 index 00000000000..b6d80d5bc8d --- /dev/null +++ b/pkgs/os-specific/linux/kernel/rtl8761b-support.patch @@ -0,0 +1,33 @@ +diff --git a/drivers/bluetooth/btrtl.c b/drivers/bluetooth/btrtl.c +index 67f4bc21e7c5..3a9afc905f24 100644 +--- a/drivers/bluetooth/btrtl.c ++++ b/drivers/bluetooth/btrtl.c +@@ -130,12 +130,19 @@ static const struct id_table ic_id_table[] = { + .cfg_name = "rtl_bt/rtl8821c_config" }, + + /* 8761A */ +- { IC_MATCH_FL_LMPSUBV, RTL_ROM_LMP_8761A, 0x0, ++ { IC_INFO(RTL_ROM_LMP_8761A, 0xa), + .config_needed = false, + .has_rom_version = true, + .fw_name = "rtl_bt/rtl8761a_fw.bin", + .cfg_name = "rtl_bt/rtl8761a_config" }, + ++ /* 8761B */ ++ { IC_INFO(RTL_ROM_LMP_8761A, 0xb), ++ .config_needed = false, ++ .has_rom_version = true, ++ .fw_name = "rtl_bt/rtl8761b_fw.bin", ++ .cfg_name = "rtl_bt/rtl8761b_config" }, ++ + /* 8822C with USB interface */ + { IC_INFO(RTL_ROM_LMP_8822B, 0xc), + .config_needed = false, +@@ -251,6 +258,7 @@ static int rtlbt_parse_firmware(struct hci_dev *hdev, + { RTL_ROM_LMP_8723B, 9 }, /* 8723D */ + { RTL_ROM_LMP_8821A, 10 }, /* 8821C */ + { RTL_ROM_LMP_8822B, 13 }, /* 8822C */ ++ { RTL_ROM_LMP_8761A, 14 }, /* 8761B */ + }; + + min_size = sizeof(struct rtl_epatch_header) + sizeof(extension_sig) + 3; diff --git a/pkgs/top-level/all-packages.nix b/pkgs/top-level/all-packages.nix index 4cdf4ec1650..a196c24270a 100644 --- a/pkgs/top-level/all-packages.nix +++ b/pkgs/top-level/all-packages.nix @@ -18378,6 +18378,7 @@ in kernelPatches = [ kernelPatches.bridge_stp_helper kernelPatches.request_key_helper + kernelPatches.rtl8761b_support kernelPatches.export_kernel_fpu_functions."5.3" ]; }; From 81f4bca15c760a15bea266e8f9173d418c4455aa Mon Sep 17 00:00:00 2001 From: Eduard Bopp Date: Sun, 20 Dec 2020 16:25:55 +0100 Subject: [PATCH 04/18] rtl8761b-firmware: init at rtk1395 Also included the firmware under enableRedistributableFirmware. --- nixos/modules/hardware/all-firmware.nix | 1 + .../firmware/rtl8761b-firmware/default.nix | 29 +++++++++++++++++++ pkgs/top-level/all-packages.nix | 2 ++ 3 files changed, 32 insertions(+) create mode 100644 pkgs/os-specific/linux/firmware/rtl8761b-firmware/default.nix diff --git a/nixos/modules/hardware/all-firmware.nix b/nixos/modules/hardware/all-firmware.nix index b07edb0f6ac..8cf3e5633dc 100644 --- a/nixos/modules/hardware/all-firmware.nix +++ b/nixos/modules/hardware/all-firmware.nix @@ -48,6 +48,7 @@ in { rtl8192su-firmware rt5677-firmware rtl8723bs-firmware + rtl8761b-firmware rtlwifi_new-firmware zd1211fw alsa-firmware diff --git a/pkgs/os-specific/linux/firmware/rtl8761b-firmware/default.nix b/pkgs/os-specific/linux/firmware/rtl8761b-firmware/default.nix new file mode 100644 index 00000000000..4418722c7c4 --- /dev/null +++ b/pkgs/os-specific/linux/firmware/rtl8761b-firmware/default.nix @@ -0,0 +1,29 @@ +{ stdenv, fetchFromGitHub }: + +stdenv.mkDerivation { + name = "rtl8761b-firmware"; + + src = fetchFromGitHub { + owner = "Realtek-OpenSource"; + repo = "android_hardware_realtek"; + rev = "rtk1395"; + sha256 = "sha256-vd9sZP7PGY+cmnqVty3sZibg01w8+UNinv8X85B+dzc="; + }; + + installPhase = '' + install -D -pm644 \ + bt/rtkbt/Firmware/BT/rtl8761b_fw \ + $out/lib/firmware/rtl_bt/rtl8761b_fw.bin + + install -D -pm644 \ + bt/rtkbt/Firmware/BT/rtl8761b_config \ + $out/lib/firmware/rtl_bt/rtl8761b_config.bin + ''; + + meta = with stdenv.lib; { + description = "Firmware for Realtek RTL8761b"; + license = licenses.unfreeRedistributableFirmware; + maintainers = with maintainers; [ edibopp ]; + platforms = with platforms; linux; + }; +} diff --git a/pkgs/top-level/all-packages.nix b/pkgs/top-level/all-packages.nix index a196c24270a..a557ab933da 100644 --- a/pkgs/top-level/all-packages.nix +++ b/pkgs/top-level/all-packages.nix @@ -19135,6 +19135,8 @@ in rtl8723bs-firmware = callPackage ../os-specific/linux/firmware/rtl8723bs-firmware { }; + rtl8761b-firmware = callPackage ../os-specific/linux/firmware/rtl8761b-firmware { }; + rtlwifi_new-firmware = callPackage ../os-specific/linux/firmware/rtlwifi_new-firmware { }; s3ql = callPackage ../tools/backup/s3ql { }; From 8123355e63feb5a21acfe6323fa69f6cf729f9d4 Mon Sep 17 00:00:00 2001 From: Mario Rodas Date: Wed, 23 Dec 2020 04:20:00 +0000 Subject: [PATCH 05/18] ncmpcpp: 0.8.2 -> 0.9.1 --- pkgs/applications/audio/ncmpcpp/default.nix | 9 +++++---- 1 file changed, 5 insertions(+), 4 deletions(-) diff --git a/pkgs/applications/audio/ncmpcpp/default.nix b/pkgs/applications/audio/ncmpcpp/default.nix index f8adc522fcb..33308ebc61a 100644 --- a/pkgs/applications/audio/ncmpcpp/default.nix +++ b/pkgs/applications/audio/ncmpcpp/default.nix @@ -12,11 +12,11 @@ assert taglibSupport -> (taglib != null); with stdenv.lib; stdenv.mkDerivation rec { pname = "ncmpcpp"; - version = "0.8.2"; + version = "0.9.1"; src = fetchurl { - url = "https://ncmpcpp.rybczak.net/stable/${pname}-${version}.tar.bz2"; - sha256 = "0m0mjb049sl62vx13h9waavysa30mk0rphacksnvf94n13la62v5"; + url = "https://rybczak.net/ncmpcpp/stable/${pname}-${version}.tar.bz2"; + sha256 = "0x35nd4v31sma8fliqdbn1nxpjyi8hv472318sfb3xbmr4wlm0fb"; }; configureFlags = [ "BOOST_LIB_SUFFIX=" ] @@ -33,7 +33,8 @@ stdenv.mkDerivation rec { meta = { description = "A featureful ncurses based MPD client inspired by ncmpc"; - homepage = "https://ncmpcpp.rybczak.net/"; + homepage = "https://rybczak.net/ncmpcpp/"; + changelog = "https://github.com/ncmpcpp/ncmpcpp/blob/${version}/CHANGELOG.md"; license = licenses.gpl2Plus; maintainers = with maintainers; [ jfrankenau koral lovek323 ]; platforms = platforms.all; From 18906f453e5f5f4190ed281d6262f50e8b8f8ca0 Mon Sep 17 00:00:00 2001 From: Atemu Date: Fri, 11 Dec 2020 09:08:55 +0100 Subject: [PATCH 06/18] anki-bin: init at 2.1.36 Works around https://github.com/NixOS/nixpkgs/issues/78449 Co-authored-by: Dmitry Kalinkin --- pkgs/games/anki/bin.nix | 44 +++++++++++++++++++++++++++++++++ pkgs/top-level/all-packages.nix | 1 + 2 files changed, 45 insertions(+) create mode 100644 pkgs/games/anki/bin.nix diff --git a/pkgs/games/anki/bin.nix b/pkgs/games/anki/bin.nix new file mode 100644 index 00000000000..e0de57fdcab --- /dev/null +++ b/pkgs/games/anki/bin.nix @@ -0,0 +1,44 @@ +{ fetchurl, stdenv, lib, buildFHSUserEnv, appimageTools, writeShellScript, anki }: + +let + pname = "anki-bin"; + version = "2.1.36"; + + unpacked = stdenv.mkDerivation { + inherit pname version; + + src = fetchurl { + url = "https://github.com/ankitects/anki/releases/download/${version}/anki-${version}-linux.tar.bz2"; + sha256 = "01xcjnfs5pfh7v0nkffw2wpl19l6pj9k3kxrcawv3cm42asy0mfz"; + }; + + installPhase = '' + runHook preInstall + + xdg-mime () { + echo Stubbed! + } + export -f xdg-mime + + PREFIX=$out bash install.sh + + runHook postInstall + ''; + }; + + meta = with lib; { + inherit (anki.meta) license homepage description longDescription; + platforms = [ "x86_64-linux" ]; + maintainers = with maintainers; [ atemu ]; + }; +in + +buildFHSUserEnv (appimageTools.defaultFhsEnvArgs // { + name = "anki"; + + runScript = writeShellScript "anki-wrapper.sh" '' + exec ${unpacked}/bin/anki + ''; + + inherit meta; +}) diff --git a/pkgs/top-level/all-packages.nix b/pkgs/top-level/all-packages.nix index 184632f4924..5de7e7403dc 100644 --- a/pkgs/top-level/all-packages.nix +++ b/pkgs/top-level/all-packages.nix @@ -25350,6 +25350,7 @@ in anki = python3Packages.callPackage ../games/anki { inherit (darwin.apple_sdk.frameworks) CoreAudio; }; + anki-bin = callPackage ../games/anki/bin.nix { buildFHSUserEnv = buildFHSUserEnvBubblewrap; }; armagetronad = callPackage ../games/armagetronad { }; From 0769fe271278380429b70f9dc635c93d13c09cec Mon Sep 17 00:00:00 2001 From: Atemu Date: Fri, 11 Dec 2020 18:19:10 +0100 Subject: [PATCH 07/18] anki-bin: add darwin support --- pkgs/games/anki/bin.nix | 26 ++++++++++++++++++++++---- 1 file changed, 22 insertions(+), 4 deletions(-) diff --git a/pkgs/games/anki/bin.nix b/pkgs/games/anki/bin.nix index e0de57fdcab..043a9e040db 100644 --- a/pkgs/games/anki/bin.nix +++ b/pkgs/games/anki/bin.nix @@ -1,7 +1,8 @@ -{ fetchurl, stdenv, lib, buildFHSUserEnv, appimageTools, writeShellScript, anki }: +{ fetchurl, stdenv, lib, buildFHSUserEnv, appimageTools, writeShellScript, anki, undmg }: let pname = "anki-bin"; + # Update hashes for both Linux and Darwin! version = "2.1.36"; unpacked = stdenv.mkDerivation { @@ -28,12 +29,12 @@ let meta = with lib; { inherit (anki.meta) license homepage description longDescription; - platforms = [ "x86_64-linux" ]; + platforms = [ "x86_64-linux" "x86_64-darwin" ]; maintainers = with maintainers; [ atemu ]; }; in -buildFHSUserEnv (appimageTools.defaultFhsEnvArgs // { +if stdenv.isLinux then buildFHSUserEnv (appimageTools.defaultFhsEnvArgs // { name = "anki"; runScript = writeShellScript "anki-wrapper.sh" '' @@ -41,4 +42,21 @@ buildFHSUserEnv (appimageTools.defaultFhsEnvArgs // { ''; inherit meta; -}) +}) else stdenv.mkDerivation { + inherit pname version; + + src = fetchurl { + url = "https://github.com/ankitects/anki/releases/download/${version}/anki-${version}-mac.dmg"; + sha256 = "1i6iidm5h8r9g801mvqxi2av03qdw3lr28056fv5ixnb5dq2wqim"; + }; + + nativeBuildInputs = [ undmg ]; + sourceRoot = "."; + + installPhase = '' + mkdir -p $out/Applications/ + cp -a Anki.app $out/Applications/ + ''; + + inherit meta; +} From 847b317a95f13572146fbdc43067a5abd8dcc3a6 Mon Sep 17 00:00:00 2001 From: Atemu Date: Thu, 24 Dec 2020 06:50:19 +0100 Subject: [PATCH 08/18] anki-bin: force x11 Co-authored-by: Vika --- pkgs/games/anki/bin.nix | 2 ++ 1 file changed, 2 insertions(+) diff --git a/pkgs/games/anki/bin.nix b/pkgs/games/anki/bin.nix index 043a9e040db..1a642c90d2e 100644 --- a/pkgs/games/anki/bin.nix +++ b/pkgs/games/anki/bin.nix @@ -38,6 +38,8 @@ if stdenv.isLinux then buildFHSUserEnv (appimageTools.defaultFhsEnvArgs // { name = "anki"; runScript = writeShellScript "anki-wrapper.sh" '' + # Wayland support is broken, disable via ENV variable + export QT_QPA_PLATFORM=xcb exec ${unpacked}/bin/anki ''; From 3b05df1d13c1b315cecc610a2f3180f6669442f0 Mon Sep 17 00:00:00 2001 From: Arnout Engelen Date: Thu, 24 Dec 2020 14:09:49 +0100 Subject: [PATCH 09/18] arduino: core 1.8.12 -> 1.8.13 --- .../arduino/arduino-core/default.nix | 14 +++++++------- .../arduino/arduino-core/downloads.nix | 18 +++++++++--------- 2 files changed, 16 insertions(+), 16 deletions(-) diff --git a/pkgs/development/arduino/arduino-core/default.nix b/pkgs/development/arduino/arduino-core/default.nix index 1c537edd0b4..fea3f8b3c84 100644 --- a/pkgs/development/arduino/arduino-core/default.nix +++ b/pkgs/development/arduino/arduino-core/default.nix @@ -78,14 +78,14 @@ let + stdenv.lib.optionalString (!withGui) "-core"; in stdenv.mkDerivation rec { - version = "1.8.12"; + version = "1.8.13"; name = "${flavor}-${version}"; src = fetchFromGitHub { owner = "arduino"; repo = "Arduino"; rev = version; - sha256 = "0lxkyvsh55biz2q20ba4qabraind5cpxznl41zfq027vl22j6kd2"; + sha256 = "0qg3qyj1b7wbaw2rsfly7nf3115h26nskl4ggrn6plhx272ni84p"; }; teensyduino_version = "151"; @@ -100,13 +100,13 @@ stdenv.mkDerivation rec { }; # Used because teensyduino requires jars be a specific size arduino_dist_src = fetchurl { - url = "http://downloads.arduino.cc/arduino-${version}-${teensy_architecture}.tar.xz"; + url = "https://downloads.arduino.cc/arduino-${version}-${teensy_architecture}.tar.xz"; sha256 = { - linux64 = "128f34kkxz7ab6ir5mqyr8d1mgxig8f9jygwxy44pdnq2rk6gmh9"; - linux32 = "11n85lwsn1w4ysfacyw08v85s3f3zvl8j8ac7rld19yxgjslvisi"; - linuxarm = "1k8yjivaydm6y16mplrjyblgx7l0wjzm3mjxh5saxrjq7drswmxx"; - linuxaarch64 = "04v2nhyjhahml6nmz23bfb63c0an4a7zxgcgxqqq442i8vd304wa"; + linux64 = "1bdlk51dqiyg5pw23hs8rfv8nrjqy0jqfl89h1466ahahpnd080v"; + linux32 = "0mgsw9wpwv1pgs2jslzflh7zf4ggqjgcd55hmdzrj0dvgkyw4cr2"; + linuxarm = "08n4lpak3i7yfyi0085j4nq14gb2n7zx85wl9drp8gaavxnfbp5f"; + linuxaarch64 = "0m4nhykzknm2hdpz1fhr2hbpncry53kvzs9y5lgj7rx3sy6ygbh7"; }.${teensy_architecture} or (throw "No arduino binaries for ${teensy_architecture}"); }; diff --git a/pkgs/development/arduino/arduino-core/downloads.nix b/pkgs/development/arduino/arduino-core/downloads.nix index f2edf64ceb6..76fa7664f0e 100644 --- a/pkgs/development/arduino/arduino-core/downloads.nix +++ b/pkgs/development/arduino/arduino-core/downloads.nix @@ -107,20 +107,20 @@ url = "https://github.com/arduino-libraries/WiFi101-FirmwareUpdater-Plugin/releases/download/v0.10.10/WiFi101-Updater-ArduinoIDE-Plugin-0.10.10.zip"; sha256 = "0bs5qdglsfc2q5c48m6wdjpzhz4ya4askh1g8364dp6p7jmg6w0d"; }; - "build/avr-1.8.2.tar.bz2" = fetchurl { - url = "https://downloads.arduino.cc/cores/avr-1.8.2.tar.bz2"; - sha256 = "06zl8fwphknd0qdx87fcr1003gid1yqsazaj674mm9widqfd84v2"; + "build/avr-1.8.3.tar.bz2" = fetchurl { + url = "https://downloads.arduino.cc/cores/avr-1.8.3.tar.bz2"; + sha256 = "051wnc0nmsmxvvs4c79zvjag33yx5il2pz2j7qyjsxkp4jc9p2ny"; }; } // optionalAttrs (system == "x86_64-linux") { - "build/arduino-builder-linux64-1.5.2.tar.bz2" = fetchurl { - url = "https://downloads.arduino.cc/tools/arduino-builder-linux64-1.5.2.tar.bz2"; - sha256 = "0wypr9a2cbv9r0ignsr13raw09i3vfc5zvkjxp2xwb7mv35y77z3"; + "build/arduino-builder-linux64-1.5.4.tar.bz2" = fetchurl { + url = "https://downloads.arduino.cc/tools/arduino-builder-linux64-1.5.4.tar.bz2"; + sha256 = "1cgvwlvxzzpjaj4njz1mrsif27l26dwkz9c7gbhdj0lvlk3xsa7s"; }; - "build/linux/avr-gcc-7.3.0-atmel3.6.1-arduino5-x86_64-pc-linux-gnu.tar.bz2" = fetchurl { - url = "https://downloads.arduino.cc/tools/avr-gcc-7.3.0-atmel3.6.1-arduino5-x86_64-pc-linux-gnu.tar.bz2"; - sha256 = "1yq6a811dabrkcgzfi3jsys41r19qsna46kglkjbcy0rza7yvzry"; + "build/linux/avr-gcc-7.3.0-atmel3.6.1-arduino7-x86_64-pc-linux-gnu.tar.bz2" = fetchurl { + url = "https://downloads.arduino.cc/tools/avr-gcc-7.3.0-atmel3.6.1-arduino7-x86_64-pc-linux-gnu.tar.bz2"; + sha256 = "07nrzv7gsq7bi7ichlw3xsdvgzk0lvv56b73ksn3089ajpv3g35x"; }; "build/linux/avrdude-6.3.0-arduino17-x86_64-pc-linux-gnu.tar.bz2" = fetchurl { url = "https://downloads.arduino.cc/tools/avrdude-6.3.0-arduino17-x86_64-pc-linux-gnu.tar.bz2"; From 022d7207fa047a3ca7527ccfb69ad6b3d8c99a89 Mon Sep 17 00:00:00 2001 From: Arnout Engelen Date: Thu, 24 Dec 2020 14:11:28 +0100 Subject: [PATCH 10/18] arduino: use gtk3 --- pkgs/development/arduino/arduino-core/default.nix | 10 ++++++---- 1 file changed, 6 insertions(+), 4 deletions(-) diff --git a/pkgs/development/arduino/arduino-core/default.nix b/pkgs/development/arduino/arduino-core/default.nix index 1c537edd0b4..9f2789729b4 100644 --- a/pkgs/development/arduino/arduino-core/default.nix +++ b/pkgs/development/arduino/arduino-core/default.nix @@ -11,7 +11,8 @@ , ncurses , readline , withGui ? false -, gtk2 ? null +, gtk3 ? null +, wrapGAppsHook , withTeensyduino ? false /* Packages needed for Teensyduino */ , upx @@ -29,7 +30,7 @@ , udev }: -assert withGui -> gtk2 != null; +assert withGui -> gtk3 != null && wrapGAppsHook != null; assert withTeensyduino -> withGui; let externalDownloads = import ./downloads.nix { @@ -55,7 +56,7 @@ let gcc.cc.lib gdk-pixbuf glib - gtk2 + gtk3 libpng12 libusb-compat-0_1 pango @@ -111,6 +112,7 @@ stdenv.mkDerivation rec { }; + nativeBuildInputs = [ wrapGAppsHook ]; buildInputs = [ jdk ant @@ -149,7 +151,7 @@ stdenv.mkDerivation rec { # This will be patched into `arduino` wrapper script # Java loads gtk dynamically, so we need to provide it using LD_LIBRARY_PATH - dynamicLibraryPath = lib.makeLibraryPath [ gtk2 ]; + dynamicLibraryPath = lib.makeLibraryPath [ gtk3 ]; javaPath = lib.makeBinPath [ jdk ]; # Everything else will be patched into rpath From e88246816133332552643633ccf85d5cf7f5e16e Mon Sep 17 00:00:00 2001 From: Arnout Engelen Date: Fri, 25 Dec 2020 09:35:05 +0100 Subject: [PATCH 11/18] arduino: teensyduino 1.51 -> 1.53 --- pkgs/development/arduino/arduino-core/default.nix | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) diff --git a/pkgs/development/arduino/arduino-core/default.nix b/pkgs/development/arduino/arduino-core/default.nix index fea3f8b3c84..fe5a57082a9 100644 --- a/pkgs/development/arduino/arduino-core/default.nix +++ b/pkgs/development/arduino/arduino-core/default.nix @@ -88,14 +88,14 @@ stdenv.mkDerivation rec { sha256 = "0qg3qyj1b7wbaw2rsfly7nf3115h26nskl4ggrn6plhx272ni84p"; }; - teensyduino_version = "151"; + teensyduino_version = "153"; teensyduino_src = fetchurl { url = "https://www.pjrc.com/teensy/td_${teensyduino_version}/TeensyduinoInstall.${teensy_architecture}"; sha256 = { - linux64 = "0q8mw9bm2vb5vwa98gwcs6ad164i98hc1qqh2qw029yhwm599pn0"; - linux32 = "1rq6sx0048ab200jy0cz5vznwxi99avidngj42rjnh7kcfas5c4m"; - linuxarm = "19j55bq36040rpdpfxcqimda76rkbx137q15bs8nvxj13wrbl4ip"; - linuxaarch64 = "09k78dycn1vcpcx37c1dak8bgjv8gs34l89n9r9s0c3rqmv3pg4x"; + linux64 = "02qgsj4h4zrjxkcclx7clsqbqd699kg0dq1xxa9hbj3vfnddjv1f"; + linux32 = "14xaff8xj176ih8ifdvxsly5xgjjm82dqbn7lqq81a43i0svjjyn"; + linuxarm = "0xpg9axa6dqyhccm9cpvsv2al7rgwy4gv2l8b2kffvn974dl5759"; + linuxaarch64 = "1lyn4zy4l5mml3c19fw6i2pk1ypnq6mgjmxmzk9d54wpf6n3j5dk"; }.${teensy_architecture} or (throw "No arduino binaries for ${teensy_architecture}"); }; # Used because teensyduino requires jars be a specific size From 2b131c97bbaa53292d690a877f54c25d39dbeead Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Vladim=C3=ADr=20=C4=8Cun=C3=A1t?= Date: Fri, 25 Dec 2020 09:46:30 +0100 Subject: [PATCH 12/18] nixos/kresd: set .stopIfChanged = false Since version 5.2.0 there's non-empty stop phase: ExecStopPost=/usr/bin/env rm -f "/run/knot-resolver/control/%i" but it's perfectly OK to run that from a different version (and typically it's no-op anyway). Real-life example where this helps: https://github.com/NixOS/nixpkgs/issues/49528#issuecomment-747723198 --- nixos/modules/services/networking/kresd.nix | 2 ++ 1 file changed, 2 insertions(+) diff --git a/nixos/modules/services/networking/kresd.nix b/nixos/modules/services/networking/kresd.nix index 6f1c4c48b43..074830fc352 100644 --- a/nixos/modules/services/networking/kresd.nix +++ b/nixos/modules/services/networking/kresd.nix @@ -135,6 +135,8 @@ in { CacheDirectory = "knot-resolver"; CacheDirectoryMode = "0770"; }; + # We don't mind running stop phase from wrong version. It seems less racy. + systemd.services."kresd@".stopIfChanged = false; # Try cleaning up the previously default location of cache file. # Note that /var/cache/* should always be safe to remove. From 351f3c043d80009569d646a332025f7870b11cf3 Mon Sep 17 00:00:00 2001 From: Michael Weiss Date: Thu, 24 Dec 2020 12:17:35 +0100 Subject: [PATCH 13/18] chromiumDev: Fix the build (libxshmfence is now required) Error: ../../components/viz/service/display_embedder/output_presenter_x11.cc:8:10: fatal error: 'X11/xshmfence.h' file not found ^~~~~~~~~~~~~~~~~ 1 error generated. --- pkgs/applications/networking/browsers/chromium/common.nix | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/pkgs/applications/networking/browsers/chromium/common.nix b/pkgs/applications/networking/browsers/chromium/common.nix index d754c2769c9..d7b1a017d31 100644 --- a/pkgs/applications/networking/browsers/chromium/common.nix +++ b/pkgs/applications/networking/browsers/chromium/common.nix @@ -13,7 +13,7 @@ , bison, gperf , glib, gtk3, dbus-glib , glibc -, libXScrnSaver, libXcursor, libXtst, libGLU, libGL +, libXScrnSaver, libXcursor, libXtst, libxshmfence, libGLU, libGL , protobuf, speechd, libXdamage, cups , ffmpeg, libxslt, libxml2, at-spi2-core , jre8 @@ -136,7 +136,7 @@ let util-linux alsaLib bison gperf kerberos glib gtk3 dbus-glib - libXScrnSaver libXcursor libXtst libGLU libGL + libXScrnSaver libXcursor libXtst libxshmfence libGLU libGL pciutils protobuf speechd libXdamage at-spi2-core jre pipewire_0_2 From bdedc49ba9974d8487915a7e3c4074b5f33d7879 Mon Sep 17 00:00:00 2001 From: Matthias Beyer Date: Fri, 18 Dec 2020 23:01:48 +0100 Subject: [PATCH 14/18] fbcat: init at 0.5.1 Signed-off-by: Matthias Beyer --- pkgs/tools/misc/fbcat/default.nix | 33 +++++++++++++++++++++++++++++++ pkgs/top-level/all-packages.nix | 2 ++ 2 files changed, 35 insertions(+) create mode 100644 pkgs/tools/misc/fbcat/default.nix diff --git a/pkgs/tools/misc/fbcat/default.nix b/pkgs/tools/misc/fbcat/default.nix new file mode 100644 index 00000000000..4f640f13a27 --- /dev/null +++ b/pkgs/tools/misc/fbcat/default.nix @@ -0,0 +1,33 @@ +{ stdenv, fetchFromGitHub } : + +stdenv.mkDerivation rec { + pname = "fbcat"; + version = "0.5.1"; + + src = fetchFromGitHub { + owner = "jwilk"; + repo = pname; + rev = version; + sha256 = "08y79br4a4cgkjnslw0hw57441ybsapaw7wjdbak19mv9lnl5ll9"; + }; + + # hardcoded because makefile target "install" depends on libxslt dependencies from network + # that are just too hard to monkeypatch here + # so this is the simple fix. + installPhase = '' + mkdir -p $out + install -d $out/bin + install -m755 fbcat $out/bin/ + install -m755 fbgrab $out/bin/ + install -d $out/share/man/man1 + ''; + + meta = with stdenv.lib; { + homepage = "http://jwilk.net/software/fbcat"; + description = "Framebuffer screenshot tool"; + license = licenses.gpl2Plus; + maintainers = [ maintainers.matthiasbeyer ]; + platforms = platforms.linux; + }; +} + diff --git a/pkgs/top-level/all-packages.nix b/pkgs/top-level/all-packages.nix index 25adca6946e..35896953b92 100644 --- a/pkgs/top-level/all-packages.nix +++ b/pkgs/top-level/all-packages.nix @@ -3985,6 +3985,8 @@ in feedgnuplot = callPackage ../tools/graphics/feedgnuplot { }; + fbcat = callPackage ../tools/misc/fbcat { }; + fbv = callPackage ../tools/graphics/fbv { }; fbvnc = callPackage ../tools/admin/fbvnc {}; From 4ac5d226541c32622730d7d6c967457c7ec6bc38 Mon Sep 17 00:00:00 2001 From: DavHau Date: Sun, 13 Dec 2020 21:19:50 +0700 Subject: [PATCH 15/18] autoPatchelfHook: fix bug introduced by #101142 --- pkgs/build-support/setup-hooks/auto-patchelf.sh | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/pkgs/build-support/setup-hooks/auto-patchelf.sh b/pkgs/build-support/setup-hooks/auto-patchelf.sh index 49e84f84ceb..cfca3f1c904 100644 --- a/pkgs/build-support/setup-hooks/auto-patchelf.sh +++ b/pkgs/build-support/setup-hooks/auto-patchelf.sh @@ -129,8 +129,7 @@ autoPatchelfFile() { # clear the RPATH first. runPatchelf --remove-rpath "$toPatch" - local missing - missing="$( + local missing="$( ldd "$toPatch" 2> /dev/null | \ sed -n -e 's/^[\t ]*\([^ ]\+\) => not found.*/\1/p' )" From 2fde1e63ba2c8dd22bc2622ac3edb2f8c662379f Mon Sep 17 00:00:00 2001 From: DavHau Date: Mon, 14 Dec 2020 13:27:58 +0700 Subject: [PATCH 16/18] autoPatchelfHook: fix shellcheck errors --- .../setup-hooks/auto-patchelf.sh | 21 +++++++++++++------ 1 file changed, 15 insertions(+), 6 deletions(-) diff --git a/pkgs/build-support/setup-hooks/auto-patchelf.sh b/pkgs/build-support/setup-hooks/auto-patchelf.sh index cfca3f1c904..3c0997a0dcd 100644 --- a/pkgs/build-support/setup-hooks/auto-patchelf.sh +++ b/pkgs/build-support/setup-hooks/auto-patchelf.sh @@ -1,3 +1,5 @@ +#!/usr/bin/env bash + declare -a autoPatchelfLibs declare -Ag autoPatchelfFailedDeps @@ -11,6 +13,8 @@ runPatchelf() { patchelf "$@" || (echo "Command failed: patchelf $*" && exit 1) } +# shellcheck disable=SC2154 +# (targetOffset is referenced but not assigned.) addEnvHooks "$targetOffset" gatherLibraries isExecutable() { @@ -116,6 +120,8 @@ autoPatchelfFile() { interpreter="$(< "$NIX_CC/nix-support/dynamic-linker")" if isExecutable "$toPatch"; then runPatchelf --set-interpreter "$interpreter" "$toPatch" + # shellcheck disable=SC2154 + # (runtimeDependencies is referenced but not assigned.) if [ -n "$runtimeDependencies" ]; then for dep in $runtimeDependencies; do rpath="$rpath${rpath:+:}$dep/lib" @@ -129,10 +135,11 @@ autoPatchelfFile() { # clear the RPATH first. runPatchelf --remove-rpath "$toPatch" - local missing="$( + local missing + missing="$( ldd "$toPatch" 2> /dev/null | \ sed -n -e 's/^[\t ]*\([^ ]\+\) => not found.*/\1/p' - )" + )" || return 0 # This ensures that we get the output of all missing dependencies instead # of failing at the first one, because it's more useful when working on a @@ -174,10 +181,10 @@ addAutoPatchelfSearchPath() { esac done - for file in \ - $(find "$@" "${findOpts[@]}" \! -type d \ - \( -name '*.so' -o -name '*.so.*' \)) - do addToDepCache "$file"; done + while IFS= read -r -d '' file; do + addToDepCache "$file" + done < <(find "$@" "${findOpts[@]}" \! -type d \ + \( -name '*.so' -o -name '*.so.*' \) -print0) } autoPatchelf() { @@ -230,6 +237,8 @@ autoPatchelf() { echo "autoPatchelfHook could not satisfy dependency $failedDep wanted by ${autoPatchelfFailedDeps[$failedDep]}" depsMissing=1 done + # shellcheck disable=SC2154 + # (autoPatchelfIgnoreMissingDeps is referenced but not assigned.) if [[ $depsMissing == 1 && -z "$autoPatchelfIgnoreMissingDeps" ]]; then echo "Add the missing dependencies to the build inputs or set autoPatchelfIgnoreMissingDeps=true" exit 1 From 2efcf6dc260dea45238c9378653b5066d2dfad04 Mon Sep 17 00:00:00 2001 From: DavHau Date: Sun, 20 Dec 2020 15:24:10 +0700 Subject: [PATCH 17/18] autoPatchelf: add comment why ignore failing ldd/sed --- pkgs/build-support/setup-hooks/auto-patchelf.sh | 2 ++ 1 file changed, 2 insertions(+) diff --git a/pkgs/build-support/setup-hooks/auto-patchelf.sh b/pkgs/build-support/setup-hooks/auto-patchelf.sh index 3c0997a0dcd..511371931de 100644 --- a/pkgs/build-support/setup-hooks/auto-patchelf.sh +++ b/pkgs/build-support/setup-hooks/auto-patchelf.sh @@ -135,6 +135,8 @@ autoPatchelfFile() { # clear the RPATH first. runPatchelf --remove-rpath "$toPatch" + # If the file is not a dynamic executable, ldd/sed will fail, + # in which case we return, since there is nothing left to do. local missing missing="$( ldd "$toPatch" 2> /dev/null | \ From 2cab4879c1fa563910e4f7a82e3a0ba3285b51b5 Mon Sep 17 00:00:00 2001 From: Ryan Burns Date: Wed, 23 Dec 2020 18:46:56 -0800 Subject: [PATCH 18/18] toybox: fix cross-compilation Toybox expects a native `cc` for producing build-time executables, such as kconfig/conf. --- pkgs/tools/misc/toybox/default.nix | 2 ++ 1 file changed, 2 insertions(+) diff --git a/pkgs/tools/misc/toybox/default.nix b/pkgs/tools/misc/toybox/default.nix index 9b38db5a727..e7a08877e90 100644 --- a/pkgs/tools/misc/toybox/default.nix +++ b/pkgs/tools/misc/toybox/default.nix @@ -1,5 +1,6 @@ { stdenv, lib, fetchFromGitHub, which, + buildPackages, enableStatic ? false, enableMinimal ? false, extraConfig ? "" @@ -16,6 +17,7 @@ stdenv.mkDerivation rec { sha256 = "0cgbmv6qk1haj709hjx5q4sl7wgh91i459gzs1203adwc7rvk6jv"; }; + depsBuildBuild = [ buildPackages.stdenv.cc ]; # needed for cross buildInputs = lib.optionals enableStatic [ stdenv.cc.libc stdenv.cc.libc.static ]; postPatch = "patchShebangs .";