From 068a885d9c6434c4fac0b6098d7b157a0a69245b Mon Sep 17 00:00:00 2001 From: Antonio Nuno Monteiro Date: Thu, 18 Nov 2021 22:06:27 -0800 Subject: [PATCH 01/27] adns: fix static compilation --- pkgs/development/libraries/adns/default.nix | 2 ++ 1 file changed, 2 insertions(+) diff --git a/pkgs/development/libraries/adns/default.nix b/pkgs/development/libraries/adns/default.nix index 4b929cdb7f0f..50483758beb5 100644 --- a/pkgs/development/libraries/adns/default.nix +++ b/pkgs/development/libraries/adns/default.nix @@ -15,6 +15,8 @@ stdenv.mkDerivation rec { nativeBuildInputs = [ gnum4 ]; + configureFlags = lib.optional stdenv.hostPlatform.isStatic "--disable-dynamic"; + preConfigure = lib.optionalString stdenv.isDarwin "sed -i -e 's|-Wl,-soname=$(SHLIBSONAME)||' configure"; From 2ea5321fb97433503844e40aa96b7d4d5ca9f5b6 Mon Sep 17 00:00:00 2001 From: Sergei Trofimovich Date: Fri, 19 Nov 2021 09:07:35 +0000 Subject: [PATCH 02/27] trafficserver: pull upstream fix for ncurses-6.3 Without this change the build fails on ncurses-6.3 as: traffic_top/traffic_top.cc:146:13: error: format not a string literal and no format arguments [-Werror=format-security] 146 | mvprintw(my_y, x, prettyName.c_str()); | ~~~~~~~~^~~~~~~~~~~~~~~~~~~~~~~~~~~~~ --- pkgs/servers/http/trafficserver/default.nix | 7 +++++++ 1 file changed, 7 insertions(+) diff --git a/pkgs/servers/http/trafficserver/default.nix b/pkgs/servers/http/trafficserver/default.nix index e7ce72e086e1..eb4af7bf4918 100644 --- a/pkgs/servers/http/trafficserver/default.nix +++ b/pkgs/servers/http/trafficserver/default.nix @@ -63,6 +63,13 @@ stdenv.mkDerivation rec { url = "https://github.com/apache/trafficserver/commit/19d3af481cf74c91fbf713fc9d2f8b138ed5fbaf.diff"; sha256 = "0z1ikgpp00rzrrcqh97931586yn9wbksgai9xlkcjd5cg8gq0150"; }) + + # Fix build against ncurses-6.3: + # https://github.com/apache/trafficserver/pull/8437 + (fetchpatch { + url = "https://github.com/apache/trafficserver/commit/66c86c6b082903a92b9db33c60e3ed947e77d540.patch"; + sha256 = "1hgpp80xnnjr4k5i6gcllrb7dw4q4xcdrkwxpc1xk2np5cbyxd16"; + }) ]; # NOTE: The upstream README indicates that flex is needed for some features, From 3845245d713cb985231258ba73b9fd9407762760 Mon Sep 17 00:00:00 2001 From: AndersonTorres Date: Fri, 19 Nov 2021 20:33:30 -0300 Subject: [PATCH 03/27] pari: 2.13.1 -> 2.13.3 --- .../science/math/pari/default.nix | 30 +++++------ .../science/math/pari/rnfdisc.patch | 51 ------------------- 2 files changed, 13 insertions(+), 68 deletions(-) delete mode 100644 pkgs/applications/science/math/pari/rnfdisc.patch diff --git a/pkgs/applications/science/math/pari/default.nix b/pkgs/applications/science/math/pari/default.nix index fc1a2e0abf8c..4ba1d5c6b474 100644 --- a/pkgs/applications/science/math/pari/default.nix +++ b/pkgs/applications/science/math/pari/default.nix @@ -1,10 +1,11 @@ -{ lib, stdenv +{ lib +, stdenv , fetchurl , gmp -, readline , libX11 -, tex , perl +, readline +, tex , withThread ? true, libpthreadstubs }: @@ -12,7 +13,7 @@ assert withThread -> libpthreadstubs != null; stdenv.mkDerivation rec { pname = "pari"; - version = "2.13.1"; + version = "2.13.3"; src = fetchurl { urls = [ @@ -20,30 +21,25 @@ stdenv.mkDerivation rec { # old versions are at the url below "https://pari.math.u-bordeaux.fr/pub/pari/OLD/${lib.versions.majorMinor version}/${pname}-${version}.tar.gz" ]; - sha256 = "sha256-gez31wzNquIwFlz/Ynyc4uwpe48i+fQHQiedhfht/LE="; + hash = "sha256-zLp/FgbGhU8UQ2N7tXrQlY1Bx/R1P4roRZ8dZMJnoco="; }; - patches = [ - # rebased version of 3edb98db78, see - # https://pari.math.u-bordeaux.fr/cgi-bin/bugreport.cgi?bug=2284 - ./rnfdisc.patch - ]; - buildInputs = [ gmp - readline libX11 - tex perl + readline + tex ] ++ lib.optionals withThread [ libpthreadstubs ]; configureScript = "./Configure"; configureFlags = [ - "--with-gmp=${gmp.dev}" - "--with-readline=${readline.dev}" - ] ++ lib.optional stdenv.isDarwin "--host=x86_64-darwin" + "--with-gmp=${lib.getDev gmp}" + "--with-readline=${lib.getDev readline}" + ] + ++ lib.optional stdenv.isDarwin "--host=x86_64-darwin" ++ lib.optional withThread "--mt=pthread"; preConfigure = '' @@ -57,6 +53,7 @@ stdenv.mkDerivation rec { makeFlags = [ "all" ]; meta = with lib; { + homepage = "http://pari.math.u-bordeaux.fr"; description = "Computer algebra system for high-performance number theory computations"; longDescription = '' PARI/GP is a widely used computer algebra system designed for fast @@ -81,7 +78,6 @@ stdenv.mkDerivation rec { 3 or 4 times faster.) gp2c currently only understands a subset of the GP language. ''; - homepage = "http://pari.math.u-bordeaux.fr"; downloadPage = "http://pari.math.u-bordeaux.fr/download.html"; license = licenses.gpl2Plus; maintainers = with maintainers; [ ertes AndersonTorres ] ++ teams.sage.members; diff --git a/pkgs/applications/science/math/pari/rnfdisc.patch b/pkgs/applications/science/math/pari/rnfdisc.patch deleted file mode 100644 index 6acac96481d5..000000000000 --- a/pkgs/applications/science/math/pari/rnfdisc.patch +++ /dev/null @@ -1,51 +0,0 @@ -commit 0d8a3ac970291c62b56104172418b3f2ca30927c -Author: Bill Allombert -Date: Sun Mar 28 13:27:24 2021 +0200 - - rnfdisc_factored: remove spurious Q_primpart [#2284] - -diff --git a/src/basemath/base2.c b/src/basemath/base2.c -index 7e7d0db9d..c461826f4 100644 ---- a/src/basemath/base2.c -+++ b/src/basemath/base2.c -@@ -3582,7 +3582,7 @@ rnfdisc_factored(GEN nf, GEN pol, GEN *pd) - - nf = checknf(nf); - pol = rnfdisc_get_T(nf, pol, &lim); -- disc = nf_to_scalar_or_basis(nf, nfX_disc(nf, Q_primpart(pol))); -+ disc = nf_to_scalar_or_basis(nf, nfX_disc(nf, pol)); - pol = nfX_to_monic(nf, pol, NULL); - fa = idealfactor_partial(nf, disc, lim); - P = gel(fa,1); l = lg(P); -diff --git a/src/test/32/rnf b/src/test/32/rnf -index 1e743f415..c016dce00 100644 ---- a/src/test/32/rnf -+++ b/src/test/32/rnf -@@ -853,9 +853,10 @@ error("inconsistent dimensions in idealtwoelt.") - 0 - 0 - 1 --[[7361, 3786, 318, 5823; 0, 1, 0, 0; 0, 0, 1, 0; 0, 0, 0, 1], [-3, 6, -2, 0] --~] --[2, -1] -+[[433, 322, 318, 1318/17; 0, 1, 0, 12/17; 0, 0, 1, 5/17; 0, 0, 0, 1/17], [25 -+/17, -12/17, 12/17, 16/17]~] -+[1, -1] -+[[12, 0, 0, 0; 0, 12, 4, 0; 0, 0, 4, 0; 0, 0, 0, 4], [6, 5, -1, 2]~] - *** at top-level: rnfdedekind(nf,P,pr2,1) - *** ^----------------------- - *** rnfdedekind: sorry, Dedekind in the difficult case is not yet implemented. -diff --git a/src/test/in/rnf b/src/test/in/rnf -index 7851ae291..318d5349e 100644 ---- a/src/test/in/rnf -+++ b/src/test/in/rnf -@@ -212,6 +212,9 @@ k = nfinit(y^4 + 10*y^2 + 17); - rnfdisc(k, x^2 - x + 1/Mod(y,k.pol)) - rnfdisc(k, x^2 - x + 1/2) - -+k = nfinit(y^4 - 10*y^2 + 1); -+rnfdisc(k,x^2-(y^3/2+y^2-5*y/2+1)) -+ - \\ ERRORS, keep at end of file - rnfdedekind(nf, P, pr2, 1) - rnfdedekind(nf, P) From dc2cad8150551fe842ddc87a1d704b0de2267b9a Mon Sep 17 00:00:00 2001 From: AndersonTorres Date: Fri, 19 Nov 2021 20:34:15 -0300 Subject: [PATCH 04/27] gp2c: cosmetical changes --- pkgs/applications/science/math/pari/gp2c.nix | 16 +++++++++++----- 1 file changed, 11 insertions(+), 5 deletions(-) diff --git a/pkgs/applications/science/math/pari/gp2c.nix b/pkgs/applications/science/math/pari/gp2c.nix index 23183f83b36b..7f31543a925f 100644 --- a/pkgs/applications/science/math/pari/gp2c.nix +++ b/pkgs/applications/science/math/pari/gp2c.nix @@ -1,7 +1,9 @@ -{ lib, stdenv -, pari +{ lib +, stdenv , fetchurl -, perl }: +, pari +, perl +}: stdenv.mkDerivation rec { pname = "gp2c"; @@ -12,11 +14,15 @@ stdenv.mkDerivation rec { sha256 = "039ip7qkwwv46wrcdrz7y12m30kazzkjr44kqbc0h137g4wzd7zf"; }; - buildInputs = [ pari perl ]; + buildInputs = [ + pari + perl + ]; configureFlags = [ "--with-paricfg=${pari}/lib/pari/pari.cfg" - "--with-perl=${perl}/bin/perl" ]; + "--with-perl=${perl}/bin/perl" + ]; meta = with lib; { description = "A compiler to translate GP scripts to PARI programs"; From 24095a994c847ae3754b631eeceda8c4687ecad1 Mon Sep 17 00:00:00 2001 From: Thiago Kenji Okada Date: Fri, 19 Nov 2021 21:24:41 -0300 Subject: [PATCH 05/27] retroArchCores: remove `retroArchCores` is strange: it requires a global configuration on nixpkgs, as: ```nix nixpkgs.config.retroarch = { enableDolphin = true; enableMGBA = true; enableMAME = true; }; ``` To do so, we ended up declaring all available emulators on `all-packages.nix`. Failing to do so would mean that the emulator wouldn't be available. However, there is a mechanism on nixpkgs that also works: overrides. Overrides are similar on how other packages works, for example: ```nix (retroarch.override { cores = with libretro; [ citra snes9x ]; }); ``` So let's remove `retroArchCores` and leave the overrides mechanism instead. --- .../retroarch/kodi-advanced-launchers.nix | 4 +- pkgs/top-level/aliases.nix | 4 +- pkgs/top-level/all-packages.nix | 97 +------------------ 3 files changed, 9 insertions(+), 96 deletions(-) diff --git a/pkgs/misc/emulators/retroarch/kodi-advanced-launchers.nix b/pkgs/misc/emulators/retroarch/kodi-advanced-launchers.nix index ee97e6f7493c..9d83c46396c3 100644 --- a/pkgs/misc/emulators/retroarch/kodi-advanced-launchers.nix +++ b/pkgs/misc/emulators/retroarch/kodi-advanced-launchers.nix @@ -1,6 +1,4 @@ -{ stdenv, pkgs, lib, cores, runtimeShell }: - -assert cores != []; +{ stdenv, pkgs, lib, runtimeShell, cores ? [ ] }: let diff --git a/pkgs/top-level/aliases.nix b/pkgs/top-level/aliases.nix index 2453aa922086..99e365540a51 100644 --- a/pkgs/top-level/aliases.nix +++ b/pkgs/top-level/aliases.nix @@ -787,9 +787,10 @@ mapAliases ({ qt-3 = throw "qt-3 has been removed from nixpkgs, as it's unmaintained and insecure"; # added 2021-02-15 rfkill = throw "rfkill has been removed, as it's included in util-linux"; # added 2020-08-23 riak-cs = throw "riak-cs is not maintained anymore"; # added 2020-10-14 - ring-daemon = jami-daemon; #added 2021-10-26 + ring-daemon = jami-daemon; # added 2021-10-26 radare2-cutter = cutter; # added 2021-03-30 redkite = throw "redkite was archived by upstream"; # added 2021-04-12 + retroArchCores = throw "retroArchCores has been removed. Please use overrides instead, e.g.: `retroarch.override { cores = with libretro; [ ... ]; }`"; # added 2021-11-19 rkt = throw "rkt was archived by upstream"; # added 2020-05-16 rpiboot-unstable = rpiboot; # added 2021-07-30 rtv = throw "rtv was archived by upstream. Consider using tuir, an actively maintained fork"; # added 2021-08-08 @@ -992,6 +993,7 @@ mapAliases ({ wireshark-gtk = throw "wireshark-gtk is not supported anymore. Use wireshark-qt or wireshark-cli instead."; # added 2019-11-18 wireguard = wireguard-tools; # added 2018-05-19 morituri = whipper; # added 2018-09-13 + xbmc-retroarch-advanced-launchers = kodi-retroarch-advanced-launchers; # added 2021-11-19 xp-pen-g430 = pentablet-driver; # added 2020-05-03 xdg_utils = xdg-utils; # added 2021-02-01 xfceUnstable = xfce4-14; # added 2019-09-17 diff --git a/pkgs/top-level/all-packages.nix b/pkgs/top-level/all-packages.nix index 60762177c3e9..10e92cb1d280 100644 --- a/pkgs/top-level/all-packages.nix +++ b/pkgs/top-level/all-packages.nix @@ -29126,94 +29126,6 @@ with pkgs; wp-cli = callPackage ../development/tools/wp-cli { }; - retroArchCores = - let - cfg = config.retroarch or {}; - inherit (lib) optional; - in with libretro; - ([ ] - ++ optional (cfg.enableAtari800 or false) atari800 - ++ optional (cfg.enableBeetleGBA or false) beetle-gba - ++ optional (cfg.enableBeetleLynx or false) beetle-lynx - ++ optional (cfg.enableBeetleNGP or false) beetle-ngp - ++ optional (cfg.enableBeetlePCEFast or false) beetle-pce-fast - ++ optional (cfg.enableBeetlePCFX or false) beetle-pcfx - ++ optional (cfg.enableBeetlePSX or false) beetle-psx - ++ optional (cfg.enableBeetlePSXHW or false) beetle-psx-hw - ++ optional (cfg.enableBeetleSaturn or false) beetle-saturn - ++ optional (cfg.enableBeetleSaturnHW or false) beetle-saturn-hw - ++ optional (cfg.enableBeetleSNES or false) beetle-snes - ++ optional (cfg.enableBeetleSuperGrafx or false) beetle-supergrafx - ++ optional (cfg.enableBeetleWswan or false) beetle-wswan - ++ optional (cfg.enableBeetleVB or false) beetle-vb - ++ optional (cfg.enableBlueMSX or false) bluemsx - ++ optional (cfg.enableBsnesMercury or false) bsnes-mercury - ++ optional (cfg.enableCitra or false) citra - ++ optional (cfg.enableDesmume or false) desmume - ++ optional (cfg.enableDesmume2015 or false) desmume2015 - ++ optional (cfg.enableDolphin or false) dolphin - ++ optional (cfg.enableDOSBox or false) dosbox - ++ optional (cfg.enableEightyOne or false) eightyone - ++ optional (cfg.enableFBAlpha2012 or false) fbalpha2012 - ++ optional (cfg.enableFBNeo or false) fbneo - ++ optional (cfg.enableFceumm or false) fceumm - ++ optional (cfg.enableFlycast or false) flycast - ++ optional (cfg.enableFMSX or false) fmsx - ++ optional (cfg.enableFreeIntv or false) freeintv - ++ optional (cfg.enableGambatte or false) gambatte - ++ optional (cfg.enableGenesisPlusGX or false) genesis-plus-gx - ++ optional (cfg.enableGpsp or false) gpsp - ++ optional (cfg.enableGW or false) gw - ++ optional (cfg.enableHandy or false) handy - ++ optional (cfg.enableHatari or false) hatari - ++ optional (cfg.enableMAME or false) mame - ++ optional (cfg.enableMAME2000 or false) mame2000 - ++ optional (cfg.enableMAME2003 or false) mame2003 - ++ optional (cfg.enableMAME2003Plus or false) mame2003-plus - ++ optional (cfg.enableMAME2010 or false) mame2010 - ++ optional (cfg.enableMAME2015 or false) mame2015 - ++ optional (cfg.enableMAME2016 or false) mame2016 - ++ optional (cfg.enableMesen or false) mesen - ++ optional (cfg.enableMeteor or false) meteor - ++ optional (cfg.enableMGBA or false) mgba - ++ optional (cfg.enableMupen64Plus or false) mupen64plus - ++ optional (cfg.enableNeoCD or false) neocd - ++ optional (cfg.enableNestopia or false) nestopia - ++ optional (cfg.enableNP2kai or false) np2kai - ++ optional (cfg.enableO2EM or false) o2em - ++ optional (cfg.enableOpera or false) opera - ++ optional (cfg.enableParallelN64 or false) parallel-n64 - ++ optional (cfg.enablePCSXRearmed or false) pcsx_rearmed - ++ optional (cfg.enablePicodrive or false) picodrive - ++ optional (cfg.enablePlay or false) play - ++ optional (cfg.enablePPSSPP or false) ppsspp - ++ optional (cfg.enablePrboom or false) prboom - ++ optional (cfg.enableProSystem or false) prosystem - ++ optional (cfg.enableQuickNES or false) quicknes - ++ optional (cfg.enableSameBoy or false) sameboy - ++ optional (cfg.enableScummVM or false) scummvm - ++ optional (cfg.enableSMSPlusGX or false) smsplus-gx - ++ optional (cfg.enableSnes9x or false) snes9x - ++ optional (cfg.enableSnes9x2002 or false) snes9x2002 - ++ optional (cfg.enableSnes9x2005 or false) snes9x2005 - ++ optional (cfg.enableSnes9x2010 or false) snes9x2010 - ++ optional (cfg.enableStella or false) stella - ++ optional (cfg.enableStella2014 or false) stella2014 - ++ optional (cfg.enableTGBDual or false) tgbdual - ++ optional (cfg.enableThePowderToy or false) the-powder-toy - ++ optional (cfg.enableTIC80 or false) tic80 - ++ optional (cfg.enableVbaNext or false) vba-next - ++ optional (cfg.enableVbaM or false) vba-m - ++ optional (cfg.enableVecx or false) vecx - ++ optional (cfg.enableVirtualJaguar or false) virtualjaguar - ++ optional (cfg.enableYabause or false) yabause - ); - - wrapRetroArch = { retroarch }: callPackage ../misc/emulators/retroarch/wrapper.nix { - inherit retroarch; - cores = retroArchCores; - }; - wsjtx = qt5.callPackage ../applications/radio/wsjtx { }; wxhexeditor = callPackage ../applications/editors/wxhexeditor { @@ -29293,10 +29205,7 @@ with pkgs; kodi-cli = callPackage ../tools/misc/kodi-cli { }; kodi-retroarch-advanced-launchers = - callPackage ../misc/emulators/retroarch/kodi-advanced-launchers.nix { - cores = retroArchCores; - }; - xbmc-retroarch-advanced-launchers = kodi-retroarch-advanced-launchers; + callPackage ../misc/emulators/retroarch/kodi-advanced-launchers.nix { }; xca = libsForQt5.callPackage ../applications/misc/xca { }; @@ -32869,6 +32778,10 @@ with pkgs; inherit (darwin.apple_sdk.frameworks) AppKit Foundation; }; + wrapRetroArch = { retroarch }: callPackage ../misc/emulators/retroarch/wrapper.nix { + inherit retroarch; + }; + retroarch = wrapRetroArch { retroarch = retroarchBare; }; libretro = recurseIntoAttrs (callPackage ../misc/emulators/retroarch/cores.nix { From cbcd3d6c858885d04198b5b66621d561d01086a5 Mon Sep 17 00:00:00 2001 From: Thiago Kenji Okada Date: Fri, 19 Nov 2021 22:52:51 -0300 Subject: [PATCH 06/27] retroarchFull: init This is retroarch + all available retroarch cores. --- pkgs/top-level/all-packages.nix | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/pkgs/top-level/all-packages.nix b/pkgs/top-level/all-packages.nix index 10e92cb1d280..e455d2c535e1 100644 --- a/pkgs/top-level/all-packages.nix +++ b/pkgs/top-level/all-packages.nix @@ -32784,6 +32784,10 @@ with pkgs; retroarch = wrapRetroArch { retroarch = retroarchBare; }; + retroarchFull = retroarch.override { + cores = builtins.filter (c: c ? libretroCore) (builtins.attrValues libretro); + }; + libretro = recurseIntoAttrs (callPackage ../misc/emulators/retroarch/cores.nix { retroarch = retroarchBare; }); From 03e35cfb6579745cecd0d629403438b90022e324 Mon Sep 17 00:00:00 2001 From: Thiago Kenji Okada Date: Sat, 20 Nov 2021 16:08:36 -0300 Subject: [PATCH 07/27] retroarch: use fixed paths on "libretro_info_path" This commit introduces a patch that hardcodes "libretro_info_path" directly in the RetroArch code, without the issues of the previous approach. With this commit, RetroArch stops reading "libretro_info_path" from `retroarch.cfg` file, and always use the default. --- .../0001-Disable-menu_show_core_updater.patch | 25 ++++++ ...se-fixed-paths-on-libretro_info_path.patch | 80 +++++++++++++++++++ pkgs/misc/emulators/retroarch/default.nix | 15 ++-- .../disable-menu-show-core-updater.patch | 13 +++ .../retroarch/fix-libretro-paths.patch | 28 +++++++ 5 files changed, 153 insertions(+), 8 deletions(-) create mode 100644 pkgs/misc/emulators/retroarch/0001-Disable-menu_show_core_updater.patch create mode 100644 pkgs/misc/emulators/retroarch/0002-Use-fixed-paths-on-libretro_info_path.patch create mode 100644 pkgs/misc/emulators/retroarch/disable-menu-show-core-updater.patch create mode 100644 pkgs/misc/emulators/retroarch/fix-libretro-paths.patch diff --git a/pkgs/misc/emulators/retroarch/0001-Disable-menu_show_core_updater.patch b/pkgs/misc/emulators/retroarch/0001-Disable-menu_show_core_updater.patch new file mode 100644 index 000000000000..75018dc8c4d1 --- /dev/null +++ b/pkgs/misc/emulators/retroarch/0001-Disable-menu_show_core_updater.patch @@ -0,0 +1,25 @@ +From 546b343294209abbb193883ab76b679b7f99c6d3 Mon Sep 17 00:00:00 2001 +From: Thiago Kenji Okada +Date: Sat, 20 Nov 2021 16:03:50 -0300 +Subject: [PATCH 1/2] Disable "menu_show_core_updater" + +--- + retroarch.cfg | 2 +- + 1 file changed, 1 insertion(+), 1 deletion(-) + +diff --git a/retroarch.cfg b/retroarch.cfg +index cdcb199c9f..ab72f3920f 100644 +--- a/retroarch.cfg ++++ b/retroarch.cfg +@@ -681,7 +681,7 @@ + # menu_show_online_updater = true + + # If disabled, will hide the ability to update cores (and core info files) inside the menu. +-# menu_show_core_updater = true ++menu_show_core_updater = false + + # If disabled, the libretro core will keep running in the background when we + # are in the menu. +-- +2.31.1 + diff --git a/pkgs/misc/emulators/retroarch/0002-Use-fixed-paths-on-libretro_info_path.patch b/pkgs/misc/emulators/retroarch/0002-Use-fixed-paths-on-libretro_info_path.patch new file mode 100644 index 000000000000..9aa8db6ab048 --- /dev/null +++ b/pkgs/misc/emulators/retroarch/0002-Use-fixed-paths-on-libretro_info_path.patch @@ -0,0 +1,80 @@ +From 6788718299e1aba3ff8b31cd6ef012e8d3643bd3 Mon Sep 17 00:00:00 2001 +From: Thiago Kenji Okada +Date: Sat, 20 Nov 2021 15:59:23 -0300 +Subject: [PATCH 2/2] Use fixed paths on "libretro_info_path" + +This patch sets "libretro_info_path" to `handle = false`, so instead of +using the values from `retroarch.cfg`, it will always use the default. + +Also, it patches the default "libretro_info_path" to the +`@libretro_info_path` string, so we can substitute it with the full path +to it during build. +--- + configuration.c | 2 +- + frontend/drivers/platform_darwin.m | 9 ++------- + frontend/drivers/platform_unix.c | 8 ++++---- + 3 files changed, 7 insertions(+), 12 deletions(-) + +diff --git a/configuration.c b/configuration.c +index e6a3841324..afb1d6e2ce 100644 +--- a/configuration.c ++++ b/configuration.c +@@ -1456,7 +1456,7 @@ static struct config_path_setting *populate_settings_path( + SETTING_PATH("core_options_path", + settings->paths.path_core_options, false, NULL, true); + SETTING_PATH("libretro_info_path", +- settings->paths.path_libretro_info, false, NULL, true); ++ settings->paths.path_libretro_info, false, NULL, false); + SETTING_PATH("content_database_path", + settings->paths.path_content_database, false, NULL, true); + SETTING_PATH("cheat_database_path", +diff --git a/frontend/drivers/platform_darwin.m b/frontend/drivers/platform_darwin.m +index f922e50c55..52732f65ae 100644 +--- a/frontend/drivers/platform_darwin.m ++++ b/frontend/drivers/platform_darwin.m +@@ -383,14 +383,9 @@ static void frontend_darwin_get_env(int *argc, char *argv[], + home_dir_buf, "shaders_glsl", + sizeof(g_defaults.dirs[DEFAULT_DIR_SHADER])); + #endif +-#ifdef HAVE_UPDATE_CORES + fill_pathname_join(g_defaults.dirs[DEFAULT_DIR_CORE], +- home_dir_buf, "cores", sizeof(g_defaults.dirs[DEFAULT_DIR_CORE])); +-#else +- fill_pathname_join(g_defaults.dirs[DEFAULT_DIR_CORE], +- bundle_path_buf, "modules", sizeof(g_defaults.dirs[DEFAULT_DIR_CORE])); +-#endif +- fill_pathname_join(g_defaults.dirs[DEFAULT_DIR_CORE_INFO], home_dir_buf, "info", sizeof(g_defaults.dirs[DEFAULT_DIR_CORE_INFO])); ++ "@libretro_directory@", "", sizeof(g_defaults.dirs[DEFAULT_DIR_CORE])); ++ fill_pathname_join(g_defaults.dirs[DEFAULT_DIR_CORE_INFO], "@libretro_info_path@", "", sizeof(g_defaults.dirs[DEFAULT_DIR_CORE_INFO])); + fill_pathname_join(g_defaults.dirs[DEFAULT_DIR_OVERLAY], home_dir_buf, "overlays", sizeof(g_defaults.dirs[DEFAULT_DIR_OVERLAY])); + #ifdef HAVE_VIDEO_LAYOUT + fill_pathname_join(g_defaults.dirs[DEFAULT_DIR_VIDEO_LAYOUT], home_dir_buf, "layouts", sizeof(g_defaults.dirs[DEFAULT_DIR_VIDEO_LAYOUT])); +diff --git a/frontend/drivers/platform_unix.c b/frontend/drivers/platform_unix.c +index 722e1c595c..d87e01cf12 100644 +--- a/frontend/drivers/platform_unix.c ++++ b/frontend/drivers/platform_unix.c +@@ -1815,8 +1815,8 @@ static void frontend_unix_get_env(int *argc, + strcpy_literal(base_path, "retroarch"); + #endif + +- fill_pathname_join(g_defaults.dirs[DEFAULT_DIR_CORE], base_path, +- "cores", sizeof(g_defaults.dirs[DEFAULT_DIR_CORE])); ++ fill_pathname_join(g_defaults.dirs[DEFAULT_DIR_CORE], "@libretro_directory@", ++ "", sizeof(g_defaults.dirs[DEFAULT_DIR_CORE])); + #if defined(DINGUX) + /* On platforms that require manual core installation/ + * removal, placing core info files in the same directory +@@ -1825,8 +1825,8 @@ static void frontend_unix_get_env(int *argc, + fill_pathname_join(g_defaults.dirs[DEFAULT_DIR_CORE_INFO], base_path, + "core_info", sizeof(g_defaults.dirs[DEFAULT_DIR_CORE_INFO])); + #else +- fill_pathname_join(g_defaults.dirs[DEFAULT_DIR_CORE_INFO], base_path, +- "cores", sizeof(g_defaults.dirs[DEFAULT_DIR_CORE_INFO])); ++ fill_pathname_join(g_defaults.dirs[DEFAULT_DIR_CORE_INFO], "@libretro_info_path@", ++ "", sizeof(g_defaults.dirs[DEFAULT_DIR_CORE_INFO])); + #endif + fill_pathname_join(g_defaults.dirs[DEFAULT_DIR_AUTOCONFIG], base_path, + "autoconfig", sizeof(g_defaults.dirs[DEFAULT_DIR_AUTOCONFIG])); +-- +2.31.1 + diff --git a/pkgs/misc/emulators/retroarch/default.nix b/pkgs/misc/emulators/retroarch/default.nix index 21cbcb801616..122dfcd0f274 100644 --- a/pkgs/misc/emulators/retroarch/default.nix +++ b/pkgs/misc/emulators/retroarch/default.nix @@ -55,18 +55,17 @@ stdenv.mkDerivation rec { }; patches = [ - # FIXME: The `retroarch.cfg` file is created once in the first run and only - # updated when needed. However, the file may have out-of-date paths - # In case of issues (e.g.: cores are not loading), please delete the - # `$XDG_CONFIG_HOME/retroarch/retroarch.cfg` file - # See: https://github.com/libretro/RetroArch/issues/13251 - ./fix-config.patch + ./0001-Disable-menu_show_core_updater.patch + ./0002-Use-fixed-paths-on-libretro_info_path.patch ]; postPatch = '' - substituteInPlace retroarch.cfg \ + substituteInPlace "frontend/drivers/platform_unix.c" \ --replace "@libretro_directory@" "$out/lib" \ - --replace "@libretro_info_path@" "$out/share/libretro/info" \ + --replace "@libretro_info_path@" "$out/share/libretro/info" + substituteInPlace "frontend/drivers/platform_darwin.m" \ + --replace "@libretro_directory@" "$out/lib" \ + --replace "@libretro_info_path@" "$out/share/libretro/info" ''; nativeBuildInputs = [ pkg-config wayland ] ++ diff --git a/pkgs/misc/emulators/retroarch/disable-menu-show-core-updater.patch b/pkgs/misc/emulators/retroarch/disable-menu-show-core-updater.patch new file mode 100644 index 000000000000..34fea554ef71 --- /dev/null +++ b/pkgs/misc/emulators/retroarch/disable-menu-show-core-updater.patch @@ -0,0 +1,13 @@ +diff --git a/retroarch.cfg b/retroarch.cfg +index cdcb199c9f..ab72f3920f 100644 +--- a/retroarch.cfg ++++ b/retroarch.cfg +@@ -681,7 +681,7 @@ + # menu_show_online_updater = true + + # If disabled, will hide the ability to update cores (and core info files) inside the menu. +-# menu_show_core_updater = true ++menu_show_core_updater = false + + # If disabled, the libretro core will keep running in the background when we + # are in the menu. diff --git a/pkgs/misc/emulators/retroarch/fix-libretro-paths.patch b/pkgs/misc/emulators/retroarch/fix-libretro-paths.patch new file mode 100644 index 000000000000..203ce836533d --- /dev/null +++ b/pkgs/misc/emulators/retroarch/fix-libretro-paths.patch @@ -0,0 +1,28 @@ +diff --git a/configuration.c b/configuration.c +index e6a3841324..afb1d6e2ce 100644 +--- a/configuration.c ++++ b/configuration.c +@@ -1456,7 +1456,7 @@ static struct config_path_setting *populate_settings_path( + SETTING_PATH("core_options_path", + settings->paths.path_core_options, false, NULL, true); + SETTING_PATH("libretro_info_path", +- settings->paths.path_libretro_info, false, NULL, true); ++ settings->paths.path_libretro_info, false, NULL, false); + SETTING_PATH("content_database_path", + settings->paths.path_content_database, false, NULL, true); + SETTING_PATH("cheat_database_path", +diff --git a/frontend/drivers/platform_unix.c b/frontend/drivers/platform_unix.c +index 722e1c595c..e7313ee038 100644 +--- a/frontend/drivers/platform_unix.c ++++ b/frontend/drivers/platform_unix.c +@@ -1825,8 +1825,8 @@ static void frontend_unix_get_env(int *argc, + fill_pathname_join(g_defaults.dirs[DEFAULT_DIR_CORE_INFO], base_path, + "core_info", sizeof(g_defaults.dirs[DEFAULT_DIR_CORE_INFO])); + #else +- fill_pathname_join(g_defaults.dirs[DEFAULT_DIR_CORE_INFO], base_path, +- "cores", sizeof(g_defaults.dirs[DEFAULT_DIR_CORE_INFO])); ++ fill_pathname_join(g_defaults.dirs[DEFAULT_DIR_CORE_INFO], "@libretro_info_path@", ++ "", sizeof(g_defaults.dirs[DEFAULT_DIR_CORE_INFO])); + #endif + fill_pathname_join(g_defaults.dirs[DEFAULT_DIR_AUTOCONFIG], base_path, + "autoconfig", sizeof(g_defaults.dirs[DEFAULT_DIR_AUTOCONFIG])); From 36f6fd1f410a797d021234ef8245ca68c53de440 Mon Sep 17 00:00:00 2001 From: Thiago Kenji Okada Date: Fri, 19 Nov 2021 23:16:53 -0300 Subject: [PATCH 08/27] nixos/doc: add release notes about retroarch changes --- .../from_md/release-notes/rl-2111.section.xml | 21 +++++++++++++++++++ .../manual/release-notes/rl-2111.section.md | 4 ++++ 2 files changed, 25 insertions(+) diff --git a/nixos/doc/manual/from_md/release-notes/rl-2111.section.xml b/nixos/doc/manual/from_md/release-notes/rl-2111.section.xml index a64379b19ef6..f1d803136aa0 100644 --- a/nixos/doc/manual/from_md/release-notes/rl-2111.section.xml +++ b/nixos/doc/manual/from_md/release-notes/rl-2111.section.xml @@ -1365,6 +1365,17 @@ Superuser created successfully. gnat11 instead of gnat9. + + + retroArchCores has been removed. This means + that using nixpkgs.config.retroarch to + customize RetroArch cores is not supported anymore. Instead, + use package overrides, for example: + retroarch.override { cores = with libretro; [ citra snes9x ]; };. + Also, retroarchFull derivation is available + for those who want to have all RetroArch cores available. + +
@@ -1966,6 +1977,16 @@ Superuser created successfully. 1.5.4. + + + RetroArch has been upgraded from version + 1.8.5 to 1.9.13.2. Since + the previous release was quite old, if you’re having issues + after the upgrade, please delete your + $XDG_CONFIG_HOME/retroarch/retroarch.cfg + file. + +
diff --git a/nixos/doc/manual/release-notes/rl-2111.section.md b/nixos/doc/manual/release-notes/rl-2111.section.md index 9a76b4cca449..275ee7142d0e 100644 --- a/nixos/doc/manual/release-notes/rl-2111.section.md +++ b/nixos/doc/manual/release-notes/rl-2111.section.md @@ -407,6 +407,8 @@ In addition to numerous new and upgraded packages, this release has the followin - The default GNAT version has been changed: The `gnat` attribute now points to `gnat11` instead of `gnat9`. +- `retroArchCores` has been removed. This means that using `nixpkgs.config.retroarch` to customize RetroArch cores is not supported anymore. Instead, use package overrides, for example: `retroarch.override { cores = with libretro; [ citra snes9x ]; };`. Also, `retroarchFull` derivation is available for those who want to have all RetroArch cores available. + ## Other Notable Changes {#sec-release-21.11-notable-changes} @@ -539,3 +541,5 @@ In addition to numerous new and upgraded packages, this release has the followin - Loki has had another release. Some default values have been changed for the configuration and some configuration options have been renamed. For more details, please check [the upgrade guide](https://grafana.com/docs/loki/latest/upgrading/#240). - `julia` now refers to `julia-stable` instead of `julia-lts`. In practice this means it has been upgraded from `1.0.4` to `1.5.4`. + +- RetroArch has been upgraded from version `1.8.5` to `1.9.13.2`. Since the previous release was quite old, if you're having issues after the upgrade, please delete your `$XDG_CONFIG_HOME/retroarch/retroarch.cfg` file. From f435d7d6310cd55af254518eb2f69d0d866a4cec Mon Sep 17 00:00:00 2001 From: Thiago Kenji Okada Date: Sat, 20 Nov 2021 10:41:46 -0300 Subject: [PATCH 09/27] retroarch: fix build on macOS, mark as broken With those changes retroarch builds on Darwin, but the executable itself is broken. --- pkgs/misc/emulators/retroarch/default.nix | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/pkgs/misc/emulators/retroarch/default.nix b/pkgs/misc/emulators/retroarch/default.nix index 122dfcd0f274..b2621ba8cc13 100644 --- a/pkgs/misc/emulators/retroarch/default.nix +++ b/pkgs/misc/emulators/retroarch/default.nix @@ -68,7 +68,8 @@ stdenv.mkDerivation rec { --replace "@libretro_info_path@" "$out/share/libretro/info" ''; - nativeBuildInputs = [ pkg-config wayland ] ++ + nativeBuildInputs = [ pkg-config ] ++ + optional stdenv.isLinux wayland ++ optional withVulkan makeWrapper; buildInputs = [ ffmpeg freetype libxml2 libGLU libGL python3 SDL2 which ] ++ @@ -109,5 +110,8 @@ stdenv.mkDerivation rec { license = licenses.gpl3Plus; platforms = platforms.all; maintainers = with maintainers; [ MP2E edwtjo matthewbauer kolbycrouch thiagokokada ]; + # FIXME: exits with error on macOS: + # No Info.plist file in application bundle or no NSPrincipalClass in the Info.plist file, exiting + broken = stdenv.isDarwin; }; } From d127765898cf783e083e277a9abae4f909263956 Mon Sep 17 00:00:00 2001 From: Stefan Frijters Date: Sat, 6 Nov 2021 00:21:35 +0100 Subject: [PATCH 10/27] wine{Unstable,Staging}: 6.20 -> 6.21 Upstream dlls/crypt32/unixlib.c has been heavily modified, so we need a new patch that fits for unstable/staging. --- pkgs/misc/emulators/wine/cert-path-6.21.patch | 15 +++++++++++++++ pkgs/misc/emulators/wine/sources.nix | 8 ++++---- 2 files changed, 19 insertions(+), 4 deletions(-) create mode 100644 pkgs/misc/emulators/wine/cert-path-6.21.patch diff --git a/pkgs/misc/emulators/wine/cert-path-6.21.patch b/pkgs/misc/emulators/wine/cert-path-6.21.patch new file mode 100644 index 000000000000..f0727f422f8c --- /dev/null +++ b/pkgs/misc/emulators/wine/cert-path-6.21.patch @@ -0,0 +1,15 @@ +diff --git a/dlls/crypt32/unixlib.c b/dlls/crypt32/unixlib.c +index 7cb521eb98b..5804b88be84 100644 +--- a/dlls/crypt32/unixlib.c ++++ b/dlls/crypt32/unixlib.c +@@ -654,6 +654,10 @@ static void load_root_certs(void) + + for (i = 0; i < ARRAY_SIZE(CRYPT_knownLocations) && list_empty(&root_cert_list); i++) + import_certs_from_path( CRYPT_knownLocations[i], TRUE ); ++ ++ char *nix_cert_file = getenv("NIX_SSL_CERT_FILE"); ++ if (nix_cert_file != NULL) ++ import_certs_from_path(nix_cert_file, TRUE); + } + + static NTSTATUS enum_root_certs( void *args ) diff --git a/pkgs/misc/emulators/wine/sources.nix b/pkgs/misc/emulators/wine/sources.nix index 647185c8b9ba..dc143b6b9445 100644 --- a/pkgs/misc/emulators/wine/sources.nix +++ b/pkgs/misc/emulators/wine/sources.nix @@ -44,9 +44,9 @@ in rec { unstable = fetchurl rec { # NOTE: Don't forget to change the SHA256 for staging as well. - version = "6.20"; + version = "6.21"; url = "https://dl.winehq.org/wine/source/6.x/wine-${version}.tar.xz"; - sha256 = "0wc4a8slb3k859sdw9wwy92zc4pq7xw1kbq4frnxbzbvkiz26a20"; + sha256 = "sha256-97Z1crUqcVDz3MQzGLQM8QQlFxMZ7fY2imAnRkLgec4="; inherit (stable) gecko32 gecko64; ## see http://wiki.winehq.org/Mono @@ -58,14 +58,14 @@ in rec { patches = [ # Also look for root certificates at $NIX_SSL_CERT_FILE - ./cert-path.patch + ./cert-path-6.21.patch ]; }; staging = fetchFromGitHub rec { # https://github.com/wine-staging/wine-staging/releases inherit (unstable) version; - sha256 = "12fvfn77rsqwdprkxiylq09jc81lq34bm8p1zhhn85q6yawpjlbn"; + sha256 = "sha256-bgtl/pei/tWob0/voRd1THBnIfsXiu/fmldG2v3rdEE="; owner = "wine-staging"; repo = "wine-staging"; rev = "v${version}"; From e19fe85e84db636ab12a86f11571370825872360 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Rasmus=20Pr=C3=A9centh?= Date: Sat, 20 Nov 2021 20:45:15 +0100 Subject: [PATCH 11/27] python3Packages.envisage: disable tests of broken optional feature --- pkgs/development/python-modules/envisage/default.nix | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/pkgs/development/python-modules/envisage/default.nix b/pkgs/development/python-modules/envisage/default.nix index 20051804328b..153d43aed8ef 100644 --- a/pkgs/development/python-modules/envisage/default.nix +++ b/pkgs/development/python-modules/envisage/default.nix @@ -1,7 +1,7 @@ { lib, fetchPypi, isPy27 , buildPythonPackage , traits, apptools, pytestCheckHook -, ipykernel, ipython, setuptools +, ipython, setuptools }: buildPythonPackage rec { @@ -15,6 +15,8 @@ buildPythonPackage rec { sha256 = "8864c29aa344f7ac26eeb94788798f2d0cc791dcf95c632da8d79ebc580e114c"; }; + # for the optional dependency ipykernel, only versions < 6 are + # supported, so it's not included in the tests, and not propagated propagatedBuildInputs = [ traits apptools setuptools ]; preCheck = '' @@ -22,7 +24,7 @@ buildPythonPackage rec { ''; checkInputs = [ - ipykernel ipython pytestCheckHook + ipython pytestCheckHook ]; meta = with lib; { From 42a83770be09b3ac21b18da6d03c95c8a3398ecd Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Rasmus=20Pr=C3=A9centh?= Date: Sat, 20 Nov 2021 20:54:45 +0100 Subject: [PATCH 12/27] python3Packages.envisage: format default.nix --- .../python-modules/envisage/default.nix | 14 ++++++++++---- 1 file changed, 10 insertions(+), 4 deletions(-) diff --git a/pkgs/development/python-modules/envisage/default.nix b/pkgs/development/python-modules/envisage/default.nix index 153d43aed8ef..b8513fd1d9ae 100644 --- a/pkgs/development/python-modules/envisage/default.nix +++ b/pkgs/development/python-modules/envisage/default.nix @@ -1,7 +1,12 @@ -{ lib, fetchPypi, isPy27 +{ lib +, fetchPypi +, isPy27 , buildPythonPackage -, traits, apptools, pytestCheckHook -, ipython, setuptools +, traits +, apptools +, pytestCheckHook +, ipython +, setuptools }: buildPythonPackage rec { @@ -24,7 +29,8 @@ buildPythonPackage rec { ''; checkInputs = [ - ipython pytestCheckHook + ipython + pytestCheckHook ]; meta = with lib; { From 70e9780f978a80fd5f9d041ad3172b2525f788f7 Mon Sep 17 00:00:00 2001 From: Stefan Frijters Date: Sat, 20 Nov 2021 20:42:11 +0100 Subject: [PATCH 13/27] wine{Unstable,Staging}: 6.21 -> 6.22 --- pkgs/misc/emulators/wine/sources.nix | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/pkgs/misc/emulators/wine/sources.nix b/pkgs/misc/emulators/wine/sources.nix index dc143b6b9445..df50f068cf22 100644 --- a/pkgs/misc/emulators/wine/sources.nix +++ b/pkgs/misc/emulators/wine/sources.nix @@ -44,9 +44,9 @@ in rec { unstable = fetchurl rec { # NOTE: Don't forget to change the SHA256 for staging as well. - version = "6.21"; + version = "6.22"; url = "https://dl.winehq.org/wine/source/6.x/wine-${version}.tar.xz"; - sha256 = "sha256-97Z1crUqcVDz3MQzGLQM8QQlFxMZ7fY2imAnRkLgec4="; + sha256 = "sha256-gmBCoYGph5cyo9rLv4FnYF8wUpG/z6r16qDslSXXZO8="; inherit (stable) gecko32 gecko64; ## see http://wiki.winehq.org/Mono @@ -65,7 +65,7 @@ in rec { staging = fetchFromGitHub rec { # https://github.com/wine-staging/wine-staging/releases inherit (unstable) version; - sha256 = "sha256-bgtl/pei/tWob0/voRd1THBnIfsXiu/fmldG2v3rdEE="; + sha256 = "sha256-dGyaos6xITiAQdU65/PJQKRl5Rr5xBpgQhXii9iwb+E="; owner = "wine-staging"; repo = "wine-staging"; rev = "v${version}"; From 60c52309689d7a9260035b66e7a7f29f2b92880e Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Vladim=C3=ADr=20=C4=8Cun=C3=A1t?= Date: Sat, 20 Nov 2021 23:00:43 +0100 Subject: [PATCH 14/27] nixosTests.installer: increase the VM memory For me that fixes the i686 ZFS case: https://hydra.nixos.org/build/158897777 I don't think it's worth chasing why RAM usage isn't very low here. --- nixos/tests/installer.nix | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/nixos/tests/installer.nix b/nixos/tests/installer.nix index 73dc676ca32d..f800975a4300 100644 --- a/nixos/tests/installer.nix +++ b/nixos/tests/installer.nix @@ -288,7 +288,7 @@ let # builds stuff in the VM, needs more juice virtualisation.diskSize = 8 * 1024; virtualisation.cores = 8; - virtualisation.memorySize = 1536; + virtualisation.memorySize = 2048; # Use a small /dev/vdb as the root disk for the # installer. This ensures the target disk (/dev/vda) is From 1ee4cb8d9341d52d36e0fb954f69e7669d1f8e8c Mon Sep 17 00:00:00 2001 From: Mauricio Collares <244239+collares@users.noreply.github.com> Date: Sat, 20 Nov 2021 20:13:07 -0300 Subject: [PATCH 15/27] sage: patch test so that new pari warning doesn't cause failures (#4) --- pkgs/applications/science/math/sage/sage-src.nix | 14 ++++++++++++++ 1 file changed, 14 insertions(+) diff --git a/pkgs/applications/science/math/sage/sage-src.nix b/pkgs/applications/science/math/sage/sage-src.nix index ed10121e5cdf..4a912e002d97 100644 --- a/pkgs/applications/science/math/sage/sage-src.nix +++ b/pkgs/applications/science/math/sage/sage-src.nix @@ -23,6 +23,12 @@ let # branches (wip patches from tickets), but exports each commit as a separate # patch, so merge commits can lead to conflicts. Used if squashed == false. # + # The above is the preferred option. To use it, find a Trac ticket and pass the + # "Commit" field from the ticket as "rev", choosing "base" as an appropriate + # release tag, i.e. a tag that doesn't cause the patch to include a lot of + # unrelated changes. If there is no such tag (due to nonlinear history, for + # example), there are two other options, listed below. + # # 2) From GitHub's sagemath/sage repo. This lets us use a GH feature that allows # us to choose between a .patch file, with one patch per commit, or a .diff file, # which squashes all commits into a single diff. This is used if squashed == @@ -118,6 +124,14 @@ stdenv.mkDerivation rec { rev = "beed4e16aff32e47d0c3b1c58cb1e2f4c38590f8"; sha256 = "sha256-3eJPfWfCrCAQ5filIn7FbzjRQeO9QyTIVl/HyRuqFtE="; }) + + # https://trac.sagemath.org/ticket/32797 + (fetchSageDiff { + base = "9.5.beta7"; + name = "pari-2.13.3-update.patch"; + rev = "f5f7a86908daf60b25e66e6a189c51ada7e0a732"; + sha256 = "sha256-H/caGx3q4KcdsyGe+ojV9bUTQ5y0siqM+QHgDbeEnbw="; + }) ]; patches = nixPatches ++ bugfixPatches ++ packageUpgradePatches; From 31b38fd938038c63e0623dba0d6a7eccc7bd39ed Mon Sep 17 00:00:00 2001 From: flurie Date: Sat, 20 Nov 2021 18:24:38 -0500 Subject: [PATCH 16/27] cdpr: fix build on darwin --- pkgs/tools/networking/cdpr/default.nix | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/pkgs/tools/networking/cdpr/default.nix b/pkgs/tools/networking/cdpr/default.nix index 6ac69b95dba6..0b92fd7aa45c 100644 --- a/pkgs/tools/networking/cdpr/default.nix +++ b/pkgs/tools/networking/cdpr/default.nix @@ -9,6 +9,10 @@ stdenv.mkDerivation rec { sha256 = "1idyvyafkk0ifcbi7mc65b60qia6hpsdb6s66j4ggqp7if6vblrj"; }; + postPatch = '' + substituteInPlace Makefile --replace 'gcc' '"$$CC"' + ''; + buildInputs = [ libpcap ]; installPhase = '' From 08b402b70e3d84d089f3de7221423790afd6a06a Mon Sep 17 00:00:00 2001 From: Thiago Kenji Okada Date: Sat, 20 Nov 2021 20:24:24 -0300 Subject: [PATCH 17/27] libretro: enableParalellBuilding, except for older MAMEs MAME since 0.225 have a fix for the build issues while building in parallel. Since libretro.mame is on 0.227 right now, should be safe to enable. Since eventually enableParallelBuilding should be the default, enabling it for all cores except the older MAMEs seems better than just enabling for libretro.mame. --- pkgs/misc/emulators/retroarch/cores.nix | 10 ++++++++-- 1 file changed, 8 insertions(+), 2 deletions(-) diff --git a/pkgs/misc/emulators/retroarch/cores.nix b/pkgs/misc/emulators/retroarch/cores.nix index c7b94e29589a..ab13e041139c 100644 --- a/pkgs/misc/emulators/retroarch/cores.nix +++ b/pkgs/misc/emulators/retroarch/cores.nix @@ -91,6 +91,8 @@ let --add-flags "-L $COREDIR/${d2u core}_libretro${stdenv.hostPlatform.extensions.sharedLibrary} $@" ''; + enableParallelBuilding = true; + passthru = { inherit core; libretroCore = "/lib/retroarch/cores"; @@ -427,7 +429,6 @@ in core = "mame"; description = "Port of MAME to libretro"; license = with lib.licenses; [ bsd3 gpl2Plus ]; - extraBuildInputs = [ alsa-lib libGLU libGL portaudio python3 xorg.libX11 ]; postPatch = '' # Prevent the failure during the parallel building of: @@ -443,6 +444,7 @@ in license = "MAME"; makefile = "Makefile"; makeFlags = lib.optional (!stdenv.hostPlatform.isx86) "IS_X86=0"; + enableParallelBuilding = false; }; mame2003 = mkLibRetroCore { @@ -450,6 +452,7 @@ in description = "Port of MAME ~2003 to libretro"; license = "MAME"; makefile = "Makefile"; + enableParallelBuilding = false; }; mame2003-plus = mkLibRetroCore { @@ -457,6 +460,7 @@ in description = "Port of MAME ~2003+ to libretro"; license = "MAME"; makefile = "Makefile"; + enableParallelBuilding = false; }; mame2010 = mkLibRetroCore { @@ -465,6 +469,7 @@ in license = "MAME"; makefile = "Makefile"; makeFlags = lib.optionals stdenv.hostPlatform.isAarch64 [ "PTR64=1" "ARM_ENABLED=1" "X86_SH2DRC=0" "FORCE_DRC_C_BACKEND=1" ]; + enableParallelBuilding = false; }; mame2015 = mkLibRetroCore { @@ -474,6 +479,7 @@ in extraNativeBuildInputs = [ python27 ]; extraBuildInputs = [ alsa-lib ]; makefile = "Makefile"; + enableParallelBuilding = false; }; mame2016 = mkLibRetroCore { @@ -494,6 +500,7 @@ in # make -C 3rdparty/genie/build/gmake.linux -f genie.make obj/Release/src/host/lua-5.3.0/src/lgc.o mkdir -p 3rdparty/genie/build/gmake.linux/obj/Release/src/host/lua-5.3.0/src ''; + enableParallelBuilding = false; }; mesen = mkLibRetroCore { @@ -523,7 +530,6 @@ in src = getCoreSrc "mupen64plus"; description = "Libretro port of Mupen64 Plus, GL only"; license = lib.licenses.gpl3Only; - extraBuildInputs = [ libGLU libGL libpng nasm xorg.libX11 ]; makefile = "Makefile"; }; From a907da6e638c8654bface8a4f5aeec2776668c8c Mon Sep 17 00:00:00 2001 From: Robert Scott Date: Sat, 20 Nov 2021 23:39:09 +0000 Subject: [PATCH 18/27] libasyncns: fix build for darwin --- pkgs/development/libraries/libasyncns/default.nix | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/pkgs/development/libraries/libasyncns/default.nix b/pkgs/development/libraries/libasyncns/default.nix index c94e1c04e0ba..423b8cca6915 100644 --- a/pkgs/development/libraries/libasyncns/default.nix +++ b/pkgs/development/libraries/libasyncns/default.nix @@ -9,6 +9,11 @@ stdenv.mkDerivation rec { sha256 = "0x5b6lcic4cd7q0bx00x93kvpyzl7n2abbgvqbrlzrfb8vknc6jg"; }; + postPatch = lib.optionalString stdenv.isDarwin '' + substituteInPlace libasyncns/asyncns.c \ + --replace '' '' + ''; + configureFlags = lib.optionals (stdenv.hostPlatform != stdenv.buildPlatform) [ "ac_cv_func_malloc_0_nonnull=yes" "ac_cv_func_realloc_0_nonnull=yes" From 2077956e7813fcc57f45d07a4b46715d0cd592ce Mon Sep 17 00:00:00 2001 From: Artturin Date: Sat, 20 Nov 2021 01:32:55 +0200 Subject: [PATCH 19/27] nixos/network-interfaces: add a warning for underscores in hostname until the issues in https://github.com/NixOS/nixpkgs/pull/138978 have been resolved --- nixos/modules/tasks/network-interfaces.nix | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/nixos/modules/tasks/network-interfaces.nix b/nixos/modules/tasks/network-interfaces.nix index 4e20ec118464..38b7f66bae4f 100644 --- a/nixos/modules/tasks/network-interfaces.nix +++ b/nixos/modules/tasks/network-interfaces.nix @@ -417,7 +417,11 @@ in network node hostname (uname --nodename) the option boot.kernel.sysctl."kernel.hostname" can be used as a workaround (but the 64 character limit still applies). + + WARNING: Do not use underscores (_) or you may run into unexpected issues. ''; + # warning until the issues in https://github.com/NixOS/nixpkgs/pull/138978 + # are resolved }; networking.fqdn = mkOption { From 15f425ae9c25aacea6dfd3754e9a0f7e803524ac Mon Sep 17 00:00:00 2001 From: Robert Scott Date: Sat, 20 Nov 2021 23:39:53 +0000 Subject: [PATCH 20/27] python3Packages.libasyncns: fix build for darwin --- .../python-modules/libasyncns/default.nix | 14 ++++++++++++-- 1 file changed, 12 insertions(+), 2 deletions(-) diff --git a/pkgs/development/python-modules/libasyncns/default.nix b/pkgs/development/python-modules/libasyncns/default.nix index 38ca9b26360c..310fc54606c6 100644 --- a/pkgs/development/python-modules/libasyncns/default.nix +++ b/pkgs/development/python-modules/libasyncns/default.nix @@ -1,5 +1,10 @@ -{ lib, buildPythonPackage, fetchurl -, libasyncns, pkg-config }: +{ lib +, stdenv +, buildPythonPackage +, fetchurl +, libasyncns +, pkg-config +}: buildPythonPackage rec { pname = "libasyncns-python"; @@ -12,6 +17,11 @@ buildPythonPackage rec { patches = [ ./libasyncns-fix-res-consts.patch ]; + postPatch = lib.optionalString stdenv.isDarwin '' + substituteInPlace resquery.c \ + --replace '' '' + ''; + buildInputs = [ libasyncns ]; nativeBuildInputs = [ pkg-config ]; doCheck = false; # requires network access From 34a7ce11562b146b57bf68083f322c370a06c1b1 Mon Sep 17 00:00:00 2001 From: Robert Scott Date: Sat, 20 Nov 2021 23:40:16 +0000 Subject: [PATCH 21/27] python3Packages.libasyncns: add pythonImportsCheck --- pkgs/development/python-modules/libasyncns/default.nix | 2 ++ 1 file changed, 2 insertions(+) diff --git a/pkgs/development/python-modules/libasyncns/default.nix b/pkgs/development/python-modules/libasyncns/default.nix index 310fc54606c6..bd28c2207340 100644 --- a/pkgs/development/python-modules/libasyncns/default.nix +++ b/pkgs/development/python-modules/libasyncns/default.nix @@ -26,6 +26,8 @@ buildPythonPackage rec { nativeBuildInputs = [ pkg-config ]; doCheck = false; # requires network access + pythonImportsCheck = [ "libasyncns" ]; + meta = with lib; { description = "libasyncns-python is a python binding for the asynchronous name service query library"; license = licenses.lgpl21; From 42133e84517a8aef0de2788160055494284a0447 Mon Sep 17 00:00:00 2001 From: Robert Scott Date: Sat, 20 Nov 2021 20:27:30 +0000 Subject: [PATCH 22/27] python3Packages.python-crontab: skip test test_03_usage to my knowledge this test only fails on darwin, but assuming /tmp is writable is a Bad Thing anyway so skipping on all platforms. don't think it covers anything not otherwise covered. --- pkgs/development/python-modules/python-crontab/default.nix | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/pkgs/development/python-modules/python-crontab/default.nix b/pkgs/development/python-modules/python-crontab/default.nix index d91418fc1d0e..9de0801d5375 100644 --- a/pkgs/development/python-modules/python-crontab/default.nix +++ b/pkgs/development/python-modules/python-crontab/default.nix @@ -10,7 +10,11 @@ buildPythonPackage rec { }; checkInputs = [ pytestCheckHook ]; - disabledTests = [ "test_07_non_posix_shell"]; + disabledTests = [ + "test_07_non_posix_shell" + # doctest that assumes /tmp is writeable, awkward to patch + "test_03_usage" + ]; propagatedBuildInputs = [ python-dateutil ]; From 8afc4e543663ca0a6a4f496262cd05233737e732 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Rasmus=20Pr=C3=A9centh?= Date: Fri, 19 Nov 2021 21:33:47 +0100 Subject: [PATCH 23/27] pythonPackages.termplotlib: fix build 1. New tests are failing with gnuplot 5.4.2 2. Propagate gnuplot and numpy --- .../python-modules/termplotlib/default.nix | 26 +++++++++++++++---- .../termplotlib/gnuplot-subprocess.patch | 26 +++++++++++++++++++ 2 files changed, 47 insertions(+), 5 deletions(-) create mode 100644 pkgs/development/python-modules/termplotlib/gnuplot-subprocess.patch diff --git a/pkgs/development/python-modules/termplotlib/default.nix b/pkgs/development/python-modules/termplotlib/default.nix index 06432b673afd..fde1080491e0 100644 --- a/pkgs/development/python-modules/termplotlib/default.nix +++ b/pkgs/development/python-modules/termplotlib/default.nix @@ -1,4 +1,5 @@ { lib +, substituteAll , buildPythonPackage , fetchFromGitHub , pytestCheckHook @@ -19,13 +20,28 @@ buildPythonPackage rec { }; format = "pyproject"; - checkInputs = [ pytestCheckHook numpy exdown gnuplot ]; + checkInputs = [ + pytestCheckHook + exdown + ]; pythonImportsCheck = [ "termplotlib" ]; - # there seems to be a newline in the very front of the output - # which causes the test to fail, since it apparently doesn't - # strip whitespace. might be a gnuplot choice? sigh... - disabledTests = [ "test_plot_lim" ]; + propagatedBuildInputs = [ numpy ]; + + patches = [ + (substituteAll { + src = ./gnuplot-subprocess.patch; + gnuplot = "${gnuplot.out}/bin/gnuplot"; + }) + ]; + + # The current gnuplot version renders slightly different test + # graphs, with emphasis on slightly. The plots are still correct. + # Tests pass on gnuplot 5.4.1, but fail on 5.4.2. + disabledTests = [ + "test_plot" + "test_nolabel" + ]; meta = with lib; { description = "matplotlib for your terminal"; diff --git a/pkgs/development/python-modules/termplotlib/gnuplot-subprocess.patch b/pkgs/development/python-modules/termplotlib/gnuplot-subprocess.patch new file mode 100644 index 000000000000..5935dbda1265 --- /dev/null +++ b/pkgs/development/python-modules/termplotlib/gnuplot-subprocess.patch @@ -0,0 +1,26 @@ +diff --git a/src/termplotlib/helpers.py b/src/termplotlib/helpers.py +index 4b67fd0..38a2242 100644 +--- a/src/termplotlib/helpers.py ++++ b/src/termplotlib/helpers.py +@@ -32,7 +32,7 @@ def is_unicode_standard_output(): + + + def get_gnuplot_version(): +- out = subprocess.check_output(["gnuplot", "--version"]).decode() ++ out = subprocess.check_output(["@gnuplot@", "--version"]).decode() + m = re.match("gnuplot (\\d).(\\d) patchlevel (\\d)\n", out) + if m is None: + raise RuntimeError("Couldn't get gnuplot version") +diff --git a/src/termplotlib/plot.py b/src/termplotlib/plot.py +index 0f46b87..1418fd1 100644 +--- a/src/termplotlib/plot.py ++++ b/src/termplotlib/plot.py +@@ -17,7 +17,7 @@ def plot( + ticks_scale: int = 0, + ): + p = subprocess.Popen( +- ["gnuplot"], ++ ["@gnuplot@"], + stdout=subprocess.PIPE, + stdin=subprocess.PIPE, + stderr=subprocess.PIPE, From 24aacf38082fac4de98d4bc2275ae3db38d273aa Mon Sep 17 00:00:00 2001 From: "S. Nordin Abouzahra" Date: Sat, 20 Nov 2021 19:30:54 -0500 Subject: [PATCH 24/27] nilfs-utils: fix hardcoded paths /sbin/nilfs_cleanerd -> $out/bin/nilfs_cleanerd /sbin/badblocks -> ${e2fsprogs}/bin/badblocks The relevant binaries to test are mkfs.nilfs2 (calls badblocks), mount.nilfs2 and umount.nilfs2 (calls nilfs_cleanerd). --- pkgs/tools/filesystems/nilfs-utils/default.nix | 9 ++++++++- 1 file changed, 8 insertions(+), 1 deletion(-) diff --git a/pkgs/tools/filesystems/nilfs-utils/default.nix b/pkgs/tools/filesystems/nilfs-utils/default.nix index 07c2c5292dcf..3c2dfaf2f1d3 100644 --- a/pkgs/tools/filesystems/nilfs-utils/default.nix +++ b/pkgs/tools/filesystems/nilfs-utils/default.nix @@ -1,4 +1,5 @@ -{ lib, stdenv, fetchFromGitHub, fetchpatch, autoreconfHook, libuuid, libselinux }: +{ lib, stdenv, fetchFromGitHub, fetchpatch, autoreconfHook, libuuid, libselinux +, e2fsprogs }: stdenv.mkDerivation rec { pname = "nilfs-utils"; @@ -15,6 +16,12 @@ stdenv.mkDerivation rec { buildInputs = [ libuuid libselinux ]; + postPatch = '' + # Fix up hardcoded paths. + substituteInPlace lib/cleaner_exec.c --replace /sbin/ $out/bin/ + substituteInPlace sbin/mkfs/mkfs.c --replace /sbin/ ${lib.getBin e2fsprogs}/bin/ + ''; + # According to upstream, libmount should be detected automatically but the # build system fails to do this. This is likely a bug with their build system # hence it is explicitly enabled here. From e9de71cc5d0f6755987c93705cf21e69197540bb Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Sebasti=C3=A1n=20Mancilla?= Date: Sat, 20 Nov 2021 21:58:31 -0300 Subject: [PATCH 25/27] darwin: stop using gccStdenv when stdenv works fine masscan, rig and sl packages were built with gccStdenv on darwin, but they build just fine with stdenv. --- pkgs/top-level/all-packages.nix | 10 +++------- 1 file changed, 3 insertions(+), 7 deletions(-) diff --git a/pkgs/top-level/all-packages.nix b/pkgs/top-level/all-packages.nix index 0eb6c6edd461..4a2b024775ff 100644 --- a/pkgs/top-level/all-packages.nix +++ b/pkgs/top-level/all-packages.nix @@ -3266,9 +3266,7 @@ with pkgs; marlin-calc = callPackage ../tools/misc/marlin-calc {}; - masscan = callPackage ../tools/security/masscan { - stdenv = gccStdenv; - }; + masscan = callPackage ../tools/security/masscan { }; massren = callPackage ../tools/misc/massren { }; @@ -8834,9 +8832,7 @@ with pkgs; inherit (darwin.apple_sdk.frameworks) Carbon Cocoa IOKit; }; - rig = callPackage ../tools/misc/rig { - stdenv = gccStdenv; - }; + rig = callPackage ../tools/misc/rig { }; riseup-vpn = libsForQt5.callPackage ../tools/networking/bitmask-vpn { provider = "riseup"; @@ -9627,7 +9623,7 @@ with pkgs; synapse-admin = callPackage ../tools/admin/synapse-admin {}; - sl = callPackage ../tools/misc/sl { stdenv = gccStdenv; }; + sl = callPackage ../tools/misc/sl { }; socat = callPackage ../tools/networking/socat { }; From 3a98364c4b8741ca40e0af5597f44e6e12e9922b Mon Sep 17 00:00:00 2001 From: Jonas Carpay Date: Sun, 21 Nov 2021 11:03:53 +0900 Subject: [PATCH 26/27] purenix: add to top-level packages --- pkgs/top-level/all-packages.nix | 2 ++ 1 file changed, 2 insertions(+) diff --git a/pkgs/top-level/all-packages.nix b/pkgs/top-level/all-packages.nix index 5848e017e372..d24db1c751bb 100644 --- a/pkgs/top-level/all-packages.nix +++ b/pkgs/top-level/all-packages.nix @@ -12062,6 +12062,8 @@ with pkgs; purescript-psa = nodePackages.purescript-psa; + purenix = haskell.lib.compose.justStaticExecutables haskellPackages.purenix; + spago = callPackage ../development/tools/purescript/spago { }; pulp = nodePackages.pulp; From 255c2849248e331d7f0e56a041b80e0014a19177 Mon Sep 17 00:00:00 2001 From: 0x4A6F <0x4A6F@users.noreply.github.com> Date: Sun, 21 Nov 2021 03:12:40 +0100 Subject: [PATCH 27/27] czkawka: 0.3.2 -> 0.3.3 (#146757) * czkawka: add myself as maintainer * czkawka: 3.2.0 -> 3.3.0 * czkawka: add testVersion --- pkgs/tools/misc/czkawka/default.nix | 17 ++++++++++++----- 1 file changed, 12 insertions(+), 5 deletions(-) diff --git a/pkgs/tools/misc/czkawka/default.nix b/pkgs/tools/misc/czkawka/default.nix index 9ff6a7aaa9aa..f2a046322d80 100644 --- a/pkgs/tools/misc/czkawka/default.nix +++ b/pkgs/tools/misc/czkawka/default.nix @@ -8,20 +8,22 @@ , gdk-pixbuf , atk , gtk3 +, testVersion +, czkawka }: rustPlatform.buildRustPackage rec { pname = "czkawka"; - version = "3.2.0"; + version = "3.3.0"; src = fetchFromGitHub { owner = "qarmin"; - repo = pname; + repo = "czkawka"; rev = version; - sha256 = "sha256-OBe6nk5C3kO5Lkas9+G+VY3xAzY7SWx8W5CkSbaYJ9Y="; + sha256 = "0mikgnsqxj8dgapr2k7i9i8mmsza15kp4nasyd6l1vp2cqy8aki6"; }; - cargoSha256 = "sha256-Jghkf1mX5ic7zB2KmtOZbSxgF8C6KjRdGG1Yt+dzylI="; + cargoSha256 = "009zfy4lk8y51h1wi71mrjp6kc7xnk3r8jlbxvhyqslhqd9w10fv"; nativeBuildInputs = [ pkg-config @@ -36,10 +38,15 @@ rustPlatform.buildRustPackage rec { gtk3 ]; + passthru.tests.version = testVersion { + package = czkawka; + command = "czkawka_cli --version"; + }; + meta = with lib; { description = "A simple, fast and easy to use app to remove unnecessary files from your computer"; homepage = "https://github.com/qarmin/czkawka"; license = with licenses; [ mit ]; - maintainers = with maintainers; [ yanganto ]; + maintainers = with maintainers; [ yanganto _0x4A6F ]; }; }