From fe9d6cb8a72f8c8687749b8944662822a9afc143 Mon Sep 17 00:00:00 2001 From: Florian Klink Date: Sun, 10 Nov 2019 01:46:26 +0100 Subject: [PATCH 01/61] dpdk: build with meson --- pkgs/os-specific/linux/dpdk/default.nix | 70 +++++++++++++------------ 1 file changed, 36 insertions(+), 34 deletions(-) diff --git a/pkgs/os-specific/linux/dpdk/default.nix b/pkgs/os-specific/linux/dpdk/default.nix index 7525fc8e405..104fccd6955 100644 --- a/pkgs/os-specific/linux/dpdk/default.nix +++ b/pkgs/os-specific/linux/dpdk/default.nix @@ -1,9 +1,13 @@ -{ stdenv, lib, kernel, fetchurl, pkgconfig, numactl, shared ? false }: +{ stdenv, lib +, kernel +, fetchurl +, pkgconfig, meson, ninja +, libbsd, numactl, libbpf, zlib, libelf, jansson, openssl, libpcap +, doxygen, python3 +, shared ? false }: let - kver = kernel.modDirVersion or null; - mod = kernel != null; in stdenv.mkDerivation rec { @@ -15,40 +19,38 @@ in stdenv.mkDerivation rec { sha256 = "141bqqy4w6nzs9z70x7yv94a4gmxjfal46pxry9bwdh3zi1jwnyd"; }; - nativeBuildInputs = [ pkgconfig ]; - buildInputs = [ numactl ] ++ lib.optional mod kernel.moduleBuildDependencies; - - RTE_KERNELDIR = if mod then "${kernel.dev}/lib/modules/${kver}/build" else "/var/empty"; - RTE_TARGET = "x86_64-native-linuxapp-gcc"; - - # we need sse3 instructions to build - NIX_CFLAGS_COMPILE = [ "-msse3" ]; - hardeningDisable = [ "pic" ]; + nativeBuildInputs = [ + doxygen + meson + ninja + pkgconfig + python3 + python3.pkgs.sphinx + ]; + buildInputs = [ + jansson + libbpf + libbsd + libelf + libpcap + numactl + openssl.dev + zlib + ] ++ lib.optionals mod kernel.moduleBuildDependencies; postPatch = '' - cat >>config/defconfig_$RTE_TARGET <>config/defconfig_$RTE_TARGET < Date: Sun, 10 Nov 2019 02:06:11 +0100 Subject: [PATCH 02/61] odp-dpdk: 1.19.0.0_DPDK_17.11 -> 1.22.0.0_DPDK_18.11 Build with dpdk 18.11.5 instead of 17.11.9 --- pkgs/os-specific/linux/odp-dpdk/default.nix | 52 +++++++++++++-------- 1 file changed, 33 insertions(+), 19 deletions(-) diff --git a/pkgs/os-specific/linux/odp-dpdk/default.nix b/pkgs/os-specific/linux/odp-dpdk/default.nix index 789668cb89e..0bdc22da918 100644 --- a/pkgs/os-specific/linux/odp-dpdk/default.nix +++ b/pkgs/os-specific/linux/odp-dpdk/default.nix @@ -1,42 +1,56 @@ { stdenv, fetchurl, autoreconfHook, pkgconfig -, dpdk, libconfig, libpcap, numactl, openssl +, dpdk, libconfig, libpcap, numactl, openssl, zlib, libbsd, libelf, jansson }: let - - dpdk_17_11 = dpdk.overrideAttrs (old: rec { - version = "17.11.9"; + dpdk_18_11 = dpdk.overrideAttrs (old: rec { + version = "18.11.5"; src = fetchurl { url = "https://fast.dpdk.org/rel/dpdk-${version}.tar.xz"; - sha256 = "0vrcc9mdjs5fk69lh7bigsk9208dfmjsz3jxaddkjlvk2hds1id6"; + sha256 = "0000000000000000000000000000000000000000000000000000"; }; }); in stdenv.mkDerivation rec { pname = "odp-dpdk"; - version = "1.19.0.0_DPDK_17.11"; + version = "1.22.0.0_DPDK_18.11"; src = fetchurl { url = "https://git.linaro.org/lng/odp-dpdk.git/snapshot/${pname}-${version}.tar.gz"; - sha256 = "05bwjaxl9hqc6fbkp95nniq11g3kvzmlxw0bq55i7p2v35nv38px"; + sha256 = "1m8xhmfjqlj2gkkigq5ka3yh0xgzrcpfpaxp1pnh8d1g99094vbx"; }; - nativeBuildInputs = [ autoreconfHook pkgconfig ]; - buildInputs = [ dpdk_17_11 libconfig libpcap numactl openssl ]; - - RTE_SDK = "${dpdk_17_11}/share/dpdk"; - RTE_TARGET = "x86_64-native-linuxapp-gcc"; - - dontDisableStatic = true; - - configureFlags = [ - "--disable-shared" - "--with-dpdk-path=${dpdk_17_11}" + nativeBuildInputs = [ + autoreconfHook + pkgconfig ]; + buildInputs = [ + dpdk_18_11 + libconfig + libpcap + numactl + openssl + zlib + libbsd + libelf + jansson + ]; + + # for some reason, /build/odp-dpdk-1.22.0.0_DPDK_18.11/lib/.libs ends up in all binaries, + # while it should be $out/lib instead. + # prepend rpath with the proper location, the /build will get removed during rpath shrinking + preFixup = '' + for prog in $out/bin/*; do + patchelf --set-rpath $out/lib:`patchelf --print-rpath $prog` $prog + done + ''; + + # binaries will segfault otherwise + dontStrip = true; meta = with stdenv.lib; { description = "Open Data Plane optimized for DPDK"; homepage = https://www.opendataplane.org; license = licenses.bsd3; - platforms = [ "x86_64-linux" ]; + platforms = platforms.linux; maintainers = [ maintainers.abuibrahim ]; }; } From 51eb8d76f3451fd306f233a09c2be7340f9c2168 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Fabian=20M=C3=B6ller?= Date: Mon, 18 Nov 2019 14:23:07 +0100 Subject: [PATCH 03/61] cargo-generate: 0.4.0 -> 0.5.0 --- pkgs/development/tools/rust/cargo-generate/default.nix | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/pkgs/development/tools/rust/cargo-generate/default.nix b/pkgs/development/tools/rust/cargo-generate/default.nix index 970c641fe49..f924bb06e09 100644 --- a/pkgs/development/tools/rust/cargo-generate/default.nix +++ b/pkgs/development/tools/rust/cargo-generate/default.nix @@ -2,16 +2,16 @@ rustPlatform.buildRustPackage rec { pname = "cargo-generate"; - version = "0.4.0"; + version = "0.5.0"; src = fetchFromGitHub { owner = "ashleygwilliams"; repo = "cargo-generate"; rev = "v${version}"; - sha256 = "09276jrb0a735v6p06wz94kbk8bblwpca13vpvy8n0jjmqack2xb"; + sha256 = "07hklya22ixklb44f3qp6yyh5d03a7rjcn0g76icqr36hvcjyjjh"; }; - cargoSha256 = "1gbxfmhwzpxm0gs3zwzs010j0ndi5aw6xsvvngg0h1lpwg9ypnbr"; + cargoSha256 = "1rsk9j1ij53dz4gakxwdppgmv12lmyj0ihh9qypdbgskvyq3a2j9"; nativeBuildInputs = [ pkgconfig ]; From 37e7ad7251d5f2d403c6531959eaad1a46ba5ccf Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Fabian=20M=C3=B6ller?= Date: Mon, 18 Nov 2019 20:53:47 +0100 Subject: [PATCH 04/61] cargo-generate: enable tests --- pkgs/development/tools/rust/cargo-generate/default.nix | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/pkgs/development/tools/rust/cargo-generate/default.nix b/pkgs/development/tools/rust/cargo-generate/default.nix index f924bb06e09..c49739165aa 100644 --- a/pkgs/development/tools/rust/cargo-generate/default.nix +++ b/pkgs/development/tools/rust/cargo-generate/default.nix @@ -18,7 +18,11 @@ rustPlatform.buildRustPackage rec { buildInputs = [ openssl ] ++ stdenv.lib.optionals stdenv.isDarwin [ Security libiconv curl ]; - doCheck = false; + preCheck = '' + export HOME=$(mktemp -d) USER=nixbld + git config --global user.name Nixbld + git config --global user.email nixbld@localhost.localnet + ''; meta = with stdenv.lib; { description = "cargo, make me a project"; From 2f760fd4873a974ed9f0ac727d19fae4211967f7 Mon Sep 17 00:00:00 2001 From: thefenriswolf Date: Thu, 21 Nov 2019 09:25:35 +0100 Subject: [PATCH 05/61] add thefenriswolf as maintainer --- maintainers/maintainer-list.nix | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/maintainers/maintainer-list.nix b/maintainers/maintainer-list.nix index 5a760c11cba..ba6329c4163 100644 --- a/maintainers/maintainer-list.nix +++ b/maintainers/maintainer-list.nix @@ -6720,6 +6720,12 @@ githubId = 42933; name = "Andrew Childs"; }; + thefenriswolf = { + email = "stefan.rohrbacher97@gmail.com"; + github = "thefenriswolf"; + githubId = "8547242"; + name = "Stefan Rohrbacher"; + }; thesola10 = { email = "thesola10@bobile.fr"; github = "thesola10"; From ef76465bc8fc0f6d62c6663793b2bb1068c9dc45 Mon Sep 17 00:00:00 2001 From: Marek Mahut Date: Fri, 22 Nov 2019 16:29:22 +0100 Subject: [PATCH 06/61] kdeFrameworks.kio: moving bin stuff into "out" output --- pkgs/development/libraries/kde-frameworks/kio/default.nix | 1 + 1 file changed, 1 insertion(+) diff --git a/pkgs/development/libraries/kde-frameworks/kio/default.nix b/pkgs/development/libraries/kde-frameworks/kio/default.nix index 6cf89669df0..fee21a6a923 100644 --- a/pkgs/development/libraries/kde-frameworks/kio/default.nix +++ b/pkgs/development/libraries/kde-frameworks/kio/default.nix @@ -20,5 +20,6 @@ mkDerivation { kbookmarks kcompletion kconfig kcoreaddons kitemviews kjobwidgets kservice kxmlgui qtbase qttools solid ]; + outputs = [ "out" "dev" ]; patches = (copyPathsToStore (lib.readPathsFromFile ./. ./series)); } From c8d1c8712c9ab0e09fdb982fc5b0a0e9d9770355 Mon Sep 17 00:00:00 2001 From: taku0 Date: Sat, 23 Nov 2019 13:56:00 +0900 Subject: [PATCH 07/61] adoptopenjdk-bin: 11.0.3 -> 11.0.4 --- .../adoptopenjdk-bin/jdk-darwin-base.nix | 3 -- .../compilers/adoptopenjdk-bin/sources.json | 32 +++++++++---------- 2 files changed, 16 insertions(+), 19 deletions(-) diff --git a/pkgs/development/compilers/adoptopenjdk-bin/jdk-darwin-base.nix b/pkgs/development/compilers/adoptopenjdk-bin/jdk-darwin-base.nix index 03857627952..b97b4503308 100644 --- a/pkgs/development/compilers/adoptopenjdk-bin/jdk-darwin-base.nix +++ b/pkgs/development/compilers/adoptopenjdk-bin/jdk-darwin-base.nix @@ -28,9 +28,6 @@ let cpuName = stdenv.hostPlatform.parsed.cpu.name; # Remove some broken manpages. rm -rf $out/Home/man/ja* - # for backward compatibility - ln -s $out/Contents/Home $out/jre - ln -s $out/Contents/Home/* $out/ mkdir -p $out/nix-support diff --git a/pkgs/development/compilers/adoptopenjdk-bin/sources.json b/pkgs/development/compilers/adoptopenjdk-bin/sources.json index 403bd96efb0..618ef3453c9 100644 --- a/pkgs/development/compilers/adoptopenjdk-bin/sources.json +++ b/pkgs/development/compilers/adoptopenjdk-bin/sources.json @@ -10,16 +10,16 @@ "version": "11.0.4" }, "armv6l": { - "build": "7", - "sha256": "3fbe418368e6d5888d0f15c4751139eb60d9785b864158a001386537fa46f67e", - "url": "https://github.com/AdoptOpenJDK/openjdk11-binaries/releases/download/jdk-11.0.3%2B7/OpenJDK11U-jdk_arm_linux_hotspot_11.0.3_7.tar.gz", - "version": "11.0.3" + "build": "11", + "sha256": "19f16c4b905055a13457d06ce9a107a54289d3828bf3ae378efc6deb908a5572", + "url": "https://github.com/AdoptOpenJDK/openjdk11-binaries/releases/download/jdk-11.0.4%2B11/OpenJDK11U-jdk_arm_linux_hotspot_11.0.4_11.tar.gz", + "version": "11.0.4" }, "armv7l": { - "build": "7", - "sha256": "3fbe418368e6d5888d0f15c4751139eb60d9785b864158a001386537fa46f67e", - "url": "https://github.com/AdoptOpenJDK/openjdk11-binaries/releases/download/jdk-11.0.3%2B7/OpenJDK11U-jdk_arm_linux_hotspot_11.0.3_7.tar.gz", - "version": "11.0.3" + "build": "11", + "sha256": "19f16c4b905055a13457d06ce9a107a54289d3828bf3ae378efc6deb908a5572", + "url": "https://github.com/AdoptOpenJDK/openjdk11-binaries/releases/download/jdk-11.0.4%2B11/OpenJDK11U-jdk_arm_linux_hotspot_11.0.4_11.tar.gz", + "version": "11.0.4" }, "packageType": "jdk", "vmType": "hotspot", @@ -77,8 +77,8 @@ "vmType": "hotspot", "x86_64": { "build": "11", - "sha256": "a50b211f475b9497311c9b65594764d7b852b1653f249582bb20fc3c302846a5", - "url": "https://github.com/AdoptOpenJDK/openjdk11-binaries/releases/download/jdk-11.0.4%2B11/OpenJDK11U-jdk_x64_mac_hotspot_11.0.4_11.tar.gz", + "sha256": "0bf5a0572877ca628fb37c54c17ce5f3aad18d64bb999eff93e11875a603b1e3", + "url": "https://github.com/AdoptOpenJDK/openjdk11-binaries/releases/download/jdk-11.0.4%2B11.4/OpenJDK11U-jdk_x64_mac_hotspot_11.0.4_11.tar.gz", "version": "11.0.4" } }, @@ -87,8 +87,8 @@ "vmType": "openj9", "x86_64": { "build": "11", - "sha256": "7c09678d9c2d9dd0366693c6ab27bed39c76a23e7ac69b8a25c794e99dcf3ba7", - "url": "https://github.com/AdoptOpenJDK/openjdk11-binaries/releases/download/jdk-11.0.4%2B11_openj9-0.15.1/OpenJDK11U-jdk_x64_mac_openj9_11.0.4_11_openj9-0.15.1.tar.gz", + "sha256": "6c0c0f364b9eaf285d7ee9236135648ca9fc6889cb0486ce99f827bcdc21f941", + "url": "https://github.com/AdoptOpenJDK/openjdk11-binaries/releases/download/jdk-11.0.4%2B11.4_openj9-0.15.1/OpenJDK11U-jdk_x64_mac_openj9_11.0.4_11_openj9-0.15.1.tar.gz", "version": "11.0.4" } } @@ -99,8 +99,8 @@ "vmType": "hotspot", "x86_64": { "build": "11", - "sha256": "1647fded28d25e562811f7bce2092eb9c21d30608843b04250c023b40604ff26", - "url": "https://github.com/AdoptOpenJDK/openjdk11-binaries/releases/download/jdk-11.0.4%2B11/OpenJDK11U-jre_x64_mac_hotspot_11.0.4_11.tar.gz", + "sha256": "800c421391e399518f6787a0b7a407c3b8efdfb73238dbd31c87bca5d899efec", + "url": "https://github.com/AdoptOpenJDK/openjdk11-binaries/releases/download/jdk-11.0.4%2B11.4/OpenJDK11U-jre_x64_mac_hotspot_11.0.4_11.tar.gz", "version": "11.0.4" } }, @@ -109,8 +109,8 @@ "vmType": "openj9", "x86_64": { "build": "11", - "sha256": "1a8e84bae517a848aa5f25c7b04f26ab3a3bfffaa7fdf9be24e1f83325e46766", - "url": "https://github.com/AdoptOpenJDK/openjdk11-binaries/releases/download/jdk-11.0.4%2B11_openj9-0.15.1/OpenJDK11U-jre_x64_mac_openj9_11.0.4_11_openj9-0.15.1.tar.gz", + "sha256": "d554d407f14d40056caf6474901eebfbe940296dd943afd05e6719b1bd15624f", + "url": "https://github.com/AdoptOpenJDK/openjdk11-binaries/releases/download/jdk-11.0.4%2B11.4_openj9-0.15.1/OpenJDK11U-jre_x64_mac_openj9_11.0.4_11_openj9-0.15.1.tar.gz", "version": "11.0.4" } } From 36c5ad2a4b44bbd4d9f922422db29c7f78a7c6ba Mon Sep 17 00:00:00 2001 From: taku0 Date: Sat, 23 Nov 2019 14:14:37 +0900 Subject: [PATCH 08/61] adoptopenjdk-bin: 11.0.4 -> 11.0.5 --- .../compilers/adoptopenjdk-bin/sources.json | 80 +++++++++---------- 1 file changed, 40 insertions(+), 40 deletions(-) diff --git a/pkgs/development/compilers/adoptopenjdk-bin/sources.json b/pkgs/development/compilers/adoptopenjdk-bin/sources.json index 618ef3453c9..3dcdde725f4 100644 --- a/pkgs/development/compilers/adoptopenjdk-bin/sources.json +++ b/pkgs/development/compilers/adoptopenjdk-bin/sources.json @@ -10,34 +10,34 @@ "version": "11.0.4" }, "armv6l": { - "build": "11", - "sha256": "19f16c4b905055a13457d06ce9a107a54289d3828bf3ae378efc6deb908a5572", - "url": "https://github.com/AdoptOpenJDK/openjdk11-binaries/releases/download/jdk-11.0.4%2B11/OpenJDK11U-jdk_arm_linux_hotspot_11.0.4_11.tar.gz", - "version": "11.0.4" + "build": "10", + "sha256": "c6b1fda3f8807028cbfcc34a4ded2e8a5a6b6239d2bcc1f06673ea6b1530df94", + "url": "https://github.com/AdoptOpenJDK/openjdk11-binaries/releases/download/jdk-11.0.5%2B10/OpenJDK11U-jdk_arm_linux_hotspot_11.0.5_10.tar.gz", + "version": "11.0.5" }, "armv7l": { - "build": "11", - "sha256": "19f16c4b905055a13457d06ce9a107a54289d3828bf3ae378efc6deb908a5572", - "url": "https://github.com/AdoptOpenJDK/openjdk11-binaries/releases/download/jdk-11.0.4%2B11/OpenJDK11U-jdk_arm_linux_hotspot_11.0.4_11.tar.gz", - "version": "11.0.4" + "build": "10", + "sha256": "c6b1fda3f8807028cbfcc34a4ded2e8a5a6b6239d2bcc1f06673ea6b1530df94", + "url": "https://github.com/AdoptOpenJDK/openjdk11-binaries/releases/download/jdk-11.0.5%2B10/OpenJDK11U-jdk_arm_linux_hotspot_11.0.5_10.tar.gz", + "version": "11.0.5" }, "packageType": "jdk", "vmType": "hotspot", "x86_64": { - "build": "11", - "sha256": "90c33cf3f2ed0bd773f648815de7347e69cfbb3416ef3bf41616ab1c4aa0f5a8", - "url": "https://github.com/AdoptOpenJDK/openjdk11-binaries/releases/download/jdk-11.0.4%2B11/OpenJDK11U-jdk_x64_linux_hotspot_11.0.4_11.tar.gz", - "version": "11.0.4" + "build": "10", + "sha256": "6dd0c9c8a740e6c19149e98034fba8e368fd9aa16ab417aa636854d40db1a161", + "url": "https://github.com/AdoptOpenJDK/openjdk11-binaries/releases/download/jdk-11.0.5%2B10/OpenJDK11U-jdk_x64_linux_hotspot_11.0.5_10.tar.gz", + "version": "11.0.5" } }, "openj9": { "packageType": "jdk", "vmType": "openj9", "x86_64": { - "build": "11", - "sha256": "b1099cccc80a3f434728c9bc3b8a90395793b625f4680ca05267cf635143d64d", - "url": "https://github.com/AdoptOpenJDK/openjdk11-binaries/releases/download/jdk-11.0.4%2B11_openj9-0.15.1/OpenJDK11U-jdk_x64_linux_openj9_11.0.4_11_openj9-0.15.1.tar.gz", - "version": "11.0.4" + "build": "10", + "sha256": "6ead0515aecb24c6a8f5f3800a070b7d20a66c8f26cba5dad137824da590a532", + "url": "https://github.com/AdoptOpenJDK/openjdk11-binaries/releases/download/jdk-11.0.5%2B10_openj9-0.17.0/OpenJDK11U-jdk_x64_linux_openj9_11.0.5_10_openj9-0.17.0.tar.gz", + "version": "11.0.5" } } }, @@ -52,20 +52,20 @@ "packageType": "jre", "vmType": "hotspot", "x86_64": { - "build": "11", - "sha256": "70d2cc675155476f1d8516a7ae6729d44681e4fad5a6fc8dfa65cab36a67b7e0", - "url": "https://github.com/AdoptOpenJDK/openjdk11-binaries/releases/download/jdk-11.0.4%2B11/OpenJDK11U-jre_x64_linux_hotspot_11.0.4_11.tar.gz", - "version": "11.0.4" + "build": "10", + "sha256": "2f08c469c9a8adea1b6ee3444ba2a8242a7e99d87976a077faf037a9eb7f884b", + "url": "https://github.com/AdoptOpenJDK/openjdk11-binaries/releases/download/jdk-11.0.5%2B10/OpenJDK11U-jre_x64_linux_hotspot_11.0.5_10.tar.gz", + "version": "11.0.5" } }, "openj9": { "packageType": "jre", "vmType": "openj9", "x86_64": { - "build": "11", - "sha256": "c2601e7cb22af7a910e03883280cee805074656104d6d3dcaaf30e3bbb832690", - "url": "https://github.com/AdoptOpenJDK/openjdk11-binaries/releases/download/jdk-11.0.4%2B11_openj9-0.15.1/OpenJDK11U-jre_x64_linux_openj9_11.0.4_11_openj9-0.15.1.tar.gz", - "version": "11.0.4" + "build": "10", + "sha256": "2b68ea68d41281238a9dbe494cec762bd97fe34cf4fb6ba44ee1ce66bcec9d38", + "url": "https://github.com/AdoptOpenJDK/openjdk11-binaries/releases/download/jdk-11.0.5%2B10_openj9-0.17.0/OpenJDK11U-jre_x64_linux_openj9_11.0.5_10_openj9-0.17.0.tar.gz", + "version": "11.0.5" } } } @@ -76,20 +76,20 @@ "packageType": "jdk", "vmType": "hotspot", "x86_64": { - "build": "11", - "sha256": "0bf5a0572877ca628fb37c54c17ce5f3aad18d64bb999eff93e11875a603b1e3", - "url": "https://github.com/AdoptOpenJDK/openjdk11-binaries/releases/download/jdk-11.0.4%2B11.4/OpenJDK11U-jdk_x64_mac_hotspot_11.0.4_11.tar.gz", - "version": "11.0.4" + "build": "10", + "sha256": "0825d0d3177832320b697944cd8e7b2e7fe3893fafe8bfcf33ee3631aa5ca96b", + "url": "https://github.com/AdoptOpenJDK/openjdk11-binaries/releases/download/jdk-11.0.5%2B10/OpenJDK11U-jdk_x64_mac_hotspot_11.0.5_10.tar.gz", + "version": "11.0.5" } }, "openj9": { "packageType": "jdk", "vmType": "openj9", "x86_64": { - "build": "11", - "sha256": "6c0c0f364b9eaf285d7ee9236135648ca9fc6889cb0486ce99f827bcdc21f941", - "url": "https://github.com/AdoptOpenJDK/openjdk11-binaries/releases/download/jdk-11.0.4%2B11.4_openj9-0.15.1/OpenJDK11U-jdk_x64_mac_openj9_11.0.4_11_openj9-0.15.1.tar.gz", - "version": "11.0.4" + "build": "10", + "sha256": "97dc8234b73e233316b5dfdca75af9a0d54aa23b1309b1a68fd0a5d2fa928e05", + "url": "https://github.com/AdoptOpenJDK/openjdk11-binaries/releases/download/jdk-11.0.5%2B10.1_openj9-0.17.0/OpenJDK11U-jdk_x64_mac_openj9_11.0.5_10_openj9-0.17.0.tar.gz", + "version": "11.0.5" } } }, @@ -98,20 +98,20 @@ "packageType": "jre", "vmType": "hotspot", "x86_64": { - "build": "11", - "sha256": "800c421391e399518f6787a0b7a407c3b8efdfb73238dbd31c87bca5d899efec", - "url": "https://github.com/AdoptOpenJDK/openjdk11-binaries/releases/download/jdk-11.0.4%2B11.4/OpenJDK11U-jre_x64_mac_hotspot_11.0.4_11.tar.gz", - "version": "11.0.4" + "build": "10", + "sha256": "dfd212023321ebb41bce8cced15b4668001e86ecff6bffdd4f2591ccaae41566", + "url": "https://github.com/AdoptOpenJDK/openjdk11-binaries/releases/download/jdk-11.0.5%2B10/OpenJDK11U-jre_x64_mac_hotspot_11.0.5_10.tar.gz", + "version": "11.0.5" } }, "openj9": { "packageType": "jre", "vmType": "openj9", "x86_64": { - "build": "11", - "sha256": "d554d407f14d40056caf6474901eebfbe940296dd943afd05e6719b1bd15624f", - "url": "https://github.com/AdoptOpenJDK/openjdk11-binaries/releases/download/jdk-11.0.4%2B11.4_openj9-0.15.1/OpenJDK11U-jre_x64_mac_openj9_11.0.4_11_openj9-0.15.1.tar.gz", - "version": "11.0.4" + "build": "10", + "sha256": "ea6bd0be4562e766c035b997447c059d10d5d2e58ca464c57f9078858da1c967", + "url": "https://github.com/AdoptOpenJDK/openjdk11-binaries/releases/download/jdk-11.0.5%2B10.1_openj9-0.17.0/OpenJDK11U-jre_x64_mac_openj9_11.0.5_10_openj9-0.17.0.tar.gz", + "version": "11.0.5" } } } From f6a5319f93e8f3faf1d859a5226808ab3783021c Mon Sep 17 00:00:00 2001 From: taku0 Date: Sat, 23 Nov 2019 14:16:39 +0900 Subject: [PATCH 09/61] adoptopenjdk-bin: 8.0.222 -> 8.0.232 --- .../compilers/adoptopenjdk-bin/sources.json | 80 +++++++++---------- 1 file changed, 40 insertions(+), 40 deletions(-) diff --git a/pkgs/development/compilers/adoptopenjdk-bin/sources.json b/pkgs/development/compilers/adoptopenjdk-bin/sources.json index 3dcdde725f4..e40ed72c46c 100644 --- a/pkgs/development/compilers/adoptopenjdk-bin/sources.json +++ b/pkgs/development/compilers/adoptopenjdk-bin/sources.json @@ -122,56 +122,56 @@ "jdk": { "hotspot": { "aarch64": { - "build": "10", - "sha256": "652776586ede124189dc218174b5922cc97feac81021ad81905900b349a352d2", - "url": "https://github.com/AdoptOpenJDK/openjdk8-binaries/releases/download/jdk8u222-b10/OpenJDK8U-jdk_aarch64_linux_hotspot_8u222b10.tar.gz", - "version": "8.0.222" + "build": "9", + "sha256": "35799a2fd4b467115aff1bc3a54853b5131ba9068e53e1ab0fbe5521a3f2ba83", + "url": "https://github.com/AdoptOpenJDK/openjdk8-binaries/releases/download/jdk8u232-b09/OpenJDK8U-jdk_aarch64_linux_hotspot_8u232b09.tar.gz", + "version": "8.0.232" }, "packageType": "jdk", "vmType": "hotspot", "x86_64": { - "build": "10", - "sha256": "37356281345b93feb4212e6267109b4409b55b06f107619dde4960e402bafa77", - "url": "https://github.com/AdoptOpenJDK/openjdk8-binaries/releases/download/jdk8u222-b10/OpenJDK8U-jdk_x64_linux_hotspot_8u222b10.tar.gz", - "version": "8.0.222" + "build": "9", + "sha256": "7b7884f2eb2ba2d47f4c0bf3bb1a2a95b73a3a7734bd47ebf9798483a7bcc423", + "url": "https://github.com/AdoptOpenJDK/openjdk8-binaries/releases/download/jdk8u232-b09/OpenJDK8U-jdk_x64_linux_hotspot_8u232b09.tar.gz", + "version": "8.0.232" } }, "openj9": { "packageType": "jdk", "vmType": "openj9", "x86_64": { - "build": "10", - "sha256": "20cff719c6de43f8bb58c7f59e251da7c1fa2207897c9a4768c8c669716dc819", - "url": "https://github.com/AdoptOpenJDK/openjdk8-binaries/releases/download/jdk8u222-b10_openj9-0.15.1/OpenJDK8U-jdk_x64_linux_openj9_8u222b10_openj9-0.15.1.tar.gz", - "version": "8.0.222" + "build": "9", + "sha256": "abea758c7e102f3c4a3be8757ee0ce039a70e2d498c160400dfb83c6f7004dbf", + "url": "https://github.com/AdoptOpenJDK/openjdk8-binaries/releases/download/jdk8u232-b09_openj9-0.17.0/OpenJDK8U-jdk_x64_linux_openj9_8u232b09_openj9-0.17.0.tar.gz", + "version": "8.0.232" } } }, "jre": { "hotspot": { "aarch64": { - "build": "10", - "sha256": "dfaf5a121f7606c54bd6232793677a4267eddf65d29cde352b84d84edbccbb51", - "url": "https://github.com/AdoptOpenJDK/openjdk8-binaries/releases/download/jdk8u222-b10/OpenJDK8U-jre_aarch64_linux_hotspot_8u222b10.tar.gz", - "version": "8.0.222" + "build": "9", + "sha256": "4540db665260fdc84ae2f191e21beec9168a70a4227718bee5edd317707e2fda", + "url": "https://github.com/AdoptOpenJDK/openjdk8-binaries/releases/download/jdk8u232-b09/OpenJDK8U-jre_aarch64_linux_hotspot_8u232b09.tar.gz", + "version": "8.0.232" }, "packageType": "jre", "vmType": "hotspot", "x86_64": { - "build": "10", - "sha256": "a418ce895c8bf3ca2e7b2f423f038b8b093941684c9430f2e40da0982e12b52d", - "url": "https://github.com/AdoptOpenJDK/openjdk8-binaries/releases/download/jdk8u222-b10/OpenJDK8U-jre_x64_linux_hotspot_8u222b10.tar.gz", - "version": "8.0.222" + "build": "9", + "sha256": "bd06b84a1fc10e0a555431bc49a84e86df45de0be93c8ee4d09d13513219843b", + "url": "https://github.com/AdoptOpenJDK/openjdk8-binaries/releases/download/jdk8u232-b09/OpenJDK8U-jre_x64_linux_hotspot_8u232b09.tar.gz", + "version": "8.0.232" } }, "openj9": { "packageType": "jre", "vmType": "openj9", "x86_64": { - "build": "10", - "sha256": "ae56994a7c8e8c19939c0c2ff8fe5a850eb2f23845c499aa5ede26deb3d5ad28", - "url": "https://github.com/AdoptOpenJDK/openjdk8-binaries/releases/download/jdk8u222-b10_openj9-0.15.1/OpenJDK8U-jre_x64_linux_openj9_8u222b10_openj9-0.15.1.tar.gz", - "version": "8.0.222" + "build": "9", + "sha256": "30bdfdb38901d4807d96a72a33b83f7a4f40255e11a88853c1e8732acc4644a7", + "url": "https://github.com/AdoptOpenJDK/openjdk8-binaries/releases/download/jdk8u232-b09_openj9-0.17.0/OpenJDK8U-jre_x64_linux_openj9_8u232b09_openj9-0.17.0.tar.gz", + "version": "8.0.232" } } } @@ -182,20 +182,20 @@ "packageType": "jdk", "vmType": "hotspot", "x86_64": { - "build": "10", - "sha256": "9605fd00d2960934422437f601c7a9a1c5537309b9199d5bc75f84f20cd29a76", - "url": "https://github.com/AdoptOpenJDK/openjdk8-binaries/releases/download/jdk8u222-b10/OpenJDK8U-jdk_x64_mac_hotspot_8u222b10.tar.gz", - "version": "8.0.222" + "build": "9", + "sha256": "c237b2c2c32c893e4ee60cdac8c4bcc34ca731a5445986c03b95cf79918e40c3", + "url": "https://github.com/AdoptOpenJDK/openjdk8-binaries/releases/download/jdk8u232-b09/OpenJDK8U-jdk_x64_mac_hotspot_8u232b09.tar.gz", + "version": "8.0.232" } }, "openj9": { "packageType": "jdk", "vmType": "openj9", "x86_64": { - "build": "10", - "sha256": "df185e167756332163633a826b329db067f8a721f7d5d27f0b353a35fc415de0", - "url": "https://github.com/AdoptOpenJDK/openjdk8-binaries/releases/download/jdk8u222-b10_openj9-0.15.1/OpenJDK8U-jdk_x64_mac_openj9_8u222b10_openj9-0.15.1.tar.gz", - "version": "8.0.222" + "build": "9", + "sha256": "168079dcc20f62ac4409800c78d23a63ba7c665e58cd7ac8bde21ebbbb2b6d48", + "url": "https://github.com/AdoptOpenJDK/openjdk8-binaries/releases/download/jdk8u232-b09.1_openj9-0.17.0/OpenJDK8U-jdk_x64_mac_openj9_8u232b09_openj9-0.17.0.tar.gz", + "version": "8.0.232" } } }, @@ -204,20 +204,20 @@ "packageType": "jre", "vmType": "hotspot", "x86_64": { - "build": "10", - "sha256": "b3ac2436534cea932ccf665b317dbf5ffc0ee065efca808b22b6c2d795ca1b90", - "url": "https://github.com/AdoptOpenJDK/openjdk8-binaries/releases/download/jdk8u222-b10/OpenJDK8U-jre_x64_mac_hotspot_8u222b10.tar.gz", - "version": "8.0.222" + "build": "9", + "sha256": "5ec5f11dbc81ab65641b765e1ef2f924736c0d1cc797cb95b078598d9d863afd", + "url": "https://github.com/AdoptOpenJDK/openjdk8-binaries/releases/download/jdk8u232-b09/OpenJDK8U-jre_x64_mac_hotspot_8u232b09.tar.gz", + "version": "8.0.232" } }, "openj9": { "packageType": "jre", "vmType": "openj9", "x86_64": { - "build": "10", - "sha256": "d5754413d7bc3a3233aaa7f8465451fbdabaf2a0c2a91743155bf135a3047ec8", - "url": "https://github.com/AdoptOpenJDK/openjdk8-binaries/releases/download/jdk8u222-b10_openj9-0.15.1/OpenJDK8U-jre_x64_mac_openj9_8u222b10_openj9-0.15.1.tar.gz", - "version": "8.0.222" + "build": "9", + "sha256": "60b70aa16c8ca38b96c305003f3d9871897555d0b4039b8e1f8db9ceeab16d53", + "url": "https://github.com/AdoptOpenJDK/openjdk8-binaries/releases/download/jdk8u232-b09.1_openj9-0.17.0/OpenJDK8U-jre_x64_mac_openj9_8u232b09_openj9-0.17.0.tar.gz", + "version": "8.0.232" } } } From 4e78f846b649c5743c8725586866f5506bf69bc1 Mon Sep 17 00:00:00 2001 From: Katharina Fey Date: Sat, 23 Nov 2019 12:56:57 +0100 Subject: [PATCH 10/61] wally-cli: init at 1.1.1 --- pkgs/development/tools/wally-cli/default.nix | 34 ++++++++++ pkgs/development/tools/wally-cli/deps.nix | 66 ++++++++++++++++++++ pkgs/top-level/all-packages.nix | 2 + 3 files changed, 102 insertions(+) create mode 100644 pkgs/development/tools/wally-cli/default.nix create mode 100644 pkgs/development/tools/wally-cli/deps.nix diff --git a/pkgs/development/tools/wally-cli/default.nix b/pkgs/development/tools/wally-cli/default.nix new file mode 100644 index 00000000000..b7333e45644 --- /dev/null +++ b/pkgs/development/tools/wally-cli/default.nix @@ -0,0 +1,34 @@ +{ lib, buildGoPackage, fetchFromGitHub, pkg-config, libusb1 }: + +buildGoPackage rec { + pname = "wally-cli"; + version = "1.1.1"; + + goPackagePath = "github.com/zsa/wally"; + subPackages = [ "cli" ]; + + nativeBuildInputs = [ + pkg-config + libusb1 + ]; + + src = fetchFromGitHub { + owner = "zsa"; + repo = "wally"; + rev = "68960e452ee0f6c7142f5008d4b1cdc6284d3de7"; + sha256 = "122m5v7s5wqlshyk2salmd848lqs4rrz54d2ap11ay61kijm0bs2"; + }; + + postInstall = '' + mv $bin/bin/cli $bin/bin/wally + ''; + + goDeps = ./deps.nix; + + meta = with lib; { + description = "A tool to flash firmware to mechanical keyboards"; + homepage = https://ergodox-ez.com/pages/wally-planck; + license = licenses.mit; + maintainers = [ maintainers.spacekookie ]; + }; +} diff --git a/pkgs/development/tools/wally-cli/deps.nix b/pkgs/development/tools/wally-cli/deps.nix new file mode 100644 index 00000000000..8edac40c0d5 --- /dev/null +++ b/pkgs/development/tools/wally-cli/deps.nix @@ -0,0 +1,66 @@ +# This file was generated by https://github.com/kamilchm/go2nix v1.3.0 +[ + { + goPackagePath = "github.com/caarlos0/spin"; + fetch = { + type = "git"; + url = "https://github.com/caarlos0/spin"; + rev = "950231d3237faf48da965375e65a00c224bcb4dc"; + sha256 = "1yz987f86qwx2avyp1bmi5y35h8bbfgp3z1fipqpjlvfq8m7lf8w"; + }; + } + { + goPackagePath = "github.com/google/gousb"; + fetch = { + type = "git"; + url = "https://github.com/google/gousb"; + rev = "18f4c1d8a750878c4f86ac3d7319b8aa462a79f9"; + sha256 = "1i7ffkq395x0v1186j9bhfgy67wlq6s840xkyx8wn87w55yd05rh"; + }; + } + { + goPackagePath = "github.com/logrusorgru/aurora"; + fetch = { + type = "git"; + url = "https://github.com/logrusorgru/aurora"; + rev = "66b7ad493a23a2523bac50571522bbfe5b90a835"; + sha256 = "06allslr29qdapv5j3fpyw9xklmb9fmya5jzybmakz9mwczm76nq"; + }; + } + { + goPackagePath = "github.com/marcinbor85/gohex"; + fetch = { + type = "git"; + url = "https://github.com/marcinbor85/gohex"; + rev = "7a43cd876e46e0f6ddc553f10f91731a78e6e949"; + sha256 = "1nzy1hk7blawq4skycj330ac3kfwh0xr6xd7s3y09hsxfzcv4p9v"; + }; + } + { + goPackagePath = "github.com/mattn/go-runewidth"; + fetch = { + type = "git"; + url = "https://github.com/mattn/go-runewidth"; + rev = "f93a0d58d5fd95e53f82782d07bb0c79d23e1290"; + sha256 = "1sq97q71vgwnbg1fphsmqrzkbfn6mjal6d8a3qgwv4nbgppwaz25"; + }; + } + { + goPackagePath = "golang.org/x/sys"; + fetch = { + type = "git"; + url = "https://go.googlesource.com/sys"; + rev = "f068ffe820e46336f56dfca7777430582d6e507b"; + sha256 = "14qvaq9wcrm7mgyra4h9jl8ssfcxyygi1hraq3cmf118961m90zn"; + }; + } + { + goPackagePath = "gopkg.in/cheggaaa/pb.v1"; + fetch = { + type = "git"; + url = "https://gopkg.in/cheggaaa/pb.v1"; + rev = "f907f6f5dd81f77c2bbc1cde92e4c5a04720cb11"; + sha256 = "13a66cqbpdif804qj12z9ad8r24va9q41gfk71qbc4zg1wsxs3rh"; + }; + } +] diff --git a/pkgs/top-level/all-packages.nix b/pkgs/top-level/all-packages.nix index bd7c138f2f1..da5054d40ba 100644 --- a/pkgs/top-level/all-packages.nix +++ b/pkgs/top-level/all-packages.nix @@ -14105,6 +14105,8 @@ in stdenv = gcc6Stdenv; # upstream code incompatible with gcc7 }; + wally-cli = callPackage ../development/tools/wally-cli { }; + wavpack = callPackage ../development/libraries/wavpack { }; wayland = callPackage ../development/libraries/wayland { }; From 74cd007ad79609cdde0cd43c0554152a5cd4a36f Mon Sep 17 00:00:00 2001 From: Dima Date: Sat, 23 Nov 2019 13:30:22 +0100 Subject: [PATCH 11/61] xidlehook: 0.7.1 -> 0.8.0 --- pkgs/tools/X11/xidlehook/default.nix | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) diff --git a/pkgs/tools/X11/xidlehook/default.nix b/pkgs/tools/X11/xidlehook/default.nix index 89aff817f50..67c6a594db7 100644 --- a/pkgs/tools/X11/xidlehook/default.nix +++ b/pkgs/tools/X11/xidlehook/default.nix @@ -1,9 +1,9 @@ -{ lib, stdenv, rustPlatform, fetchFromGitLab +{ lib, stdenv, rustPlatform, fetchFromGitLab, python3 , xlibsWrapper, xorg, libpulseaudio, pkgconfig, patchelf, Security }: rustPlatform.buildRustPackage rec { pname = "xidlehook"; - version = "0.7.1"; + version = "0.8.0"; doCheck = false; @@ -12,14 +12,14 @@ rustPlatform.buildRustPackage rec { repo = "xidlehook"; rev = version; - sha256 = "04bb81iwxznkr1zq1q8dql9qklzm9qy7837a71b02ywp3fc6v5b2"; + sha256 = "127b20y86xs2wq5ka236057nyrh87fgzhjqbl6azf002afnbsn5m"; }; cargoBuildFlags = lib.optionals (!stdenv.isLinux) ["--no-default-features" "--features" "pulse"]; - cargoSha256 = "0xnz2s8vh5njqs4a1qm98ydh8pywxvnnpym0z94fsifyfdjlsfm4"; + cargoSha256 = "0jdkcxvlw7s8pz1ka3d2w97356a2axvlwfgyh2dz7nmfzpjx64x0"; buildInputs = [ xlibsWrapper xorg.libXScrnSaver libpulseaudio ] ++ lib.optional stdenv.isDarwin Security; - nativeBuildInputs = [ pkgconfig patchelf ]; + nativeBuildInputs = [ pkgconfig patchelf python3 ]; postFixup = lib.optionalString stdenv.isLinux '' RPATH="$(patchelf --print-rpath $out/bin/xidlehook)" From c90b210855e3a02f525d79e2e91b1b9074259664 Mon Sep 17 00:00:00 2001 From: Pascal Hertleif Date: Sat, 23 Nov 2019 20:47:34 +0100 Subject: [PATCH 12/61] zola: fix build on macOS Patches lockfile to update sass-sys to a version which includes compass-rs/sass-rs#60 Fixes #72972 --- pkgs/applications/misc/zola/cargo-lock.patch | 28 ++++++++++++++++++++ pkgs/applications/misc/zola/default.nix | 5 ++-- 2 files changed, 31 insertions(+), 2 deletions(-) create mode 100644 pkgs/applications/misc/zola/cargo-lock.patch diff --git a/pkgs/applications/misc/zola/cargo-lock.patch b/pkgs/applications/misc/zola/cargo-lock.patch new file mode 100644 index 00000000000..b9d97e3c328 --- /dev/null +++ b/pkgs/applications/misc/zola/cargo-lock.patch @@ -0,0 +1,28 @@ +diff --git a/Cargo.lock b/Cargo.lock +index df5fef3..80f071a 100644 +--- a/Cargo.lock ++++ b/Cargo.lock +@@ -2158,12 +2158,12 @@ version = "0.2.2" + source = "registry+https://github.com/rust-lang/crates.io-index" + dependencies = [ + "libc 0.2.62 (registry+https://github.com/rust-lang/crates.io-index)", +- "sass-sys 0.4.13 (registry+https://github.com/rust-lang/crates.io-index)", ++ "sass-sys 0.4.15 (registry+https://github.com/rust-lang/crates.io-index)", + ] + + [[package]] + name = "sass-sys" +-version = "0.4.13" ++version = "0.4.15" + source = "registry+https://github.com/rust-lang/crates.io-index" + dependencies = [ + "cc 1.0.45 (registry+https://github.com/rust-lang/crates.io-index)", +@@ -3410,7 +3410,7 @@ dependencies = [ + "checksum safemem 0.3.2 (registry+https://github.com/rust-lang/crates.io-index)" = "d2b08423011dae9a5ca23f07cf57dac3857f5c885d352b76f6d95f4aea9434d0" + "checksum same-file 1.0.5 (registry+https://github.com/rust-lang/crates.io-index)" = "585e8ddcedc187886a30fa705c47985c3fa88d06624095856b36ca0b82ff4421" + "checksum sass-rs 0.2.2 (registry+https://github.com/rust-lang/crates.io-index)" = "cabcf7c6e55053f359911187ac401409aad2dc14338cae972dec266fee486abd" +-"checksum sass-sys 0.4.13 (registry+https://github.com/rust-lang/crates.io-index)" = "6e16ac97c2335bc367e2d675f54c1823558f1b19a6c67671d48b70e30ae22972" ++"checksum sass-sys 0.4.15 (registry+https://github.com/rust-lang/crates.io-index)" = "304b6f9501d1da13f17404aeee85486d7383d06074906669b3ea032f81e83d22" + "checksum schannel 0.1.16 (registry+https://github.com/rust-lang/crates.io-index)" = "87f550b06b6cba9c8b8be3ee73f391990116bf527450d2556e9b9ce263b9a021" + "checksum scoped_threadpool 0.1.9 (registry+https://github.com/rust-lang/crates.io-index)" = "1d51f5df5af43ab3f1360b429fa5e0152ac5ce8c0bd6485cae490332e96846a8" + "checksum scopeguard 0.3.3 (registry+https://github.com/rust-lang/crates.io-index)" = "94258f53601af11e6a49f722422f6e3425c52b06245a5cf9bc09908b174f5e27" diff --git a/pkgs/applications/misc/zola/default.nix b/pkgs/applications/misc/zola/default.nix index b9231f8f093..178be491169 100644 --- a/pkgs/applications/misc/zola/default.nix +++ b/pkgs/applications/misc/zola/default.nix @@ -8,10 +8,11 @@ rustPlatform.buildRustPackage rec { owner = "getzola"; repo = pname; rev = "v${version}"; - sha256 = "0dbj2rkn4k5glnwdazsvjhah5pj9cbdb8hwlvm5q4njsmrgpyaw5"; + sha256 = "13kbgxh7r6124d1fjdf0x599j1kpgixp1y9d299zb5vrd6rf5wy5"; }; + cargoPatches = [ ./cargo-lock.patch ]; - cargoSha256 = "0i0xqbpbv3md42d2853cfzkhfwlkvxahhz5dldla5x96rm1i2hr8"; + cargoSha256 = "03rwf5l1l3ap03qi0xqcxsbyvpg3cqmr50j8ql6c5v55xl0ki9w8"; nativeBuildInputs = [ cmake pkgconfig ]; buildInputs = [ openssl ] From a8a552da536463495c7abd71934509483e5a731d Mon Sep 17 00:00:00 2001 From: Florian Klink Date: Sat, 23 Nov 2019 23:05:12 +0100 Subject: [PATCH 13/61] nixosTests.systemd-nspawn: convert test to python also fix a wrong test name ;-) --- nixos/tests/systemd-nspawn.nix | 16 +++++++++------- 1 file changed, 9 insertions(+), 7 deletions(-) diff --git a/nixos/tests/systemd-nspawn.nix b/nixos/tests/systemd-nspawn.nix index c2039bb5980..5bf55060d2e 100644 --- a/nixos/tests/systemd-nspawn.nix +++ b/nixos/tests/systemd-nspawn.nix @@ -1,4 +1,4 @@ -import ./make-test.nix ({pkgs, lib, ...}: +import ./make-test-python.nix ({pkgs, lib, ...}: let gpgKeyring = (pkgs.runCommand "gpg-keyring" { buildInputs = [ pkgs.gnupg ]; } '' mkdir -p $out @@ -32,7 +32,7 @@ let gpg --batch --sign --detach-sign --output SHA256SUMS.gpg SHA256SUMS ''); in { - name = "opensmtpd"; + name = "systemd-nspawn"; nodes = { server = { pkgs, ... }: { @@ -48,11 +48,13 @@ in { }; testScript = '' - startAll; + start_all() - $server->waitForUnit("nginx.service"); - $client->waitForUnit("network-online.target"); - $client->succeed("machinectl pull-raw --verify=signature http://server/testimage.raw"); - $client->succeed("cmp /var/lib/machines/testimage.raw ${nspawnImages}/testimage.raw"); + server.wait_for_unit("nginx.service") + client.wait_for_unit("network-online.target") + client.succeed("machinectl pull-raw --verify=signature http://server/testimage.raw") + client.succeed( + "cmp /var/lib/machines/testimage.raw ${nspawnImages}/testimage.raw" + ) ''; }) From 56718763e9eaed155e5d0f8f9305d25726a476bc Mon Sep 17 00:00:00 2001 From: Florian Klink Date: Sat, 23 Nov 2019 23:47:16 +0100 Subject: [PATCH 14/61] nixosTests.mysql: port to python --- nixos/tests/mysql.nix | 26 ++++++++++++++++---------- 1 file changed, 16 insertions(+), 10 deletions(-) diff --git a/nixos/tests/mysql.nix b/nixos/tests/mysql.nix index 05bd968de02..2c0d212c2f1 100644 --- a/nixos/tests/mysql.nix +++ b/nixos/tests/mysql.nix @@ -1,4 +1,4 @@ -import ./make-test.nix ({ pkgs, ...} : { +import ./make-test-python.nix ({ pkgs, ...} : { name = "mysql"; meta = with pkgs.stdenv.lib.maintainers; { maintainers = [ eelco shlevy ]; @@ -47,17 +47,23 @@ import ./make-test.nix ({ pkgs, ...} : { }; testScript = '' - startAll; + start_all - $mysql->waitForUnit("mysql"); - $mysql->succeed("echo 'use empty_testdb;' | mysql -u root"); - $mysql->succeed("echo 'use testdb; select * from tests;' | mysql -u root -N | grep 4"); + mysql.wait_for_unit("mysql") + mysql.succeed("echo 'use empty_testdb;' | mysql -u root") + mysql.succeed("echo 'use testdb; select * from tests;' | mysql -u root -N | grep 4") # ';' acts as no-op, just check whether login succeeds with the user created from the initialScript - $mysql->succeed("echo ';' | mysql -u passworduser --password=password123"); + mysql.succeed("echo ';' | mysql -u passworduser --password=password123") - $mariadb->waitForUnit("mysql"); - $mariadb->succeed("echo 'use testdb; create table tests (test_id INT, PRIMARY KEY (test_id));' | sudo -u testuser mysql -u testuser"); - $mariadb->succeed("echo 'use testdb; insert into tests values (42);' | sudo -u testuser mysql -u testuser"); - $mariadb->succeed("echo 'use testdb; select test_id from tests;' | sudo -u testuser mysql -u testuser -N | grep 42"); + mariadb.wait_for_unit("mysql") + mariadb.succeed( + "echo 'use testdb; create table tests (test_id INT, PRIMARY KEY (test_id));' | sudo -u testuser mysql -u testuser" + ) + mariadb.succeed( + "echo 'use testdb; insert into tests values (42);' | sudo -u testuser mysql -u testuser" + ) + mariadb.succeed( + "echo 'use testdb; select test_id from tests;' | sudo -u testuser mysql -u testuser -N | grep 42" + ) ''; }) From ced69719cd64390378d9a729d2393d494b9f8dde Mon Sep 17 00:00:00 2001 From: Florian Klink Date: Sat, 23 Nov 2019 23:47:46 +0100 Subject: [PATCH 15/61] nixosTests.mysqlReplication: port to python --- nixos/tests/mysql-replication.nix | 46 ++++++++++++++++++------------- 1 file changed, 27 insertions(+), 19 deletions(-) diff --git a/nixos/tests/mysql-replication.nix b/nixos/tests/mysql-replication.nix index c75a862106f..a2654f041ad 100644 --- a/nixos/tests/mysql-replication.nix +++ b/nixos/tests/mysql-replication.nix @@ -1,4 +1,4 @@ -import ./make-test.nix ({ pkgs, ...} : +import ./make-test-python.nix ({ pkgs, ...} : let replicateUser = "replicate"; @@ -54,28 +54,36 @@ in }; testScript = '' - $master->start; - $master->waitForUnit("mysql"); - $master->waitForOpenPort(3306); + master.start() + master.wait_for_unit("mysql") + master.wait_for_open_port(3306) # Wait for testdb to be fully populated (5 rows). - $master->waitUntilSucceeds("mysql -u root -D testdb -N -B -e 'select count(id) from tests' | grep -q 5"); + master.wait_until_succeeds( + "mysql -u root -D testdb -N -B -e 'select count(id) from tests' | grep -q 5" + ) - $slave1->start; - $slave2->start; - $slave1->waitForUnit("mysql"); - $slave1->waitForOpenPort(3306); - $slave2->waitForUnit("mysql"); - $slave2->waitForOpenPort(3306); + slave1.start() + slave2.start() + slave1.wait_for_unit("mysql") + slave1.wait_for_open_port(3306) + slave2.wait_for_unit("mysql") + slave2.wait_for_open_port(3306) # wait for replications to finish - $slave1->waitUntilSucceeds("mysql -u root -D testdb -N -B -e 'select count(id) from tests' | grep -q 5"); - $slave2->waitUntilSucceeds("mysql -u root -D testdb -N -B -e 'select count(id) from tests' | grep -q 5"); + slave1.wait_until_succeeds( + "mysql -u root -D testdb -N -B -e 'select count(id) from tests' | grep -q 5" + ) + slave2.wait_until_succeeds( + "mysql -u root -D testdb -N -B -e 'select count(id) from tests' | grep -q 5" + ) - $slave2->succeed("systemctl stop mysql"); - $master->succeed("echo 'insert into testdb.tests values (123, 456);' | mysql -u root -N"); - $slave2->succeed("systemctl start mysql"); - $slave2->waitForUnit("mysql"); - $slave2->waitForOpenPort(3306); - $slave2->waitUntilSucceeds("echo 'select * from testdb.tests where Id = 123;' | mysql -u root -N | grep 456"); + slave2.succeed("systemctl stop mysql") + master.succeed("echo 'insert into testdb.tests values (123, 456);' | mysql -u root -N") + slave2.succeed("systemctl start mysql") + slave2.wait_for_unit("mysql") + slave2.wait_for_open_port(3306) + slave2.wait_until_succeeds( + "echo 'select * from testdb.tests where Id = 123;' | mysql -u root -N | grep 456" + ) ''; }) From 132b7032712ae8e18f3d3d615aa01118c07d2913 Mon Sep 17 00:00:00 2001 From: Florian Klink Date: Sat, 23 Nov 2019 23:48:12 +0100 Subject: [PATCH 16/61] nixosTests.mysqlBackup: port to python --- nixos/tests/mysql-backup.nix | 48 ++++++++++++++++++++---------------- 1 file changed, 27 insertions(+), 21 deletions(-) diff --git a/nixos/tests/mysql-backup.nix b/nixos/tests/mysql-backup.nix index 81482dfef7e..a0595e4d553 100644 --- a/nixos/tests/mysql-backup.nix +++ b/nixos/tests/mysql-backup.nix @@ -1,5 +1,5 @@ # Test whether mysqlBackup option works -import ./make-test.nix ({ pkgs, ... } : { +import ./make-test-python.nix ({ pkgs, ... } : { name = "mysql-backup"; meta = with pkgs.stdenv.lib.maintainers; { maintainers = [ rvl ]; @@ -20,31 +20,37 @@ import ./make-test.nix ({ pkgs, ... } : { }; }; - testScript = - '' startAll; + testScript = '' + start_all() - # Delete backup file that may be left over from a previous test run. - # This is not needed on Hydra but useful for repeated local test runs. - $master->execute("rm -f /var/backup/mysql/testdb.gz"); + # Delete backup file that may be left over from a previous test run. + # This is not needed on Hydra but useful for repeated local test runs. + master.execute("rm -f /var/backup/mysql/testdb.gz") - # Need to have mysql started so that it can be populated with data. - $master->waitForUnit("mysql.service"); + # Need to have mysql started so that it can be populated with data. + master.wait_for_unit("mysql.service") - # Wait for testdb to be fully populated (5 rows). - $master->waitUntilSucceeds("mysql -u root -D testdb -N -B -e 'select count(id) from tests' | grep -q 5"); + # Wait for testdb to be fully populated (5 rows). + master.wait_until_succeeds( + "mysql -u root -D testdb -N -B -e 'select count(id) from tests' | grep -q 5" + ) - # Do a backup and wait for it to start - $master->startJob("mysql-backup.service"); - $master->waitForJob("mysql-backup.service"); + # Do a backup and wait for it to start + master.start_job("mysql-backup.service") + master.wait_for_unit("mysql-backup.service") - # wait for backup to fail, because of database 'doesnotexist' - $master->waitUntilFails("systemctl is-active -q mysql-backup.service"); + # wait for backup to fail, because of database 'doesnotexist' + master.wait_until_fails("systemctl is-active -q mysql-backup.service") - # wait for backup file and check that data appears in backup - $master->waitForFile("/var/backup/mysql/testdb.gz"); - $master->succeed("${pkgs.gzip}/bin/zcat /var/backup/mysql/testdb.gz | grep hello"); + # wait for backup file and check that data appears in backup + master.wait_for_file("/var/backup/mysql/testdb.gz") + master.succeed( + "${pkgs.gzip}/bin/zcat /var/backup/mysql/testdb.gz | grep hello" + ) - # Check that a failed backup is logged - $master->succeed("journalctl -u mysql-backup.service | grep 'fail.*doesnotexist' > /dev/null"); - ''; + # Check that a failed backup is logged + master.succeed( + "journalctl -u mysql-backup.service | grep 'fail.*doesnotexist' > /dev/null" + ) + ''; }) From ba7734440081e5e389df250bd3fe43557a1a3909 Mon Sep 17 00:00:00 2001 From: Florian Klink Date: Sun, 24 Nov 2019 00:13:45 +0100 Subject: [PATCH 17/61] nixosTests.nix-ssh-serve: port to python --- nixos/tests/nix-ssh-serve.nix | 30 ++++++++++++++++++------------ 1 file changed, 18 insertions(+), 12 deletions(-) diff --git a/nixos/tests/nix-ssh-serve.nix b/nixos/tests/nix-ssh-serve.nix index 494d55121eb..03f83542c7c 100644 --- a/nixos/tests/nix-ssh-serve.nix +++ b/nixos/tests/nix-ssh-serve.nix @@ -1,4 +1,4 @@ -import ./make-test.nix ({ pkgs, lib, ... }: +import ./make-test-python.nix ({ pkgs, lib, ... }: let inherit (import ./ssh-keys.nix pkgs) snakeOilPrivateKey snakeOilPublicKey; ssh-config = builtins.toFile "ssh.conf" '' @@ -18,22 +18,28 @@ in client.nix.package = pkgs.nix; }; testScript = '' - startAll; + start_all() - $client->succeed("mkdir -m 700 /root/.ssh"); - $client->copyFileFromHost("${ssh-config}", "/root/.ssh/config"); - $client->succeed("cat ${snakeOilPrivateKey} > /root/.ssh/id_ecdsa"); - $client->succeed("chmod 600 /root/.ssh/id_ecdsa"); + client.succeed("mkdir -m 700 /root/.ssh") + client.succeed( + "cat ${ssh-config} > /root/.ssh/config" + ) + client.succeed( + "cat ${snakeOilPrivateKey} > /root/.ssh/id_ecdsa" + ) + client.succeed("chmod 600 /root/.ssh/id_ecdsa") - $client->succeed("nix-store --add /etc/machine-id > mach-id-path"); + client.succeed("nix-store --add /etc/machine-id > mach-id-path") - $server->waitForUnit("sshd"); + server.wait_for_unit("sshd") - $client->fail("diff /root/other-store\$(cat mach-id-path) /etc/machine-id"); + client.fail("diff /root/other-store$(cat mach-id-path) /etc/machine-id") # Currently due to shared store this is a noop :( - $client->succeed("nix copy --to ssh-ng://nix-ssh\@server \$(cat mach-id-path)"); - $client->succeed("nix-store --realise \$(cat mach-id-path) --store /root/other-store --substituters ssh-ng://nix-ssh\@server"); - $client->succeed("diff /root/other-store\$(cat mach-id-path) /etc/machine-id"); + client.succeed("nix copy --to ssh-ng://nix-ssh@server $(cat mach-id-path)") + client.succeed( + "nix-store --realise $(cat mach-id-path) --store /root/other-store --substituters ssh-ng://nix-ssh@server" + ) + client.succeed("diff /root/other-store$(cat mach-id-path) /etc/machine-id") ''; } ) From cfaaa524e3bc3f8f7cf97accfbc5dc87bb5f3fa9 Mon Sep 17 00:00:00 2001 From: Florian Klink Date: Sun, 24 Nov 2019 01:27:22 +0100 Subject: [PATCH 18/61] nixosTests.google-oslogin: port to python also use a .ssh/config instead of passing the same options over and over again --- nixos/tests/google-oslogin/default.nix | 54 +++++++++++++++++--------- 1 file changed, 36 insertions(+), 18 deletions(-) diff --git a/nixos/tests/google-oslogin/default.nix b/nixos/tests/google-oslogin/default.nix index 3b84bba3f98..1977e92e987 100644 --- a/nixos/tests/google-oslogin/default.nix +++ b/nixos/tests/google-oslogin/default.nix @@ -1,7 +1,14 @@ -import ../make-test.nix ({ pkgs, ... } : +import ../make-test-python.nix ({ pkgs, ... } : let inherit (import ./../ssh-keys.nix pkgs) snakeOilPrivateKey snakeOilPublicKey; + + # don't check host keys or known hosts, use the snakeoil ssh key + ssh-config = builtins.toFile "ssh.conf" '' + UserKnownHostsFile=/dev/null + StrictHostKeyChecking=no + IdentityFile=~/.ssh/id_snakeoil + ''; in { name = "google-oslogin"; meta = with pkgs.stdenv.lib.maintainers; { @@ -15,38 +22,49 @@ in { client = { ... }: {}; }; testScript = '' - startAll; + start_all() - $server->waitForUnit("mock-google-metadata.service"); - $server->waitForOpenPort(80); + server.wait_for_unit("mock-google-metadata.service") + server.wait_for_open_port(80) # mockserver should return a non-expired ssh key for both mockuser and mockadmin - $server->succeed('${pkgs.google-compute-engine-oslogin}/bin/google_authorized_keys mockuser | grep -q "${snakeOilPublicKey}"'); - $server->succeed('${pkgs.google-compute-engine-oslogin}/bin/google_authorized_keys mockadmin | grep -q "${snakeOilPublicKey}"'); + server.succeed( + '${pkgs.google-compute-engine-oslogin}/bin/google_authorized_keys mockuser | grep -q "${snakeOilPublicKey}"' + ) + server.succeed( + '${pkgs.google-compute-engine-oslogin}/bin/google_authorized_keys mockadmin | grep -q "${snakeOilPublicKey}"' + ) - # install snakeoil ssh key on the client - $client->succeed("mkdir -p ~/.ssh"); - $client->succeed("cat ${snakeOilPrivateKey} > ~/.ssh/id_snakeoil"); - $client->succeed("chmod 600 ~/.ssh/id_snakeoil"); + # install snakeoil ssh key on the client, and provision .ssh/config file + client.succeed("mkdir -p ~/.ssh") + client.succeed( + "cat ${snakeOilPrivateKey} > ~/.ssh/id_snakeoil" + ) + client.succeed("chmod 600 ~/.ssh/id_snakeoil") + client.succeed("cp ${ssh-config} ~/.ssh/config") - $client->waitForUnit("network.target"); - $server->waitForUnit("sshd.service"); + client.wait_for_unit("network.target") + server.wait_for_unit("sshd.service") # we should not be able to connect as non-existing user - $client->fail("ssh -o User=ghost -o UserKnownHostsFile=/dev/null -o StrictHostKeyChecking=no server -i ~/.ssh/id_snakeoil 'true'"); + client.fail("ssh ghost@server 'true'") # we should be able to connect as mockuser - $client->succeed("ssh -o User=mockuser -o UserKnownHostsFile=/dev/null -o StrictHostKeyChecking=no server -i ~/.ssh/id_snakeoil 'true'"); + client.succeed("ssh mockuser@server 'true'") # but we shouldn't be able to sudo - $client->fail("ssh -o User=mockuser -o UserKnownHostsFile=/dev/null -o StrictHostKeyChecking=no server -i ~/.ssh/id_snakeoil '/run/wrappers/bin/sudo /run/current-system/sw/bin/id' | grep -q 'root'"); + client.fail( + "ssh mockuser@server '/run/wrappers/bin/sudo /run/current-system/sw/bin/id' | grep -q 'root'" + ) # we should also be able to log in as mockadmin - $client->succeed("ssh -o User=mockadmin -o UserKnownHostsFile=/dev/null -o StrictHostKeyChecking=no server -i ~/.ssh/id_snakeoil 'true'"); + client.succeed("ssh mockadmin@server 'true'") # pam_oslogin_admin.so should now have generated a sudoers file - $server->succeed("find /run/google-sudoers.d | grep -q '/run/google-sudoers.d/mockadmin'"); + server.succeed("find /run/google-sudoers.d | grep -q '/run/google-sudoers.d/mockadmin'") # and we should be able to sudo - $client->succeed("ssh -o User=mockadmin -o UserKnownHostsFile=/dev/null -o StrictHostKeyChecking=no server -i ~/.ssh/id_snakeoil '/run/wrappers/bin/sudo /run/current-system/sw/bin/id' | grep -q 'root'"); + client.succeed( + "ssh mockadmin@server '/run/wrappers/bin/sudo /run/current-system/sw/bin/id' | grep -q 'root'" + ) ''; }) From 39e8f9a31281be04563e0993915b610024cdba60 Mon Sep 17 00:00:00 2001 From: Florian Klink Date: Sun, 24 Nov 2019 01:38:24 +0100 Subject: [PATCH 19/61] nixosTests.etcd: port to python --- nixos/tests/etcd.nix | 16 +++++++--------- 1 file changed, 7 insertions(+), 9 deletions(-) diff --git a/nixos/tests/etcd.nix b/nixos/tests/etcd.nix index 6c23b31779b..84272434384 100644 --- a/nixos/tests/etcd.nix +++ b/nixos/tests/etcd.nix @@ -1,6 +1,6 @@ # This test runs simple etcd node -import ./make-test.nix ({ pkgs, ... } : { +import ./make-test-python.nix ({ pkgs, ... } : { name = "etcd"; meta = with pkgs.stdenv.lib.maintainers; { @@ -14,14 +14,12 @@ import ./make-test.nix ({ pkgs, ... } : { }; testScript = '' - subtest "should start etcd node", sub { - $node->start(); - $node->waitForUnit("etcd.service"); - }; + with subtest("should start etcd node"): + node.start() + node.wait_for_unit("etcd.service") - subtest "should write and read some values to etcd", sub { - $node->succeed("etcdctl set /foo/bar 'Hello world'"); - $node->succeed("etcdctl get /foo/bar | grep 'Hello world'"); - } + with subtest("should write and read some values to etcd"): + node.succeed("etcdctl set /foo/bar 'Hello world'") + node.succeed("etcdctl get /foo/bar | grep 'Hello world'") ''; }) From 6bd28271dcd1f2a766d69ecfdd8ca0913f747e65 Mon Sep 17 00:00:00 2001 From: Florian Klink Date: Sun, 24 Nov 2019 01:38:51 +0100 Subject: [PATCH 20/61] nixosTests.etcd-cluster: port to python --- nixos/tests/etcd-cluster.nix | 43 +++++++++++++++++------------------- 1 file changed, 20 insertions(+), 23 deletions(-) diff --git a/nixos/tests/etcd-cluster.nix b/nixos/tests/etcd-cluster.nix index 43fde7d5920..19c5d915823 100644 --- a/nixos/tests/etcd-cluster.nix +++ b/nixos/tests/etcd-cluster.nix @@ -1,6 +1,6 @@ # This test runs simple etcd cluster -import ./make-test.nix ({ pkgs, ... } : let +import ./make-test-python.nix ({ pkgs, ... } : let runWithOpenSSL = file: cmd: pkgs.runCommand file { buildInputs = [ pkgs.openssl ]; @@ -129,29 +129,26 @@ in { }; testScript = '' - subtest "should start etcd cluster", sub { - $node1->start(); - $node2->start(); - $node1->waitForUnit("etcd.service"); - $node2->waitForUnit("etcd.service"); - $node2->waitUntilSucceeds("etcdctl cluster-health"); - $node1->succeed("etcdctl set /foo/bar 'Hello world'"); - $node2->succeed("etcdctl get /foo/bar | grep 'Hello world'"); - }; + with subtest("should start etcd cluster"): + node1.start() + node2.start() + node1.wait_for_unit("etcd.service") + node2.wait_for_unit("etcd.service") + node2.wait_until_succeeds("etcdctl cluster-health") + node1.succeed("etcdctl set /foo/bar 'Hello world'") + node2.succeed("etcdctl get /foo/bar | grep 'Hello world'") - subtest "should add another member", sub { - $node1->waitUntilSucceeds("etcdctl member add node3 https://node3:2380"); - $node3->start(); - $node3->waitForUnit("etcd.service"); - $node3->waitUntilSucceeds("etcdctl member list | grep 'node3'"); - $node3->succeed("etcdctl cluster-health"); - }; + with subtest("should add another member"): + node1.wait_until_succeeds("etcdctl member add node3 https://node3:2380") + node3.start() + node3.wait_for_unit("etcd.service") + node3.wait_until_succeeds("etcdctl member list | grep 'node3'") + node3.succeed("etcdctl cluster-health") - subtest "should survive member crash", sub { - $node3->crash; - $node1->succeed("etcdctl cluster-health"); - $node1->succeed("etcdctl set /foo/bar 'Hello degraded world'"); - $node1->succeed("etcdctl get /foo/bar | grep 'Hello degraded world'"); - }; + with subtest("should survive member crash"): + node3.crash() + node1.succeed("etcdctl cluster-health") + node1.succeed("etcdctl set /foo/bar 'Hello degraded world'") + node1.succeed("etcdctl get /foo/bar | grep 'Hello degraded world'") ''; }) From 62d64297932068b5afa25fb66ed396cd38ef293a Mon Sep 17 00:00:00 2001 From: Craig Hall Date: Fri, 23 Aug 2019 11:30:13 +0100 Subject: [PATCH 21/61] gcc: Fix cross names There was an issue with the dashes. (taken from commit e158e113a6b74f6cd0e1de9e976b882a03714bf8) --- pkgs/development/compilers/gcc/4.8/default.nix | 6 +++--- pkgs/development/compilers/gcc/4.9/default.nix | 6 +++--- pkgs/development/compilers/gcc/5/default.nix | 6 +++--- pkgs/development/compilers/gcc/6/default.nix | 6 +++--- pkgs/development/compilers/gcc/7/default.nix | 6 +++--- pkgs/development/compilers/gcc/8/default.nix | 6 +++--- pkgs/development/compilers/gcc/9/default.nix | 6 +++--- pkgs/development/compilers/gcc/snapshot/default.nix | 6 +++--- 8 files changed, 24 insertions(+), 24 deletions(-) diff --git a/pkgs/development/compilers/gcc/4.8/default.nix b/pkgs/development/compilers/gcc/4.8/default.nix index eee2c1a97a8..a90f738ac42 100644 --- a/pkgs/development/compilers/gcc/4.8/default.nix +++ b/pkgs/development/compilers/gcc/4.8/default.nix @@ -101,8 +101,8 @@ let majorVersion = "4"; /* Cross-gcc settings (build == host != target) */ crossMingw = targetPlatform != hostPlatform && targetPlatform.libc == "msvcrt"; - stageNameAddon = if crossStageStatic then "-stage-static" else "-stage-final"; - crossNameAddon = if targetPlatform != hostPlatform then "-${targetPlatform.config}" + stageNameAddon else ""; + stageNameAddon = if crossStageStatic then "stage-static" else "stage-final"; + crossNameAddon = optionalString (targetPlatform != hostPlatform) "${targetPlatform.config}-${stageNameAddon}-"; in @@ -110,7 +110,7 @@ in assert x11Support -> (filter (x: x == null) ([ gtk2 libart_lgpl ] ++ xlibs)) == []; stdenv.mkDerivation ({ - name = crossNameAddon + "${name}${if stripped then "" else "-debug"}-${version}"; + name = "${crossNameAddon}${name}${if stripped then "" else "-debug"}-${version}"; builder = ../builder.sh; diff --git a/pkgs/development/compilers/gcc/4.9/default.nix b/pkgs/development/compilers/gcc/4.9/default.nix index b4ac68be1a3..c0d166f2b13 100644 --- a/pkgs/development/compilers/gcc/4.9/default.nix +++ b/pkgs/development/compilers/gcc/4.9/default.nix @@ -106,8 +106,8 @@ let majorVersion = "4"; /* Cross-gcc settings (build == host != target) */ crossMingw = targetPlatform != hostPlatform && targetPlatform.libc == "msvcrt"; - stageNameAddon = if crossStageStatic then "-stage-static" else "-stage-final"; - crossNameAddon = if targetPlatform != hostPlatform then "-${targetPlatform.config}" + stageNameAddon else ""; + stageNameAddon = if crossStageStatic then "stage-static" else "stage-final"; + crossNameAddon = optionalString (targetPlatform != hostPlatform) "${targetPlatform.config}-${stageNameAddon}-"; in @@ -115,7 +115,7 @@ in assert x11Support -> (filter (x: x == null) ([ gtk2 libart_lgpl ] ++ xlibs)) == []; stdenv.mkDerivation ({ - name = crossNameAddon + "${name}${if stripped then "" else "-debug"}-${version}"; + name = "${crossNameAddon}${name}${if stripped then "" else "-debug"}-${version}"; builder = ../builder.sh; diff --git a/pkgs/development/compilers/gcc/5/default.nix b/pkgs/development/compilers/gcc/5/default.nix index cb327864f6e..05a2a8a45f9 100644 --- a/pkgs/development/compilers/gcc/5/default.nix +++ b/pkgs/development/compilers/gcc/5/default.nix @@ -97,8 +97,8 @@ let majorVersion = "5"; /* Cross-gcc settings (build == host != target) */ crossMingw = targetPlatform != hostPlatform && targetPlatform.libc == "msvcrt"; - stageNameAddon = if crossStageStatic then "-stage-static" else "-stage-final"; - crossNameAddon = if targetPlatform != hostPlatform then "-${targetPlatform.config}" + stageNameAddon else ""; + stageNameAddon = if crossStageStatic then "stage-static" else "stage-final"; + crossNameAddon = optionalString (targetPlatform != hostPlatform) "${targetPlatform.config}-${stageNameAddon}-"; in @@ -106,7 +106,7 @@ in assert x11Support -> (filter (x: x == null) ([ gtk2 libart_lgpl ] ++ xlibs)) == []; stdenv.mkDerivation ({ - name = crossNameAddon + "${name}${if stripped then "" else "-debug"}-${version}"; + name = "${crossNameAddon}${name}${if stripped then "" else "-debug"}-${version}"; builder = ../builder.sh; diff --git a/pkgs/development/compilers/gcc/6/default.nix b/pkgs/development/compilers/gcc/6/default.nix index 2cecc5bbaa0..7cdebf033d0 100644 --- a/pkgs/development/compilers/gcc/6/default.nix +++ b/pkgs/development/compilers/gcc/6/default.nix @@ -93,8 +93,8 @@ let majorVersion = "6"; /* Cross-gcc settings (build == host != target) */ crossMingw = targetPlatform != hostPlatform && targetPlatform.libc == "msvcrt"; - stageNameAddon = if crossStageStatic then "-stage-static" else "-stage-final"; - crossNameAddon = if targetPlatform != hostPlatform then "-${targetPlatform.config}" + stageNameAddon else ""; + stageNameAddon = if crossStageStatic then "stage-static" else "stage-final"; + crossNameAddon = optionalString (targetPlatform != hostPlatform) "${targetPlatform.config}-${stageNameAddon}-"; in @@ -102,7 +102,7 @@ in assert x11Support -> (filter (x: x == null) ([ gtk2 libart_lgpl ] ++ xlibs)) == []; stdenv.mkDerivation ({ - name = crossNameAddon + "${name}${if stripped then "" else "-debug"}-${version}"; + name = "${crossNameAddon}${name}${if stripped then "" else "-debug"}-${version}"; builder = ../builder.sh; diff --git a/pkgs/development/compilers/gcc/7/default.nix b/pkgs/development/compilers/gcc/7/default.nix index c1592dbcb9b..558b2b6d847 100644 --- a/pkgs/development/compilers/gcc/7/default.nix +++ b/pkgs/development/compilers/gcc/7/default.nix @@ -71,13 +71,13 @@ let majorVersion = "7"; /* Cross-gcc settings (build == host != target) */ crossMingw = targetPlatform != hostPlatform && targetPlatform.libc == "msvcrt"; - stageNameAddon = if crossStageStatic then "-stage-static" else "-stage-final"; - crossNameAddon = if targetPlatform != hostPlatform then "-${targetPlatform.config}" + stageNameAddon else ""; + stageNameAddon = if crossStageStatic then "stage-static" else "stage-final"; + crossNameAddon = optionalString (targetPlatform != hostPlatform) "${targetPlatform.config}-${stageNameAddon}-"; in stdenv.mkDerivation ({ - name = crossNameAddon + "${name}${if stripped then "" else "-debug"}-${version}"; + name = "${crossNameAddon}${name}${if stripped then "" else "-debug"}-${version}"; builder = ../builder.sh; diff --git a/pkgs/development/compilers/gcc/8/default.nix b/pkgs/development/compilers/gcc/8/default.nix index 2f222a8bc94..40cbe5942ea 100644 --- a/pkgs/development/compilers/gcc/8/default.nix +++ b/pkgs/development/compilers/gcc/8/default.nix @@ -63,13 +63,13 @@ let majorVersion = "8"; /* Cross-gcc settings (build == host != target) */ crossMingw = targetPlatform != hostPlatform && targetPlatform.libc == "msvcrt"; - stageNameAddon = if crossStageStatic then "-stage-static" else "-stage-final"; - crossNameAddon = if targetPlatform != hostPlatform then "-${targetPlatform.config}" + stageNameAddon else ""; + stageNameAddon = if crossStageStatic then "stage-static" else "stage-final"; + crossNameAddon = optionalString (targetPlatform != hostPlatform) "${targetPlatform.config}-${stageNameAddon}-"; in stdenv.mkDerivation ({ - name = crossNameAddon + "${name}${if stripped then "" else "-debug"}-${version}"; + name = "${crossNameAddon}${name}${if stripped then "" else "-debug"}-${version}"; builder = ../builder.sh; diff --git a/pkgs/development/compilers/gcc/9/default.nix b/pkgs/development/compilers/gcc/9/default.nix index 1fdba1baa29..7c3fbb6ea78 100644 --- a/pkgs/development/compilers/gcc/9/default.nix +++ b/pkgs/development/compilers/gcc/9/default.nix @@ -62,13 +62,13 @@ let majorVersion = "9"; /* Cross-gcc settings (build == host != target) */ crossMingw = targetPlatform != hostPlatform && targetPlatform.libc == "msvcrt"; - stageNameAddon = if crossStageStatic then "-stage-static" else "-stage-final"; - crossNameAddon = if targetPlatform != hostPlatform then "-${targetPlatform.config}" + stageNameAddon else ""; + stageNameAddon = if crossStageStatic then "stage-static" else "stage-final"; + crossNameAddon = optionalString (targetPlatform != hostPlatform) "${targetPlatform.config}-${stageNameAddon}-"; in stdenv.mkDerivation ({ - name = crossNameAddon + "${name}${if stripped then "" else "-debug"}-${version}"; + name = "${crossNameAddon}${name}${if stripped then "" else "-debug"}-${version}"; builder = ../builder.sh; diff --git a/pkgs/development/compilers/gcc/snapshot/default.nix b/pkgs/development/compilers/gcc/snapshot/default.nix index 0519f04629e..ce4f4426dfb 100644 --- a/pkgs/development/compilers/gcc/snapshot/default.nix +++ b/pkgs/development/compilers/gcc/snapshot/default.nix @@ -59,13 +59,13 @@ let majorVersion = "7"; /* Cross-gcc settings (build == host != target) */ crossMingw = targetPlatform != hostPlatform && targetPlatform.libc == "msvcrt"; - stageNameAddon = if crossStageStatic then "-stage-static" else "-stage-final"; - crossNameAddon = if targetPlatform != hostPlatform then "-${targetPlatform.config}" + stageNameAddon else ""; + stageNameAddon = if crossStageStatic then "stage-static" else "stage-final"; + crossNameAddon = optionalString (targetPlatform != hostPlatform) "${targetPlatform.config}-${stageNameAddon}-"; in stdenv.mkDerivation ({ - name = crossNameAddon + "${name}${if stripped then "" else "-debug"}-${version}"; + name = "${crossNameAddon}${name}${if stripped then "" else "-debug"}-${version}"; builder = ../builder.sh; From e4f551abf22800524a49cafb660ef981aa7b5d6e Mon Sep 17 00:00:00 2001 From: Arnout Engelen Date: Sun, 24 Nov 2019 10:24:34 +0100 Subject: [PATCH 22/61] diffoscope: 129 -> 131 --- pkgs/tools/misc/diffoscope/default.nix | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/pkgs/tools/misc/diffoscope/default.nix b/pkgs/tools/misc/diffoscope/default.nix index 1e15d9f0fe0..29d3e40eee4 100644 --- a/pkgs/tools/misc/diffoscope/default.nix +++ b/pkgs/tools/misc/diffoscope/default.nix @@ -9,11 +9,11 @@ # Note: when upgrading this package, please run the list-missing-tools.sh script as described below! python3Packages.buildPythonApplication rec { pname = "diffoscope"; - version = "129"; + version = "131"; src = fetchurl { url = "https://diffoscope.org/archive/diffoscope-${version}.tar.bz2"; - sha256 = "11llxk3nwz38ildypvi3djip650a3pd7m3c74mpgvi8v00rs1ca9"; + sha256 = "1lqzm523pzxqj6xfm00z61d263w714d90sn6rfyh2npb8q95gfdn"; }; patches = [ From b1e98203069edff196e77ca6cd3da5f7d70343ef Mon Sep 17 00:00:00 2001 From: Jon Roberts Date: Sun, 24 Nov 2019 04:42:21 -0600 Subject: [PATCH 23/61] houdini: 17.0.352 -> 17.5.327 (#67983) * houdini: 17.0.352 -> 17.5.327 * houdini: update sidefx.com to www.sidefx.com --- pkgs/applications/misc/houdini/runtime.nix | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/pkgs/applications/misc/houdini/runtime.nix b/pkgs/applications/misc/houdini/runtime.nix index 12364db7d4a..279791561d9 100644 --- a/pkgs/applications/misc/houdini/runtime.nix +++ b/pkgs/applications/misc/houdini/runtime.nix @@ -30,14 +30,14 @@ let license_dir = "~/.config/houdini"; in stdenv.mkDerivation rec { - version = "17.0.352"; + version = "17.5.327"; pname = "houdini-runtime"; src = requireFile rec { name = "houdini-${version}-linux_x86_64_gcc6.3.tar.gz"; - sha256 = "0cl5fkgaplb0cvv7mli06ffc9j4ngpy8hl5zqabj3d645gcgafjg"; + sha256 = "1byigmhmby8lgi2vmgxy9jlrrqk7jyr507zqkihq5bv8kfsanv1x"; message = '' This nix expression requires that ${name} is already part of the store. - Download it from https://sidefx.com and add it to the nix store with: + Download it from https://www.sidefx.com and add it to the nix store with: nix-prefetch-url @@ -78,7 +78,7 @@ stdenv.mkDerivation rec { ''; meta = { description = "3D animation application software"; - homepage = https://sidefx.com; + homepage = https://www.sidefx.com; license = stdenv.lib.licenses.unfree; platforms = stdenv.lib.platforms.linux; maintainers = [ stdenv.lib.maintainers.canndrew ]; From 6d553ded9390c9073fd92f3a2dc4396cf352597d Mon Sep 17 00:00:00 2001 From: thefenriswolf Date: Thu, 21 Nov 2019 09:29:46 +0100 Subject: [PATCH 24/61] tensorman: init at 0.1.0 --- pkgs/tools/misc/tensorman/default.nix | 24 ++++++++++++++++++++++++ pkgs/top-level/all-packages.nix | 2 ++ 2 files changed, 26 insertions(+) create mode 100644 pkgs/tools/misc/tensorman/default.nix diff --git a/pkgs/tools/misc/tensorman/default.nix b/pkgs/tools/misc/tensorman/default.nix new file mode 100644 index 00000000000..97912b3c5fa --- /dev/null +++ b/pkgs/tools/misc/tensorman/default.nix @@ -0,0 +1,24 @@ +{ pkgconfig, stdenv, rustPlatform, rustc, cargo, docker, openssl, fetchFromGitHub }: + +rustPlatform.buildRustPackage rec { + pname = "tensorman"; + version = "0.1.0"; + + src = fetchFromGitHub { + owner = "pop-os"; + repo = "tensorman"; + rev = version; + sha256 = "0ywb53snvymmwh10hm6whckz7dwmpqa4rxiggd24y178jdfrm2ns"; + }; + + buildInputs = [ pkgconfig openssl ]; + cargoSha256 = "1gh5w6zzrvjk60bqaf355fagijy723rvmqjh4laksd96pmzdfwn9"; + + meta = with stdenv.lib; { + description = "Utility for easy management of Tensorflow containers"; + homepage = "https://github.com/pop-os/tensorman/"; + license = stdenv.lib.licenses.gpl3; + platforms = [ "x86_64-linux" ]; + maintainers = with maintainers; [ thefenriswolf ]; + }; +} diff --git a/pkgs/top-level/all-packages.nix b/pkgs/top-level/all-packages.nix index 7a2fb63008e..c8ab04c3077 100644 --- a/pkgs/top-level/all-packages.nix +++ b/pkgs/top-level/all-packages.nix @@ -21042,6 +21042,8 @@ in spike = callPackage ../applications/virtualization/spike { }; + tensorman = callPackage ../tools/misc/tensorman { }; + spideroak = callPackage ../applications/networking/spideroak { }; split2flac = callPackage ../applications/audio/split2flac { }; From 78cb116272f85e691df648b7f117a4064b04ab4e Mon Sep 17 00:00:00 2001 From: edef Date: Sun, 24 Nov 2019 10:58:38 +0000 Subject: [PATCH 25/61] iperf3: correct license to bsd3 (#73949) Quoth http://software.es.net/iperf: > [iperf3] is released under a three-clause BSD license. --- pkgs/tools/networking/iperf/3.nix | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/pkgs/tools/networking/iperf/3.nix b/pkgs/tools/networking/iperf/3.nix index 4e2c27e2d40..c59eb09f4c5 100644 --- a/pkgs/tools/networking/iperf/3.nix +++ b/pkgs/tools/networking/iperf/3.nix @@ -29,7 +29,7 @@ stdenv.mkDerivation rec { homepage = http://software.es.net/iperf/; description = "Tool to measure IP bandwidth using UDP or TCP"; platforms = platforms.unix; - license = "as-is"; + license = licenses.bsd3; maintainers = with maintainers; [ fpletz ]; }; } From 0f00c2aee22517634ebec13e9778762ed71ae2b0 Mon Sep 17 00:00:00 2001 From: worldofpeace Date: Sun, 24 Nov 2019 06:29:35 -0500 Subject: [PATCH 26/61] chessx: use qt5's mkDerivation and latest qt Fixes #74020 https://github.com/NixOS/nixpkgs/issues/65399 --- pkgs/games/chessx/default.nix | 33 ++++++++++++++++++++++----------- pkgs/top-level/all-packages.nix | 2 +- 2 files changed, 23 insertions(+), 12 deletions(-) diff --git a/pkgs/games/chessx/default.nix b/pkgs/games/chessx/default.nix index 3b460daefd1..f0b04489eda 100644 --- a/pkgs/games/chessx/default.nix +++ b/pkgs/games/chessx/default.nix @@ -1,8 +1,16 @@ -{ stdenv, pkgconfig, zlib, qtbase, qtsvg, qttools, qtmultimedia, qmake, fetchurl, makeWrapper -, lib +{ mkDerivation +, stdenv +, pkgconfig +, zlib +, qtbase +, qtsvg +, qttools +, qtmultimedia +, qmake +, fetchurl }: -stdenv.mkDerivation rec { +mkDerivation rec { pname = "chessx"; version = "1.5.0"; @@ -11,15 +19,18 @@ stdenv.mkDerivation rec { sha256 = "09rqyra28w3z9ldw8sx07k5ap3sjlli848p737maj7c240rasc6i"; }; - buildInputs = [ - qtbase - qtsvg - qttools - qtmultimedia - zlib + nativeBuildInputs = [ + pkgconfig + qmake ]; - nativeBuildInputs = [ pkgconfig qmake makeWrapper ]; + buildInputs = [ + qtbase + qtmultimedia + qtsvg + qttools + zlib + ]; # RCC: Error in 'resources.qrc': Cannot find file 'i18n/chessx_da.qm' enableParallelBuilding = false; @@ -39,7 +50,7 @@ stdenv.mkDerivation rec { homepage = http://chessx.sourceforge.net/; description = "ChessX allows you to browse and analyse chess games"; license = licenses.gpl2; - maintainers = [maintainers.luispedro]; + maintainers = [ maintainers.luispedro ]; platforms = platforms.linux; }; } diff --git a/pkgs/top-level/all-packages.nix b/pkgs/top-level/all-packages.nix index 027ee1701f3..0813cb07231 100644 --- a/pkgs/top-level/all-packages.nix +++ b/pkgs/top-level/all-packages.nix @@ -22510,7 +22510,7 @@ in chessdb = callPackage ../games/chessdb { }; - chessx = libsForQt59.callPackage ../games/chessx { }; + chessx = libsForQt5.callPackage ../games/chessx { }; chiaki = libsForQt5.callPackage ../games/chiaki { }; From 433972d65b61105abc0f57037fac58676ff986b1 Mon Sep 17 00:00:00 2001 From: Robin Gloster Date: Sun, 24 Nov 2019 13:04:11 +0100 Subject: [PATCH 27/61] nixosTests.prosody*: port to python --- nixos/tests/xmpp/prosody-mysql.nix | 20 ++++++++++---------- nixos/tests/xmpp/prosody.nix | 20 ++++++++++---------- 2 files changed, 20 insertions(+), 20 deletions(-) diff --git a/nixos/tests/xmpp/prosody-mysql.nix b/nixos/tests/xmpp/prosody-mysql.nix index 62b4a17421e..0507227021b 100644 --- a/nixos/tests/xmpp/prosody-mysql.nix +++ b/nixos/tests/xmpp/prosody-mysql.nix @@ -1,4 +1,4 @@ -import ../make-test.nix { +import ../make-test-python.nix { name = "prosody-mysql"; nodes = { @@ -57,21 +57,21 @@ import ../make-test.nix { }; testScript = { nodes, ... }: '' - $mysql->waitForUnit('mysql.service'); - $server->waitForUnit('prosody.service'); - $server->succeed('prosodyctl status') =~ /Prosody is running/; + mysql.wait_for_unit("mysql.service") + server.wait_for_unit("prosody.service") + server.succeed('prosodyctl status | grep "Prosody is running"') # set password to 'nothunter2' (it's asked twice) - $server->succeed('yes nothunter2 | prosodyctl adduser cthon98@example.com'); + server.succeed("yes nothunter2 | prosodyctl adduser cthon98@example.com") # set password to 'y' - $server->succeed('yes | prosodyctl adduser azurediamond@example.com'); + server.succeed("yes | prosodyctl adduser azurediamond@example.com") # correct password to 'hunter2' - $server->succeed('yes hunter2 | prosodyctl passwd azurediamond@example.com'); + server.succeed("yes hunter2 | prosodyctl passwd azurediamond@example.com") - $client->succeed("send-message"); + client.succeed("send-message") - $server->succeed('prosodyctl deluser cthon98@example.com'); - $server->succeed('prosodyctl deluser azurediamond@example.com'); + server.succeed("prosodyctl deluser cthon98@example.com") + server.succeed("prosodyctl deluser azurediamond@example.com") ''; } diff --git a/nixos/tests/xmpp/prosody.nix b/nixos/tests/xmpp/prosody.nix index 8331c7b6d33..9d1374bff6b 100644 --- a/nixos/tests/xmpp/prosody.nix +++ b/nixos/tests/xmpp/prosody.nix @@ -1,4 +1,4 @@ -import ../make-test.nix { +import ../make-test-python.nix { name = "prosody"; nodes = { @@ -28,19 +28,19 @@ import ../make-test.nix { }; testScript = { nodes, ... }: '' - $server->waitForUnit('prosody.service'); - $server->succeed('prosodyctl status') =~ /Prosody is running/; + server.wait_for_unit("prosody.service") + server.succeed('prosodyctl status | grep "Prosody is running"') # set password to 'nothunter2' (it's asked twice) - $server->succeed('yes nothunter2 | prosodyctl adduser cthon98@example.com'); + server.succeed("yes nothunter2 | prosodyctl adduser cthon98@example.com") # set password to 'y' - $server->succeed('yes | prosodyctl adduser azurediamond@example.com'); - # correct password to 'hunter2' - $server->succeed('yes hunter2 | prosodyctl passwd azurediamond@example.com'); + server.succeed("yes | prosodyctl adduser azurediamond@example.com") + # correct password to "hunter2" + server.succeed("yes hunter2 | prosodyctl passwd azurediamond@example.com") - $client->succeed("send-message"); + client.succeed("send-message") - $server->succeed('prosodyctl deluser cthon98@example.com'); - $server->succeed('prosodyctl deluser azurediamond@example.com'); + server.succeed("prosodyctl deluser cthon98@example.com") + server.succeed("prosodyctl deluser azurediamond@example.com") ''; } From 3b218e85707e85fc435272d908239bf568f78b0b Mon Sep 17 00:00:00 2001 From: Maximilian Bosch Date: Sun, 24 Nov 2019 13:35:09 +0100 Subject: [PATCH 28/61] nixos/docker-registry: port test to python test-driver --- nixos/tests/docker-registry.nix | 50 ++++++++++++++++----------------- 1 file changed, 24 insertions(+), 26 deletions(-) diff --git a/nixos/tests/docker-registry.nix b/nixos/tests/docker-registry.nix index 8936421072a..2928fd8141a 100644 --- a/nixos/tests/docker-registry.nix +++ b/nixos/tests/docker-registry.nix @@ -1,6 +1,6 @@ # This test runs docker-registry and check if it works -import ./make-test.nix ({ pkgs, ...} : { +import ./make-test-python.nix ({ pkgs, ...} : { name = "docker-registry"; meta = with pkgs.stdenv.lib.maintainers; { maintainers = [ globin ma27 ironpinguin ]; @@ -28,36 +28,34 @@ import ./make-test.nix ({ pkgs, ...} : { }; testScript = '' - $client1->start(); - $client1->waitForUnit("docker.service"); - $client1->succeed("tar cv --files-from /dev/null | docker import - scratch"); - $client1->succeed("docker tag scratch registry:8080/scratch"); + client1.start() + client1.wait_for_unit("docker.service") + client1.succeed("tar cv --files-from /dev/null | docker import - scratch") + client1.succeed("docker tag scratch registry:8080/scratch") - $registry->start(); - $registry->waitForUnit("docker-registry.service"); - $registry->waitForOpenPort("8080"); - $client1->succeed("docker push registry:8080/scratch"); + registry.start() + registry.wait_for_unit("docker-registry.service") + registry.wait_for_open_port("8080") + client1.succeed("docker push registry:8080/scratch") - $client2->start(); - $client2->waitForUnit("docker.service"); - $client2->succeed("docker pull registry:8080/scratch"); - $client2->succeed("docker images | grep scratch"); + client2.start() + client2.wait_for_unit("docker.service") + client2.succeed("docker pull registry:8080/scratch") + client2.succeed("docker images | grep scratch") - $client2->succeed( - 'curl -fsS -X DELETE registry:8080/v2/scratch/manifests/$(curl -fsS -I -H"Accept: application/vnd.docker.distribution.manifest.v2+json" registry:8080/v2/scratch/manifests/latest | grep Docker-Content-Digest | sed -e \'s/Docker-Content-Digest: //\' | tr -d \'\r\')' - ); + client2.succeed( + "curl -fsS -X DELETE registry:8080/v2/scratch/manifests/$(curl -fsS -I -H\"Accept: application/vnd.docker.distribution.manifest.v2+json\" registry:8080/v2/scratch/manifests/latest | grep Docker-Content-Digest | sed -e 's/Docker-Content-Digest: //' | tr -d '\\r')" + ) - $registry->systemctl("start docker-registry-garbage-collect.service"); - $registry->waitUntilFails("systemctl status docker-registry-garbage-collect.service"); - $registry->waitForUnit("docker-registry.service"); + registry.systemctl("start docker-registry-garbage-collect.service") + registry.wait_until_fails("systemctl status docker-registry-garbage-collect.service") + registry.wait_for_unit("docker-registry.service") - $registry->fail( - 'ls -l /var/lib/docker-registry/docker/registry/v2/blobs/sha256/*/*/data' - ); + registry.fail("ls -l /var/lib/docker-registry/docker/registry/v2/blobs/sha256/*/*/data") - $client1->succeed("docker push registry:8080/scratch"); - $registry->succeed( - 'ls -l /var/lib/docker-registry/docker/registry/v2/blobs/sha256/*/*/data' - ); + client1.succeed("docker push registry:8080/scratch") + registry.succeed( + "ls -l /var/lib/docker-registry/docker/registry/v2/blobs/sha256/*/*/data" + ) ''; }) From 2403c1a88d9ce295fe8f89ba908f304939eb3091 Mon Sep 17 00:00:00 2001 From: Maximilian Bosch Date: Sun, 24 Nov 2019 13:21:16 +0100 Subject: [PATCH 29/61] nixos/gotify-server: port test to python test-driver --- nixos/tests/gotify-server.nix | 44 +++++++++++++++++------------------ 1 file changed, 22 insertions(+), 22 deletions(-) diff --git a/nixos/tests/gotify-server.nix b/nixos/tests/gotify-server.nix index 0ffc3138d5a..c6e00686aed 100644 --- a/nixos/tests/gotify-server.nix +++ b/nixos/tests/gotify-server.nix @@ -1,4 +1,4 @@ -import ./make-test.nix ({ pkgs, lib, ...} : { +import ./make-test-python.nix ({ pkgs, lib, ...} : { name = "gotify-server"; meta = with pkgs.stdenv.lib.maintainers; { maintainers = [ ma27 ]; @@ -14,32 +14,32 @@ import ./make-test.nix ({ pkgs, lib, ...} : { }; testScript = '' - startAll; + machine.start() - $machine->waitForUnit("gotify-server"); - $machine->waitForOpenPort(3000); + machine.wait_for_unit("gotify-server.service") + machine.wait_for_open_port(3000) - my $token = $machine->succeed( - "curl --fail -sS -X POST localhost:3000/application -F name=nixos " . - '-H "Authorization: Basic $(echo -ne "admin:admin" | base64 --wrap 0)" ' . - '| jq .token | xargs echo -n' - ); + token = machine.succeed( + "curl --fail -sS -X POST localhost:3000/application -F name=nixos " + + '-H "Authorization: Basic $(echo -ne "admin:admin" | base64 --wrap 0)" ' + + "| jq .token | xargs echo -n" + ) - my $usertoken = $machine->succeed( - "curl --fail -sS -X POST localhost:3000/client -F name=nixos " . - '-H "Authorization: Basic $(echo -ne "admin:admin" | base64 --wrap 0)" ' . - '| jq .token | xargs echo -n' - ); + usertoken = machine.succeed( + "curl --fail -sS -X POST localhost:3000/client -F name=nixos " + + '-H "Authorization: Basic $(echo -ne "admin:admin" | base64 --wrap 0)" ' + + "| jq .token | xargs echo -n" + ) - $machine->succeed( - "curl --fail -sS -X POST 'localhost:3000/message?token=$token' -H 'Accept: application/json' " . - '-F title=Gotify -F message=Works' - ); + machine.succeed( + f"curl --fail -sS -X POST 'localhost:3000/message?token={token}' -H 'Accept: application/json' " + + "-F title=Gotify -F message=Works" + ) - my $title = $machine->succeed( - "curl --fail -sS 'localhost:3000/message?since=0&token=$usertoken' | jq '.messages|.[0]|.title' | xargs echo -n" - ); + title = machine.succeed( + f"curl --fail -sS 'localhost:3000/message?since=0&token={usertoken}' | jq '.messages|.[0]|.title' | xargs echo -n" + ) - $title eq "Gotify" or die "Wrong title ($title), expected 'Gotify'!"; + assert title == "Gotify" ''; }) From 3ea442ca94d91afd355dbdadece457ecb1ff9276 Mon Sep 17 00:00:00 2001 From: Christian Kauhaus Date: Sun, 24 Nov 2019 14:03:29 +0100 Subject: [PATCH 30/61] networking.vpnc: remove option This PR is part of the networking.* namespace cleanup. The Cisco VPN module is currently of limited value since it just creates config files but does not manage services. The same functionality can be achieved by using _environment.etc_ instead. It would be a different situation if we had a full service module. So if you are annoyed by this change, please consider write a more featureful module and put its options unter _services.networking.vpnc_. Note that this change removes options for *Cisco VPN*, not *networkmanager-vpn*. --- nixos/modules/config/vpnc.nix | 41 ----------------------------------- nixos/modules/module-list.nix | 1 - nixos/modules/rename.nix | 1 + 3 files changed, 1 insertion(+), 42 deletions(-) delete mode 100644 nixos/modules/config/vpnc.nix diff --git a/nixos/modules/config/vpnc.nix b/nixos/modules/config/vpnc.nix deleted file mode 100644 index 356e007c0a3..00000000000 --- a/nixos/modules/config/vpnc.nix +++ /dev/null @@ -1,41 +0,0 @@ -{ config, lib, ... }: - -with lib; - -let - cfg = config.networking.vpnc; - mkServiceDef = name: value: - { - name = "vpnc/${name}.conf"; - value = { text = value; }; - }; - -in -{ - options = { - networking.vpnc = { - services = mkOption { - type = types.attrsOf types.str; - default = {}; - example = literalExample '' - { test = ''' - IPSec gateway 192.168.1.1 - IPSec ID someID - IPSec secret secretKey - Xauth username name - Xauth password pass - '''; - } - ''; - description = - '' - The names of cisco VPNs and their associated definitions - ''; - }; - }; - }; - - config.environment.etc = mapAttrs' mkServiceDef cfg.services; -} - - diff --git a/nixos/modules/module-list.nix b/nixos/modules/module-list.nix index 6b578cd5619..5f4a608d74d 100644 --- a/nixos/modules/module-list.nix +++ b/nixos/modules/module-list.nix @@ -35,7 +35,6 @@ ./config/terminfo.nix ./config/unix-odbc-drivers.nix ./config/users-groups.nix - ./config/vpnc.nix ./config/vte.nix ./config/zram.nix ./hardware/acpilight.nix diff --git a/nixos/modules/rename.nix b/nixos/modules/rename.nix index 7d8cf55b827..a109b26a5f3 100644 --- a/nixos/modules/rename.nix +++ b/nixos/modules/rename.nix @@ -235,6 +235,7 @@ with lib; (mkRemovedOptionModule [ "services" "zabbixServer" "dbPassword" ] "Use services.zabbixServer.database.passwordFile instead.") (mkRemovedOptionModule [ "systemd" "generator-packages" ] "Use systemd.packages instead.") (mkRemovedOptionModule [ "fonts" "enableCoreFonts" ] "Use fonts.fonts = [ pkgs.corefonts ]; instead.") + (mkRemovedOptionModule [ "networking" "vpnc" ] "Use environment.etc.\"vpnc/service.conf\" instead.") # ZSH (mkRenamedOptionModule [ "programs" "zsh" "enableSyntaxHighlighting" ] [ "programs" "zsh" "syntaxHighlighting" "enable" ]) From 54a15bb2eccafab3330e51d81fe482fe760fafb5 Mon Sep 17 00:00:00 2001 From: Julian Stecklina Date: Fri, 22 Nov 2019 11:39:14 +0200 Subject: [PATCH 31/61] git-machete: init at 2.12.1 --- .../git-and-tools/default.nix | 2 ++ .../git-and-tools/git-machete/default.nix | 33 +++++++++++++++++++ 2 files changed, 35 insertions(+) create mode 100644 pkgs/applications/version-management/git-and-tools/git-machete/default.nix diff --git a/pkgs/applications/version-management/git-and-tools/default.nix b/pkgs/applications/version-management/git-and-tools/default.nix index db82cc54135..68e10ed4e3e 100644 --- a/pkgs/applications/version-management/git-and-tools/default.nix +++ b/pkgs/applications/version-management/git-and-tools/default.nix @@ -103,6 +103,8 @@ let git-imerge = callPackage ./git-imerge { }; + git-machete = python3Packages.callPackage ./git-machete { }; + git-octopus = callPackage ./git-octopus { }; git-open = callPackage ./git-open { }; diff --git a/pkgs/applications/version-management/git-and-tools/git-machete/default.nix b/pkgs/applications/version-management/git-and-tools/git-machete/default.nix new file mode 100644 index 00000000000..aafaa6659d3 --- /dev/null +++ b/pkgs/applications/version-management/git-and-tools/git-machete/default.nix @@ -0,0 +1,33 @@ +{ lib, buildPythonApplication, fetchPypi +, installShellFiles, pbr +, flake8, mock, pycodestyle, pylint, tox }: + +buildPythonApplication rec { + pname = "git-machete"; + version = "2.12.1"; + + src = fetchPypi { + inherit pname version; + sha256 = "114kq396zq45jlibn1lp0nk4lmanj4w1bcn48gi7xzdm0y1nkzfq"; + }; + + nativeBuildInputs = [ installShellFiles pbr ]; + + # TODO: Add missing check inputs (2019-11-22): + # - stestr + doCheck = false; + checkInputs = [ flake8 mock pycodestyle pylint tox ]; + + postInstall = '' + installShellCompletion --bash --name git-machete completion/git-machete.completion.bash + installShellCompletion --zsh --name _git-machete completion/git-machete.completion.zsh + ''; + + meta = with lib; { + homepage = https://github.com/VirtusLab/git-machete; + description = "Git repository organizer and rebase workflow automation tool"; + license = licenses.mit; + platforms = platforms.all; + maintainers = [ maintainers.blitz ]; + }; +} From a1e6e5145bd890d414c2424e404def493d4602c7 Mon Sep 17 00:00:00 2001 From: Maximilian Bosch Date: Sun, 24 Nov 2019 14:19:36 +0100 Subject: [PATCH 32/61] nixos/codimd: port test to python test-driver --- nixos/tests/codimd.nix | 26 ++++++++++++-------------- 1 file changed, 12 insertions(+), 14 deletions(-) diff --git a/nixos/tests/codimd.nix b/nixos/tests/codimd.nix index 562f6f24f99..b1acbf4a832 100644 --- a/nixos/tests/codimd.nix +++ b/nixos/tests/codimd.nix @@ -1,4 +1,4 @@ -import ./make-test.nix ({ pkgs, lib, ... }: +import ./make-test-python.nix ({ pkgs, lib, ... }: { name = "codimd"; @@ -35,20 +35,18 @@ import ./make-test.nix ({ pkgs, lib, ... }: }; testScript = '' - startAll(); + start_all() - subtest "CodiMD sqlite", sub { - $codimdSqlite->waitForUnit("codimd.service"); - $codimdSqlite->waitForOpenPort(3000); - $codimdSqlite->waitUntilSucceeds("curl -sSf http://localhost:3000/new"); - }; + with subtest("CodiMD sqlite"): + codimdSqlite.wait_for_unit("codimd.service") + codimdSqlite.wait_for_open_port(3000) + codimdSqlite.wait_until_succeeds("curl -sSf http://localhost:3000/new") - subtest "CodiMD postgres", sub { - $codimdPostgres->waitForUnit("postgresql.service"); - $codimdPostgres->waitForUnit("codimd.service"); - $codimdPostgres->waitForOpenPort(5432); - $codimdPostgres->waitForOpenPort(3000); - $codimdPostgres->waitUntilSucceeds("curl -sSf http://localhost:3000/new"); - }; + with subtest("CodiMD postgres"): + codimdPostgres.wait_for_unit("postgresql.service") + codimdPostgres.wait_for_unit("codimd.service") + codimdPostgres.wait_for_open_port(5432) + codimdPostgres.wait_for_open_port(3000) + codimdPostgres.wait_until_succeeds("curl -sSf http://localhost:3000/new") ''; }) From cf38a146fdca8011c359dd926dcbfe1da5808c0c Mon Sep 17 00:00:00 2001 From: Matthias Beyer Date: Sun, 24 Nov 2019 14:42:09 +0100 Subject: [PATCH 33/61] timewarrior: 1.1.1 -> 1.2.0 Switch to fetch sources from github. Signed-off-by: Matthias Beyer CC: Sampo Sorsa CC: Ingolf Wanger --- pkgs/applications/misc/timewarrior/default.nix | 13 ++++++++----- 1 file changed, 8 insertions(+), 5 deletions(-) diff --git a/pkgs/applications/misc/timewarrior/default.nix b/pkgs/applications/misc/timewarrior/default.nix index d0419c414d7..a8b86e71cb1 100644 --- a/pkgs/applications/misc/timewarrior/default.nix +++ b/pkgs/applications/misc/timewarrior/default.nix @@ -1,14 +1,17 @@ -{ stdenv, fetchurl, cmake }: +{ stdenv, fetchFromGitHub, cmake }: stdenv.mkDerivation rec { pname = "timewarrior"; - version = "1.1.1"; + version = "1.2.0"; enableParallelBuilding = true; - src = fetchurl { - url = "https://taskwarrior.org/download/timew-${version}.tar.gz"; - sha256 = "1jfcfzdwk5qqhxznj1bgy0sx3lnp3z5lqr9kch9a7iazwmi9lz8z"; + src = fetchFromGitHub { + owner = "GothenburgBitFactory"; + repo = "timewarrior"; + rev = "v${version}"; + sha256 = "0ci8kb7gdp1dsv6xj30nbz8lidrmn50pbriw26wv8mdhs17rfk7w"; + fetchSubmodules = true; }; nativeBuildInputs = [ cmake ]; From 7ca619018f4ffbab0e95500bb05605f3e382ad38 Mon Sep 17 00:00:00 2001 From: Maximilian Bosch Date: Sun, 24 Nov 2019 13:55:05 +0100 Subject: [PATCH 34/61] nixos/graylog: port test to python test-driver --- nixos/tests/graylog.nix | 82 +++++++++++++++++++++-------------------- 1 file changed, 43 insertions(+), 39 deletions(-) diff --git a/nixos/tests/graylog.nix b/nixos/tests/graylog.nix index dc54afd1d26..2d22012fa7c 100644 --- a/nixos/tests/graylog.nix +++ b/nixos/tests/graylog.nix @@ -1,4 +1,4 @@ -import ./make-test.nix ({ pkgs, lib, ... }: { +import ./make-test-python.nix ({ pkgs, lib, ... }: { name = "graylog"; meta.maintainers = with lib.maintainers; [ ma27 ]; @@ -64,48 +64,52 @@ import ./make-test.nix ({ pkgs, lib, ... }: { facility = "Test"; }); in '' - $machine->start; - $machine->waitForUnit("graylog.service"); - $machine->waitForOpenPort(9000); - $machine->succeed("curl -sSfL http://127.0.0.1:9000/"); + machine.start() + machine.wait_for_unit("graylog.service") + machine.wait_for_open_port(9000) + machine.succeed("curl -sSfL http://127.0.0.1:9000/") - my $session = $machine->succeed("curl -X POST " - . "-sSfL http://127.0.0.1:9000/api/system/sessions " - . "-d \$(cat ${payloads.login}) " - . "-H 'Content-Type: application/json' " - . "-H 'Accept: application/json' " - . "-H 'x-requested-by: cli' " - . "| jq .session_id | xargs echo" - ); + session = machine.succeed( + "curl -X POST " + + "-sSfL http://127.0.0.1:9000/api/system/sessions " + + "-d $(cat ${payloads.login}) " + + "-H 'Content-Type: application/json' " + + "-H 'Accept: application/json' " + + "-H 'x-requested-by: cli' " + + "| jq .session_id | xargs echo" + ).rstrip() - chomp($session); + machine.succeed( + "curl -X POST " + + f"-sSfL http://127.0.0.1:9000/api/system/inputs -u {session}:session " + + '-d $(cat ${payloads.input} | sed -e "s,@node@,$(cat /var/lib/graylog/server/node-id),") ' + + "-H 'Accept: application/json' " + + "-H 'Content-Type: application/json' " + + "-H 'x-requested-by: cli' " + ) - $machine->succeed("curl -X POST " - . "-sSfL http://127.0.0.1:9000/api/system/inputs -u $session:session " - . "-d \$(cat ${payloads.input} | sed -e \"s,\@node\@,\$(cat /var/lib/graylog/server/node-id),\") " - . "-H 'Accept: application/json' " - . "-H 'Content-Type: application/json' " - . "-H 'x-requested-by: cli' " - ); + machine.wait_until_succeeds( + "test \"$(curl -sSfL 'http://127.0.0.1:9000/api/cluster/inputstates' " + + f"-u {session}:session " + + "-H 'Accept: application/json' " + + "-H 'Content-Type: application/json' " + + "-H 'x-requested-by: cli'" + + "| jq 'to_entries[]|.value|.[0]|.state' | xargs echo" + + ')" = "RUNNING"' + ) - $machine->waitUntilSucceeds("test \"\$(curl -sSfL 'http://127.0.0.1:9000/api/cluster/inputstates' " - . "-u $session:session " - . "-H 'Accept: application/json' " - . "-H 'Content-Type: application/json' " - . "-H 'x-requested-by: cli'" - . "| jq 'to_entries[]|.value|.[0]|.state' | xargs echo" - . ")\" = \"RUNNING\"" - ); + machine.succeed( + "echo -n $(cat ${payloads.gelf_message}) | nc -w10 -u 127.0.0.1 12201" + ) - $machine->succeed("echo -n \$(cat ${payloads.gelf_message}) | nc -w10 -u 127.0.0.1 12201"); - - $machine->succeed("test \"\$(curl -X GET " - . "-sSfL 'http://127.0.0.1:9000/api/search/universal/relative?query=*' " - . "-u $session:session " - . "-H 'Accept: application/json' " - . "-H 'Content-Type: application/json' " - . "-H 'x-requested-by: cli'" - . " | jq '.total_results' | xargs echo)\" = \"1\"" - ); + machine.succeed( + 'test "$(curl -X GET ' + + "-sSfL 'http://127.0.0.1:9000/api/search/universal/relative?query=*' " + + f"-u {session}:session " + + "-H 'Accept: application/json' " + + "-H 'Content-Type: application/json' " + + "-H 'x-requested-by: cli'" + + ' | jq \'.total_results\' | xargs echo)" = "1"' + ) ''; }) From fd75f27adee18159ff2fd514512f4bd7c66d40e7 Mon Sep 17 00:00:00 2001 From: Renaud Date: Sun, 24 Nov 2019 15:54:00 +0100 Subject: [PATCH 35/61] nut: build with openssl 1.1.x instead of nss (it is upstream preference) + update homepage and src URLs to fetch over TLS Close #67906 --- pkgs/applications/misc/nut/default.nix | 23 ++++++++++++++++------- 1 file changed, 16 insertions(+), 7 deletions(-) diff --git a/pkgs/applications/misc/nut/default.nix b/pkgs/applications/misc/nut/default.nix index ec5ee031a5b..8b0cab31588 100644 --- a/pkgs/applications/misc/nut/default.nix +++ b/pkgs/applications/misc/nut/default.nix @@ -1,17 +1,27 @@ { stdenv, fetchurl, pkgconfig, neon, libusb, openssl, udev, avahi, freeipmi -, libtool, makeWrapper, nss }: +, libtool, makeWrapper, autoreconfHook, fetchpatch +}: stdenv.mkDerivation rec { - name = "nut-2.7.4"; + pname = "nut"; + version = "2.7.4"; src = fetchurl { - url = "http://www.networkupstools.org/source/2.7/${name}.tar.gz"; + url = "https://networkupstools.org/source/2.7/${pname}-${version}.tar.gz"; sha256 = "19r5dm07sfz495ckcgbfy0pasx0zy3faa0q7bih69lsjij8q43lq"; }; - buildInputs = [ neon libusb openssl udev avahi freeipmi libtool nss ]; + patches = [ + (fetchpatch { + # Fix build with openssl >= 1.1.0 + url = "https://github.com/networkupstools/nut/commit/612c05efb3c3b243da603a3a050993281888b6e3.patch"; + sha256 = "0jdbii1z5sqyv24286j5px65j7b3gp8zk3ahbph83pig6g46m3hs"; + }) + ]; - nativeBuildInputs = [ pkgconfig makeWrapper ]; + buildInputs = [ neon libusb openssl udev avahi freeipmi ]; + + nativeBuildInputs = [ autoreconfHook libtool pkgconfig makeWrapper ]; configureFlags = [ "--with-all" @@ -26,7 +36,6 @@ stdenv.mkDerivation rec { enableParallelBuilding = true; - postInstall = '' wrapProgram $out/bin/nut-scanner --prefix LD_LIBRARY_PATH : \ "$out/lib:${neon}/lib:${libusb.out}/lib:${avahi}/lib:${freeipmi}/lib" @@ -39,7 +48,7 @@ stdenv.mkDerivation rec { interface for monitoring and administering UPS, PDU and SCD hardware. It uses a layered approach to connect all of the parts. ''; - homepage = http://www.networkupstools.org/; + homepage = https://networkupstools.org/; repositories.git = https://github.com/networkupstools/nut.git; platforms = platforms.linux; maintainers = [ maintainers.pierron ]; From b9d458d91c1d39b8b5954c84afc862b044cf84d5 Mon Sep 17 00:00:00 2001 From: Robert Scott Date: Sun, 24 Nov 2019 15:09:04 +0000 Subject: [PATCH 36/61] tnef: 1.4.17 -> 1.4.18 (security) (#73882) addresses CVE-2019-18849 --- pkgs/applications/misc/tnef/default.nix | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/pkgs/applications/misc/tnef/default.nix b/pkgs/applications/misc/tnef/default.nix index cb70d57869c..bbd3073a4d8 100644 --- a/pkgs/applications/misc/tnef/default.nix +++ b/pkgs/applications/misc/tnef/default.nix @@ -1,14 +1,14 @@ { stdenv, fetchFromGitHub, autoreconfHook }: stdenv.mkDerivation rec { - version = "1.4.17"; + version = "1.4.18"; pname = "tnef"; src = fetchFromGitHub { owner = "verdammelt"; repo = "tnef"; rev = version; - sha256 = "0cq2xh5wd74qn6k2nnw5rayxgqhjl3jbzf4zlc4babcwxrv32ldh"; + sha256 = "104g48mcm00bgiyzas2vf86331w7bnw7h3bc11ib4lp7rz6zqfck"; }; doCheck = true; From c67d3f1a878f75619d69e9c2262813deda97508c Mon Sep 17 00:00:00 2001 From: gnidorah Date: Tue, 19 Nov 2019 17:32:11 +0300 Subject: [PATCH 37/61] openxray: make it work again after #72199 --- pkgs/games/openxray/default.nix | 32 ++++++++++++++++++++++++++++---- 1 file changed, 28 insertions(+), 4 deletions(-) diff --git a/pkgs/games/openxray/default.nix b/pkgs/games/openxray/default.nix index 9960d94a247..c115833d848 100644 --- a/pkgs/games/openxray/default.nix +++ b/pkgs/games/openxray/default.nix @@ -1,9 +1,8 @@ { stdenv, fetchFromGitHub, cmake, glew, freeimage, liblockfile -, openal, cryptopp, libtheora, SDL2, lzo, libjpeg, libogg, tbb +, openal, libtheora, SDL2, lzo, libjpeg, libogg, tbb , pcre, makeWrapper }: -stdenv.mkDerivation rec { - pname = "OpenXRay"; +let version = "558"; src = fetchFromGitHub { @@ -14,6 +13,31 @@ stdenv.mkDerivation rec { fetchSubmodules = true; }; + # https://github.com/OpenXRay/xray-16/issues/518 + cryptopp = stdenv.mkDerivation { + pname = "cryptopp"; + version = "5.6.5"; + + inherit src; + + postUnpack = "sourceRoot+=/Externals/cryptopp"; + + makeFlags = [ "PREFIX=${placeholder "out"}" ]; + enableParallelBuilding = true; + + doCheck = true; + + meta = with stdenv.lib; { + description = "Crypto++, a free C++ class library of cryptographic schemes"; + homepage = "https://cryptopp.com/"; + license = with licenses; [ boost publicDomain ]; + platforms = platforms.all; + }; + }; +in stdenv.mkDerivation rec { + pname = "OpenXRay"; + inherit version src; + hardeningDisable = [ "format" ]; cmakeFlags = [ "-DCMAKE_INCLUDE_PATH=${cryptopp}/include/cryptopp" ]; installFlags = [ "DESTDIR=${placeholder "out"}" ]; @@ -47,6 +71,6 @@ stdenv.mkDerivation rec { url = https://github.com/OpenXRay/xray-16/blob/xd_dev/License.txt; }; maintainers = [ maintainers.gnidorah ]; - platforms = ["x86_64-linux" "i686-linux" ]; + platforms = [ "x86_64-linux" "i686-linux" ]; }; } From 6962cfee48787655e6538e7d731d42e60435b2a8 Mon Sep 17 00:00:00 2001 From: elseym Date: Tue, 19 Nov 2019 18:41:22 +0100 Subject: [PATCH 38/61] plex: 1.18.1.1973 -> 1.18.2.2058 --- pkgs/servers/plex/raw.nix | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/pkgs/servers/plex/raw.nix b/pkgs/servers/plex/raw.nix index de7167ca740..998d64e34f0 100644 --- a/pkgs/servers/plex/raw.nix +++ b/pkgs/servers/plex/raw.nix @@ -8,13 +8,13 @@ # server, and the FHS userenv and corresponding NixOS module should # automatically pick up the changes. stdenv.mkDerivation rec { - version = "1.18.1.1973-0f4abfbcc"; + version = "1.18.2.2058-e67a4e892"; pname = "plexmediaserver"; # Fetch the source src = fetchurl { url = "https://downloads.plex.tv/plex-media-server-new/${version}/redhat/plexmediaserver-${version}.x86_64.rpm"; - sha256 = "1lmj4yal1f072w5rwxn9m09lbclzy87xnvy89iva1kmqzl3bfz2q"; + sha256 = "12riaabhc4pp3nbjqvbp81fsnjzw43yfgnkjm7s9il0n85awzg0s"; }; outputs = [ "out" "basedb" ]; From 58498ae061e6f4f84750281cb6d16a93f4ec151d Mon Sep 17 00:00:00 2001 From: Tom Fitzhenry Date: Sun, 17 Nov 2019 23:09:32 +1100 Subject: [PATCH 39/61] nixos/openarena: fix service's binary name The binary name was recently changed from openarena-server to oa_ded in https://github.com/NixOS/nixpkgs/pull/71122 . That change broke the openarena module and consequently the openarena test too. This commit fixes both. As an alternative, we considered reverting the name change in https://github.com/NixOS/nixpkgs/pull/72824 but we decided oa_ded was a better name for the binary (it's the name upstream use). --- nixos/modules/services/games/openarena.nix | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/nixos/modules/services/games/openarena.nix b/nixos/modules/services/games/openarena.nix index b7d1aea6b8d..8c014d78809 100644 --- a/nixos/modules/services/games/openarena.nix +++ b/nixos/modules/services/games/openarena.nix @@ -43,7 +43,7 @@ in serviceConfig = { DynamicUser = true; StateDirectory = "openarena"; - ExecStart = "${pkgs.openarena}/bin/openarena-server +set fs_basepath ${pkgs.openarena}/openarena-0.8.8 +set fs_homepath /var/lib/openarena ${concatStringsSep " " cfg.extraFlags}"; + ExecStart = "${pkgs.openarena}/bin/oa_ded +set fs_basepath ${pkgs.openarena}/openarena-0.8.8 +set fs_homepath /var/lib/openarena ${concatStringsSep " " cfg.extraFlags}"; Restart = "on-failure"; # Hardening From 8bba28260af21c1703cdf8aa0d19c8498a78fb81 Mon Sep 17 00:00:00 2001 From: Edward Amsden Date: Wed, 27 Mar 2019 20:52:28 -0400 Subject: [PATCH 40/61] nixos/digital-ocean-image: init --- .../virtualisation/digital-ocean-config.nix | 197 ++++++++++++++++++ .../virtualisation/digital-ocean-image.nix | 69 ++++++ .../virtualisation/digital-ocean-init.nix | 95 +++++++++ 3 files changed, 361 insertions(+) create mode 100644 nixos/modules/virtualisation/digital-ocean-config.nix create mode 100644 nixos/modules/virtualisation/digital-ocean-image.nix create mode 100644 nixos/modules/virtualisation/digital-ocean-init.nix diff --git a/nixos/modules/virtualisation/digital-ocean-config.nix b/nixos/modules/virtualisation/digital-ocean-config.nix new file mode 100644 index 00000000000..88cb0cd450e --- /dev/null +++ b/nixos/modules/virtualisation/digital-ocean-config.nix @@ -0,0 +1,197 @@ +{ config, pkgs, lib, modulesPath, ... }: +with lib; +{ + imports = [ + (modulesPath + "/profiles/qemu-guest.nix") + (modulesPath + "/virtualisation/digital-ocean-init.nix") + ]; + options.virtualisation.digitalOcean = with types; { + setRootPassword = mkOption { + type = bool; + default = false; + example = true; + description = "Whether to set the root password from the Digital Ocean metadata"; + }; + setSshKeys = mkOption { + type = bool; + default = true; + example = true; + description = "Whether to fetch ssh keys from Digital Ocean"; + }; + seedEntropy = mkOption { + type = bool; + default = true; + example = true; + description = "Whether to run the kernel RNG entropy seeding script from the Digital Ocean vendor data"; + }; + }; + config = + let + cfg = config.virtualisation.digitalOcean; + hostName = config.networking.hostName; + doMetadataFile = "/run/do-metadata/v1.json"; + in mkMerge [{ + fileSystems."/" = { + device = "/dev/disk/by-label/nixos"; + autoResize = true; + fsType = "ext4"; + }; + boot = { + growPartition = true; + kernelParams = [ "console=ttyS0" "panic=1" "boot.panic_on_fail" ]; + initrd.kernelModules = [ "virtio_scsi" ]; + kernelModules = [ "virtio_pci" "virtio_net" ]; + loader = { + grub.device = "/dev/vda"; + timeout = 0; + grub.configurationLimit = 0; + }; + }; + services.openssh = { + enable = mkDefault true; + passwordAuthentication = mkDefault false; + }; + services.do-agent.enable = mkDefault true; + networking = { + hostName = mkDefault ""; # use Digital Ocean metadata server + }; + + /* Check for and wait for the metadata server to become reachable. + * This serves as a dependency for all the other metadata services. */ + systemd.services.digitalocean-metadata = { + path = [ pkgs.curl ]; + description = "Get host metadata provided by Digitalocean"; + script = '' + set -eu + DO_DELAY_ATTEMPTS=0 + while ! curl -fsSL -o $RUNTIME_DIRECTORY/v1.json http://169.254.169.254/metadata/v1.json; do + DO_DELAY_ATTEMPTS=$((DO_DELAY_ATTEMPTS + 1)) + if (( $DO_DELAY_ATTEMPTS >= $DO_DELAY_ATTEMPTS_MAX )); then + echo "giving up" + exit 1 + fi + + echo "metadata unavailable, trying again in 1s..." + sleep 1 + done + chmod 600 $RUNTIME_DIRECTORY/v1.json + ''; + environment = { + DO_DELAY_ATTEMPTS_MAX = "10"; + }; + serviceConfig = { + Type = "oneshot"; + RemainAfterExit = true; + RuntimeDirectory = "do-metadata"; + RuntimeDirectoryPreserve = "yes"; + }; + unitConfig = { + ConditionPathExists = "!${doMetadataFile}"; + After = [ "network-pre.target" ] ++ + optional config.networking.dhcpcd.enable "dhcpcd.service" ++ + optional config.systemd.network.enable "systemd-networkd.service"; + }; + }; + + /* Fetch the root password from the digital ocean metadata. + * There is no specific route for this, so we use jq to get + * it from the One Big JSON metadata blob */ + systemd.services.digitalocean-set-root-password = mkIf cfg.setRootPassword { + path = [ pkgs.shadow pkgs.jq ]; + description = "Set root password provided by Digitalocean"; + wantedBy = [ "multi-user.target" ]; + script = '' + set -eo pipefail + ROOT_PASSWORD=$(jq -er '.auth_key' ${doMetadataFile}) + echo "root:$ROOT_PASSWORD" | chpasswd + mkdir -p /etc/do-metadata/set-root-password + ''; + unitConfig = { + ConditionPathExists = "!/etc/do-metadata/set-root-password"; + Before = optional config.services.openssh.enable "sshd.service"; + After = [ "digitalocean-metadata.service" ]; + Requires = [ "digitalocean-metadata.service" ]; + }; + serviceConfig = { + Type = "oneshot"; + }; + }; + + /* Set the hostname from Digital Ocean, unless the user configured it in + * the NixOS configuration. The cached metadata file isn't used here + * because the hostname is a mutable part of the droplet. */ + systemd.services.digitalocean-set-hostname = mkIf (hostName == "") { + path = [ pkgs.curl pkgs.nettools ]; + description = "Set hostname provided by Digitalocean"; + wantedBy = [ "network.target" ]; + script = '' + set -e + DIGITALOCEAN_HOSTNAME=$(curl -fsSL http://169.254.169.254/metadata/v1/hostname) + hostname "$DIGITALOCEAN_HOSTNAME" + if [[ ! -e /etc/hostname || -w /etc/hostname ]]; then + printf "%s\n" "$DIGITALOCEAN_HOSTNAME" > /etc/hostname + fi + ''; + unitConfig = { + Before = [ "network.target" ]; + After = [ "digitalocean-metadata.service" ]; + Wants = [ "digitalocean-metadata.service" ]; + }; + serviceConfig = { + Type = "oneshot"; + }; + }; + + /* Fetch the ssh keys for root from Digital Ocean */ + systemd.services.digitalocean-ssh-keys = mkIf cfg.setSshKeys { + description = "Set root ssh keys provided by Digital Ocean"; + wantedBy = [ "multi-user.target" ]; + path = [ pkgs.jq ]; + script = '' + set -e + mkdir -m 0700 -p /root/.ssh + jq -er '.public_keys[]' ${doMetadataFile} > /root/.ssh/authorized_keys + chmod 600 /root/.ssh/authorized_keys + ''; + serviceConfig = { + Type = "oneshot"; + RemainAfterExit = true; + }; + unitConfig = { + ConditionPathExists = "!/root/.ssh/authorized_keys"; + Before = optional config.services.openssh.enable "sshd.service"; + After = [ "digitalocean-metadata.service" ]; + Requires = [ "digitalocean-metadata.service" ]; + }; + }; + + /* Initialize the RNG by running the entropy-seed script from the + * Digital Ocean metadata + */ + systemd.services.digitalocean-entropy-seed = mkIf cfg.seedEntropy { + description = "Run the kernel RNG entropy seeding script from the Digital Ocean vendor data"; + wantedBy = [ "network.target" ]; + path = [ pkgs.jq pkgs.mpack ]; + script = '' + set -eo pipefail + TEMPDIR=$(mktemp -d) + jq -er '.vendor_data' ${doMetadataFile} | munpack -tC $TEMPDIR + ENTROPY_SEED=$(grep -rl "DigitalOcean Entropy Seed script" $TEMPDIR) + ${pkgs.runtimeShell} $ENTROPY_SEED + rm -rf $TEMPDIR + ''; + unitConfig = { + Before = [ "network.target" ]; + After = [ "digitalocean-metadata.service" ]; + Requires = [ "digitalocean-metadata.service" ]; + }; + serviceConfig = { + Type = "oneshot"; + }; + }; + + } + ]; + meta.maintainers = with maintainers; [ arianvp eamsden ]; +} + diff --git a/nixos/modules/virtualisation/digital-ocean-image.nix b/nixos/modules/virtualisation/digital-ocean-image.nix new file mode 100644 index 00000000000..b582e235d43 --- /dev/null +++ b/nixos/modules/virtualisation/digital-ocean-image.nix @@ -0,0 +1,69 @@ +{ config, lib, pkgs, ... }: + +with lib; +let + cfg = config.virtualisation.digitalOceanImage; +in +{ + + imports = [ ./digital-ocean-config.nix ]; + + options = { + virtualisation.digitalOceanImage.diskSize = mkOption { + type = with types; int; + default = 4096; + description = '' + Size of disk image. Unit is MB. + ''; + }; + + virtualisation.digitalOceanImage.configFile = mkOption { + type = with types; nullOr path; + default = null; + description = '' + A path to a configuration file which will be placed at + /etc/nixos/configuration.nix and be used when switching + to a new configuration. If set to null, a default + configuration is used that imports + (modulesPath + "/virtualisation/digital-ocean-config.nix"). + ''; + }; + + virtualisation.digitalOceanImage.compressionMethod = mkOption { + type = types.enum [ "gzip" "bzip2" ]; + default = "gzip"; + example = "bzip2"; + description = '' + Disk image compression method. Choose bzip2 to generate smaller images that + take longer to generate but will consume less metered storage space on your + Digital Ocean account. + ''; + }; + }; + + #### implementation + config = { + + system.build.digitalOceanImage = import ../../lib/make-disk-image.nix { + name = "digital-ocean-image"; + format = "qcow2"; + postVM = let + compress = { + "gzip" = "${pkgs.gzip}/bin/gzip"; + "bzip2" = "${pkgs.bzip2}/bin/bzip2"; + }.${cfg.compressionMethod}; + in '' + ${compress} $diskImage + ''; + configFile = if cfg.configFile == null + then config.virtualisation.digitalOcean.defaultConfigFile + else cfg.configFile; + inherit (cfg) diskSize; + inherit config lib pkgs; + }; + + }; + + meta.maintainers = with maintainers; [ arianvp eamsden ]; + +} diff --git a/nixos/modules/virtualisation/digital-ocean-init.nix b/nixos/modules/virtualisation/digital-ocean-init.nix new file mode 100644 index 00000000000..02f4de009fa --- /dev/null +++ b/nixos/modules/virtualisation/digital-ocean-init.nix @@ -0,0 +1,95 @@ +{ config, pkgs, lib, ... }: +with lib; +let + cfg = config.virtualisation.digitalOcean; + defaultConfigFile = pkgs.writeText "digitalocean-configuration.nix" '' + { modulesPath, lib, ... }: + { + imports = lib.optional (builtins.pathExists ./do-userdata.nix) ./do-userdata.nix ++ [ + (modulesPath + "/virtualisation/digital-ocean-config.nix") + ]; + } + ''; +in { + options.virtualisation.digitalOcean.rebuildFromUserData = mkOption { + type = types.bool; + default = true; + example = true; + description = "Whether to reconfigure the system from Digital Ocean user data"; + }; + options.virtualisation.digitalOcean.defaultConfigFile = mkOption { + type = types.path; + default = defaultConfigFile; + defaultText = '' + The default configuration imports user-data if applicable and + (modulesPath + "/virtualisation/digital-ocean-config.nix"). + ''; + description = '' + A path to a configuration file which will be placed at + /etc/nixos/configuration.nix and be used when switching to + a new configuration. + ''; + }; + + config = { + systemd.services.digitalocean-init = mkIf cfg.rebuildFromUserData { + description = "Reconfigure the system from Digital Ocean userdata on startup"; + wantedBy = [ "network-online.target" ]; + unitConfig = { + ConditionPathExists = "!/etc/nixos/do-userdata.nix"; + After = [ "digitalocean-metadata.service" "network-online.target" ]; + Requires = [ "digitalocean-metadata.service" ]; + X-StopOnRemoval = false; + }; + serviceConfig = { + Type = "oneshot"; + RemainAfterExit = true; + }; + restartIfChanged = false; + path = [ pkgs.jq pkgs.gnused pkgs.gnugrep pkgs.systemd config.nix.package config.system.build.nixos-rebuild ]; + environment = { + HOME = "/root"; + NIX_PATH = concatStringsSep ":" [ + "/nix/var/nix/profiles/per-user/root/channels/nixos" + "nixos-config=/etc/nixos/configuration.nix" + "/nix/var/nix/profiles/per-user/root/channels" + ]; + }; + script = '' + set -e + echo "attempting to fetch configuration from Digital Ocean user data..." + userData=$(mktemp) + if jq -er '.user_data' /run/do-metadata/v1.json > $userData; then + # If the user-data looks like it could be a nix expression, + # copy it over. Also, look for a magic three-hash comment and set + # that as the channel. + if nix-instantiate --parse $userData > /dev/null; then + channels="$(grep '^###' "$userData" | sed 's|###\s*||')" + printf "%s" "$channels" | while read channel; do + echo "writing channel: $channel" + done + + if [[ -n "$channels" ]]; then + printf "%s" "$channels" > /root/.nix-channels + nix-channel --update + fi + + echo "setting configuration from Digital Ocean user data" + cp "$userData" /etc/nixos/do-userdata.nix + if [[ ! -e /etc/nixos/configuration.nix ]]; then + install -m0644 ${cfg.defaultConfigFile} /etc/nixos/configuration.nix + fi + else + echo "user data does not appear to be a Nix expression; ignoring" + exit + fi + + nixos-rebuild switch + else + echo "no user data is available" + fi + ''; + }; + }; + meta.maintainers = with maintainers; [ arianvp eamsden ]; +} From ec16d5c3ba641be9f9021a64926c77ae23d294fb Mon Sep 17 00:00:00 2001 From: Florian Klink Date: Sat, 23 Nov 2019 23:54:06 +0100 Subject: [PATCH 41/61] nixosTests.wordpress: port to python --- nixos/tests/wordpress.nix | 36 ++++++++++++++++++++++++------------ 1 file changed, 24 insertions(+), 12 deletions(-) diff --git a/nixos/tests/wordpress.nix b/nixos/tests/wordpress.nix index c6acfa6c1f3..a26a45b36e8 100644 --- a/nixos/tests/wordpress.nix +++ b/nixos/tests/wordpress.nix @@ -1,4 +1,4 @@ -import ./make-test.nix ({ pkgs, ... }: +import ./make-test-python.nix ({ pkgs, ... }: { name = "wordpress"; @@ -23,19 +23,31 @@ import ./make-test.nix ({ pkgs, ... }: }; testScript = '' - startAll; + import re - $machine->waitForUnit("httpd"); - $machine->waitForUnit("phpfpm-wordpress-site1.local"); - $machine->waitForUnit("phpfpm-wordpress-site2.local"); + start_all() - $machine->succeed("curl -L site1.local | grep 'Welcome to the famous'"); - $machine->succeed("curl -L site2.local | grep 'Welcome to the famous'"); + machine.wait_for_unit("httpd") - $machine->succeed("systemctl --no-pager show wordpress-init-site1.local.service | grep 'ExecStart=.*status=0'"); - $machine->succeed("systemctl --no-pager show wordpress-init-site2.local.service | grep 'ExecStart=.*status=0'"); - $machine->succeed("grep -E '^define.*NONCE_SALT.{64,};\$' /var/lib/wordpress/site1.local/secret-keys.php"); - $machine->succeed("grep -E '^define.*NONCE_SALT.{64,};\$' /var/lib/wordpress/site2.local/secret-keys.php"); + machine.wait_for_unit("phpfpm-wordpress-site1.local") + machine.wait_for_unit("phpfpm-wordpress-site2.local") + + site_names = ["site1.local", "site2.local"] + + with subtest("website returns welcome screen"): + for site_name in site_names: + assert "Welcome to the famous" in machine.succeed(f"curl -L {site_name}") + + with subtest("wordpress-init went through"): + for site_name in site_names: + info = machine.get_unit_info(f"wordpress-init-{site_name}") + assert info.Result == "success" + + with subtest("secret keys are set"): + re.compile(r"^define.*NONCE_SALT.{64,};$") + for site_name in site_names: + assert r.match( + machine.succeed(f"cat /var/lib/wordpress/{site_name}/secret-keys.php") + ) ''; - }) From 5682fe1584e52c67b0d6c99b7d13e7c29ae0cecc Mon Sep 17 00:00:00 2001 From: Kyle Sferrazza Date: Mon, 18 Nov 2019 13:26:27 -0500 Subject: [PATCH 42/61] mongodb-compass: add wrapGAppsHook --- pkgs/tools/misc/mongodb-compass/default.nix | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/pkgs/tools/misc/mongodb-compass/default.nix b/pkgs/tools/misc/mongodb-compass/default.nix index 25d7eaba55e..95c87cb35fc 100644 --- a/pkgs/tools/misc/mongodb-compass/default.nix +++ b/pkgs/tools/misc/mongodb-compass/default.nix @@ -1,6 +1,6 @@ { stdenv, fetchurl, dpkg , alsaLib, atk, cairo, cups, curl, dbus, expat, fontconfig, freetype, glib -, gnome2, gnome3, libnotify, libxcb, nspr, nss, systemd, xorg }: +, gnome2, gnome3, libnotify, libxcb, nspr, nss, systemd, xorg, wrapGAppsHook }: let @@ -57,7 +57,7 @@ in stdenv.mkDerivation { inherit src; - buildInputs = [ dpkg ]; + buildInputs = [ dpkg wrapGAppsHook gnome3.gtk ]; dontUnpack = true; buildCommand = '' @@ -76,6 +76,7 @@ in stdenv.mkDerivation { patchelf --set-interpreter "$(cat $NIX_CC/nix-support/dynamic-linker)" "$file" || true patchelf --set-rpath ${rpath}:$out/share/mongodb-compass "$file" || true done + wrapGAppsHook $out/bin/mongodb-compass ''; meta = with stdenv.lib; { From a5809c883803e65b18da500c2953476de1a0f795 Mon Sep 17 00:00:00 2001 From: Florian Klink Date: Sun, 24 Nov 2019 16:52:23 +0100 Subject: [PATCH 43/61] maintainer-list: add mmilata --- maintainers/maintainer-list.nix | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/maintainers/maintainer-list.nix b/maintainers/maintainer-list.nix index ebbda36b1de..4443d307fd9 100644 --- a/maintainers/maintainer-list.nix +++ b/maintainers/maintainer-list.nix @@ -4524,6 +4524,12 @@ githubId = 117842; name = "Henri Bourcereau"; }; + mmilata = { + email = "martin@martinmilata.cz"; + github = "mmilata"; + gitHubId = 85857; + name = "Martin Milata"; + }; mmlb = { email = "me.mmlb@mmlb.me"; github = "mmlb"; From 069364f34897be82c193dcd3501ab99f4e46cdc0 Mon Sep 17 00:00:00 2001 From: Florian Klink Date: Sun, 24 Nov 2019 16:48:35 +0100 Subject: [PATCH 44/61] nixosTests.wordpress: add flokli and mmilata --- nixos/tests/wordpress.nix | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/nixos/tests/wordpress.nix b/nixos/tests/wordpress.nix index a26a45b36e8..64c533d70f4 100644 --- a/nixos/tests/wordpress.nix +++ b/nixos/tests/wordpress.nix @@ -3,7 +3,11 @@ import ./make-test-python.nix ({ pkgs, ... }: { name = "wordpress"; meta = with pkgs.stdenv.lib.maintainers; { - maintainers = [ grahamc ]; # under duress! + maintainers = [ + flokli + grahamc # under duress! + mmilata + ]; }; machine = From 84a105254d52d8ded6c5365399b61bea14505cd7 Mon Sep 17 00:00:00 2001 From: John Ericson Date: Sun, 24 Nov 2019 16:19:32 +0000 Subject: [PATCH 45/61] lib: Add getName to mirror getVersion --- lib/default.nix | 3 ++- lib/strings.nix | 17 +++++++++++++++++ 2 files changed, 19 insertions(+), 1 deletion(-) diff --git a/lib/default.nix b/lib/default.nix index 18d2dfae1e1..0e840dd6c9e 100644 --- a/lib/default.nix +++ b/lib/default.nix @@ -84,7 +84,8 @@ let hasInfix hasPrefix hasSuffix stringToCharacters stringAsChars escape escapeShellArg escapeShellArgs replaceChars lowerChars upperChars toLower toUpper addContextFrom splitString - removePrefix removeSuffix versionOlder versionAtLeast getVersion + removePrefix removeSuffix versionOlder versionAtLeast + getName getVersion nameFromURL enableFeature enableFeatureAs withFeature withFeatureAs fixedWidthString fixedWidthNumber isStorePath toInt readPathsFromFile fileContents; diff --git a/lib/strings.nix b/lib/strings.nix index ae0d74c6721..6dbb3d3a3e8 100644 --- a/lib/strings.nix +++ b/lib/strings.nix @@ -472,6 +472,23 @@ rec { */ versionAtLeast = v1: v2: !versionOlder v1 v2; + /* This function takes an argument that's either a derivation or a + derivation's "name" attribute and extracts the name part from that + argument. + + Example: + getName "youtube-dl-2016.01.01" + => "youtube-dl" + getName pkgs.youtube-dl + => "youtube-dl" + */ + getName = x: + let + parse = drv: (builtins.parseDrvName drv).name; + in if isString x + then parse x + else x.pname or (parse x.name); + /* This function takes an argument that's either a derivation or a derivation's "name" attribute and extracts the version part from that argument. From 2b9773f91ec214546c28f57c68783b30e257fcef Mon Sep 17 00:00:00 2001 From: Florian Klink Date: Sun, 24 Nov 2019 17:32:55 +0100 Subject: [PATCH 46/61] nixos/tests/beegfs: remove This was broken for quite some time. cc https://github.com/NixOS/nixpkgs/issues/73998 --- nixos/tests/all-tests.nix | 1 - nixos/tests/beegfs.nix | 115 -------------------------------------- 2 files changed, 116 deletions(-) delete mode 100644 nixos/tests/beegfs.nix diff --git a/nixos/tests/all-tests.nix b/nixos/tests/all-tests.nix index a2129ef7076..f1c3c7dcef3 100644 --- a/nixos/tests/all-tests.nix +++ b/nixos/tests/all-tests.nix @@ -28,7 +28,6 @@ in babeld = handleTest ./babeld.nix {}; bcachefs = handleTestOn ["x86_64-linux"] ./bcachefs.nix {}; # linux-4.18.2018.10.12 is unsupported on aarch64 beanstalkd = handleTest ./beanstalkd.nix {}; - beegfs = handleTestOn ["x86_64-linux"] ./beegfs.nix {}; # beegfs is unsupported on aarch64 bind = handleTest ./bind.nix {}; bittorrent = handleTest ./bittorrent.nix {}; #blivet = handleTest ./blivet.nix {}; # broken since 2017-07024 diff --git a/nixos/tests/beegfs.nix b/nixos/tests/beegfs.nix deleted file mode 100644 index 3465272f559..00000000000 --- a/nixos/tests/beegfs.nix +++ /dev/null @@ -1,115 +0,0 @@ -import ./make-test.nix ({ ... } : - -let - connAuthFile="beegfs/auth-def.key"; - - client = { pkgs, ... } : { - networking.firewall.enable = false; - services.beegfsEnable = true; - services.beegfs.default = { - mgmtdHost = "mgmt"; - connAuthFile = "/etc/${connAuthFile}"; - client = { - mount = false; - enable = true; - }; - }; - - fileSystems = pkgs.lib.mkVMOverride # FIXME: this should be creatd by the module - [ { mountPoint = "/beegfs"; - device = "default"; - fsType = "beegfs"; - options = [ "cfgFile=/etc/beegfs/client-default.conf" "_netdev" ]; - } - ]; - - environment.etc.${connAuthFile} = { - enable = true; - text = "ThisIsALousySecret"; - mode = "0600"; - }; - }; - - - server = service : { pkgs, ... } : { - networking.firewall.enable = false; - boot.initrd.postDeviceCommands = '' - ${pkgs.e2fsprogs}/bin/mkfs.ext4 -L data /dev/vdb - ''; - - virtualisation.emptyDiskImages = [ 4096 ]; - - fileSystems = pkgs.lib.mkVMOverride - [ { mountPoint = "/data"; - device = "/dev/disk/by-label/data"; - fsType = "ext4"; - } - ]; - - environment.systemPackages = with pkgs; [ beegfs ]; - environment.etc.${connAuthFile} = { - enable = true; - text = "ThisIsALousySecret"; - mode = "0600"; - }; - - services.beegfsEnable = true; - services.beegfs.default = { - mgmtdHost = "mgmt"; - connAuthFile = "/etc/${connAuthFile}"; - ${service} = { - enable = true; - storeDir = "/data"; - }; - }; - }; - -in -{ - name = "beegfs"; - - nodes = { - meta = server "meta"; - mgmt = server "mgmtd"; - storage1 = server "storage"; - storage2 = server "storage"; - client1 = client; - client2 = client; - }; - - testScript = '' - # Initalize the data directories - $mgmt->waitForUnit("default.target"); - $mgmt->succeed("beegfs-setup-mgmtd -C -f -p /data"); - $mgmt->succeed("systemctl start beegfs-mgmtd-default"); - - $meta->waitForUnit("default.target"); - $meta->succeed("beegfs-setup-meta -C -f -s 1 -p /data"); - $meta->succeed("systemctl start beegfs-meta-default"); - - $storage1->waitForUnit("default.target"); - $storage1->succeed("beegfs-setup-storage -C -f -s 1 -i 1 -p /data"); - $storage1->succeed("systemctl start beegfs-storage-default"); - - $storage2->waitForUnit("default.target"); - $storage2->succeed("beegfs-setup-storage -C -f -s 2 -i 2 -p /data"); - $storage2->succeed("systemctl start beegfs-storage-default"); - - # - - # Basic test - $client1->waitForUnit("beegfs.mount"); - $client1->succeed("beegfs-check-servers-default"); - $client1->succeed("echo test > /beegfs/test"); - $client2->waitForUnit("beegfs.mount"); - $client2->succeed("test -e /beegfs/test"); - $client2->succeed("cat /beegfs/test | grep test"); - - # test raid0/stripping - $client1->succeed("dd if=/dev/urandom bs=1M count=10 of=/beegfs/striped"); - $client2->succeed("cat /beegfs/striped > /dev/null"); - - # check if fs is still healthy - $client1->succeed("beegfs-fsck-default --checkfs"); - ''; -}) From 99537e994f09e8e5499d3d877df0e16da8452ca7 Mon Sep 17 00:00:00 2001 From: Craig Hall Date: Wed, 14 Aug 2019 14:52:15 +0100 Subject: [PATCH 47/61] {cc,bintools}-wrapper: use cc pname/version if set --- pkgs/build-support/bintools-wrapper/default.nix | 6 +++--- pkgs/build-support/cc-wrapper/default.nix | 6 +++--- 2 files changed, 6 insertions(+), 6 deletions(-) diff --git a/pkgs/build-support/bintools-wrapper/default.nix b/pkgs/build-support/bintools-wrapper/default.nix index e02e77de45e..2a039513d2f 100644 --- a/pkgs/build-support/bintools-wrapper/default.nix +++ b/pkgs/build-support/bintools-wrapper/default.nix @@ -34,8 +34,8 @@ let targetPrefix = stdenv.lib.optionalString (targetPlatform != hostPlatform) (targetPlatform.config + "-"); - bintoolsVersion = (builtins.parseDrvName bintools.name).version; - bintoolsName = (builtins.parseDrvName bintools.name).name; + bintoolsVersion = stdenv.lib.getVersion version; + bintoolsName = stdenv.lib.removePrefix targetPrefix (stdenv.lib.getName bintools); libc_bin = if libc == null then null else getBin libc; libc_dev = if libc == null then null else getDev libc; @@ -74,7 +74,7 @@ in stdenv.mkDerivation { name = targetPrefix - + (if name != "" then name else stdenv.lib.removePrefix targetPrefix "${bintoolsName}-wrapper") + + (if name != "" then name else "${bintoolsName}-wrapper") + (stdenv.lib.optionalString (bintools != null && bintoolsVersion != "") "-${bintoolsVersion}"); preferLocalBuild = true; diff --git a/pkgs/build-support/cc-wrapper/default.nix b/pkgs/build-support/cc-wrapper/default.nix index cf2d38cd997..9851602179c 100644 --- a/pkgs/build-support/cc-wrapper/default.nix +++ b/pkgs/build-support/cc-wrapper/default.nix @@ -35,8 +35,8 @@ let targetPrefix = stdenv.lib.optionalString (targetPlatform != hostPlatform) (targetPlatform.config + "-"); - ccVersion = (builtins.parseDrvName cc.name).version; - ccName = (builtins.parseDrvName cc.name).name; + ccVersion = stdenv.lib.getVersion cc; + ccName = stdenv.lib.removePrefix targetPrefix (stdenv.lib.getName cc); libc_bin = if libc == null then null else getBin libc; libc_dev = if libc == null then null else getDev libc; @@ -94,7 +94,7 @@ assert nativePrefix == bintools.nativePrefix; stdenv.mkDerivation { name = targetPrefix - + (if name != "" then name else stdenv.lib.removePrefix targetPrefix "${ccName}-wrapper") + + (if name != "" then name else "${ccName}-wrapper") + (stdenv.lib.optionalString (cc != null && ccVersion != "") "-${ccVersion}"); preferLocalBuild = true; From c3e17efaab0b53b4f45454aaaea7690506a8fcde Mon Sep 17 00:00:00 2001 From: Florian Klink Date: Sun, 24 Nov 2019 17:33:51 +0100 Subject: [PATCH 48/61] nixos/beegfs: remove module packages are marked as broken for quite some time. --- nixos/doc/manual/release-notes/rl-2003.xml | 5 + nixos/modules/module-list.nix | 1 - nixos/modules/rename.nix | 4 + .../services/network-filesystems/beegfs.nix | 357 ------------------ 4 files changed, 9 insertions(+), 358 deletions(-) delete mode 100644 nixos/modules/services/network-filesystems/beegfs.nix diff --git a/nixos/doc/manual/release-notes/rl-2003.xml b/nixos/doc/manual/release-notes/rl-2003.xml index 6916fd225da..e8e89c5bbc2 100644 --- a/nixos/doc/manual/release-notes/rl-2003.xml +++ b/nixos/doc/manual/release-notes/rl-2003.xml @@ -176,6 +176,11 @@ KDE’s old multimedia framework Phonon no longer supports Qt 4. For that reason, Plasma desktop also does not have option any more. + + + The BeeGFS module has been removed. + + diff --git a/nixos/modules/module-list.nix b/nixos/modules/module-list.nix index 5f4a608d74d..6d1ef0d234a 100644 --- a/nixos/modules/module-list.nix +++ b/nixos/modules/module-list.nix @@ -538,7 +538,6 @@ ./services/monitoring/zabbix-agent.nix ./services/monitoring/zabbix-proxy.nix ./services/monitoring/zabbix-server.nix - ./services/network-filesystems/beegfs.nix ./services/network-filesystems/cachefilesd.nix ./services/network-filesystems/davfs2.nix ./services/network-filesystems/drbd.nix diff --git a/nixos/modules/rename.nix b/nixos/modules/rename.nix index a109b26a5f3..c810bcf3bca 100644 --- a/nixos/modules/rename.nix +++ b/nixos/modules/rename.nix @@ -280,6 +280,10 @@ with lib; # BLCR (mkRemovedOptionModule [ "environment.blcr.enable" ] "The BLCR module has been removed") + # beegfs + (mkRemovedOptionModule [ "services.beegfsEnable" ] "The BeeGFS module has been removed") + (mkRemovedOptionModule [ "services.beegfs" ] "The BeeGFS module has been removed") + # Redis (mkRemovedOptionModule [ "services" "redis" "user" ] "The redis module now is hardcoded to the redis user.") (mkRemovedOptionModule [ "services" "redis" "dbpath" ] "The redis module now uses /var/lib/redis as data directory.") diff --git a/nixos/modules/services/network-filesystems/beegfs.nix b/nixos/modules/services/network-filesystems/beegfs.nix deleted file mode 100644 index 2e03a422665..00000000000 --- a/nixos/modules/services/network-filesystems/beegfs.nix +++ /dev/null @@ -1,357 +0,0 @@ -{ config, lib, pkgs, ...} : - -with lib; - -let - cfg = config.services.beegfs; - - # functions for the generations of config files - - configMgmtd = name: cfg: pkgs.writeText "mgmt-${name}.conf" '' - storeMgmtdDirectory = ${cfg.mgmtd.storeDir} - storeAllowFirstRunInit = false - connAuthFile = ${cfg.connAuthFile} - connPortShift = ${toString cfg.connPortShift} - - ${cfg.mgmtd.extraConfig} - ''; - - configAdmon = name: cfg: pkgs.writeText "admon-${name}.conf" '' - sysMgmtdHost = ${cfg.mgmtdHost} - connAuthFile = ${cfg.connAuthFile} - connPortShift = ${toString cfg.connPortShift} - - ${cfg.admon.extraConfig} - ''; - - configMeta = name: cfg: pkgs.writeText "meta-${name}.conf" '' - storeMetaDirectory = ${cfg.meta.storeDir} - sysMgmtdHost = ${cfg.mgmtdHost} - connAuthFile = ${cfg.connAuthFile} - connPortShift = ${toString cfg.connPortShift} - storeAllowFirstRunInit = false - - ${cfg.meta.extraConfig} - ''; - - configStorage = name: cfg: pkgs.writeText "storage-${name}.conf" '' - storeStorageDirectory = ${cfg.storage.storeDir} - sysMgmtdHost = ${cfg.mgmtdHost} - connAuthFile = ${cfg.connAuthFile} - connPortShift = ${toString cfg.connPortShift} - storeAllowFirstRunInit = false - - ${cfg.storage.extraConfig} - ''; - - configHelperd = name: cfg: pkgs.writeText "helperd-${name}.conf" '' - connAuthFile = ${cfg.connAuthFile} - ${cfg.helperd.extraConfig} - ''; - - configClientFilename = name : "/etc/beegfs/client-${name}.conf"; - - configClient = name: cfg: '' - sysMgmtdHost = ${cfg.mgmtdHost} - connAuthFile = ${cfg.connAuthFile} - connPortShift = ${toString cfg.connPortShift} - - ${cfg.client.extraConfig} - ''; - - serviceList = [ - { service = "admon"; cfgFile = configAdmon; } - { service = "meta"; cfgFile = configMeta; } - { service = "mgmtd"; cfgFile = configMgmtd; } - { service = "storage"; cfgFile = configStorage; } - ]; - - # functions to generate systemd.service entries - - systemdEntry = service: cfgFile: (mapAttrs' ( name: cfg: - (nameValuePair "beegfs-${service}-${name}" (mkIf cfg.${service}.enable { - wantedBy = [ "multi-user.target" ]; - requires = [ "network-online.target" ]; - after = [ "network-online.target" ]; - serviceConfig = rec { - ExecStart = '' - ${pkgs.beegfs}/bin/beegfs-${service} \ - cfgFile=${cfgFile name cfg} \ - pidFile=${PIDFile} - ''; - PIDFile = "/run/beegfs-${service}-${name}.pid"; - TimeoutStopSec = "300"; - }; - }))) cfg); - - systemdHelperd = mapAttrs' ( name: cfg: - (nameValuePair "beegfs-helperd-${name}" (mkIf cfg.client.enable { - wantedBy = [ "multi-user.target" ]; - requires = [ "network-online.target" ]; - after = [ "network-online.target" ]; - serviceConfig = rec { - ExecStart = '' - ${pkgs.beegfs}/bin/beegfs-helperd \ - cfgFile=${configHelperd name cfg} \ - pidFile=${PIDFile} - ''; - PIDFile = "/run/beegfs-helperd-${name}.pid"; - TimeoutStopSec = "300"; - }; - }))) cfg; - - # wrappers to beegfs tools. Avoid typing path of config files - utilWrappers = mapAttrsToList ( name: cfg: - ( pkgs.runCommand "beegfs-utils-${name}" { - nativeBuildInputs = [ pkgs.makeWrapper ]; - preferLocalBuild = true; - } '' - mkdir -p $out/bin - - makeWrapper ${pkgs.beegfs}/bin/beegfs-check-servers \ - $out/bin/beegfs-check-servers-${name} \ - --add-flags "-c ${configClientFilename name}" \ - --prefix PATH : ${lib.makeBinPath [ pkgs.beegfs ]} - - makeWrapper ${pkgs.beegfs}/bin/beegfs-ctl \ - $out/bin/beegfs-ctl-${name} \ - --add-flags "--cfgFile=${configClientFilename name}" - - makeWrapper ${pkgs.beegfs}/bin/beegfs-ctl \ - $out/bin/beegfs-df-${name} \ - --add-flags "--cfgFile=${configClientFilename name}" \ - --add-flags --listtargets \ - --add-flags --hidenodeid \ - --add-flags --pools \ - --add-flags --spaceinfo - - makeWrapper ${pkgs.beegfs}/bin/beegfs-fsck \ - $out/bin/beegfs-fsck-${name} \ - --add-flags "--cfgFile=${configClientFilename name}" - '' - )) cfg; -in -{ - ###### interface - - options = { - services.beegfsEnable = mkEnableOption "BeeGFS"; - - services.beegfs = mkOption { - default = {}; - description = '' - BeeGFS configurations. Every mount point requires a separate configuration. - ''; - type = with types; attrsOf (submodule ({ ... } : { - options = { - mgmtdHost = mkOption { - type = types.str; - default = null; - example = "master"; - description = ''Hostname of managament host.''; - }; - - connAuthFile = mkOption { - type = types.str; - default = ""; - example = "/etc/my.key"; - description = "File containing shared secret authentication."; - }; - - connPortShift = mkOption { - type = types.int; - default = 0; - example = 5; - description = '' - For each additional beegfs configuration shift all - service TCP/UDP ports by at least 5. - ''; - }; - - client = { - enable = mkEnableOption "BeeGFS client"; - - mount = mkOption { - type = types.bool; - default = true; - description = "Create fstab entry automatically"; - }; - - mountPoint = mkOption { - type = types.str; - default = "/run/beegfs"; - description = '' - Mount point under which the beegfs filesytem should be mounted. - If mounted manually the mount option specifing the config file is needed: - cfgFile=/etc/beegfs/beegfs-client-<name>.conf - ''; - }; - - extraConfig = mkOption { - type = types.lines; - default = ""; - description = '' - Additional lines for beegfs-client.conf. - See documentation for further details. - ''; - }; - }; - - helperd = { - enable = mkOption { - type = types.bool; - default = true; - description = '' - Enable the BeeGFS helperd. - The helpered is need for logging purposes on the client. - Disabling helperd allows for runing the client - with allowUnfree = false. - ''; - }; - - extraConfig = mkOption { - type = types.lines; - default = ""; - description = '' - Additional lines for beegfs-helperd.conf. See documentation - for further details. - ''; - }; - }; - - mgmtd = { - enable = mkEnableOption "BeeGFS mgmtd daemon"; - - storeDir = mkOption { - type = types.path; - default = null; - example = "/data/beegfs-mgmtd"; - description = '' - Data directory for mgmtd. - Must not be shared with other beegfs daemons. - This directory must exist and it must be initialized - with beegfs-setup-mgmtd, e.g. "beegfs-setup-mgmtd -C -p <storeDir>" - ''; - }; - - extraConfig = mkOption { - type = types.lines; - default = ""; - description = '' - Additional lines for beegfs-mgmtd.conf. See documentation - for further details. - ''; - }; - }; - - admon = { - enable = mkEnableOption "BeeGFS admon daemon"; - - extraConfig = mkOption { - type = types.lines; - default = ""; - description = '' - Additional lines for beegfs-admon.conf. See documentation - for further details. - ''; - }; - }; - - meta = { - enable = mkEnableOption "BeeGFS meta data daemon"; - - storeDir = mkOption { - type = types.path; - default = null; - example = "/data/beegfs-meta"; - description = '' - Data directory for meta data service. - Must not be shared with other beegfs daemons. - The underlying filesystem must be mounted with xattr turned on. - This directory must exist and it must be initialized - with beegfs-setup-meta, e.g. - "beegfs-setup-meta -C -s <serviceID> -p <storeDir>" - ''; - }; - - extraConfig = mkOption { - type = types.str; - default = ""; - description = '' - Additional lines for beegfs-meta.conf. See documentation - for further details. - ''; - }; - }; - - storage = { - enable = mkEnableOption "BeeGFS storage daemon"; - - storeDir = mkOption { - type = types.path; - default = null; - example = "/data/beegfs-storage"; - description = '' - Data directories for storage service. - Must not be shared with other beegfs daemons. - The underlying filesystem must be mounted with xattr turned on. - This directory must exist and it must be initialized - with beegfs-setup-storage, e.g. - "beegfs-setup-storage -C -s <serviceID> -i <storageTargetID> -p <storeDir>" - ''; - }; - - extraConfig = mkOption { - type = types.str; - default = ""; - description = '' - Addional lines for beegfs-storage.conf. See documentation - for further details. - ''; - }; - }; - }; - })); - }; - }; - - ###### implementation - - config = - mkIf config.services.beegfsEnable { - - environment.systemPackages = utilWrappers; - - # Put the client.conf files in /etc since they are needed - # by the commandline tools - environment.etc = mapAttrs' ( name: cfg: - (nameValuePair "beegfs/client-${name}.conf" (mkIf (cfg.client.enable) - { - enable = true; - text = configClient name cfg; - }))) cfg; - - # Kernel module, we need it only once per host. - boot = mkIf ( - foldr (a: b: a || b) false - (map (x: x.client.enable) (collect (x: x ? client) cfg))) - { - kernelModules = [ "beegfs" ]; - extraModulePackages = [ pkgs.linuxPackages.beegfs-module ]; - }; - - # generate fstab entries - fileSystems = mapAttrs' (name: cfg: - (nameValuePair cfg.client.mountPoint (optionalAttrs cfg.client.mount (mkIf cfg.client.enable { - device = "beegfs_nodev"; - fsType = "beegfs"; - mountPoint = cfg.client.mountPoint; - options = [ "cfgFile=${configClientFilename name}" "_netdev" ]; - })))) cfg; - - # generate systemd services - systemd.services = systemdHelperd // - foldr (a: b: a // b) {} - (map (x: systemdEntry x.service x.cfgFile) serviceList); - }; -} From 8ab403c08924579d4eb099726f55a3fb56f4e58c Mon Sep 17 00:00:00 2001 From: Florian Klink Date: Sun, 24 Nov 2019 17:35:38 +0100 Subject: [PATCH 49/61] beegfs: remove This has been marked as broken since https://github.com/NixOS/nixpkgs/pull/66352 Closes #73998. --- pkgs/os-specific/linux/beegfs/default.nix | 167 ------------------ .../linux/beegfs/kernel-module.nix | 46 ----- pkgs/top-level/aliases.nix | 1 + pkgs/top-level/all-packages.nix | 4 - 4 files changed, 1 insertion(+), 217 deletions(-) delete mode 100644 pkgs/os-specific/linux/beegfs/default.nix delete mode 100644 pkgs/os-specific/linux/beegfs/kernel-module.nix diff --git a/pkgs/os-specific/linux/beegfs/default.nix b/pkgs/os-specific/linux/beegfs/default.nix deleted file mode 100644 index 7ce2fea6924..00000000000 --- a/pkgs/os-specific/linux/beegfs/default.nix +++ /dev/null @@ -1,167 +0,0 @@ -{ stdenv, fetchurl, pkgconfig, unzip, which -, libuuid, attr, xfsprogs, cppunit, rdma-core -, zlib, openssl, sqlite, jre, openjdk, ant -, openssh, perl, gfortran, influxdb, curl -} : - -let - version = "7.0"; - - subdirs = [ - "beeond_thirdparty/build" - "beeond_thirdparty_gpl/build" - "thirdparty/build" - "opentk_lib/build" - "common/build" - "admon/build" - "java_lib/build" - "ctl/build" - "fsck/build" - "helperd/build" - "meta/build" - "mgmtd/build" - "storage/build" - "utils/build" - "mon/build" - "upgrade/beegfs_mirror_md/build" - ]; - -in stdenv.mkDerivation { - pname = "beegfs"; - inherit version; - - src = fetchurl { - url = "https://git.beegfs.com/pub/v7/repository/archive.tar.bz2?ref=${version}"; - sha256 = "1wsljd5ybyhl94aqrdfvcs8a0l8w4pr0bs1vhjrf4y7ldhw35m3k"; - }; - - nativeBuildInputs = [ which unzip pkgconfig cppunit openjdk ant perl ]; - - buildInputs = [ - libuuid - attr - xfsprogs - zlib - openssl - sqlite - jre - rdma-core - openssh - gfortran - influxdb - curl - ]; - - hardeningDisable = [ "format" ]; # required for building beeond - - postPatch = '' - patchShebangs ./ - find -type f -name Makefile -exec sed -i "s:/bin/bash:${stdenv.shell}:" \{} \; - find -type f -name Makefile -exec sed -i "s:/bin/true:true:" \{} \; - find -type f -name "*.mk" -exec sed -i "s:/bin/true:true:" \{} \; - - # unpack manually and patch variable name - sed -i '/tar -C $(SOURCE_PATH) -xzf $(PCOPY_TAR)/d' beeond_thirdparty/build/Makefile - cd beeond_thirdparty/source - tar xf pcopy-0.96.tar.gz - sed -i 's/\([^_]\)rank/\1grank/' pcopy-0.96/src/pcp.cpp - cd ../.. - ''; - - buildPhase = '' - for i in ${toString subdirs}; do - make -C $i BEEGFS_OPENTK_IBVERBS=1 ''${enableParallelBuilding:+-j''${NIX_BUILD_CORES} -l''${NIX_BUILD_CORES}} - done - make -C admon/build admon_gui BEEGFS_OPENTK_IBVERBS=1 - ''; - - enableParallelBuilding = true; - - installPhase = '' - binDir=$out/bin - docDir=$out/share/doc/beegfs - includeDir=$out/include/beegfs - libDir=$out/lib - libDirPkg=$out/lib/beegfs - - mkdir -p $binDir $libDir $libDirPkg $docDir $includeDir - - cp admon/build/beegfs-admon $binDir - cp admon/build/dist/usr/bin/beegfs-admon-gui $binDir - cp admon_gui/dist/beegfs-admon-gui.jar $libDirPkg - cp admon/build/dist/etc/beegfs-admon.conf $docDir - - cp java_lib/build/jbeegfs.jar $libDirPkg - cp java_lib/build/libjbeegfs.so $libDir - - cp ctl/build/beegfs-ctl $binDir - cp fsck/build/beegfs-fsck $binDir - - cp utils/scripts/beegfs-check-servers $binDir - cp utils/scripts/beegfs-df $binDir - cp utils/scripts/beegfs-net $binDir - - cp helperd/build/beegfs-helperd $binDir - cp helperd/build/dist/etc/beegfs-helperd.conf $docDir - - cp client_module/build/dist/sbin/beegfs-setup-client $binDir - cp client_module/build/dist/etc/beegfs-client.conf $docDir - - cp meta/build/beegfs-meta $binDir - cp meta/build/dist/sbin/beegfs-setup-meta $binDir - cp meta/build/dist/etc/beegfs-meta.conf $docDir - - cp mgmtd/build/beegfs-mgmtd $binDir - cp mgmtd/build/dist/sbin/beegfs-setup-mgmtd $binDir - cp mgmtd/build/dist/etc/beegfs-mgmtd.conf $docDir - - cp storage/build/beegfs-storage $binDir - cp storage/build/dist/sbin/beegfs-setup-storage $binDir - cp storage/build/dist/etc/beegfs-storage.conf $docDir - - cp opentk_lib/build/libbeegfs-opentk.so $libDir - - cp upgrade/beegfs_mirror_md/build/beegfs-mirror-md $binDir - - cp client_devel/build/dist/usr/share/doc/beegfs-client-devel/examples/* $docDir - cp -r client_devel/include/* $includeDir - - cp beeond_thirdparty_gpl/build/parallel $out/bin - cp beeond_thirdparty/build/pcopy/p* $out/bin - cp beeond_thirdparty/build/pcopy/s* $out/bin - cp -r beeond/scripts/* $out - cp beeond/source/* $out/bin - ''; - - postFixup = '' - substituteInPlace $out/bin/beegfs-admon-gui \ - --replace " java " " ${jre}/bin/java " \ - --replace "/opt/beegfs/beegfs-admon-gui/beegfs-admon-gui.jar" \ - "$libDirPkg/beegfs-admon-gui.jar" - - substituteInPlace $out/bin/beeond \ - --replace /opt/beegfs/sbin "$out/bin" - ''; - - doCheck = true; - - checkPhase = '' - LD_LIBRARY_PATH=$LD_LIBRARY_PATH:`pwd`/opentk_lib/build/ \ - common/build/test-runner --text - ''; - - meta = with stdenv.lib; { - description = "High performance distributed filesystem with RDMA support"; - homepage = "https://www.beegfs.io"; - platforms = [ "i686-linux" "x86_64-linux" ]; - license = { - fullName = "BeeGFS_EULA"; - url = "https://www.beegfs.io/docs/BeeGFS_EULA.txt"; - free = false; - }; - maintainers = with maintainers; [ markuskowa ]; - # 2019-08-09 - # fails to build and had stability issues earlier - broken = true; - }; -} diff --git a/pkgs/os-specific/linux/beegfs/kernel-module.nix b/pkgs/os-specific/linux/beegfs/kernel-module.nix deleted file mode 100644 index 286252b927b..00000000000 --- a/pkgs/os-specific/linux/beegfs/kernel-module.nix +++ /dev/null @@ -1,46 +0,0 @@ -{ stdenv, fetchurl, which -, kmod, kernel -} : - -let - version = "7.0"; -in stdenv.mkDerivation { - name = "beegfs-module-${version}-${kernel.version}"; - - src = fetchurl { - url = "https://git.beegfs.com/pub/v7/repository/archive.tar.bz2?ref=${version}"; - sha256 = "1wsljd5ybyhl94aqrdfvcs8a0l8w4pr0bs1vhjrf4y7ldhw35m3k"; - }; - - hardeningDisable = [ "fortify" "pic" "stackprotector" ]; - - nativeBuildInputs = [ which kmod ]; - - buildInputs = kernel.moduleBuildDependencies; - - makeFlags = [ "KDIR=${kernel.dev}/lib/modules/${kernel.modDirVersion}/build/" ]; - - postPatch = '' - patchShebangs ./ - find -type f -name Makefile -exec sed -i "s:/bin/bash:${stdenv.shell}:" \{} \; - find -type f -name Makefile -exec sed -i "s:/bin/true:true:" \{} \; - find -type f -name "*.mk" -exec sed -i "s:/bin/true:true:" \{} \; - ''; - - preBuild = "cd client_module/build"; - - installPhase = '' - instdir=$out/lib/modules/${kernel.modDirVersion}/extras/fs/beegfs - mkdir -p $instdir - cp beegfs.ko $instdir - ''; - - meta = with stdenv.lib; { - description = "High performance distributed filesystem with RDMA support"; - homepage = "https://www.beegfs.io"; - platforms = [ "i686-linux" "x86_64-linux" ]; - license = licenses.gpl2; - maintainers = with maintainers; [ markuskowa ]; - broken = stdenv.lib.versionAtLeast kernel.version "4.18"; - }; -} diff --git a/pkgs/top-level/aliases.nix b/pkgs/top-level/aliases.nix index 238f7b94772..8bc18fc4661 100644 --- a/pkgs/top-level/aliases.nix +++ b/pkgs/top-level/aliases.nix @@ -47,6 +47,7 @@ mapAliases ({ at_spi2_core = at-spi2-core; # added 2018-02-25 bar-xft = lemonbar-xft; # added 2015-01-16 bashCompletion = bash-completion; # Added 2016-09-28 + beegfs = throw "beegfs has been removed."; # added 2019-11-24 bridge_utils = bridge-utils; # added 2015-02-20 bro = zeek; # added 2019-09-29 btrfsProgs = btrfs-progs; # added 2016-01-03 diff --git a/pkgs/top-level/all-packages.nix b/pkgs/top-level/all-packages.nix index a738cd4bf41..020e71e63d1 100644 --- a/pkgs/top-level/all-packages.nix +++ b/pkgs/top-level/all-packages.nix @@ -2164,8 +2164,6 @@ in beanstalkd = callPackage ../servers/beanstalkd { }; - beegfs = callPackage ../os-specific/linux/beegfs { }; - beets = callPackage ../tools/audio/beets { pythonPackages = python3Packages; }; @@ -16277,8 +16275,6 @@ in bbswitch = callPackage ../os-specific/linux/bbswitch {}; - beegfs-module = callPackage ../os-specific/linux/beegfs/kernel-module.nix { }; - ati_drivers_x11 = callPackage ../os-specific/linux/ati-drivers { }; chipsec = callPackage ../tools/security/chipsec { From 2db8c2310a852e12087712a3514007ba1db4cf24 Mon Sep 17 00:00:00 2001 From: Andrew Childs Date: Mon, 25 Nov 2019 01:37:01 +0900 Subject: [PATCH 50/61] ubootTools: use tools-only_defconfig instead of allnoconfig Includes more features in the tools, like support for Flat Device Tree files in mkimage. --- pkgs/misc/uboot/default.nix | 5 +---- 1 file changed, 1 insertion(+), 4 deletions(-) diff --git a/pkgs/misc/uboot/default.nix b/pkgs/misc/uboot/default.nix index ffe576c31d8..f7663c8e447 100644 --- a/pkgs/misc/uboot/default.nix +++ b/pkgs/misc/uboot/default.nix @@ -90,15 +90,12 @@ in { inherit buildUBoot; ubootTools = buildUBoot { - defconfig = "allnoconfig"; + defconfig = "tools-only_defconfig"; installDir = "$out/bin"; hardeningDisable = []; dontStrip = false; extraMeta.platforms = lib.platforms.linux; extraMakeFlags = [ "HOST_TOOLS_ALL=y" "CROSS_BUILD_TOOLS=1" "NO_SDL=1" "tools" ]; - postConfigure = '' - sed -i '/CONFIG_SYS_TEXT_BASE/c\CONFIG_SYS_TEXT_BASE=0x00000000' .config - ''; filesToInstall = [ "tools/dumpimage" "tools/fdtgrep" From 9b090ccbca3f7dd26d91db06e96e8bf8282c37ca Mon Sep 17 00:00:00 2001 From: John Ericson Date: Sun, 24 Nov 2019 17:22:28 +0000 Subject: [PATCH 51/61] treewide: Get rid of most `parseDrvName` without breaking compat That is because this commit should be merged to both master and release-19.09. --- doc/configuration.xml | 11 +++++------ maintainers/scripts/update.nix | 2 +- nixos/modules/services/databases/mysql.nix | 12 ++++-------- nixos/modules/services/networking/znc/default.nix | 2 +- nixos/modules/system/boot/loader/grub/grub.nix | 4 ++-- pkgs/applications/editors/kdevelop5/kdevelop.nix | 2 +- pkgs/applications/misc/sweethome3d/default.nix | 14 ++++++-------- pkgs/applications/misc/sweethome3d/editors.nix | 13 +++++-------- .../networking/browsers/firefox/wrapper.nix | 8 +++++--- .../networking/instant-messengers/slack/update.sh | 2 +- .../instant-messengers/zoom-us/update.sh | 2 +- .../version-management/git-and-tools/git/update.sh | 2 +- .../version-management/monotone/default.nix | 2 +- pkgs/applications/video/vdr/wrapper.nix | 2 +- pkgs/applications/virtualization/OVMF/default.nix | 2 +- pkgs/common-updater/scripts/update-source-version | 4 ++-- pkgs/desktops/gnome-3/default.nix | 5 ++--- .../compilers/chicken/4/eggDerivation.nix | 2 +- pkgs/development/em-modules/generic/default.nix | 4 ++-- .../interpreters/lua-5/build-lua-package.nix | 2 +- .../libraries/science/math/caffe2/default.nix | 2 +- .../lisp-modules/openssl-lib-marked.nix | 2 +- pkgs/development/perl-modules/generic/default.nix | 6 +++--- pkgs/development/tools/analysis/radare2/update.py | 2 +- .../tools/continuous-integration/jenkins/update.sh | 2 +- .../tools/documentation/antora/default.nix | 7 +++---- pkgs/misc/emulators/retroarch/wrapper.nix | 10 ++-------- pkgs/misc/emulators/wine/staging.nix | 2 +- pkgs/misc/tmux-plugins/default.nix | 2 +- pkgs/misc/vim-plugins/build-vim-plugin.nix | 2 +- pkgs/os-specific/linux/prl-tools/default.nix | 4 ++-- pkgs/servers/x11/xorg/overrides.nix | 4 ++-- pkgs/shells/zsh/oh-my-zsh/update.sh | 2 +- .../tools/audio/acoustid-fingerprinter/default.nix | 2 +- pkgs/tools/inputmethods/ibus/wrapper.nix | 2 +- pkgs/tools/security/afl/libdislocator.nix | 2 +- pkgs/top-level/all-packages.nix | 12 ++++++------ pkgs/top-level/lua-packages.nix | 2 +- 38 files changed, 74 insertions(+), 90 deletions(-) diff --git a/doc/configuration.xml b/doc/configuration.xml index b497fa4e272..0d9786c2d6a 100644 --- a/doc/configuration.xml +++ b/doc/configuration.xml @@ -179,11 +179,10 @@ allows unfree packages named flash player and visual studio code: { - allowUnfreePredicate = (pkg: builtins.elem - (builtins.parseDrvName pkg.name).name [ - "flashplayer" - "vscode" - ]); + allowUnfreePredicate = pkg: builtins.elem (lib.getName pkg) [ + "flashplayer" + "vscode" + ]; } @@ -273,7 +272,7 @@ very short names: { - allowInsecurePredicate = (pkg: (builtins.stringLength (builtins.parseDrvName pkg.name).name) <= 5); + allowInsecurePredicate = (pkg: (builtins.stringLength (lib.getName pkg) <= 5); } diff --git a/maintainers/scripts/update.nix b/maintainers/scripts/update.nix index 04723cb8a36..7192f6e3b23 100755 --- a/maintainers/scripts/update.nix +++ b/maintainers/scripts/update.nix @@ -126,7 +126,7 @@ let packageData = package: { name = package.name; - pname = (builtins.parseDrvName package.name).name; + pname = lib.getName package; updateScript = map builtins.toString (pkgs.lib.toList package.updateScript); }; diff --git a/nixos/modules/services/databases/mysql.nix b/nixos/modules/services/databases/mysql.nix index df74cfc9a26..9f7727bb89f 100644 --- a/nixos/modules/services/databases/mysql.nix +++ b/nixos/modules/services/databases/mysql.nix @@ -8,15 +8,11 @@ let mysql = cfg.package; - isMariaDB = - let - pName = _p: (builtins.parseDrvName (_p.name)).name; - in pName mysql == pName pkgs.mariadb; + isMariaDB = lib.getName mysql == lib.getName pkgs.mariadb; + isMysqlAtLeast57 = - let - pName = _p: (builtins.parseDrvName (_p.name)).name; - in (pName mysql == pName pkgs.mysql57) - && ((builtins.compareVersions mysql.version "5.7") >= 0); + (lib.getName mysql == lib.getName pkgs.mysql57) + && (builtins.compareVersions mysql.version "5.7" >= 0); mysqldOptions = "--user=${cfg.user} --datadir=${cfg.dataDir} --basedir=${mysql}"; diff --git a/nixos/modules/services/networking/znc/default.nix b/nixos/modules/services/networking/znc/default.nix index 05f97bfa539..0a9848a4934 100644 --- a/nixos/modules/services/networking/znc/default.nix +++ b/nixos/modules/services/networking/znc/default.nix @@ -239,7 +239,7 @@ in services.znc = { configFile = mkDefault (pkgs.writeText "znc-generated.conf" semanticString); config = { - Version = (builtins.parseDrvName pkgs.znc.name).version; + Version = lib.getVersion pkgs.znc; Listener.l.Port = mkDefault 5000; Listener.l.SSL = mkDefault true; }; diff --git a/nixos/modules/system/boot/loader/grub/grub.nix b/nixos/modules/system/boot/loader/grub/grub.nix index e13f0421d38..9a4db84f7b7 100644 --- a/nixos/modules/system/boot/loader/grub/grub.nix +++ b/nixos/modules/system/boot/loader/grub/grub.nix @@ -47,8 +47,8 @@ let grub = f grub; grubTarget = f (grub.grubTarget or ""); shell = "${pkgs.runtimeShell}"; - fullName = (builtins.parseDrvName realGrub.name).name; - fullVersion = (builtins.parseDrvName realGrub.name).version; + fullName = lib.getName realGrub; + fullVersion = lib.getVersion realGrub; grubEfi = f grubEfi; grubTargetEfi = if cfg.efiSupport && (cfg.version == 2) then f (grubEfi.grubTarget or "") else ""; bootPath = args.path; diff --git a/pkgs/applications/editors/kdevelop5/kdevelop.nix b/pkgs/applications/editors/kdevelop5/kdevelop.nix index 4c2011b5b03..88c35a6223a 100644 --- a/pkgs/applications/editors/kdevelop5/kdevelop.nix +++ b/pkgs/applications/editors/kdevelop5/kdevelop.nix @@ -36,7 +36,7 @@ mkDerivation rec { # https://cgit.kde.org/kdevelop.git/commit/?id=716372ae2e8dff9c51e94d33443536786e4bd85b # required as nixos seems to be unable to find CLANG_BUILTIN_DIR cmakeFlags = [ - "-DCLANG_BUILTIN_DIR=${llvmPackages.clang-unwrapped}/lib/clang/${(builtins.parseDrvName llvmPackages.clang.name).version}/include" + "-DCLANG_BUILTIN_DIR=${llvmPackages.clang-unwrapped}/lib/clang/${lib.getVersion llvmPackages.clang}/include" ]; dontWrapQtApps = true; diff --git a/pkgs/applications/misc/sweethome3d/default.nix b/pkgs/applications/misc/sweethome3d/default.nix index 9dcdf8fd2b0..76a62d1762c 100644 --- a/pkgs/applications/misc/sweethome3d/default.nix +++ b/pkgs/applications/misc/sweethome3d/default.nix @@ -3,8 +3,6 @@ let - getDesktopFileName = drvName: (builtins.parseDrvName drvName).name; - # TODO: Should we move this to `lib`? Seems like its would be useful in many cases. extensionOf = filePath: lib.concatStringsSep "." (lib.tail (lib.splitString "." (builtins.baseNameOf filePath))); @@ -15,15 +13,15 @@ let '') icons); mkSweetHome3D = - { name, module, version, src, license, description, desktopName, icons }: + { pname, module, version, src, license, description, desktopName, icons }: stdenv.mkDerivation rec { - inherit name version src description; + inherit pname version src description; exec = stdenv.lib.toLower module; sweethome3dItem = makeDesktopItem { inherit exec desktopName; - name = getDesktopFileName name; - icon = getDesktopFileName name; + name = pname; + icon = pname; comment = description; genericName = "Computer Aided (Interior) Design"; categories = "Application;Graphics;2DGraphics;3DGraphics;"; @@ -49,7 +47,7 @@ let mkdir -p $out/bin cp install/${module}-${version}.jar $out/share/java/. - ${installIcons (getDesktopFileName name) icons} + ${installIcons pname icons} cp "${sweethome3dItem}/share/applications/"* $out/share/applications @@ -74,9 +72,9 @@ let in { application = mkSweetHome3D rec { + pname = stdenv.lib.toLower module + "-application"; version = "6.2"; module = "SweetHome3D"; - name = stdenv.lib.toLower module + "-application-" + version; description = "Design and visualize your future home"; license = stdenv.lib.licenses.gpl2Plus; src = fetchsvn { diff --git a/pkgs/applications/misc/sweethome3d/editors.nix b/pkgs/applications/misc/sweethome3d/editors.nix index eef5185aaee..1d3f1a41e16 100644 --- a/pkgs/applications/misc/sweethome3d/editors.nix +++ b/pkgs/applications/misc/sweethome3d/editors.nix @@ -7,20 +7,17 @@ let m: "sweethome3d-" + removeSuffix "libraryeditor" (toLower m) + "-editor"; - sweetName = m: v: sweetExec m + "-" + v; - - getDesktopFileName = drvName: (builtins.parseDrvName drvName).name; mkEditorProject = - { name, module, version, src, license, description, desktopName }: + { pname, module, version, src, license, description, desktopName }: stdenv.mkDerivation rec { application = sweethome3dApp; - inherit name module version src description; + inherit pname module version src description; exec = sweetExec module; editorItem = makeDesktopItem { inherit exec desktopName; - name = getDesktopFileName name; + name = pname; comment = description; genericName = "Computer Aided (Interior) Design"; categories = "Application;Graphics;2DGraphics;3DGraphics;"; @@ -66,7 +63,7 @@ in { textures-editor = mkEditorProject rec { version = "1.5"; module = "TexturesLibraryEditor"; - name = sweetName module version; + pname = module; description = "Easily create SH3T files and edit the properties of the texture images it contain"; license = stdenv.lib.licenses.gpl2Plus; src = fetchcvs { @@ -81,7 +78,7 @@ in { furniture-editor = mkEditorProject rec { version = "1.19"; module = "FurnitureLibraryEditor"; - name = sweetName module version; + pname = module; description = "Quickly create SH3F files and edit the properties of the 3D models it contain"; license = stdenv.lib.licenses.gpl2; src = fetchcvs { diff --git a/pkgs/applications/networking/browsers/firefox/wrapper.nix b/pkgs/applications/networking/browsers/firefox/wrapper.nix index 3ed06717f6a..69061cd0808 100644 --- a/pkgs/applications/networking/browsers/firefox/wrapper.nix +++ b/pkgs/applications/networking/browsers/firefox/wrapper.nix @@ -18,8 +18,10 @@ browser: let wrapper = - { browserName ? browser.browserName or (builtins.parseDrvName browser.name).name - , name ? (browserName + "-" + (builtins.parseDrvName browser.name).version) + { browserName ? browser.browserName or (lib.getName browser) + , name ? browserName + "-" + lib.getVersion browser # TODO delete, it's just for compat + , pname ? lib.getName name + , version ? lib.getVersion name , desktopName ? # browserName with first letter capitalized (lib.toUpper (lib.substring 0 1 browserName) + lib.substring 1 (-1) browserName) , nameSuffix ? "" @@ -83,7 +85,7 @@ let gtk_modules = [ libcanberra-gtk2 ]; in stdenv.mkDerivation { - inherit name; + inherit pname version; desktopItem = makeDesktopItem { name = browserName; diff --git a/pkgs/applications/networking/instant-messengers/slack/update.sh b/pkgs/applications/networking/instant-messengers/slack/update.sh index e5f79388353..6a15298c4e7 100755 --- a/pkgs/applications/networking/instant-messengers/slack/update.sh +++ b/pkgs/applications/networking/instant-messengers/slack/update.sh @@ -3,7 +3,7 @@ set -eu -o pipefail -oldVersion="$(nix-instantiate --eval -E "with import ./. {}; slack-theme-black.version or (builtins.parseDrvName slack-theme-black.name).version" | tr -d '"')" +oldVersion="$(nix-instantiate --eval -E "with import ./. {}; lib.getVersion slack-theme-black" | tr -d '"')" latestSha="$(curl -L -s https://api.github.com/repos/laCour/slack-night-mode/commits\?sha\=master\&since\=${oldVersion} | jq -r '.[0].sha')" if [ ! "null" = "${latestSha}" ]; then diff --git a/pkgs/applications/networking/instant-messengers/zoom-us/update.sh b/pkgs/applications/networking/instant-messengers/zoom-us/update.sh index e0632042493..6214d4e2625 100755 --- a/pkgs/applications/networking/instant-messengers/zoom-us/update.sh +++ b/pkgs/applications/networking/instant-messengers/zoom-us/update.sh @@ -3,7 +3,7 @@ set -eu -o pipefail -oldVersion=$(nix-instantiate --eval -E "with import ./. {}; zoom-us.version or (builtins.parseDrvName zoom-us.name).version" | tr -d '"') +oldVersion=$(nix-instantiate --eval -E "with import ./. {}; lib.getVersion zoom-us" | tr -d '"') version="$(curl -sI https://zoom.us/client/latest/zoom_x86_64.tar.xz | grep -Fi 'Location:' | pcregrep -o1 '/(([0-9]\.?)+)/')" if [ ! "${oldVersion}" = "${version}" ]; then diff --git a/pkgs/applications/version-management/git-and-tools/git/update.sh b/pkgs/applications/version-management/git-and-tools/git/update.sh index 05944014743..1f1a29782ec 100755 --- a/pkgs/applications/version-management/git-and-tools/git/update.sh +++ b/pkgs/applications/version-management/git-and-tools/git/update.sh @@ -3,7 +3,7 @@ set -eu -o pipefail -oldVersion="$(nix-instantiate --eval -E "with import ./. {}; git.version or (builtins.parseDrvName git.name).version" | tr -d '"')" +oldVersion="$(nix-instantiate --eval -E "with import ./. {}; lib.getVersion git" | tr -d '"')" latestTag="$(git ls-remote --tags --sort="v:refname" git://github.com/git/git.git | grep -v '\{\}' | grep -v '\-rc' | tail -1 | sed 's|^.*/v\(.*\)|\1|')" if [ ! "${oldVersion}" = "${latestTag}" ]; then diff --git a/pkgs/applications/version-management/monotone/default.nix b/pkgs/applications/version-management/monotone/default.nix index 7081e1a0899..bf8e5652d99 100644 --- a/pkgs/applications/version-management/monotone/default.nix +++ b/pkgs/applications/version-management/monotone/default.nix @@ -5,7 +5,7 @@ let version = "1.1"; - perlVersion = (builtins.parseDrvName perl.name).version; + perlVersion = stdenv.lib.getVersion perl; in assert perlVersion != ""; diff --git a/pkgs/applications/video/vdr/wrapper.nix b/pkgs/applications/video/vdr/wrapper.nix index 497ad7c77a0..50d3b9d65a8 100644 --- a/pkgs/applications/video/vdr/wrapper.nix +++ b/pkgs/applications/video/vdr/wrapper.nix @@ -8,7 +8,7 @@ in symlinkJoin { - name = "vdr-with-plugins-${(builtins.parseDrvName vdr.name).version}"; + name = "vdr-with-plugins-${lib.getVersion vdr}"; paths = [ vdr ] ++ plugins; diff --git a/pkgs/applications/virtualization/OVMF/default.nix b/pkgs/applications/virtualization/OVMF/default.nix index ecf6f1c5421..846f395671d 100644 --- a/pkgs/applications/virtualization/OVMF/default.nix +++ b/pkgs/applications/virtualization/OVMF/default.nix @@ -16,7 +16,7 @@ let else throw "Unsupported architecture"; - version = (builtins.parseDrvName edk2.name).version; + version = lib.getVersion edk2; in edk2.mkDerivation projectDscPath { diff --git a/pkgs/common-updater/scripts/update-source-version b/pkgs/common-updater/scripts/update-source-version index 591ffa6ca5b..0a436ff02a3 100755 --- a/pkgs/common-updater/scripts/update-source-version +++ b/pkgs/common-updater/scripts/update-source-version @@ -92,8 +92,8 @@ if [ -z "$oldUrl" ]; then die "Couldn't evaluate source url from '$attr.src'!" fi -drvName=$(nix-instantiate $systemArg --eval -E "with import ./. {}; (builtins.parseDrvName $attr.name).name" | tr -d '"') -oldVersion=$(nix-instantiate $systemArg --eval -E "with import ./. {}; $attr.${versionKey} or (builtins.parseDrvName $attr.name).version" | tr -d '"') +drvName=$(nix-instantiate $systemArg --eval -E "with import ./. {}; lib.getName $attr" | tr -d '"') +oldVersion=$(nix-instantiate $systemArg --eval -E "with import ./. {}; $attr.${versionKey} or lib.getVersion $attr" | tr -d '"') if [ -z "$drvName" -o -z "$oldVersion" ]; then die "Couldn't evaluate name and version from '$attr.name'!" diff --git a/pkgs/desktops/gnome-3/default.nix b/pkgs/desktops/gnome-3/default.nix index 370733798af..5347542928b 100644 --- a/pkgs/desktops/gnome-3/default.nix +++ b/pkgs/desktops/gnome-3/default.nix @@ -14,10 +14,9 @@ lib.makeScope pkgs.newScope (self: with self; { */ removePackagesByName = packages: packagesToRemove: let - pkgName = drv: (builtins.parseDrvName drv.name).name; - namesToRemove = map pkgName packagesToRemove; + namesToRemove = map lib.getName packagesToRemove; in - lib.filter (x: !(builtins.elem (pkgName x) namesToRemove)) packages; + lib.filter (x: !(builtins.elem (lib.getName x) namesToRemove)) packages; maintainers = with pkgs.lib.maintainers; [ lethalman jtojnar hedning worldofpeace ]; diff --git a/pkgs/development/compilers/chicken/4/eggDerivation.nix b/pkgs/development/compilers/chicken/4/eggDerivation.nix index 4dc7ebe6671..16f9c413d4c 100644 --- a/pkgs/development/compilers/chicken/4/eggDerivation.nix +++ b/pkgs/development/compilers/chicken/4/eggDerivation.nix @@ -8,7 +8,7 @@ let libPath = "${chicken}/var/lib/chicken/${toString chicken.binaryVersion}/"; overrides = import ./overrides.nix; - baseName = (builtins.parseDrvName name).name; + baseName = lib.getName name; override = if builtins.hasAttr baseName overrides then builtins.getAttr baseName overrides diff --git a/pkgs/development/em-modules/generic/default.nix b/pkgs/development/em-modules/generic/default.nix index d1e7ac882d7..a260beb5104 100644 --- a/pkgs/development/em-modules/generic/default.nix +++ b/pkgs/development/em-modules/generic/default.nix @@ -10,8 +10,8 @@ pkgs.stdenv.mkDerivation ( args // { - pname = "emscripten-${args.pname or (builtins.parseDrvName args.name).name}"; - version = args.version or (builtins.parseDrvName args.name).version; + pname = "emscripten-${lib.getName args}"; + version = lib.getVersion args; buildInputs = [ emscripten python ] ++ buildInputs; nativeBuildInputs = [ emscripten python ] ++ nativeBuildInputs; diff --git a/pkgs/development/interpreters/lua-5/build-lua-package.nix b/pkgs/development/interpreters/lua-5/build-lua-package.nix index 74ccb91030a..be7aa5fc09d 100644 --- a/pkgs/development/interpreters/lua-5/build-lua-package.nix +++ b/pkgs/development/interpreters/lua-5/build-lua-package.nix @@ -161,7 +161,7 @@ builtins.removeAttrs attrs ["disabled" "checkInputs" "externalDeps"] // { # enabled only for src.rock setSourceRoot= let - name_only=(builtins.parseDrvName name).name; + name_only= lib.getName name; in lib.optionalString (knownRockspec == null) '' # format is rockspec_basename/source_basename diff --git a/pkgs/development/libraries/science/math/caffe2/default.nix b/pkgs/development/libraries/science/math/caffe2/default.nix index 26ec1237601..a5c373ecde9 100644 --- a/pkgs/development/libraries/science/math/caffe2/default.nix +++ b/pkgs/development/libraries/science/math/caffe2/default.nix @@ -57,7 +57,7 @@ let dst = "pybind11"; }; - ccVersion = (builtins.parseDrvName stdenv.cc.name).version; + ccVersion = lib.getVersion stdenv.cc; in stdenv.mkDerivation rec { diff --git a/pkgs/development/lisp-modules/openssl-lib-marked.nix b/pkgs/development/lisp-modules/openssl-lib-marked.nix index e2c632b8eba..186ef14b406 100644 --- a/pkgs/development/lisp-modules/openssl-lib-marked.nix +++ b/pkgs/development/lisp-modules/openssl-lib-marked.nix @@ -2,7 +2,7 @@ with import ../../../default.nix {}; runCommand "openssl-lib-marked" {} '' mkdir -p "$out/lib" for lib in ssl crypto; do - version="${(builtins.parseDrvName openssl.name).version}" + version="${lib.getVersion openssl}" ln -s "${lib.getLib openssl}/lib/lib$lib.so" "$out/lib/lib$lib.so.$version" version="$(echo "$version" | sed -re 's/[a-z]+$//')" while test -n "$version"; do diff --git a/pkgs/development/perl-modules/generic/default.nix b/pkgs/development/perl-modules/generic/default.nix index 073b0f1c5ad..714b693d276 100644 --- a/pkgs/development/perl-modules/generic/default.nix +++ b/pkgs/development/perl-modules/generic/default.nix @@ -34,15 +34,15 @@ toPerlModule(stdenv.mkDerivation ( # https://metacpan.org/pod/release/XSAWYERX/perl-5.26.0/pod/perldelta.pod#Removal-of-the-current-directory-%28%22.%22%29-from-@INC PERL_USE_UNSAFE_INC = "1"; - meta.homepage = "https://metacpan.org/release/${attrs.pname or (builtins.parseDrvName attrs.name).name}"; # TODO: phase-out `attrs.name` + meta.homepage = "https://metacpan.org/release/${lib.getName attrs}"; # TODO: phase-out `attrs.name` meta.platforms = perl.meta.platforms; } attrs ) // { - pname = "perl${perl.version}-${attrs.pname or (builtins.parseDrvName attrs.name).name}"; # TODO: phase-out `attrs.name` - version = attrs.version or (builtins.parseDrvName attrs.name).version; # TODO: phase-out `attrs.name` + pname = "perl${perl.version}-${lib.getName attrs}"; # TODO: phase-out `attrs.name` + version = lib.getVersion attrs; # TODO: phase-out `attrs.name` builder = ./builder.sh; buildInputs = buildInputs ++ [ perl ]; nativeBuildInputs = nativeBuildInputs ++ [ (perl.dev or perl) ]; diff --git a/pkgs/development/tools/analysis/radare2/update.py b/pkgs/development/tools/analysis/radare2/update.py index 794581bca7a..b9e72e62366 100755 --- a/pkgs/development/tools/analysis/radare2/update.py +++ b/pkgs/development/tools/analysis/radare2/update.py @@ -38,7 +38,7 @@ def get_radare2_rev() -> str: def get_cutter_version() -> str: version_expr = """ -(with import {}; (builtins.parseDrvName (qt5.callPackage {}).name).version) +(with import {}; lib.getVersion (qt5.callPackage {})) """ return sh("nix", "eval", "--raw", version_expr.strip(), "-I", "radare2={0}".format(SCRIPT_DIR)) diff --git a/pkgs/development/tools/continuous-integration/jenkins/update.sh b/pkgs/development/tools/continuous-integration/jenkins/update.sh index 66d1b4ceff6..4f2f6527ecc 100755 --- a/pkgs/development/tools/continuous-integration/jenkins/update.sh +++ b/pkgs/development/tools/continuous-integration/jenkins/update.sh @@ -4,7 +4,7 @@ set -eu -o pipefail core_json="$(curl -s --fail --location https://updates.jenkins.io/stable/update-center.actual.json | jq .core)" -oldVersion=$(nix-instantiate --eval -E "with import ./. {}; jenkins.version or (builtins.parseDrvName jenkins.name).version" | tr -d '"') +oldVersion=$(nix-instantiate --eval -E "with import ./. {}; lib.getVersion jenkins" | tr -d '"') version="$(jq -r .version <<<$core_json)" sha256="$(jq -r .sha256 <<<$core_json)" diff --git a/pkgs/development/tools/documentation/antora/default.nix b/pkgs/development/tools/documentation/antora/default.nix index 9f1aa037087..6427fa461dd 100644 --- a/pkgs/development/tools/documentation/antora/default.nix +++ b/pkgs/development/tools/documentation/antora/default.nix @@ -1,16 +1,15 @@ { stdenv, nodePackages_10_x }: let - drvName = drv: (builtins.parseDrvName drv).name; linkNodeDeps = ({ pkg, deps, name ? "" }: let - targetModule = if name != "" then name else drvName pkg; + targetModule = if name != "" then name else stdenv.lib.getName pkg; in nodePackages_10_x.${pkg}.override (oldAttrs: { postInstall = '' mkdir -p $out/lib/node_modules/${targetModule}/node_modules ${stdenv.lib.concatStringsSep "\n" (map (dep: '' - ln -s ${nodePackages_10_x.${dep}}/lib/node_modules/${drvName dep} \ - $out/lib/node_modules/${targetModule}/node_modules/${drvName dep} + ln -s ${nodePackages_10_x.${dep}}/lib/node_modules/${stdenv.lib.getName dep} \ + $out/lib/node_modules/${targetModule}/node_modules/${stdenv.lib.getName dep} '') deps )} ''; diff --git a/pkgs/misc/emulators/retroarch/wrapper.nix b/pkgs/misc/emulators/retroarch/wrapper.nix index 71ae168f1b2..08ebf8ea854 100644 --- a/pkgs/misc/emulators/retroarch/wrapper.nix +++ b/pkgs/misc/emulators/retroarch/wrapper.nix @@ -1,14 +1,8 @@ { stdenv, lib, makeWrapper, retroarch, cores }: -let - - p = builtins.parseDrvName retroarch.name; - -in - stdenv.mkDerivation { - name = "retroarch-" + p.version; - version = p.version; + pname = "retroarch"; + version = lib.getVersion retroarch; buildInputs = [ makeWrapper ]; diff --git a/pkgs/misc/emulators/wine/staging.nix b/pkgs/misc/emulators/wine/staging.nix index 5264e66279f..df979c68a47 100644 --- a/pkgs/misc/emulators/wine/staging.nix +++ b/pkgs/misc/emulators/wine/staging.nix @@ -5,7 +5,7 @@ with callPackage ./util.nix {}; let patch = (callPackage ./sources.nix {}).staging; build-inputs = pkgNames: extra: (mkBuildInputs wineUnstable.pkgArches pkgNames) ++ extra; -in assert (builtins.parseDrvName wineUnstable.name).version == patch.version; +in assert stdenv.lib.getVersion wineUnstable == patch.version; stdenv.lib.overrideDerivation wineUnstable (self: { buildInputs = build-inputs [ "perl" "utillinux" "autoconf" libtxc_dxtn_Name ] self.buildInputs; diff --git a/pkgs/misc/tmux-plugins/default.nix b/pkgs/misc/tmux-plugins/default.nix index 8d885cbf516..3c664ac0cf3 100644 --- a/pkgs/misc/tmux-plugins/default.nix +++ b/pkgs/misc/tmux-plugins/default.nix @@ -25,7 +25,7 @@ let addonInfo ? null, preInstall ? "", postInstall ? "", - path ? (builtins.parseDrvName pluginName).name, + path ? lib.getName pluginName, dependencies ? [], ... }: diff --git a/pkgs/misc/vim-plugins/build-vim-plugin.nix b/pkgs/misc/vim-plugins/build-vim-plugin.nix index b797f49df9e..4ca99b09af5 100644 --- a/pkgs/misc/vim-plugins/build-vim-plugin.nix +++ b/pkgs/misc/vim-plugins/build-vim-plugin.nix @@ -18,7 +18,7 @@ rec { buildPhase ? "", preInstall ? "", postInstall ? "", - path ? (builtins.parseDrvName name).name, + path ? stdenv.lib.getName name, addonInfo ? null, ... }: diff --git a/pkgs/os-specific/linux/prl-tools/default.nix b/pkgs/os-specific/linux/prl-tools/default.nix index 3daab3917e8..78aa5abdf30 100644 --- a/pkgs/os-specific/linux/prl-tools/default.nix +++ b/pkgs/os-specific/linux/prl-tools/default.nix @@ -8,7 +8,7 @@ assert (!libsOnly) -> kernel != null; # Disable for kernels 4.15 and above due to compatibility issues assert kernel != null -> stdenv.lib.versionOlder kernel.version "4.15"; -let xorgFullVer = (builtins.parseDrvName xorg.xorgserver.name).version; +let xorgFullVer = lib.getVersion xorg.xorgserver; xorgVer = lib.concatStringsSep "." (lib.take 2 (lib.splitString "." xorgFullVer)); x64 = if stdenv.hostPlatform.system == "x86_64-linux" then true else if stdenv.hostPlatform.system == "i686-linux" then false @@ -44,7 +44,7 @@ stdenv.mkDerivation rec { ( cd $sourceRoot/tools; tar -xaf prltools${if x64 then ".x64" else ""}.tar.gz ) ''; - kernelVersion = if libsOnly then "" else (builtins.parseDrvName kernel.name).version; + kernelVersion = if libsOnly then "" else lib.getName kernel.name; kernelDir = if libsOnly then "" else "${kernel.dev}/lib/modules/${kernelVersion}"; scriptPath = lib.concatStringsSep ":" (lib.optionals (!libsOnly) [ "${utillinux}/bin" "${gawk}/bin" ]); diff --git a/pkgs/servers/x11/xorg/overrides.nix b/pkgs/servers/x11/xorg/overrides.nix index 7e081b664b3..593afff2a07 100644 --- a/pkgs/servers/x11/xorg/overrides.nix +++ b/pkgs/servers/x11/xorg/overrides.nix @@ -520,7 +520,7 @@ self: super: xorgserver = with self; super.xorgserver.overrideAttrs (attrs_passed: # exchange attrs if abiCompat is set let - version = (builtins.parseDrvName attrs_passed.name).version; + version = lib.getVersion attrs_passed; attrs = if (abiCompat == null || lib.hasPrefix abiCompat version) then attrs_passed // { @@ -555,7 +555,7 @@ self: super: in attrs // (let - version = (builtins.parseDrvName attrs.name).version; + version = lib.getVersion attrs; commonBuildInputs = attrs.buildInputs ++ [ xtrans ]; commonPropagatedBuildInputs = [ zlib libGL libGLU dbus diff --git a/pkgs/shells/zsh/oh-my-zsh/update.sh b/pkgs/shells/zsh/oh-my-zsh/update.sh index 08b0daa4387..9567a2b6ae5 100755 --- a/pkgs/shells/zsh/oh-my-zsh/update.sh +++ b/pkgs/shells/zsh/oh-my-zsh/update.sh @@ -3,7 +3,7 @@ set -eu -o pipefail -oldVersion="$(nix-instantiate --eval -E "with import ./. {}; oh-my-zsh.version or (builtins.parseDrvName oh-my-zsh.name).version" | tr -d '"')" +oldVersion="$(nix-instantiate --eval -E "with import ./. {}; lib.getVersion oh-my-zsh" | tr -d '"')" latestSha="$(curl -L -s https://api.github.com/repos/robbyrussell/oh-my-zsh/commits\?sha\=master\&since\=${oldVersion} | jq -r '.[0].sha')" url="$(nix-instantiate --eval -E "with import ./. {}; oh-my-zsh.src.url" | tr -d '"')" diff --git a/pkgs/tools/audio/acoustid-fingerprinter/default.nix b/pkgs/tools/audio/acoustid-fingerprinter/default.nix index acd205a30de..7b92b973df4 100644 --- a/pkgs/tools/audio/acoustid-fingerprinter/default.nix +++ b/pkgs/tools/audio/acoustid-fingerprinter/default.nix @@ -13,7 +13,7 @@ stdenv.mkDerivation rec { nativeBuildInputs = [ pkgconfig ]; buildInputs = [ cmake qt4 taglib chromaprint ffmpeg ]; - cmakeFlags = [ "-DTAGLIB_MIN_VERSION=${(builtins.parseDrvName taglib.name).version}" ]; + cmakeFlags = [ "-DTAGLIB_MIN_VERSION=${stdenv.lib.getVersion taglib}" ]; patches = [ (fetchpatch { diff --git a/pkgs/tools/inputmethods/ibus/wrapper.nix b/pkgs/tools/inputmethods/ibus/wrapper.nix index 3196c5b4e8a..1b14629d283 100644 --- a/pkgs/tools/inputmethods/ibus/wrapper.nix +++ b/pkgs/tools/inputmethods/ibus/wrapper.nix @@ -3,7 +3,7 @@ }: let - name = "ibus-with-plugins-" + (builtins.parseDrvName ibus.name).version; + name = "ibus-with-plugins-" + stdenv.lib.getVersion ibus; env = { buildInputs = [ ibus ] ++ plugins; nativeBuildInputs = [ lndir makeWrapper ]; diff --git a/pkgs/tools/security/afl/libdislocator.nix b/pkgs/tools/security/afl/libdislocator.nix index 47e74573b81..415fa82f2ec 100644 --- a/pkgs/tools/security/afl/libdislocator.nix +++ b/pkgs/tools/security/afl/libdislocator.nix @@ -1,7 +1,7 @@ { stdenv, afl}: stdenv.mkDerivation { - version = (builtins.parseDrvName afl.name).version; + version = stdenv.lib.getVersion afl; pname = "libdislocator"; src = afl.src; diff --git a/pkgs/top-level/all-packages.nix b/pkgs/top-level/all-packages.nix index 9fe66cd96b3..9b9277c78a8 100644 --- a/pkgs/top-level/all-packages.nix +++ b/pkgs/top-level/all-packages.nix @@ -18327,8 +18327,8 @@ in firefox-bin = wrapFirefox firefox-bin-unwrapped { browserName = "firefox"; - name = "firefox-bin-" + - (builtins.parseDrvName firefox-bin-unwrapped.name).version; + pname = "firefox-bin"; + version = lib.getVersion firefox-bin-unwrapped; desktopName = "Firefox"; }; @@ -18341,8 +18341,8 @@ in firefox-beta-bin = res.wrapFirefox firefox-beta-bin-unwrapped { browserName = "firefox"; - name = "firefox-beta-bin-" + - (builtins.parseDrvName firefox-beta-bin-unwrapped.name).version; + pname = "firefox-beta-bin"; + version = lib.getVersion firefox-beta-bin-unwrapped; desktopName = "Firefox Beta"; }; @@ -18356,8 +18356,8 @@ in firefox-devedition-bin = res.wrapFirefox firefox-devedition-bin-unwrapped { browserName = "firefox"; nameSuffix = "-devedition"; - name = "firefox-devedition-bin-" + - (builtins.parseDrvName firefox-devedition-bin-unwrapped.name).version; + pname = "firefox-devedition-bin"; + version = lib.getVersion firefox-devedition-bin-unwrapped; desktopName = "Firefox DevEdition"; }; diff --git a/pkgs/top-level/lua-packages.nix b/pkgs/top-level/lua-packages.nix index c9e9305666e..9e51e373569 100644 --- a/pkgs/top-level/lua-packages.nix +++ b/pkgs/top-level/lua-packages.nix @@ -23,7 +23,7 @@ let isLua51 = (lib.versions.majorMinor lua.version) == "5.1"; isLua52 = (lib.versions.majorMinor lua.version) == "5.2"; isLua53 = lua.luaversion == "5.3"; - isLuaJIT = (builtins.parseDrvName lua.name).name == "luajit"; + isLuaJIT = lib.getName lua == "luajit"; lua-setup-hook = callPackage ../development/interpreters/lua-5/setup-hook.nix { }; From d34d84a61da7cf332e470b65ab05f2d995026090 Mon Sep 17 00:00:00 2001 From: John Ericson Date: Sun, 24 Nov 2019 17:27:45 +0000 Subject: [PATCH 52/61] firefox-wrapper: Get rid of name argument Only pname + version is supported now. (Both are still optional, however.) --- pkgs/applications/networking/browsers/firefox/wrapper.nix | 5 ++--- pkgs/top-level/all-packages.nix | 3 --- 2 files changed, 2 insertions(+), 6 deletions(-) diff --git a/pkgs/applications/networking/browsers/firefox/wrapper.nix b/pkgs/applications/networking/browsers/firefox/wrapper.nix index 69061cd0808..4901d694f49 100644 --- a/pkgs/applications/networking/browsers/firefox/wrapper.nix +++ b/pkgs/applications/networking/browsers/firefox/wrapper.nix @@ -19,9 +19,8 @@ browser: let wrapper = { browserName ? browser.browserName or (lib.getName browser) - , name ? browserName + "-" + lib.getVersion browser # TODO delete, it's just for compat - , pname ? lib.getName name - , version ? lib.getVersion name + , pname ? browserName + , version ? lib.getVersion browser , desktopName ? # browserName with first letter capitalized (lib.toUpper (lib.substring 0 1 browserName) + lib.substring 1 (-1) browserName) , nameSuffix ? "" diff --git a/pkgs/top-level/all-packages.nix b/pkgs/top-level/all-packages.nix index f4a3bcc0582..c973fe37fac 100644 --- a/pkgs/top-level/all-packages.nix +++ b/pkgs/top-level/all-packages.nix @@ -18867,7 +18867,6 @@ in firefox-bin = wrapFirefox firefox-bin-unwrapped { browserName = "firefox"; pname = "firefox-bin"; - version = lib.getVersion firefox-bin-unwrapped; desktopName = "Firefox"; }; @@ -18881,7 +18880,6 @@ in firefox-beta-bin = res.wrapFirefox firefox-beta-bin-unwrapped { browserName = "firefox"; pname = "firefox-beta-bin"; - version = lib.getVersion firefox-beta-bin-unwrapped; desktopName = "Firefox Beta"; }; @@ -18896,7 +18894,6 @@ in browserName = "firefox"; nameSuffix = "-devedition"; pname = "firefox-devedition-bin"; - version = lib.getVersion firefox-devedition-bin-unwrapped; desktopName = "Firefox DevEdition"; }; From 97baa2e21bcfad1c4e21333c31b6d12385b2e18e Mon Sep 17 00:00:00 2001 From: John Ericson Date: Sun, 24 Nov 2019 17:36:17 +0000 Subject: [PATCH 53/61] doc: Fix and clarify `allowInsecurePredicate` example I had made inbalanced parens. Remove unneeded parens for legibility too. --- doc/configuration.xml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/doc/configuration.xml b/doc/configuration.xml index 0d9786c2d6a..6720f54374a 100644 --- a/doc/configuration.xml +++ b/doc/configuration.xml @@ -272,7 +272,7 @@ very short names: { - allowInsecurePredicate = (pkg: (builtins.stringLength (lib.getName pkg) <= 5); + allowInsecurePredicate = pkg: builtins.stringLength (lib.getName pkg) <= 5; } From ca12e08caabcb9c4a0d55d0e5b8f50821b88db11 Mon Sep 17 00:00:00 2001 From: Florian Klink Date: Sun, 24 Nov 2019 01:10:17 +0100 Subject: [PATCH 54/61] nixosTests.bees: port to python --- nixos/tests/all-tests.nix | 1 + nixos/tests/bees.nix | 37 ++++++++++++++++++++++--------------- 2 files changed, 23 insertions(+), 15 deletions(-) diff --git a/nixos/tests/all-tests.nix b/nixos/tests/all-tests.nix index f1c3c7dcef3..3d5bc408c44 100644 --- a/nixos/tests/all-tests.nix +++ b/nixos/tests/all-tests.nix @@ -28,6 +28,7 @@ in babeld = handleTest ./babeld.nix {}; bcachefs = handleTestOn ["x86_64-linux"] ./bcachefs.nix {}; # linux-4.18.2018.10.12 is unsupported on aarch64 beanstalkd = handleTest ./beanstalkd.nix {}; + bees = handleTest ./bees.nix {}; bind = handleTest ./bind.nix {}; bittorrent = handleTest ./bittorrent.nix {}; #blivet = handleTest ./blivet.nix {}; # broken since 2017-07024 diff --git a/nixos/tests/bees.nix b/nixos/tests/bees.nix index 6f68c2f834f..6e6a9c3446b 100644 --- a/nixos/tests/bees.nix +++ b/nixos/tests/bees.nix @@ -1,4 +1,4 @@ -import ./make-test.nix ({ lib, ... }: +import ./make-test-python.nix ({ lib, pkgs, ... }: { name = "bees"; @@ -29,27 +29,34 @@ import ./make-test.nix ({ lib, ... }: testScript = let - withRetry = content: maxTests: sleepTime: '' - max_tests=${lib.escapeShellArg maxTests}; sleep_time=${lib.escapeShellArg sleepTime}; for ((i=0; i1 && $3 == 0 { count++ } END { print count }') -eq 0 ]] ''; - someContentIsShared = loc: ''[[ $(btrfs fi du -s --raw ${lib.escapeShellArg loc}/dedup-me-{1,2} | awk 'BEGIN { count=0; } NR>1 && $3 == 0 { count++ } END { print count }') -eq 0 ]]''; in '' # shut down the instance started by systemd at boot, so we can test our test procedure - $machine->succeed("systemctl stop beesd\@aux1.service"); + machine.succeed("systemctl stop beesd@aux1.service") - $machine->succeed("dd if=/dev/urandom of=/aux1/dedup-me-1 bs=1M count=8"); - $machine->succeed("cp --reflink=never /aux1/dedup-me-1 /aux1/dedup-me-2"); - $machine->succeed("cp --reflink=never /aux1/* /aux2/"); - $machine->succeed("sync"); - $machine->fail(q(${someContentIsShared "/aux1"})); - $machine->fail(q(${someContentIsShared "/aux2"})); - $machine->succeed("systemctl start beesd\@aux1.service"); + machine.succeed( + "dd if=/dev/urandom of=/aux1/dedup-me-1 bs=1M count=8", + "cp --reflink=never /aux1/dedup-me-1 /aux1/dedup-me-2", + "cp --reflink=never /aux1/* /aux2/", + "sync", + ) + machine.fail( + "${someContentIsShared "/aux1"}", + "${someContentIsShared "/aux2"}", + ) + machine.succeed("systemctl start beesd@aux1.service") # assert that "Set Shared" column is nonzero - $machine->succeed(q(${withRetry (someContentIsShared "/aux1") 20 2})); - $machine->fail(q(${someContentIsShared "/aux2"})); + machine.wait_until_succeeds( + "${someContentIsShared "/aux1"}", + ) + machine.fail("${someContentIsShared "/aux2"}") # assert that 16MB hash table size requested was honored - $machine->succeed(q([[ $(stat -c %s /aux1/.beeshome/beeshash.dat) = $(( 16 * 1024 * 1024)) ]])) + machine.succeed( + "[[ $(stat -c %s /aux1/.beeshome/beeshash.dat) = $(( 16 * 1024 * 1024)) ]]" + ) ''; }) From cd07c6dc87b93a0cae0ca5ad972e980d14a9250e Mon Sep 17 00:00:00 2001 From: rys ostrovid Date: Sun, 24 Nov 2019 18:55:22 +0100 Subject: [PATCH 55/61] lmms: fix qt5 * lmms: fix qt5 * lmms: implement better solution * lmms: limit platforms * lmms: add missing dependency --- pkgs/applications/audio/lmms/default.nix | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/pkgs/applications/audio/lmms/default.nix b/pkgs/applications/audio/lmms/default.nix index d22065eb9fe..99503fc3942 100644 --- a/pkgs/applications/audio/lmms/default.nix +++ b/pkgs/applications/audio/lmms/default.nix @@ -1,9 +1,9 @@ { stdenv, fetchFromGitHub, cmake, pkgconfig, alsaLib ? null, fftwFloat, fltk13 , fluidsynth_1 ? null, lame ? null, libgig ? null, libjack2 ? null, libpulseaudio ? null , libsamplerate, libsoundio ? null, libsndfile, libvorbis ? null, portaudio ? null -, qtbase, qtx11extras, qttools, SDL ? null }: +, qtbase, qtx11extras, qttools, SDL ? null, mkDerivation }: -stdenv.mkDerivation rec { +mkDerivation rec { pname = "lmms"; version = "1.2.0-rc7"; @@ -43,7 +43,7 @@ stdenv.mkDerivation rec { description = "DAW similar to FL Studio (music production software)"; homepage = https://lmms.io; license = licenses.gpl2Plus; - platforms = platforms.linux; + platforms = [ "x86_64-linux" "i686-linux" ]; maintainers = with maintainers; [ goibhniu yegortimoshenko ]; }; } From 4a0a297861dad089c08373822c5fa28556a2a089 Mon Sep 17 00:00:00 2001 From: John Ericson Date: Sun, 24 Nov 2019 17:57:06 +0000 Subject: [PATCH 56/61] bintools-wrapper: Fix version --- pkgs/build-support/bintools-wrapper/default.nix | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/pkgs/build-support/bintools-wrapper/default.nix b/pkgs/build-support/bintools-wrapper/default.nix index 2a039513d2f..5dddbde9eec 100644 --- a/pkgs/build-support/bintools-wrapper/default.nix +++ b/pkgs/build-support/bintools-wrapper/default.nix @@ -34,7 +34,7 @@ let targetPrefix = stdenv.lib.optionalString (targetPlatform != hostPlatform) (targetPlatform.config + "-"); - bintoolsVersion = stdenv.lib.getVersion version; + bintoolsVersion = stdenv.lib.getVersion bintools; bintoolsName = stdenv.lib.removePrefix targetPrefix (stdenv.lib.getName bintools); libc_bin = if libc == null then null else getBin libc; From 6acbcff8988834e04e07c5d8a92a72283013d7cb Mon Sep 17 00:00:00 2001 From: Roman Volosatovs Date: Fri, 15 Nov 2019 00:44:53 +0100 Subject: [PATCH 57/61] richgo: 0.2.8 -> 0.3.3 --- pkgs/development/tools/richgo/default.nix | 15 +++++++++------ 1 file changed, 9 insertions(+), 6 deletions(-) diff --git a/pkgs/development/tools/richgo/default.nix b/pkgs/development/tools/richgo/default.nix index 507402deed6..871ea0dc67a 100644 --- a/pkgs/development/tools/richgo/default.nix +++ b/pkgs/development/tools/richgo/default.nix @@ -1,21 +1,24 @@ -{ stdenv, buildGoPackage, fetchFromGitHub }: +{ stdenv, buildGoModule, fetchFromGitHub }: -buildGoPackage rec { +buildGoModule rec { pname = "richgo"; - version = "0.2.8"; - goPackagePath = "github.com/kyoh86/richgo"; + version = "0.3.3"; src = fetchFromGitHub { owner = "kyoh86"; repo = "richgo"; rev = "v${version}"; - sha256 = "0kbwl3a2gima23zmahk0jxp7wga91bs927a1rp5xl889ikng1n4j"; + sha256 = "07ipa54c4mzm6yizgvkm6x5yim1xgv3f0xdxg35qziacdfcwd6m4"; }; + modSha256 = "12wbjfqy6qnapm3f2pz1ci1gvc0y8kzr8c99kihyh1jv9r3zy1wz"; + + subPackages = [ "." ]; + meta = with stdenv.lib; { description = "Enrich `go test` outputs with text decorations."; homepage = https://github.com/kyoh86/richgo; - license = licenses.unlicense; # NOTE: The project switched to MIT in https://git.io/fA1ik + license = licenses.mit; maintainers = with maintainers; [ rvolosatovs ]; }; } From d576af35614039a802dbbfd0aa63d94570cbcb49 Mon Sep 17 00:00:00 2001 From: Adithya Kumar Date: Fri, 22 Nov 2019 23:48:07 +0000 Subject: [PATCH 58/61] vimPlugins: Update --- pkgs/misc/vim-plugins/generated.nix | 162 ++++++++++++++-------------- 1 file changed, 81 insertions(+), 81 deletions(-) diff --git a/pkgs/misc/vim-plugins/generated.nix b/pkgs/misc/vim-plugins/generated.nix index ced786abeee..645f7a49bd3 100644 --- a/pkgs/misc/vim-plugins/generated.nix +++ b/pkgs/misc/vim-plugins/generated.nix @@ -457,12 +457,12 @@ let coc-python = buildVimPluginFrom2Nix { pname = "coc-python"; - version = "2019-11-07"; + version = "2019-11-21"; src = fetchFromGitHub { owner = "neoclide"; repo = "coc-python"; - rev = "01cf6f3833d44fb83c38655b496212625329c90b"; - sha256 = "0vn9fjhhlgciv7kwda4hn2lg7fisxgdsg47sbqz75qirnixw8mjv"; + rev = "756c9f623f6a82ad902e2bdfe3f0c77fba96c18e"; + sha256 = "1fab8bzj386zkgn7551l58q4ykqakjbx92afx30i1861y8m1a4p1"; }; }; @@ -567,12 +567,12 @@ let coc-tsserver = buildVimPluginFrom2Nix { pname = "coc-tsserver"; - version = "2019-11-13"; + version = "2019-11-20"; src = fetchFromGitHub { owner = "neoclide"; repo = "coc-tsserver"; - rev = "3d537937a6ce74cdf08d3109dc14af9baeff9af7"; - sha256 = "1nfnlirdb91x835hk2h30vnjc940mnw94p2wgp28p80mcbrk4s4v"; + rev = "d48cc4a31217af3e0d2fa91159972ea7a9575b21"; + sha256 = "0zmzyqp8nw99ajzxr8469yfm9zgi53zggxsp6k6b9m6x8c9rqly9"; }; }; @@ -843,23 +843,23 @@ let denite-nvim = buildVimPluginFrom2Nix { pname = "denite-nvim"; - version = "2019-11-18"; + version = "2019-11-19"; src = fetchFromGitHub { owner = "Shougo"; repo = "denite.nvim"; - rev = "2f8e00266f2958a02eb870b69f4ab0ef1d91c022"; - sha256 = "1n5h1ys0pb3lfg7zbyfdkshcy05kxd7f4d81qcr69k7n1ni44fvq"; + rev = "7712a251e172b2dc6a41d36504c0392797484ab1"; + sha256 = "0n696hjri23s9janar3k9la85apzl5kn51jgrjjf3p9xbx8h3ljk"; }; }; deol-nvim = buildVimPluginFrom2Nix { pname = "deol-nvim"; - version = "2019-09-08"; + version = "2019-11-22"; src = fetchFromGitHub { owner = "Shougo"; repo = "deol.nvim"; - rev = "474b72a8541e529a1628084c277e6e0aa7f80fda"; - sha256 = "00kwij67csk9yp64r8lfrc9m0jm5mqckf4c9a3489azfjn8da097"; + rev = "6457c49bb90ea955755c6a47a561f04312a28ed8"; + sha256 = "0bmw6xw0qa25dix4lp82447w3ffl49vf431wz90j6xa0swaxifkj"; }; }; @@ -934,12 +934,12 @@ let deoplete-lsp = buildVimPluginFrom2Nix { pname = "deoplete-lsp"; - version = "2019-09-20"; + version = "2019-11-21"; src = fetchFromGitHub { owner = "Shougo"; repo = "deoplete-lsp"; - rev = "335e8a03d5741aa42bd7ce64d79e31d7de570ab5"; - sha256 = "0jn4fn9vkxf3av6mdmzixz20l9ca8n2sql7j9mcmh06mn86949bs"; + rev = "44185b8c477b1ba5a299f157569f842a5f2ed1ec"; + sha256 = "0y7ibagw5hj10qjrkqa8vq1a0h50xdnrirz2lnpyy8wyk9l5l2lc"; }; }; @@ -967,23 +967,23 @@ let deoplete-ternjs = buildVimPluginFrom2Nix { pname = "deoplete-ternjs"; - version = "2019-09-22"; + version = "2019-11-22"; src = fetchFromGitHub { owner = "carlitux"; repo = "deoplete-ternjs"; - rev = "307f9c3beb178026d122d9ab3825e4640dd1c29a"; - sha256 = "039qbcg9fanrs7dc52n987rhd0xdyvsmjdrfd1dcrr6ys990n64d"; + rev = "ca0ee77276bc688f847b566d64b32e4bb62691d8"; + sha256 = "0980fwr931dqyp032gcg4mwk2iv3inywa8w3m73zcr082xc0crp7"; }; }; deoplete-nvim = buildVimPluginFrom2Nix { pname = "deoplete-nvim"; - version = "2019-11-17"; + version = "2019-11-20"; src = fetchFromGitHub { owner = "Shougo"; repo = "deoplete.nvim"; - rev = "edbc7b721e45f1eaa9e1ebe695f4f363f14a7a67"; - sha256 = "1l33wxdsyvhksnbkv1k924qvgdy9s3rksmqsa1yv7zrssl8xdmjn"; + rev = "57cf7710a8dd51797bbbe5a45e67aef44caa126f"; + sha256 = "1wmlx2nx3bciv9mhws04ryix0sp33j945mn09cm8vvipbq0bk2q2"; }; }; @@ -1598,23 +1598,23 @@ let lh-brackets = buildVimPluginFrom2Nix { pname = "lh-brackets"; - version = "2019-11-16"; + version = "2019-11-22"; src = fetchFromGitHub { owner = "LucHermitte"; repo = "lh-brackets"; - rev = "941444938a7effce57ddd2706f6fd2455d74a8c5"; - sha256 = "1pkpjz0j2n1b1qdbmp4lj43qk2ddr55001yjg6cpznsl7b8rq095"; + rev = "88548effe90b6b980e1320656231eaff57952d83"; + sha256 = "1xmsmvkbxqh0ib30qzkk5km5mjdr4f64mxll79x2x0wn8ldwjz9g"; }; }; lh-vim-lib = buildVimPluginFrom2Nix { pname = "lh-vim-lib"; - version = "2019-11-15"; + version = "2019-11-22"; src = fetchFromGitHub { owner = "LucHermitte"; repo = "lh-vim-lib"; - rev = "76432c08d570a30f6d2d4c246756a3eb6e898ee3"; - sha256 = "1wwr5yjvzv1xc0f5qbjfqclrpvx9vnrg8dkybf95lwgp9a8v7xxv"; + rev = "ae9d7cf976143a43af11d350ca3406733549b883"; + sha256 = "1jziwz9mp6jsfd0jkvj4s6n4fw1kg0zgbd5j5rjz2jgp1akqnz2l"; }; }; @@ -1730,12 +1730,12 @@ let ncm2-jedi = buildVimPluginFrom2Nix { pname = "ncm2-jedi"; - version = "2019-06-07"; + version = "2019-11-19"; src = fetchFromGitHub { owner = "ncm2"; repo = "ncm2-jedi"; - rev = "86744a7641ce11e22d01778c310e5015f85ef412"; - sha256 = "16h17cqy76iwd9b3wsmmzjg6j465mjd5kjybmk6dilxmq07q24c9"; + rev = "b28bf6d054051cc1c7a6b148323d3adb9baa4ed5"; + sha256 = "07pq8akzvlb8hzksgxx1c50j09ia0xnszq1f83x75kqsjg5f6nhy"; }; }; @@ -1785,12 +1785,12 @@ let neco-look = buildVimPluginFrom2Nix { pname = "neco-look"; - version = "2018-11-09"; + version = "2019-11-19"; src = fetchFromGitHub { owner = "ujihisa"; repo = "neco-look"; - rev = "8c3951acb93b72dda4572859928ef7b372485596"; - sha256 = "1gd692yc1x3753rxg58hwc7nwmm4rjr03y1xaczy1qahq1bm9a40"; + rev = "4d7f1fd7e406c302fba2a1358017c5a76d0f9fc1"; + sha256 = "1brvzg15ni5j60wncpvxhs5k36wz83lhvfcnvja2l9yrngcgh6vr"; }; }; @@ -1972,12 +1972,12 @@ let nerdtree = buildVimPluginFrom2Nix { pname = "nerdtree"; - version = "2019-11-13"; + version = "2019-11-22"; src = fetchFromGitHub { owner = "scrooloose"; repo = "nerdtree"; - rev = "8d9b8dae67c5a6affbfd0304e0949ce9e79065ea"; - sha256 = "1jgjw0lm1znf530mfa9iniwb3j35hpgz49ccykg5q6lrbscchc7h"; + rev = "82b1649f2e1c79ff17730fe0a3750bbec203dd29"; + sha256 = "07viagjyd5bdnal7m6k0yschdnr2yxmxcg7zlgz7s7inn80blv79"; }; }; @@ -2566,12 +2566,12 @@ let syntastic = buildVimPluginFrom2Nix { pname = "syntastic"; - version = "2019-10-23"; + version = "2019-11-20"; src = fetchFromGitHub { owner = "scrooloose"; repo = "syntastic"; - rev = "28bb72adbe5c610bdc07407ddb83898919e4645c"; - sha256 = "1hhpd01vc9377fvqdh30pqack0i0sxxz2qdzz2i6x4snabga2zqj"; + rev = "39b35b23b952d620b8ec7cabb13110f586663837"; + sha256 = "1nc3019c969ms6m0hrj5k1kggcvsywn6j7kz0scdwzvfd6bcla6h"; }; }; @@ -2765,12 +2765,12 @@ let ultisnips = buildVimPluginFrom2Nix { pname = "ultisnips"; - version = "2019-11-13"; + version = "2019-11-19"; src = fetchFromGitHub { owner = "SirVer"; repo = "ultisnips"; - rev = "f7b9b3b1100b3b2883ed2d0ac3627708a10dc469"; - sha256 = "08g1h9ra807d19rhaf5l6g7pryq07cyy4g1ab0ycwyb0whlr6m57"; + rev = "c309637e0243b71f7e3265ebe3cffdfe9674cfbc"; + sha256 = "1q2miwd56k2l7lfwmw3khqnfry9izaca91dcf32p0xp06bc3ah28"; }; }; @@ -3084,23 +3084,23 @@ let vim-airline = buildVimPluginFrom2Nix { pname = "vim-airline"; - version = "2019-11-15"; + version = "2019-11-21"; src = fetchFromGitHub { owner = "vim-airline"; repo = "vim-airline"; - rev = "29549aa55a5f20317eb63b8cd0c08c68a1336f3e"; - sha256 = "1z2chmvxqq5s7a9qjam9j46m7dyfh80z62411swlc9py4aqm91ci"; + rev = "b9eb94120133a3be4cee77e9bedf68c4200f4b04"; + sha256 = "0x9z67i8g4p6iik110nfcnsdpny74gi6arx2yvwssa6vzdv2rh9f"; }; }; vim-airline-themes = buildVimPluginFrom2Nix { pname = "vim-airline-themes"; - version = "2019-10-31"; + version = "2019-11-21"; src = fetchFromGitHub { owner = "vim-airline"; repo = "vim-airline-themes"; - rev = "650701f08fa49abca607f5a69ddf0a8157bcd8cf"; - sha256 = "0kk21x1g27gsy29ikfh8iayjgnm7vs2zllgwglqfjmlqvkqajmr0"; + rev = "935dffc6ff96f7282db93e40e024c942056aedaa"; + sha256 = "0mx3w41sxvrvk4n4sv1zswlnxmkk93wy9wmc1gmc70yrd9q9jfbx"; }; }; @@ -3271,12 +3271,12 @@ let vim-codefmt = buildVimPluginFrom2Nix { pname = "vim-codefmt"; - version = "2019-08-14"; + version = "2019-11-20"; src = fetchFromGitHub { owner = "google"; repo = "vim-codefmt"; - rev = "18f47c3ac563b60f71103b1e1d29b349ff9d8549"; - sha256 = "0z36jjj1bxb4xz9lyjrbv769797g3x475ncamflfj6yj72vvhfy4"; + rev = "dae6dd82a98eda68af83a1f725cc570ef3b1ae7d"; + sha256 = "0w2djjs29dgd5jcfglvgb4mb60vb1bj34mxzbx2sidp3lb15xn4y"; }; }; @@ -3733,12 +3733,12 @@ let vim-gitgutter = buildVimPluginFrom2Nix { pname = "vim-gitgutter"; - version = "2019-10-24"; + version = "2019-11-22"; src = fetchFromGitHub { owner = "airblade"; repo = "vim-gitgutter"; - rev = "af20a9fcfff9b5277fc8482e802c4dec291ea589"; - sha256 = "0jakfv1b1kc8mq1izj7bzd83d55z38igl7xl1c7n1vb9m2dy0nn3"; + rev = "fa8d0feb4103f15b97e2abb4e76cbaaf03495d1d"; + sha256 = "0ki46g0xl6gn75hh9p13any17x5v703bc86ya2nfqwyp2w0gapyg"; }; }; @@ -3766,12 +3766,12 @@ let vim-go = buildVimPluginFrom2Nix { pname = "vim-go"; - version = "2019-11-18"; + version = "2019-11-20"; src = fetchFromGitHub { owner = "fatih"; repo = "vim-go"; - rev = "6d9cabbfa2ed92ef764f87041b60fcab010f7bc7"; - sha256 = "0621mh4vh92dp4jhcklgghppncbvpbzzwx9xpxs7b6917hmsxp8g"; + rev = "d4a9cc72469927202fadf14600253a35240c993e"; + sha256 = "061qzzldh796lagnk1blpkvx5f55rc8h7vgzgffxg9dhc73my5a3"; }; }; @@ -3788,12 +3788,12 @@ let vim-grepper = buildVimPluginFrom2Nix { pname = "vim-grepper"; - version = "2019-10-09"; + version = "2019-11-19"; src = fetchFromGitHub { owner = "mhinz"; repo = "vim-grepper"; - rev = "8b783474b64fa01b813f9c4a24f240c7c3378726"; - sha256 = "1mrqdg0hq4gvzng959dk6hbgh19sxzgg959i6k39c7phdd1f1fm9"; + rev = "d8fa51d4fa99221511dc8b9e2eb1cba23a9b0c20"; + sha256 = "1wb4g5g1phixqwpj9nd261f690ziimy80w12pjivrik20bj17ipd"; }; }; @@ -3953,12 +3953,12 @@ let vim-illuminate = buildVimPluginFrom2Nix { pname = "vim-illuminate"; - version = "2019-08-04"; + version = "2019-11-21"; src = fetchFromGitHub { owner = "RRethy"; repo = "vim-illuminate"; - rev = "0c37ddf0dfbe069b9f2cf1d4a341efe7b373f133"; - sha256 = "11zjm9a6x57s5rs080p1gcj86l01765ayn3k9yx6mx8d48n8zr3k"; + rev = "4929d19cc8483d9d9872cb3669915e6a8cc381a2"; + sha256 = "1rbhnmqrw8gdpf60lx4akhadz3q80fykal1a9c4mnn5nrqymv9va"; }; }; @@ -4130,12 +4130,12 @@ let vim-jsx-pretty = buildVimPluginFrom2Nix { pname = "vim-jsx-pretty"; - version = "2019-11-18"; + version = "2019-11-19"; src = fetchFromGitHub { owner = "MaxMEllon"; repo = "vim-jsx-pretty"; - rev = "70586430c0f05c91ed2832db2c65769501978d94"; - sha256 = "1b2qssdzc0b7pzr1ws86zybvwnwby987xsa7sfizsjqslb14xw4w"; + rev = "8b96cea873612b35ddfd7aef4b6c21f991103f0f"; + sha256 = "18ilra7s29jl7k3nda2z3r7bvixk5b8bbfn9d3nvfz7l26n8s6i6"; }; }; @@ -4493,12 +4493,12 @@ let vim-pandoc = buildVimPluginFrom2Nix { pname = "vim-pandoc"; - version = "2019-11-07"; + version = "2019-11-22"; src = fetchFromGitHub { owner = "vim-pandoc"; repo = "vim-pandoc"; - rev = "9275cdb54b55eda88f3f0066783ea72410ccf678"; - sha256 = "0532bq9667dfz79fg4blrzc6d9y1cz2xr5h7jda3psrj27adrlxk"; + rev = "524d05885d0fdd176d3da06fd2befff9a22353e2"; + sha256 = "1ngsqyjcsav3k2dcr4anhdm5ycnlfiwykqx3v15ds3j2prsn9hkd"; }; }; @@ -4570,12 +4570,12 @@ let vim-pencil = buildVimPluginFrom2Nix { pname = "vim-pencil"; - version = "2019-11-16"; + version = "2019-11-22"; src = fetchFromGitHub { owner = "reedes"; repo = "vim-pencil"; - rev = "236380f1afcc1df10ae78cbf2c6e958d29183eaa"; - sha256 = "1yxc03pmf0wr104mxy2ssln16jm3kkylivmhh47jk5iv2xw8i38q"; + rev = "9aead49ecfd0640e07fdf30fb149dc7d072051eb"; + sha256 = "189mqxsawdpb68vs9gpkh6flm00m3zhh744awwjd433dhyhz07fx"; }; }; @@ -5351,12 +5351,12 @@ let vim-wordy = buildVimPluginFrom2Nix { pname = "vim-wordy"; - version = "2019-08-29"; + version = "2019-11-22"; src = fetchFromGitHub { owner = "reedes"; repo = "vim-wordy"; - rev = "87a77cb293ed1193c01e0f93c4dd70cddde76b08"; - sha256 = "19wvm1al41ys429rb2agb7d3xfv1kh2287r8sgiy1f6whjn236z6"; + rev = "f0391713fa83771d64b065868331ef4754d861ed"; + sha256 = "0v5cl3rrg2vrdb2al67hbh730rw8m2zvhb1vippv64k65mknkgp5"; }; }; @@ -5494,12 +5494,12 @@ let vimtex = buildVimPluginFrom2Nix { pname = "vimtex"; - version = "2019-11-18"; + version = "2019-11-19"; src = fetchFromGitHub { owner = "lervag"; repo = "vimtex"; - rev = "e555f48c131088fd66a9f7822c24e6edba8bfd03"; - sha256 = "1l3a6isf4r46yn8kawlm11b5i1vpdpdnbwfi8kch7z90j7dmwlg6"; + rev = "ed45b8b8ff5a61f05dea081d3eae98dcaee28857"; + sha256 = "1sd1315lg6sxydvwhk58kyp5hhdbrzqvkfgy0hvpy7c5h1rlfcjm"; }; }; @@ -5649,12 +5649,12 @@ let youcompleteme = buildVimPluginFrom2Nix { pname = "youcompleteme"; - version = "2019-11-18"; + version = "2019-11-19"; src = fetchFromGitHub { owner = "valloric"; repo = "youcompleteme"; - rev = "25fbeadba44be998667ba47a1bce16219d01148c"; - sha256 = "02hl0gyx189q6k3z9dvnwpgn5sw76rz4j9y0hrj8yqzaqk7xv7fw"; + rev = "a7fd70cf7213c75088a47967c3e28aa4f6c47872"; + sha256 = "0knn6j85k6rpis3riv6j9nvxw7114ddz1fr1p6ayv4mhnyj669rc"; fetchSubmodules = true; }; }; From a067458d6529828c837207819856516876779c85 Mon Sep 17 00:00:00 2001 From: Adithya Kumar Date: Fri, 22 Nov 2019 23:53:18 +0000 Subject: [PATCH 59/61] vimPlugins.vimagit: init at 2019-07-24 --- pkgs/misc/vim-plugins/generated.nix | 11 +++++++++++ pkgs/misc/vim-plugins/vim-plugin-names | 1 + 2 files changed, 12 insertions(+) diff --git a/pkgs/misc/vim-plugins/generated.nix b/pkgs/misc/vim-plugins/generated.nix index 645f7a49bd3..12bdf40d326 100644 --- a/pkgs/misc/vim-plugins/generated.nix +++ b/pkgs/misc/vim-plugins/generated.nix @@ -5415,6 +5415,17 @@ let }; }; + vimagit = buildVimPluginFrom2Nix { + pname = "vimagit"; + version = "2019-07-24"; + src = fetchFromGitHub { + owner = "jreybert"; + repo = "vimagit"; + rev = "94762b1356ebdcb8ec486a86f45e69ef77a69465"; + sha256 = "1p8izqdkx8g1aqmq9a2qm506bs4mvc4xdbzkh2k5xprm5vc14z0s"; + }; + }; + vimelette = buildVimPluginFrom2Nix { pname = "vimelette"; version = "2019-05-02"; diff --git a/pkgs/misc/vim-plugins/vim-plugin-names b/pkgs/misc/vim-plugins/vim-plugin-names index 433458b66d0..263f2d2b5dd 100644 --- a/pkgs/misc/vim-plugins/vim-plugin-names +++ b/pkgs/misc/vim-plugins/vim-plugin-names @@ -156,6 +156,7 @@ jonsmithers/vim-html-template-literals joonty/vim-xdebug josa42/coc-go jpalardy/vim-slime +jreybert/vimagit JuliaEditorSupport/deoplete-julia JuliaEditorSupport/julia-vim Julian/vim-textobj-variable-segment From 9d208a6af179a89b4ad7f4b7d5a67eb5e4729814 Mon Sep 17 00:00:00 2001 From: Herwig Hochleitner Date: Thu, 21 Nov 2019 09:51:18 +0100 Subject: [PATCH 60/61] anbox: 2019-05-03 -> 2019-11-15 --- pkgs/os-specific/linux/anbox/default.nix | 6 +++--- pkgs/os-specific/linux/anbox/kmod.nix | 6 +++--- 2 files changed, 6 insertions(+), 6 deletions(-) diff --git a/pkgs/os-specific/linux/anbox/default.nix b/pkgs/os-specific/linux/anbox/default.nix index 755ec390a9c..0012c3de989 100644 --- a/pkgs/os-specific/linux/anbox/default.nix +++ b/pkgs/os-specific/linux/anbox/default.nix @@ -45,13 +45,13 @@ in stdenv.mkDerivation rec { pname = "anbox"; - version = "unstable-2019-05-03"; + version = "unstable-2019-11-15"; src = fetchFromGitHub { owner = pname; repo = pname; - rev = "ea2b7a3dea34a6803134f4adc16c276f4c2479eb"; - sha256 = "00x772nbrbx7ma0scr24m65g50pmi4v6d6q3cwbbi55r8qiy2yz7"; + rev = "0a49ae08f76de7f886a3dbed4422711c2fa39d10"; + sha256 = "09l56nv9cnyhykclfmvam6bkcxlamwbql6nrz9n022553w92hkjf"; }; nativeBuildInputs = [ diff --git a/pkgs/os-specific/linux/anbox/kmod.nix b/pkgs/os-specific/linux/anbox/kmod.nix index fee8d1e7a42..0888f2c5414 100644 --- a/pkgs/os-specific/linux/anbox/kmod.nix +++ b/pkgs/os-specific/linux/anbox/kmod.nix @@ -2,13 +2,13 @@ stdenv.mkDerivation { pname = "anbox-modules"; - version = "2019-07-13-" + kernel.version; + version = "2019-11-15-" + kernel.version; src = fetchFromGitHub { owner = "anbox"; repo = "anbox-modules"; - rev = "816dd4d6e702cf77a44cfe208659af6c39e02b57"; - sha256 = "115xrv3fz5bk51hz8cwb61h0xnrsnv217fxmbpw35a6hjrk7gslc"; + rev = "e0a237e571989987806b32881044c539db25e3e1"; + sha256 = "1km1nslp4f5znwskh4bb1b61r1inw1dlbwiyyq3rrh0f0agf8d0v"; }; nativeBuildInputs = kernel.moduleBuildDependencies; From a52d7674cc7bdf5fbccf1d273fadc58f008c839e Mon Sep 17 00:00:00 2001 From: Herwig Hochleitner Date: Fri, 22 Nov 2019 10:51:56 +0100 Subject: [PATCH 61/61] chromium: update vaapi patch https://github.com/NixOS/nixpkgs/issues/73878 --- .../networking/browsers/chromium/common.nix | 4 +- .../chromium/patches/chromium-vaapi.patch | 117 ------------------ .../browsers/chromium/patches/vaapi-fix.patch | 54 ++++++++ 3 files changed, 56 insertions(+), 119 deletions(-) delete mode 100644 pkgs/applications/networking/browsers/chromium/patches/chromium-vaapi.patch create mode 100644 pkgs/applications/networking/browsers/chromium/patches/vaapi-fix.patch diff --git a/pkgs/applications/networking/browsers/chromium/common.nix b/pkgs/applications/networking/browsers/chromium/common.nix index 3f7782bb919..aff4d54c620 100644 --- a/pkgs/applications/networking/browsers/chromium/common.nix +++ b/pkgs/applications/networking/browsers/chromium/common.nix @@ -150,8 +150,8 @@ let # ++ optionals (channel == "dev") [ ( githubPatch "" "0000000000000000000000000000000000000000000000000000000000000000" ) ] # ++ optional (versionRange "68" "72") ( githubPatch "" "0000000000000000000000000000000000000000000000000000000000000000" ) ] ++ optionals (useVaapi) [ - # source: https://aur.archlinux.org/cgit/aur.git/plain/chromium-vaapi.patch?h=chromium-vaapi - ./patches/chromium-vaapi.patch + # source: https://aur.archlinux.org/cgit/aur.git/tree/vaapi-fix.patch?h=chromium-vaapi + ./patches/vaapi-fix.patch ] ++ optional stdenv.isAarch64 (fetchpatch { url = https://raw.githubusercontent.com/OSSystems/meta-browser/e4a667deaaf9a26a3a1aeb355770d1f29da549ad/recipes-browser/chromium/files/aarch64-skia-build-fix.patch; postFetch = "substituteInPlace $out --replace __aarch64__ SK_CPU_ARM64"; diff --git a/pkgs/applications/networking/browsers/chromium/patches/chromium-vaapi.patch b/pkgs/applications/networking/browsers/chromium/patches/chromium-vaapi.patch deleted file mode 100644 index 38d77e21551..00000000000 --- a/pkgs/applications/networking/browsers/chromium/patches/chromium-vaapi.patch +++ /dev/null @@ -1,117 +0,0 @@ -From abc7295ca1653c85472916909f0eb76e28e79a58 Mon Sep 17 00:00:00 2001 -From: Akarshan Biswas -Date: Thu, 24 Jan 2019 12:45:29 +0530 -Subject: [PATCH] Enable mojo with VDA2 on Linux - ---- - chrome/browser/about_flags.cc | 8 ++++---- - chrome/browser/flag_descriptions.cc | 9 +++++++-- - chrome/browser/flag_descriptions.h | 10 ++++++++-- - gpu/config/software_rendering_list.json | 3 ++- - media/media_options.gni | 9 ++++++--- - media/mojo/services/gpu_mojo_media_client.cc | 4 ++-- - 6 files changed, 29 insertions(+), 14 deletions(-) - -diff --git a/chrome/browser/about_flags.cc b/chrome/browser/about_flags.cc -index 0a84c6ac1..be2aa1d8b 100644 ---- a/chrome/browser/about_flags.cc -+++ b/chrome/browser/about_flags.cc -@@ -1714,7 +1714,7 @@ const FeatureEntry kFeatureEntries[] = { - "disable-accelerated-video-decode", - flag_descriptions::kAcceleratedVideoDecodeName, - flag_descriptions::kAcceleratedVideoDecodeDescription, -- kOsMac | kOsWin | kOsCrOS | kOsAndroid, -+ kOsMac | kOsWin | kOsCrOS | kOsAndroid | kOsLinux, - SINGLE_DISABLE_VALUE_TYPE(switches::kDisableAcceleratedVideoDecode), - }, - #if defined(OS_WIN) -@@ -2345,12 +2345,12 @@ const FeatureEntry kFeatureEntries[] = { - FEATURE_VALUE_TYPE(service_manager::features::kXRSandbox)}, - #endif // ENABLE_ISOLATED_XR_SERVICE - #endif // ENABLE_VR --#if defined(OS_CHROMEOS) -+#if defined(OS_CHROMEOS) || defined(OS_LINUX) - {"disable-accelerated-mjpeg-decode", - flag_descriptions::kAcceleratedMjpegDecodeName, -- flag_descriptions::kAcceleratedMjpegDecodeDescription, kOsCrOS, -+ flag_descriptions::kAcceleratedMjpegDecodeDescription, kOsCrOS | kOsLinux, - SINGLE_DISABLE_VALUE_TYPE(switches::kDisableAcceleratedMjpegDecode)}, --#endif // OS_CHROMEOS -+#endif // OS_CHROMEOS // OS_LINUX - {"v8-cache-options", flag_descriptions::kV8CacheOptionsName, - flag_descriptions::kV8CacheOptionsDescription, kOsAll, - MULTI_VALUE_TYPE(kV8CacheOptionsChoices)}, -diff --git a/chrome/browser/flag_descriptions.cc b/chrome/browser/flag_descriptions.cc -index 62637e092..86f89fc6e 100644 ---- a/chrome/browser/flag_descriptions.cc -+++ b/chrome/browser/flag_descriptions.cc -@@ -3085,15 +3085,20 @@ const char kTextSuggestionsTouchBarDescription[] = - - #endif - --// Chrome OS ------------------------------------------------------------------- -+// Chrome OS Linux------------------------------------------------------------------- - --#if defined(OS_CHROMEOS) -+#if defined(OS_CHROMEOS) || (defined(OS_LINUX) && !defined(OS_ANDROID)) - - const char kAcceleratedMjpegDecodeName[] = - "Hardware-accelerated mjpeg decode for captured frame"; - const char kAcceleratedMjpegDecodeDescription[] = - "Enable hardware-accelerated mjpeg decode for captured frame where " - "available."; -+#endif -+ -+// Chrome OS -------------------------------------------------- -+ -+#if defined(OS_CHROMEOS) - - const char kAllowTouchpadThreeFingerClickName[] = "Touchpad three-finger-click"; - const char kAllowTouchpadThreeFingerClickDescription[] = -diff --git a/chrome/browser/flag_descriptions.h b/chrome/browser/flag_descriptions.h -index 5dac660bb..6cc4115da 100644 ---- a/chrome/browser/flag_descriptions.h -+++ b/chrome/browser/flag_descriptions.h -@@ -1846,13 +1846,19 @@ extern const char kPermissionPromptPersistenceToggleDescription[]; - - #endif // defined(OS_MACOSX) - --// Chrome OS ------------------------------------------------------------------ -+// Chrome OS and Linux ------------------------------------------------------------------ - --#if defined(OS_CHROMEOS) -+#if defined(OS_CHROMEOS) || (defined(OS_LINUX) && !defined(OS_ANDROID)) - - extern const char kAcceleratedMjpegDecodeName[]; - extern const char kAcceleratedMjpegDecodeDescription[]; - -+#endif // defined(OS_CHROMEOS) || (defined(OS_LINUX) && !defined(OS_ANDROID)) -+ -+// Chrome OS ------------------------------------------------------------------------ -+ -+#if defined(OS_CHROMEOS) -+ - extern const char kAllowTouchpadThreeFingerClickName[]; - extern const char kAllowTouchpadThreeFingerClickDescription[]; - -diff --git a/gpu/config/software_rendering_list.json b/gpu/config/software_rendering_list.json -index 65f37b3f1..ae8a1718f 100644 ---- a/gpu/config/software_rendering_list.json -+++ b/gpu/config/software_rendering_list.json -@@ -371,11 +371,12 @@ - }, - { - "id": 48, -- "description": "Accelerated video decode is unavailable on Linux", -+ "description": "Accelerated VA-API video decode is not supported on NVIDIA platforms", - "cr_bugs": [137247], - "os": { - "type": "linux" - }, -+ "vendor_id": "0x10de", - "features": [ - "accelerated_video_decode" - ] --- -2.20.1 - diff --git a/pkgs/applications/networking/browsers/chromium/patches/vaapi-fix.patch b/pkgs/applications/networking/browsers/chromium/patches/vaapi-fix.patch new file mode 100644 index 00000000000..db9d6082756 --- /dev/null +++ b/pkgs/applications/networking/browsers/chromium/patches/vaapi-fix.patch @@ -0,0 +1,54 @@ +--- a/media/gpu/vaapi/vaapi_video_decode_accelerator.cc ++++ b/media/gpu/vaapi/vaapi_video_decode_accelerator.cc +@@ -635,6 +635,7 @@ + // |vpp_vaapi_wrapper_| for VaapiPicture to DownloadFromSurface() the VA's + // internal decoded frame. + if (buffer_allocation_mode_ != BufferAllocationMode::kNone && ++ buffer_allocation_mode_ != BufferAllocationMode::kWrapVdpau && + !vpp_vaapi_wrapper_) { + vpp_vaapi_wrapper_ = VaapiWrapper::Create( + VaapiWrapper::kVideoProcess, VAProfileNone, +@@ -650,7 +651,8 @@ + // only used as a copy destination. Therefore, the VaapiWrapper used and + // owned by |picture| is |vpp_vaapi_wrapper_|. + std::unique_ptr picture = vaapi_picture_factory_->Create( +- (buffer_allocation_mode_ == BufferAllocationMode::kNone) ++ ((buffer_allocation_mode_ == BufferAllocationMode::kNone) || ++ (buffer_allocation_mode_ == BufferAllocationMode::kWrapVdpau)) + ? vaapi_wrapper_ + : vpp_vaapi_wrapper_, + make_context_current_cb_, bind_image_cb_, buffers[i]); +@@ -1077,6 +1079,14 @@ + + VaapiVideoDecodeAccelerator::BufferAllocationMode + VaapiVideoDecodeAccelerator::DecideBufferAllocationMode() { ++ // NVIDIA blobs use VDPAU ++ if (base::StartsWith(VaapiWrapper::GetVendorStringForTesting(), ++ "Splitted-Desktop Systems VDPAU", ++ base::CompareCase::SENSITIVE)) { ++ LOG(INFO) << "VA-API driver on VDPAU backend"; ++ return BufferAllocationMode::kWrapVdpau; ++ } ++ + // TODO(crbug.com/912295): Enable a better BufferAllocationMode for IMPORT + // |output_mode_| as well. + if (output_mode_ == VideoDecodeAccelerator::Config::OutputMode::IMPORT) +@@ -1089,7 +1099,7 @@ + // depends on the bitstream and sometimes it's not enough to cover the amount + // of frames needed by the client pipeline (see b/133733739). + // TODO(crbug.com/911754): Enable for VP9 Profile 2. +- if (IsGeminiLakeOrLater() && ++ if (false && IsGeminiLakeOrLater() && + (profile_ == VP9PROFILE_PROFILE0 || profile_ == VP8PROFILE_ANY)) { + // Add one to the reference frames for the one being currently egressed, and + // an extra allocation for both |client_| and |decoder_|, see +--- a/media/gpu/vaapi/vaapi_video_decode_accelerator.h ++++ b/media/gpu/vaapi/vaapi_video_decode_accelerator.h +@@ -204,6 +204,7 @@ + // Using |client_|s provided PictureBuffers and as many internally + // allocated. + kNormal, ++ kWrapVdpau, + }; + + // Decides the concrete buffer allocation mode, depending on the hardware