From 38f51c213c83eeb4cf5bdecfe442c19be2ca8181 Mon Sep 17 00:00:00 2001 From: "Bryan A. S" Date: Tue, 16 Nov 2021 23:48:47 -0300 Subject: [PATCH 01/17] gotify-desktop: init at 1.2.0 --- pkgs/tools/misc/gotify-desktop/default.nix | 26 ++++++++++++++++++++++ pkgs/top-level/all-packages.nix | 2 ++ 2 files changed, 28 insertions(+) create mode 100644 pkgs/tools/misc/gotify-desktop/default.nix diff --git a/pkgs/tools/misc/gotify-desktop/default.nix b/pkgs/tools/misc/gotify-desktop/default.nix new file mode 100644 index 000000000000..350f29ec52b0 --- /dev/null +++ b/pkgs/tools/misc/gotify-desktop/default.nix @@ -0,0 +1,26 @@ +{ lib, fetchFromGitHub, rustPlatform, openssl, pkg-config}: + +rustPlatform.buildRustPackage rec { + pname = "gotify-desktop"; + version = "1.2.0"; + + src = fetchFromGitHub { + owner = "desbma"; + repo = pname; + rev = version; + sha256 = "sha256-QQpZeXFv8BqFOQ+7ANWmtsgNlMakAL2ML4rlG2cFZJE="; + }; + + cargoSha256 = "sha256-zcSAsI/yGGJer7SPKDKZ6NQ3UgTdBcDighS6VTNITMo="; + + nativeBuildInputs = [ pkg-config ]; + + buildInputs = [ openssl ]; + + meta = with lib; { + description = "Small Gotify daemon to send messages as desktop notifications"; + homepage = "https://github.com/desbma/gotify-desktop"; + license = licenses.gpl3Plus; + maintainers = [ maintainers.bryanasdev000 ]; + }; +} diff --git a/pkgs/top-level/all-packages.nix b/pkgs/top-level/all-packages.nix index 06b7f496ace6..e90acd721f07 100644 --- a/pkgs/top-level/all-packages.nix +++ b/pkgs/top-level/all-packages.nix @@ -3068,6 +3068,8 @@ with pkgs; gotify-cli = callPackage ../tools/misc/gotify-cli { }; + gotify-desktop = callPackage ../tools/misc/gotify-desktop { }; + gping = callPackage ../tools/networking/gping { }; gpu-burn = callPackage ../applications/misc/gpu-burn { }; From 64b4af529611a698c381c87f2d756f8e820f405f Mon Sep 17 00:00:00 2001 From: Artturin Date: Wed, 17 Nov 2021 18:50:41 +0200 Subject: [PATCH 02/17] kmod-blacklist-ubuntu: 22-1.1ubuntu1 -> 28-1ubuntu4 --- pkgs/os-specific/linux/kmod-blacklist-ubuntu/default.nix | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/pkgs/os-specific/linux/kmod-blacklist-ubuntu/default.nix b/pkgs/os-specific/linux/kmod-blacklist-ubuntu/default.nix index 1c7ea22b7584..4002657ad690 100644 --- a/pkgs/os-specific/linux/kmod-blacklist-ubuntu/default.nix +++ b/pkgs/os-specific/linux/kmod-blacklist-ubuntu/default.nix @@ -1,7 +1,7 @@ { lib, stdenv, fetchurl, gnugrep, findutils }: let - version = "22-1.1ubuntu1"; # Zesty + version = "28-1ubuntu4"; # impish 2021-06-24 in stdenv.mkDerivation { pname = "kmod-blacklist"; @@ -9,7 +9,7 @@ in stdenv.mkDerivation { src = fetchurl { url = "https://launchpad.net/ubuntu/+archive/primary/+files/kmod_${version}.debian.tar.xz"; - sha256 = "1k749g707ccb82l4xmrkp53khl71f57cpj9fzd1qyzrz147fjyhi"; + sha256 = "sha256-K8tWpaLmCm3Jcxw3OZ+D7Koiug7epooRn1YMfqjGAiw="; }; installPhase = '' @@ -31,7 +31,7 @@ in stdenv.mkDerivation { ''; meta = with lib; { - homepage = "https://packages.ubuntu.com/source/zesty/kmod"; + homepage = "https://launchpad.net/ubuntu/+source/kmod"; description = "Linux kernel module blacklists from Ubuntu"; platforms = platforms.linux; license = with licenses; [ gpl2Plus lgpl21Plus ]; From 015a305ab68d0fafd289d3fe9ebf446cd5ab8e28 Mon Sep 17 00:00:00 2001 From: Artturin Date: Wed, 17 Nov 2021 20:15:45 +0200 Subject: [PATCH 03/17] google-cloud-sdk: fix completion loading --- pkgs/tools/admin/google-cloud-sdk/default.nix | 2 ++ 1 file changed, 2 insertions(+) diff --git a/pkgs/tools/admin/google-cloud-sdk/default.nix b/pkgs/tools/admin/google-cloud-sdk/default.nix index fd02e7ea418e..ac3f9d65c0fe 100644 --- a/pkgs/tools/admin/google-cloud-sdk/default.nix +++ b/pkgs/tools/admin/google-cloud-sdk/default.nix @@ -103,6 +103,8 @@ in stdenv.mkDerivation rec { mkdir -p $out/share/zsh/site-functions mv $out/google-cloud-sdk/completion.zsh.inc $out/share/zsh/site-functions/_gcloud ln -s $out/share/zsh/site-functions/_gcloud $out/share/zsh/site-functions/_gsutil + # zsh doesn't load completions from $FPATH without #compdef as the first line + sed -i '1 i #compdef gcloud' $out/share/zsh/site-functions/_gcloud # This directory contains compiled mac binaries. We used crcmod from # nixpkgs instead. From 4b32a5d26155ce66b74930791acd38b221d3faaf Mon Sep 17 00:00:00 2001 From: Nikolay Korotkiy Date: Thu, 18 Nov 2021 00:25:06 +0300 Subject: [PATCH 04/17] quark: init at 2021-02-22 --- pkgs/servers/http/quark/default.nix | 26 ++++++++++++++++++++++++++ pkgs/top-level/all-packages.nix | 2 ++ 2 files changed, 28 insertions(+) create mode 100644 pkgs/servers/http/quark/default.nix diff --git a/pkgs/servers/http/quark/default.nix b/pkgs/servers/http/quark/default.nix new file mode 100644 index 000000000000..629e61b43397 --- /dev/null +++ b/pkgs/servers/http/quark/default.nix @@ -0,0 +1,26 @@ +{ lib, stdenv, fetchgit, patches ? null }: + +stdenv.mkDerivation { + pname = "quark"; + version = "unstable-2021-02-22"; + + src = fetchgit { + url = "git://git.suckless.org/quark"; + rev = "68b4f733b2755762e43df90f73db5a6ec8d14104"; + sha256 = "sha256-Jtu5zJfHd+6Oq572nVem5msMDCOjdqDNH4SQck8/O5A="; + }; + + inherit patches; + + makeFlags = [ "CC:=$(CC)" ]; + + installFlags = [ "PREFIX=$(out)" ]; + + meta = with lib; { + description = "Extremely small and simple HTTP GET/HEAD-only web server for static content"; + homepage = "http://tools.suckless.org/quark"; + license = licenses.isc; + maintainers = with maintainers; [ sikmir ]; + platforms = platforms.linux; + }; +} diff --git a/pkgs/top-level/all-packages.nix b/pkgs/top-level/all-packages.nix index bb92dc9a69b1..4ec4f8e7c0dd 100644 --- a/pkgs/top-level/all-packages.nix +++ b/pkgs/top-level/all-packages.nix @@ -21035,6 +21035,8 @@ with pkgs; pshs = callPackage ../servers/http/pshs { }; + quark = callPackage ../servers/http/quark { }; + sympa = callPackage ../servers/mail/sympa { }; system-sendmail = lowPrio (callPackage ../servers/mail/system-sendmail { }); From 48a4db63e67f7d06139eb0fa53918cb07ecb6ead Mon Sep 17 00:00:00 2001 From: Artturin Date: Thu, 18 Nov 2021 03:20:56 +0200 Subject: [PATCH 05/17] crda: 3.18 -> 4.14 --- pkgs/os-specific/linux/crda/default.nix | 36 ++++++++++++------------- 1 file changed, 18 insertions(+), 18 deletions(-) diff --git a/pkgs/os-specific/linux/crda/default.nix b/pkgs/os-specific/linux/crda/default.nix index c337da2fe723..d12bba4e1645 100644 --- a/pkgs/os-specific/linux/crda/default.nix +++ b/pkgs/os-specific/linux/crda/default.nix @@ -2,35 +2,42 @@ stdenv.mkDerivation rec { pname = "crda"; - version = "3.18"; + version = "4.14"; src = fetchurl { - sha256 = "1gydiqgb08d9gbx4l6gv98zg3pljc984m50hmn3ysxcbkxkvkz23"; - url = "http://kernel.org/pub/software/network/crda/crda-${version}.tar.xz"; + url = "https://git.kernel.org/pub/scm/linux/kernel/git/mcgrof/crda.git/snapshot/crda-${version}.tar.gz"; + sha256 = "sha256-Wo81u4snR09Gaw511FG6kXQz2KqxiJZ4pk2cTnKouMI="; }; patches = [ - # Switch to Python 3 - # https://lore.kernel.org/linux-wireless/1437542484-23409-1-git-send-email-ahmed.taahir@gmail.com/ + # Fix python 3 build: except ImportError, e: SyntaxError: invalid syntax (fetchpatch { - url = "https://lore.kernel.org/linux-wireless/1437542484-23409-2-git-send-email-ahmed.taahir@gmail.com/raw"; - sha256 = "0s2n340cgaasvg1k8g9v8xjrbh4y2mcgrhdmv97ja2fs8xjcjbf1"; + url = "https://raw.githubusercontent.com/archlinux/svntogit-packages/d234fddf451fab0f4fc412e2769f54e11f10d7d8/trunk/crda-4.14-python-3.patch"; + sha256 = "sha256-KEezEKrfizq9k4ZiE2mf3Nl4JiBayhXeVnFl7wYh28Y="; }) + (fetchpatch { - url = "https://lore.kernel.org/linux-wireless/1437542484-23409-3-git-send-email-ahmed.taahir@gmail.com/raw"; - sha256 = "01dlfw7kqhyx025jxq2l75950b181p9r7i9zkflcwvbzzdmx59md"; + url = "https://raw.githubusercontent.com/archlinux/svntogit-packages/d48ec843222b0d74c85bce86fa6f087c7dfdf952/trunk/0001-Makefile-Link-libreg.so-against-the-crypto-library.patch"; + sha256 = "sha256-j93oydi209f22OF8aXZ/NczuUOnlhkdSeYvy2WRRvm0="; }) ]; - buildInputs = [ libgcrypt libnl ]; + strictDeps = true; + nativeBuildInputs = [ pkg-config - python3Packages.pycrypto + python3Packages.m2crypto # only used for a build time script + ]; + + buildInputs = [ + libgcrypt + libnl ]; postPatch = '' patchShebangs utils/ substituteInPlace Makefile \ + --replace 'gzip' 'gzip -n' \ --replace ldconfig true \ --replace pkg-config $PKG_CONFIG sed -i crda.c \ @@ -45,19 +52,12 @@ stdenv.mkDerivation rec { "REG_BIN=${wireless-regdb}/lib/crda/regulatory.bin" ]; - NIX_CFLAGS_COMPILE = "-Wno-error=unused-const-variable"; - buildFlags = [ "all_noverify" ]; enableParallelBuilding = true; doCheck = true; checkTarget = "verify"; - postInstall = '' - # The patch installs build header - rm $out/include/reglib/keys-gcrypt.h - ''; - meta = with lib; { description = "Linux wireless Central Regulatory Domain Agent"; longDescription = '' From a96a6e751593609014b854ad40e2836c03c8a887 Mon Sep 17 00:00:00 2001 From: Artturin Date: Thu, 18 Nov 2021 21:32:56 +0200 Subject: [PATCH 06/17] nixos/qemu-vm: fix deprecation readonly -> readonly=on machine # qemu-system-x86_64: -drive if=pflash,format=raw,unit=0,readonly,...: warning: short-form boolean option 'readonly' deprecated vm-test-run-systemd-boot-specialisation> machine # Please use readonly=on instead --- nixos/modules/virtualisation/qemu-vm.nix | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/nixos/modules/virtualisation/qemu-vm.nix b/nixos/modules/virtualisation/qemu-vm.nix index 6ce4461babc7..1d8973385b54 100644 --- a/nixos/modules/virtualisation/qemu-vm.nix +++ b/nixos/modules/virtualisation/qemu-vm.nix @@ -845,7 +845,7 @@ in ''-append "$(cat ${config.system.build.toplevel}/kernel-params) init=${config.system.build.toplevel}/init regInfo=${regInfo}/registration ${consoles} $QEMU_KERNEL_PARAMS"'' ]) (mkIf cfg.useEFIBoot [ - "-drive if=pflash,format=raw,unit=0,readonly,file=${efiFirmware}" + "-drive if=pflash,format=raw,unit=0,readonly=on,file=${efiFirmware}" "-drive if=pflash,format=raw,unit=1,file=$NIX_EFI_VARS" ]) (mkIf (cfg.bios != null) [ From 31759dc4b74e667462b98b41e031fc2362d10428 Mon Sep 17 00:00:00 2001 From: Artturin Date: Fri, 24 Sep 2021 20:16:18 +0300 Subject: [PATCH 07/17] nixos/networkmanager: remove redundant ipv6.ip6-privacy this setting was added in 2016 in commit bcdd81d9e14d960cf2fc910b622e236728a7fc07 the posibility to preferTempAddress was added to nixos/network-interface in 2018 in commit 1fec496f384c53df39684035bafb482865d3eff8 preferTempAddress was renamed to tempAddress in 2020 in commit 2485e6399e1737d9795f836bb057ab0daf719f03 therefore this setting is redundant since nm will use the sysctl option nixos/network-interfaces: add default to sysctl so that the value for it is set networkmanager falls back to it https://man.archlinux.org/man/NetworkManager.conf.5 --- nixos/modules/services/networking/networkmanager.nix | 1 - nixos/modules/tasks/network-interfaces.nix | 2 ++ 2 files changed, 2 insertions(+), 1 deletion(-) diff --git a/nixos/modules/services/networking/networkmanager.nix b/nixos/modules/services/networking/networkmanager.nix index 74daf0ae9faf..73e63e2ee99b 100644 --- a/nixos/modules/services/networking/networkmanager.nix +++ b/nixos/modules/services/networking/networkmanager.nix @@ -527,7 +527,6 @@ in { { networkmanager.connectionConfig = { - "ipv6.ip6-privacy" = 2; "ethernet.cloned-mac-address" = cfg.ethernet.macAddress; "wifi.cloned-mac-address" = cfg.wifi.macAddress; "wifi.powersave" = diff --git a/nixos/modules/tasks/network-interfaces.nix b/nixos/modules/tasks/network-interfaces.nix index 4e20ec118464..75fc5a14a800 100644 --- a/nixos/modules/tasks/network-interfaces.nix +++ b/nixos/modules/tasks/network-interfaces.nix @@ -1233,6 +1233,8 @@ in "net.ipv4.conf.all.forwarding" = mkDefault (any (i: i.proxyARP) interfaces); "net.ipv6.conf.all.disable_ipv6" = mkDefault (!cfg.enableIPv6); "net.ipv6.conf.default.disable_ipv6" = mkDefault (!cfg.enableIPv6); + # networkmanager falls back to "/proc/sys/net/ipv6/conf/default/use_tempaddr" + "net.ipv6.conf.default.use_tempaddr" = tempaddrValues.${cfg.tempAddresses}.sysctl; } // listToAttrs (flip concatMap (filter (i: i.proxyARP) interfaces) (i: [(nameValuePair "net.ipv4.conf.${replaceChars ["."] ["/"] i.name}.proxy_arp" true)])) // listToAttrs (forEach interfaces From 962f61aa056c54334805f44411b7cebf6551b7c3 Mon Sep 17 00:00:00 2001 From: Jonathan Ringer Date: Thu, 18 Nov 2021 22:36:17 -0800 Subject: [PATCH 08/17] python37Packages.ipykernel: fix build --- pkgs/development/python-modules/ipykernel/default.nix | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/pkgs/development/python-modules/ipykernel/default.nix b/pkgs/development/python-modules/ipykernel/default.nix index dd84c0e65389..21e371c1a48b 100644 --- a/pkgs/development/python-modules/ipykernel/default.nix +++ b/pkgs/development/python-modules/ipykernel/default.nix @@ -2,6 +2,8 @@ , buildPythonPackage , callPackage , fetchPypi +, pythonOlder +, argcomplete , debugpy , ipython , jupyter-client @@ -24,6 +26,8 @@ buildPythonPackage rec { jupyter-client tornado traitlets + ] ++ lib.optionals (pythonOlder "3.8") [ + argcomplete ]; # check in passthru.tests.pytest to escape infinite recursion with ipyparallel From 46179208cfe95ca627c88d4595dbc8f2fb3ebdac Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Sandro=20J=C3=A4ckel?= Date: Wed, 17 Nov 2021 13:05:59 +0100 Subject: [PATCH 09/17] cogl: switch to pname+version see #103997 --- pkgs/development/libraries/cogl/default.nix | 6 ++---- 1 file changed, 2 insertions(+), 4 deletions(-) diff --git a/pkgs/development/libraries/cogl/default.nix b/pkgs/development/libraries/cogl/default.nix index 75ec2a2acc7f..e58a500cf838 100644 --- a/pkgs/development/libraries/cogl/default.nix +++ b/pkgs/development/libraries/cogl/default.nix @@ -3,14 +3,12 @@ , mesa, automake, autoconf , gstreamerSupport ? true, gst_all_1 }: -let +stdenv.mkDerivation rec { pname = "cogl"; -in stdenv.mkDerivation rec { - name = "${pname}-${version}"; version = "1.22.8"; src = fetchurl { - url = "mirror://gnome/sources/${pname}/${lib.versions.majorMinor version}/${name}.tar.xz"; + url = "mirror://gnome/sources/${pname}/${lib.versions.majorMinor version}/cogl-${version}.tar.xz"; sha256 = "0nfph4ai60ncdx7hy6hl1i1cmp761jgnyjfhagzi0iqq36qb41d8"; }; From de18d833598fe4e30649fe248fd71f8313c48250 Mon Sep 17 00:00:00 2001 From: Fabian Affolter Date: Fri, 19 Nov 2021 22:47:29 +0100 Subject: [PATCH 10/17] python3Packages.libversion: 1.2.3 -> 1.2.4 --- .../python-modules/libversion/default.nix | 42 +++++++++++++------ 1 file changed, 30 insertions(+), 12 deletions(-) diff --git a/pkgs/development/python-modules/libversion/default.nix b/pkgs/development/python-modules/libversion/default.nix index fb77eeed4c2c..a492ea7806a0 100644 --- a/pkgs/development/python-modules/libversion/default.nix +++ b/pkgs/development/python-modules/libversion/default.nix @@ -1,23 +1,41 @@ -{ lib, buildPythonPackage, fetchPypi, pkg-config, libversion, pythonOlder }: +{ lib +, buildPythonPackage +, fetchFromGitHub +, libversion +, pkg-config +, pythonOlder +}: buildPythonPackage rec { pname = "libversion"; - version = "1.2.3"; - - src = fetchPypi { - inherit pname version; - sha256 = "e6e903cc6307c3eda90401373eb81bfd0dd2dc93772ddab3d23705bed0c6f6e9"; - }; - - nativeBuildInputs = [ pkg-config ]; - buildInputs = [ libversion ]; + version = "1.2.4"; + format = "setuptools"; disabled = pythonOlder "3.6"; + src = fetchFromGitHub { + owner = "repology"; + repo = "py-libversion"; + rev = version; + sha256 = "sha256-p0wtSB+QXAERf+57MMb8cqWoy1bG3XaCpR9GPwYYvJM="; + }; + + nativeBuildInputs = [ + pkg-config + ]; + + buildInputs = [ + libversion + ]; + + pythonImportsCheck = [ + "libversion" + ]; + meta = with lib; { - homepage = "https://github.com/repology/py-libversion"; description = "Python bindings for libversion, which provides fast, powerful and correct generic version string comparison algorithm"; + homepage = "https://github.com/repology/py-libversion"; license = licenses.mit; - maintainers = [ maintainers.ryantm ]; + maintainers = with maintainers; [ ryantm ]; }; } From 54caa42f9e88d2b93e1367dc7952b87b1e93b655 Mon Sep 17 00:00:00 2001 From: Alyssa Ross Date: Fri, 19 Nov 2021 21:58:23 +0000 Subject: [PATCH 11/17] catgirl: enable parallel building Tested at -j48. --- pkgs/applications/networking/irc/catgirl/default.nix | 2 ++ 1 file changed, 2 insertions(+) diff --git a/pkgs/applications/networking/irc/catgirl/default.nix b/pkgs/applications/networking/irc/catgirl/default.nix index f45f803e805f..d807e3bd0309 100644 --- a/pkgs/applications/networking/irc/catgirl/default.nix +++ b/pkgs/applications/networking/irc/catgirl/default.nix @@ -23,6 +23,8 @@ stdenv.mkDerivation rec { buildInputs = [ libressl ncurses ]; strictDeps = true; + enableParallelBuilding = true; + meta = with lib; { homepage = "https://git.causal.agency/catgirl/about/"; license = licenses.gpl3Plus; From 771d7823a483ea08e7b9c3421cafdf0397e2e2f9 Mon Sep 17 00:00:00 2001 From: Fabian Affolter Date: Fri, 19 Nov 2021 23:25:57 +0100 Subject: [PATCH 12/17] python3Packages.devolo-plc-api: init at 0.6.3 --- .../python-modules/devolo-plc-api/default.nix | 59 +++++++++++++++++++ pkgs/top-level/python-packages.nix | 2 + 2 files changed, 61 insertions(+) create mode 100644 pkgs/development/python-modules/devolo-plc-api/default.nix diff --git a/pkgs/development/python-modules/devolo-plc-api/default.nix b/pkgs/development/python-modules/devolo-plc-api/default.nix new file mode 100644 index 000000000000..91e734e45f6d --- /dev/null +++ b/pkgs/development/python-modules/devolo-plc-api/default.nix @@ -0,0 +1,59 @@ +{ lib +, buildPythonPackage +, fetchFromGitHub +, httpx +, protobuf +, pytest-asyncio +, pytest-httpx +, pytest-mock +, pytestCheckHook +, pythonOlder +, setuptools-scm +, zeroconf +}: + +buildPythonPackage rec { + pname = "devolo-plc-api"; + version = "0.6.3"; + format = "setuptools"; + + disabled = pythonOlder "3.8"; + + src = fetchFromGitHub { + owner = "2Fake"; + repo = "devolo_plc_api"; + rev = "v${version}"; + sha256 = "6EIT6ifC4M4qj/2dZYVZ3fb3bPs25R7IEh/MduYTTkU="; + }; + + SETUPTOOLS_SCM_PRETEND_VERSION = version; + + nativeBuildInputs = [ + setuptools-scm + ]; + + propagatedBuildInputs = [ + httpx + protobuf + zeroconf + ]; + + + checkInputs = [ + pytest-asyncio + pytest-httpx + pytest-mock + pytestCheckHook + ]; + + pythonImportsCheck = [ + "devolo_plc_api" + ]; + + meta = with lib; { + description = "Python module to interact with Devolo PLC devices"; + homepage = "https://github.com/2Fake/devolo_plc_api"; + license = licenses.gpl3Only; + maintainers = with maintainers; [ fab ]; + }; +} diff --git a/pkgs/top-level/python-packages.nix b/pkgs/top-level/python-packages.nix index 87b06b9eb148..39cd8697e169 100644 --- a/pkgs/top-level/python-packages.nix +++ b/pkgs/top-level/python-packages.nix @@ -2028,6 +2028,8 @@ in { devolo-home-control-api = callPackage ../development/python-modules/devolo-home-control-api { }; + devolo-plc-api = callPackage ../development/python-modules/devolo-plc-api { }; + devpi-common = callPackage ../development/python-modules/devpi-common { }; devtools = callPackage ../development/python-modules/devtools { }; From 643ef1145e2bc2634b1e74a8eb4467dd57e69844 Mon Sep 17 00:00:00 2001 From: Jonathan Ringer Date: Fri, 19 Nov 2021 14:44:17 -0800 Subject: [PATCH 13/17] python3Packages.diskcache: disable flakey test --- pkgs/development/python-modules/diskcache/default.nix | 9 +++++++++ 1 file changed, 9 insertions(+) diff --git a/pkgs/development/python-modules/diskcache/default.nix b/pkgs/development/python-modules/diskcache/default.nix index 0264c0ff10c5..457ab077a0ce 100644 --- a/pkgs/development/python-modules/diskcache/default.nix +++ b/pkgs/development/python-modules/diskcache/default.nix @@ -32,6 +32,15 @@ buildPythonPackage rec { doCheck = !stdenv.isDarwin; pythonImportsCheck = [ "diskcache" ]; + disabledTests = [ + # very time sensitive, can fail on over subscribed machines + "test_incr_update_keyerror" + ]; + + pytestFlagsArray = [ + "-n $NIX_BUILD_CORES" + ]; + meta = with lib; { description = "Disk and file backed persistent cache"; homepage = "http://www.grantjenks.com/docs/diskcache/"; From 18e1ae0d99c10ff83c51a6a4214e7f70c2e17d10 Mon Sep 17 00:00:00 2001 From: arkivm Date: Fri, 19 Nov 2021 14:50:53 -0800 Subject: [PATCH 14/17] bcompare: add darwin support (#141413) MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Co-authored-by: Paweł Kruszewski --- .../version-management/bcompare/default.nix | 114 +++++++++++------- 1 file changed, 72 insertions(+), 42 deletions(-) diff --git a/pkgs/applications/version-management/bcompare/default.nix b/pkgs/applications/version-management/bcompare/default.nix index 98c0ad8bc3fe..f3bd18eb32bd 100644 --- a/pkgs/applications/version-management/bcompare/default.nix +++ b/pkgs/applications/version-management/bcompare/default.nix @@ -1,54 +1,82 @@ -{ autoPatchelfHook, bzip2, cairo, coreutils, fetchurl, gdk-pixbuf, pango, gtk2, kcoreaddons, ki18n, kio, kservice, lib, qt4, qtbase, stdenv, runtimeShell }: +{ lib, autoPatchelfHook, bzip2, cairo, coreutils, fetchurl, gdk-pixbuf, glibc, pango, gtk2, kcoreaddons, ki18n, kio, kservice +, stdenv, runtimeShell, unzip +}: -stdenv.mkDerivation rec { +let pname = "bcompare"; version = "4.4.0.25886"; - src = fetchurl { - url = "https://www.scootersoftware.com/${pname}-${version}_amd64.deb"; - sha256 = "sha256-zQZrCjXzoOZ5o5M4t1n5/HhGoGTcZSj5rlf9Uz9UZko="; + throwSystem = throw "Unsupported system: ${stdenv.hostPlatform.system}"; + + srcs = { + x86_64-linux = fetchurl { + url = "https://www.scootersoftware.com/${pname}-${version}_amd64.deb"; + sha256 = "sha256-zQZrCjXzoOZ5o5M4t1n5/HhGoGTcZSj5rlf9Uz9UZko="; + }; + + x86_64-darwin = fetchurl { + url = "https://www.scootersoftware.com/BCompareOSX-${version}.zip"; + sha256 = "sha256-dez30a1sp+4XuBBYhu07Vpn1+AUmX0Ni7aad7hy2ajQ="; + }; + + aarch64-darwin = srcs.x86_64-darwin; }; - unpackPhase = '' - ar x $src - tar xfz data.tar.gz - ''; + src = srcs.${stdenv.hostPlatform.system} or throwSystem; - installPhase = '' - mkdir -p $out/bin $out/lib $out/share - cp -R usr/share $out/ - cp -R usr/lib $out/ - cp -R usr/bin $out/ + linux = stdenv.mkDerivation { + inherit pname version src meta; + unpackPhase = '' + ar x $src + tar xfz data.tar.gz + ''; - # Remove library that refuses to be autoPatchelf'ed - rm $out/lib/beyondcompare/ext/bcompare_ext_kde.amd64.so + installPhase = '' + mkdir -p $out/{bin,lib,share} - substituteInPlace $out/bin/bcompare \ - --replace "/usr/lib/beyondcompare" "$out/lib/beyondcompare" \ - --replace "/bin/bash" "${runtimeShell}" + cp -R usr/{bin,lib,share} $out/ - # Create symlink bzip2 library - ln -s ${bzip2.out}/lib/libbz2.so.1 $out/lib/beyondcompare/libbz2.so.1.0 - ''; + # Remove library that refuses to be autoPatchelf'ed + rm $out/lib/beyondcompare/ext/bcompare_ext_kde.amd64.so - nativeBuildInputs = [ autoPatchelfHook ]; + substituteInPlace $out/bin/${pname} \ + --replace "/usr/lib/beyondcompare" "$out/lib/beyondcompare" \ + --replace "ldd" "${glibc.out}/bin/ldd" \ + --replace "/bin/bash" "${runtimeShell}" - buildInputs = [ - stdenv.cc.cc.lib - gtk2 - pango - cairo - kio - kservice - ki18n - kcoreaddons - gdk-pixbuf - bzip2 - ]; + # Create symlink bzip2 library + ln -s ${bzip2.out}/lib/libbz2.so.1 $out/lib/beyondcompare/libbz2.so.1.0 + ''; - dontBuild = true; - dontConfigure = true; - dontWrapQtApps = true; + nativeBuildInputs = [ autoPatchelfHook ]; + + buildInputs = [ + stdenv.cc.cc.lib + gtk2 + pango + cairo + kio + kservice + ki18n + kcoreaddons + gdk-pixbuf + bzip2 + ]; + + dontBuild = true; + dontConfigure = true; + dontWrapQtApps = true; + }; + + darwin = stdenv.mkDerivation { + inherit pname version src meta; + nativeBuildInputs = [ unzip ]; + + installPhase = '' + mkdir -p $out/Applications/BCompare.app + cp -R . $out/Applications/BCompare.app + ''; + }; meta = with lib; { description = "GUI application that allows to quickly and easily compare files and folders"; @@ -59,8 +87,10 @@ stdenv.mkDerivation rec { ''; homepage = "https://www.scootersoftware.com"; license = licenses.unfree; - maintainers = [ maintainers.ktor ]; - platforms = [ "x86_64-linux" ]; + maintainers = with maintainers; [ ktor arkivm ]; + platforms = builtins.attrNames srcs; }; - -} +in +if stdenv.isDarwin +then darwin +else linux From 8e4ef58acbadbeba439ad6030502d27f1724fd1b Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Sebasti=C3=A1n=20Mancilla?= Date: Fri, 19 Nov 2021 17:04:40 -0300 Subject: [PATCH 15/17] python3Packages.m3u8: use pytestCheckHook --- pkgs/development/python-modules/m3u8/default.nix | 14 ++++++++------ 1 file changed, 8 insertions(+), 6 deletions(-) diff --git a/pkgs/development/python-modules/m3u8/default.nix b/pkgs/development/python-modules/m3u8/default.nix index 552a095e705f..0c3fb3562a01 100644 --- a/pkgs/development/python-modules/m3u8/default.nix +++ b/pkgs/development/python-modules/m3u8/default.nix @@ -1,4 +1,4 @@ -{ lib, buildPythonPackage, fetchFromGitHub, requests, iso8601, bottle, pytest, pytest-cov }: +{ lib, buildPythonPackage, fetchFromGitHub, requests, iso8601, bottle, pytestCheckHook }: buildPythonPackage rec { pname = "m3u8"; @@ -11,14 +11,16 @@ buildPythonPackage rec { sha256 = "0cmg993icpsa1b19kljxvjwhs167bsqrs0ad4wnwsi8qq6na5d4p"; }; - checkInputs = [ bottle pytest pytest-cov ]; - - checkPhase = '' - pytest tests/test_{parser,model,variant_m3u8}.py - ''; + checkInputs = [ bottle pytestCheckHook ]; propagatedBuildInputs = [ requests iso8601 ]; + pytestFlagsArray = [ + "tests/test_parser.py" + "tests/test_model.py" + "tests/test_variant_m3u8.py" + ]; + meta = with lib; { homepage = "https://github.com/globocom/m3u8"; description = "Python m3u8 parser"; From 2b84c77b3e4f439ef4f004c1ad5cd7f12a4bfab0 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Sebasti=C3=A1n=20Mancilla?= Date: Fri, 19 Nov 2021 17:07:49 -0300 Subject: [PATCH 16/17] python3Packages.m3u8: fix build on Hydra (x86_64-darwin) --- pkgs/development/python-modules/m3u8/default.nix | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/pkgs/development/python-modules/m3u8/default.nix b/pkgs/development/python-modules/m3u8/default.nix index 0c3fb3562a01..1299160206de 100644 --- a/pkgs/development/python-modules/m3u8/default.nix +++ b/pkgs/development/python-modules/m3u8/default.nix @@ -21,6 +21,11 @@ buildPythonPackage rec { "tests/test_variant_m3u8.py" ]; + preCheck = '' + # Fix test on Hydra + substituteInPlace tests/test_model.py --replace "/tmp/d.m3u8" "$TMPDIR/d.m3u8" + ''; + meta = with lib; { homepage = "https://github.com/globocom/m3u8"; description = "Python m3u8 parser"; From 939caa7fb77028634d31956db72480c204752f9e Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Sebasti=C3=A1n=20Mancilla?= Date: Fri, 19 Nov 2021 17:01:06 -0300 Subject: [PATCH 17/17] python3Packages.m3u8: 0.6.0 -> 0.9.0 --- pkgs/development/python-modules/m3u8/default.nix | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/pkgs/development/python-modules/m3u8/default.nix b/pkgs/development/python-modules/m3u8/default.nix index 1299160206de..bc2233cf0d29 100644 --- a/pkgs/development/python-modules/m3u8/default.nix +++ b/pkgs/development/python-modules/m3u8/default.nix @@ -2,19 +2,19 @@ buildPythonPackage rec { pname = "m3u8"; - version = "0.6.0"; + version = "0.9.0"; src = fetchFromGitHub { owner = "globocom"; repo = pname; rev = version; - sha256 = "0cmg993icpsa1b19kljxvjwhs167bsqrs0ad4wnwsi8qq6na5d4p"; + sha256 = "sha256-EfHhmV2otEgEy2OVohS+DF7dk97GFdWZ4cFCERZBmlA="; }; - checkInputs = [ bottle pytestCheckHook ]; - propagatedBuildInputs = [ requests iso8601 ]; + checkInputs = [ bottle pytestCheckHook ]; + pytestFlagsArray = [ "tests/test_parser.py" "tests/test_model.py"