From a6700d75f38cda83367a8af84651a2a72ce0f3ef Mon Sep 17 00:00:00 2001 From: lassulus Date: Sat, 24 Jul 2021 09:33:10 +0200 Subject: [PATCH 01/27] vbox-image: add new option to set free space in image --- nixos/modules/virtualisation/virtualbox-image.nix | 8 ++++++++ 1 file changed, 8 insertions(+) diff --git a/nixos/modules/virtualisation/virtualbox-image.nix b/nixos/modules/virtualisation/virtualbox-image.nix index 272c696807aa..853dd642a76d 100644 --- a/nixos/modules/virtualisation/virtualbox-image.nix +++ b/nixos/modules/virtualisation/virtualbox-image.nix @@ -18,6 +18,13 @@ in { The size of the VirtualBox base image in MiB. ''; }; + baseImageFreeSpace = mkOption { + type = with types; int; + default = 30 * 1024; + description = '' + Free space in the VirtualBox base image in MiB. + ''; + }; memorySize = mkOption { type = types.int; default = 1536; @@ -129,6 +136,7 @@ in { inherit pkgs lib config; partitionTableType = "legacy"; diskSize = cfg.baseImageSize; + additionalSpace = cfg.baseImageFreeSpace; postVM = '' From 9867f9cef6ee2ee3705e69bb9d7be9dadd4e22a5 Mon Sep 17 00:00:00 2001 From: Fabian Affolter Date: Tue, 27 Jul 2021 19:08:17 +0200 Subject: [PATCH 02/27] python3Packages.apispec: 4.7.0 -> 4.7.1 --- pkgs/development/python-modules/apispec/default.nix | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/pkgs/development/python-modules/apispec/default.nix b/pkgs/development/python-modules/apispec/default.nix index 3bc1e6d4a5cf..2753864fed81 100644 --- a/pkgs/development/python-modules/apispec/default.nix +++ b/pkgs/development/python-modules/apispec/default.nix @@ -12,12 +12,12 @@ buildPythonPackage rec { pname = "apispec"; - version = "4.7.0"; + version = "4.7.1"; disabled = pythonOlder "3.6"; src = fetchPypi { inherit pname version; - sha256 = "sha256-v6G+yLWyzqZyfgIMOm/hHZYwiN0u1hbhFHXOry1naTc="; + sha256 = "1yf71c9nq1rfb5pkgmfw486fvywi1bjnmgwxcly7y3basf3980kr"; }; propagatedBuildInputs = [ From 3209d25fd2355dbb68bf231ee1c1b3b442d42e86 Mon Sep 17 00:00:00 2001 From: cas1no <44465831+cas1no@users.noreply.github.com> Date: Sat, 31 Jul 2021 14:58:53 +0300 Subject: [PATCH 03/27] viber: add 'QML2_IMPORT_PATH' to the wrap --- .../networking/instant-messengers/viber/default.nix | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/pkgs/applications/networking/instant-messengers/viber/default.nix b/pkgs/applications/networking/instant-messengers/viber/default.nix index 66d33533a736..53eea50767f5 100644 --- a/pkgs/applications/networking/instant-messengers/viber/default.nix +++ b/pkgs/applications/networking/instant-messengers/viber/default.nix @@ -82,7 +82,8 @@ stdenv.mkDerivation { wrapProgram $out/opt/viber/Viber \ --set QT_PLUGIN_PATH "$out/opt/viber/plugins" \ --set QT_XKB_CONFIG_ROOT "${xorg.xkeyboardconfig}/share/X11/xkb" \ - --set QTCOMPOSE "${xorg.libX11.out}/share/X11/locale" + --set QTCOMPOSE "${xorg.libX11.out}/share/X11/locale" \ + --set QML2_IMPORT_PATH "$out/opt/viber/qml" ln -s $out/opt/viber/Viber $out/bin/viber mv $out/usr/share $out/share From d0556404f6d437aab5527e05854b119b5f14c61d Mon Sep 17 00:00:00 2001 From: "R. RyanTM" Date: Sat, 31 Jul 2021 18:08:28 +0000 Subject: [PATCH 04/27] pony-corral: 0.5.1 -> 0.5.3 --- pkgs/development/compilers/ponyc/pony-corral.nix | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/pkgs/development/compilers/ponyc/pony-corral.nix b/pkgs/development/compilers/ponyc/pony-corral.nix index 3f40a4d7889e..43fe247b79fb 100644 --- a/pkgs/development/compilers/ponyc/pony-corral.nix +++ b/pkgs/development/compilers/ponyc/pony-corral.nix @@ -2,13 +2,13 @@ stdenv.mkDerivation ( rec { pname = "corral"; - version = "0.5.1"; + version = "0.5.3"; src = fetchFromGitHub { owner = "ponylang"; repo = pname; rev = version; - sha256 = "1g4dkf5hsnykn3x6yx6ycjzmzzr1nwl59lj13j7zyka1ibv53hwf"; + sha256 = "sha256-27J1Y3+tbZK7RX+63xVV2eaX/LF525vBR3Ff9EYDEl0="; }; buildInputs = [ ponyc ]; From 6dac1b7a09564d1d362c8fc9cfed0a6264e85a72 Mon Sep 17 00:00:00 2001 From: Vincent Laporte Date: Wed, 28 Jul 2021 16:51:49 +0200 Subject: [PATCH 05/27] coqPackages.VST: build and install more modules from floyd/ Fixes #131203 --- pkgs/development/coq-modules/VST/default.nix | 21 ++++++++++++++++++-- 1 file changed, 19 insertions(+), 2 deletions(-) diff --git a/pkgs/development/coq-modules/VST/default.nix b/pkgs/development/coq-modules/VST/default.nix index 5ee1df774185..1d2a1a3c05fc 100644 --- a/pkgs/development/coq-modules/VST/default.nix +++ b/pkgs/development/coq-modules/VST/default.nix @@ -1,4 +1,16 @@ -{ lib, mkCoqDerivation, coq, compcert, version ? null }: +{ lib, mkCoqDerivation, coq, compcert, ITree, version ? null }: + +# A few modules that are not built and installed by default +# but that may be useful to some users. +# They depend on ITree. +let extra_floyd_files = [ + "ASTsize.v" + "io_events.v" + "powerlater.v" + "printf.v" + "quickprogram.v" + ]; +in with lib; mkCoqDerivation { pname = "coq${coq.coq-version}-VST"; @@ -12,9 +24,14 @@ with lib; mkCoqDerivation { ] null; release."2.8".sha256 = "sha256-cyK88uzorRfjapNQ6XgQEmlbWnDsiyLve5po1VG52q0="; releaseRev = v: "v${v}"; + extraBuildInputs = [ ITree ]; propagatedBuildInputs = [ compcert ]; - preConfigure = "patchShebangs util"; + preConfigure = '' + patchShebangs util + substituteInPlace Makefile \ + --replace 'FLOYD_FILES=' 'FLOYD_FILES= ${toString extra_floyd_files}' + ''; makeFlags = [ "BITSIZE=64" From 6e9195f6687d05d4225521a34d1702dd9c0a4444 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?J=C3=B6rg=20Thalheim?= Date: Sat, 31 Jul 2021 21:46:16 +0200 Subject: [PATCH 06/27] linux_zen: 5.13.5 -> 5.13.7 --- pkgs/os-specific/linux/kernel/linux-zen.nix | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/pkgs/os-specific/linux/kernel/linux-zen.nix b/pkgs/os-specific/linux/kernel/linux-zen.nix index 3955b1851d32..7cbeedda7265 100644 --- a/pkgs/os-specific/linux/kernel/linux-zen.nix +++ b/pkgs/os-specific/linux/kernel/linux-zen.nix @@ -1,7 +1,7 @@ { lib, fetchFromGitHub, buildLinux, ... } @ args: let - version = "5.13.5"; + version = "5.13.7"; suffix = "zen1"; in @@ -14,11 +14,11 @@ buildLinux (args // { owner = "zen-kernel"; repo = "zen-kernel"; rev = "v${version}-${suffix}"; - sha256 = "sha256-3guG482lsdcWqAJ1kY757D4EeOEpTDvy95de0bHif98="; + sha256 = "sha256-ZvB5Ejt9MXP4QK5cj9CGQgFJIfDV03IW5xcknCxDui0="; }; extraMeta = { - branch = "5.12/master"; + branch = "5.13"; maintainers = with lib.maintainers; [ atemu andresilva ]; description = "Built using the best configuration and kernel sources for desktop, multimedia, and gaming workloads."; }; From 604d0dd0d68daf696a9ba5494b63500e9db36874 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?J=C3=B6rg=20Thalheim?= Date: Sat, 31 Jul 2021 22:59:41 +0200 Subject: [PATCH 07/27] linux_zen: actually enable patchset --- pkgs/os-specific/linux/kernel/linux-zen.nix | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/pkgs/os-specific/linux/kernel/linux-zen.nix b/pkgs/os-specific/linux/kernel/linux-zen.nix index 7cbeedda7265..2b91a259232b 100644 --- a/pkgs/os-specific/linux/kernel/linux-zen.nix +++ b/pkgs/os-specific/linux/kernel/linux-zen.nix @@ -17,6 +17,10 @@ buildLinux (args // { sha256 = "sha256-ZvB5Ejt9MXP4QK5cj9CGQgFJIfDV03IW5xcknCxDui0="; }; + structuredExtraConfig = with lib.kernel; { + ZEN_INTERACTIVE = yes; + }; + extraMeta = { branch = "5.13"; maintainers = with lib.maintainers; [ atemu andresilva ]; From 72d43569121a8e3053e717a20dabb1ec550b40d0 Mon Sep 17 00:00:00 2001 From: Artturin Date: Sun, 1 Aug 2021 04:09:48 +0300 Subject: [PATCH 08/27] enlightenment: add wayland support --- pkgs/desktops/enlightenment/enlightenment/default.nix | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/pkgs/desktops/enlightenment/enlightenment/default.nix b/pkgs/desktops/enlightenment/enlightenment/default.nix index 84cadd209499..76beac1392d8 100644 --- a/pkgs/desktops/enlightenment/enlightenment/default.nix +++ b/pkgs/desktops/enlightenment/enlightenment/default.nix @@ -13,6 +13,7 @@ , xkeyboard_config , udisks2 +, waylandSupport ? false, wayland-protocols, xwayland , bluetoothSupport ? true, bluez5 , pulseSupport ? !stdenv.isDarwin, libpulseaudio }: @@ -45,6 +46,7 @@ stdenv.mkDerivation rec { ] ++ lib.optional bluetoothSupport bluez5 # for bluetooth configuration and control ++ lib.optional pulseSupport libpulseaudio # for proper audio device control and redirection + ++ lib.optionals waylandSupport [ wayland-protocols xwayland ] ; patches = [ @@ -62,7 +64,7 @@ stdenv.mkDerivation rec { mesonFlags = [ "-D systemdunitdir=lib/systemd/user" - ]; + ] ++ lib.optional waylandSupport "-Dwl=true"; passthru.providedSessions = [ "enlightenment" ]; From 75b4fccfa4dde18a2761f5e3eb2b7a19baa32faf Mon Sep 17 00:00:00 2001 From: Mauricio Collares Date: Sat, 31 Jul 2021 21:54:41 -0300 Subject: [PATCH 09/27] ecl: make sure boehmgc is available to gcc/linker --- pkgs/development/compilers/ecl/default.nix | 24 +++++++++++++--------- 1 file changed, 14 insertions(+), 10 deletions(-) diff --git a/pkgs/development/compilers/ecl/default.nix b/pkgs/development/compilers/ecl/default.nix index 083998049c1e..d75418b41ef0 100644 --- a/pkgs/development/compilers/ecl/default.nix +++ b/pkgs/development/compilers/ecl/default.nix @@ -47,20 +47,24 @@ stdenv.mkDerivation { (if threadSupport then "--enable-threads" else "--disable-threads") "--with-gmp-prefix=${gmp.dev}" "--with-libffi-prefix=${libffi.dev}" - ] - ++ - (lib.optional (! noUnicode) - "--enable-unicode") - ; + ] + ++ + (lib.optional useBoehmgc + "--with-libgc-prefix=${boehmgc.dev}") + ++ + (lib.optional (! noUnicode) + "--enable-unicode") + ; hardeningDisable = [ "format" ]; - postInstall = '' + postInstall = let + ldArgs = lib.strings.concatMapStringsSep " " + (l: ''--prefix NIX_LDFLAGS ' ' "-L${l.lib or l.out or l}/lib"'') + ([ gmp libffi ] ++ lib.optional useBoehmgc boehmgc); + in '' sed -e 's/@[-a-zA-Z_]*@//g' -i $out/bin/ecl-config - wrapProgram "$out/bin/ecl" \ - --prefix PATH ':' "${gcc}/bin" \ - --prefix NIX_LDFLAGS ' ' "-L${gmp.lib or gmp.out or gmp}/lib" \ - --prefix NIX_LDFLAGS ' ' "-L${libffi.lib or libffi.out or libffi}/lib" + wrapProgram "$out/bin/ecl" --prefix PATH ':' "${gcc}/bin" ${ldArgs} ''; meta = { From 6395aaba171b8be4d0c67f6e843051b834ccf0f0 Mon Sep 17 00:00:00 2001 From: Angus Trau Date: Sat, 31 Jul 2021 21:39:12 +1000 Subject: [PATCH 10/27] darwin.apple_sdk.frameworks.AVFoundation: Add missing dependencies --- pkgs/os-specific/darwin/apple-sdk-11.0/apple_sdk.nix | 9 +++++++++ pkgs/os-specific/darwin/apple-sdk-11.0/frameworks.nix | 2 +- 2 files changed, 10 insertions(+), 1 deletion(-) diff --git a/pkgs/os-specific/darwin/apple-sdk-11.0/apple_sdk.nix b/pkgs/os-specific/darwin/apple-sdk-11.0/apple_sdk.nix index 6e987c5dfb41..228a084d250f 100644 --- a/pkgs/os-specific/darwin/apple-sdk-11.0/apple_sdk.nix +++ b/pkgs/os-specific/darwin/apple-sdk-11.0/apple_sdk.nix @@ -141,6 +141,15 @@ in rec { cp -r ${MacOSX-SDK}/usr/include/libDER $out/include ''; }; + + simd = stdenv.mkDerivation { + name = "apple-lib-simd"; + dontUnpack = true; + installPhase = '' + mkdir -p $out/include + cp -r ${MacOSX-SDK}/usr/include/simd $out/include + ''; + }; }; overrides = super: { diff --git a/pkgs/os-specific/darwin/apple-sdk-11.0/frameworks.nix b/pkgs/os-specific/darwin/apple-sdk-11.0/frameworks.nix index c8f8ccc4a081..96c0475c087e 100644 --- a/pkgs/os-specific/darwin/apple-sdk-11.0/frameworks.nix +++ b/pkgs/os-specific/darwin/apple-sdk-11.0/frameworks.nix @@ -1,7 +1,7 @@ { frameworks, libs, libobjc, Libsystem, libnetwork }: with frameworks; with libs; { AGL = { inherit Carbon OpenGL; }; - AVFoundation = { inherit ApplicationServices AVFCapture AVFCore CoreGraphics; }; + AVFoundation = { inherit ApplicationServices AVFCapture AVFCore CoreGraphics simd UniformTypeIdentifiers; }; AVKit = {}; Accelerate = { inherit CoreWLAN IOBluetooth; }; Accessibility = {}; From 9ab9a8118c821ec22ce36eb26a4f69814c4a5d0a Mon Sep 17 00:00:00 2001 From: Angus Trau Date: Sat, 31 Jul 2021 21:37:45 +1000 Subject: [PATCH 11/27] libgme: fix build on apple silicon --- pkgs/development/libraries/audio/libgme/default.nix | 3 +++ 1 file changed, 3 insertions(+) diff --git a/pkgs/development/libraries/audio/libgme/default.nix b/pkgs/development/libraries/audio/libgme/default.nix index 2761eaf3753a..d78756b0ca45 100644 --- a/pkgs/development/libraries/audio/libgme/default.nix +++ b/pkgs/development/libraries/audio/libgme/default.nix @@ -21,6 +21,9 @@ stdenv.mkDerivation rec { nativeBuildInputs = [ cmake removeReferencesTo ]; + # These checks fail on aarch64-darwin + cmakeFlags = [ "-DENABLE_UBSAN=OFF" ]; + # It used to reference it, in the past, but thanks to the postFixup hook, now # it doesn't. disallowedReferences = [ stdenv.cc.cc ]; From 6decab67c64131058021370653286d3e99e774bd Mon Sep 17 00:00:00 2001 From: AndersonTorres Date: Sun, 1 Aug 2021 00:35:19 -0300 Subject: [PATCH 12/27] stella: 6.5.2 -> 6.5.3 --- pkgs/misc/emulators/stella/default.nix | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/pkgs/misc/emulators/stella/default.nix b/pkgs/misc/emulators/stella/default.nix index ff90ae8908be..73e5990e112e 100644 --- a/pkgs/misc/emulators/stella/default.nix +++ b/pkgs/misc/emulators/stella/default.nix @@ -7,13 +7,13 @@ stdenv.mkDerivation rec { pname = "stella"; - version = "6.5.2"; + version = "6.5.3"; src = fetchFromGitHub { owner = "stella-emu"; repo = pname; rev = version; - hash = "sha256-CDLMOqSgRx75tjBoLycis/cckCNwgdlb9TRBlD3Dd04="; + hash = "sha256-Y9rEh9PZalQNj+d7OXN/8z5P8Hti4R3c2RL1BY+J1y4="; }; nativeBuildInputs = [ pkg-config ]; From bbf384f4cd71bf3646e7058719436c0996761e16 Mon Sep 17 00:00:00 2001 From: AndersonTorres Date: Sun, 1 Aug 2021 00:11:43 -0300 Subject: [PATCH 13/27] tcsh: 6.22.03 -> 6.22.04 --- pkgs/shells/tcsh/default.nix | 16 ++++++++-------- 1 file changed, 8 insertions(+), 8 deletions(-) diff --git a/pkgs/shells/tcsh/default.nix b/pkgs/shells/tcsh/default.nix index 4d6c9556501c..4fd4e5730a4e 100644 --- a/pkgs/shells/tcsh/default.nix +++ b/pkgs/shells/tcsh/default.nix @@ -4,7 +4,7 @@ stdenv.mkDerivation rec { pname = "tcsh"; - version = "6.22.03"; + version = "6.22.04"; src = fetchurl { urls = [ @@ -15,7 +15,7 @@ stdenv.mkDerivation rec { "ftp://ftp.funet.fi/pub/unix/shells/tcsh/${pname}-${version}.tar.gz" "ftp://ftp.funet.fi/pub/unix/shells/tcsh/old/${pname}-${version}.tar.gz" ]; - sha256 = "sha256-viz9ZT0qDH9QbS3RTBIyS6dJvUhAN75t9Eo5c/UiYrc="; + hash = "sha256-6xY1YkMhjDLzngcljXK/iyHmLOlLsOipXjGLFROX4jE="; }; buildInputs = [ ncurses ]; @@ -28,12 +28,13 @@ stdenv.mkDerivation rec { }); meta = with lib; { + homepage = "https://www.tcsh.org/"; description = "An enhanced version of the Berkeley UNIX C shell (csh)"; longDescription = '' - tcsh is an enhanced but completely compatible version of the - Berkeley UNIX C shell, csh. It is a command language interpreter - usable both as an interactive login shell and a shell script - command processor. + tcsh is an enhanced but completely compatible version of the Berkeley UNIX + C shell, csh. It is a command language interpreter usable both as an + interactive login shell and a shell script command processor. + It includes: - command-line editor - programmable word completion @@ -41,10 +42,9 @@ stdenv.mkDerivation rec { - history mechanism - job control ''; - homepage = "https://www.tcsh.org/"; license = licenses.bsd2; maintainers = with maintainers; [ AndersonTorres ]; - platforms = platforms.linux ++ platforms.darwin; + platforms = platforms.unix; }; passthru = { From 556fd07764fcdd5320c1c173c0275e64c16c6226 Mon Sep 17 00:00:00 2001 From: AndersonTorres Date: Sun, 1 Aug 2021 01:01:36 -0300 Subject: [PATCH 14/27] qmplay2: 20.12.16 -> 21.06.07 --- pkgs/applications/video/qmplay2/default.nix | 20 +++++++++++--------- 1 file changed, 11 insertions(+), 9 deletions(-) diff --git a/pkgs/applications/video/qmplay2/default.nix b/pkgs/applications/video/qmplay2/default.nix index 0e0580b9f2ae..538f540c63be 100644 --- a/pkgs/applications/video/qmplay2/default.nix +++ b/pkgs/applications/video/qmplay2/default.nix @@ -1,4 +1,5 @@ -{ lib, stdenv +{ lib +, stdenv , fetchFromGitHub , pkg-config , cmake @@ -19,25 +20,27 @@ , vulkan-tools , wrapQtAppsHook }: - -let +stdenv.mkDerivation rec { pname = "qmplay2"; - version = "20.12.16"; -in stdenv.mkDerivation { - inherit pname version; + version = "21.06.07"; src = fetchFromGitHub { owner = "zaps166"; repo = "QMPlay2"; rev = version; - sha256 = "sha256-+XXlQI9MyENioYmzqbbZYQ6kaMATBjPrPaErR2Vqhus="; + sha256 = "sha256-NV9uglYnqebXhMx8uL0DhGe9l5TBVjlSIaB4IWC8YAc="; fetchSubmodules = true; }; - nativeBuildInputs = [ cmake pkg-config wrapQtAppsHook ]; + nativeBuildInputs = [ + cmake + pkg-config + wrapQtAppsHook + ]; buildInputs = [ alsa-lib ffmpeg + libXv libass libcddb libcdio @@ -45,7 +48,6 @@ in stdenv.mkDerivation { libpulseaudio libsidplayfp libva - libXv qtbase qttools taglib From 35a3cbc754eb21cae5eb5f96d6e9ef0cc983d856 Mon Sep 17 00:00:00 2001 From: AndersonTorres Date: Sun, 1 Aug 2021 01:47:45 -0300 Subject: [PATCH 15/27] openmsx: 16.0 -> 17.0 --- pkgs/misc/emulators/openmsx/default.nix | 59 ++++++++++++++++++------- 1 file changed, 43 insertions(+), 16 deletions(-) diff --git a/pkgs/misc/emulators/openmsx/default.nix b/pkgs/misc/emulators/openmsx/default.nix index 61d416e17ac8..f054b954b59b 100644 --- a/pkgs/misc/emulators/openmsx/default.nix +++ b/pkgs/misc/emulators/openmsx/default.nix @@ -1,28 +1,55 @@ -{ lib, stdenv, fetchFromGitHub, pkg-config +{ lib +, stdenv +, fetchFromGitHub +, pkg-config +, SDL2 +, SDL2_image +, SDL2_ttf +, alsa-lib +, freetype +, glew +, libGL +, libogg +, libpng +, libtheora +, libvorbis , python -, alsa-lib, glew, libGL, libpng -, libogg, libtheora, libvorbis -, SDL2, SDL2_image, SDL2_ttf -, freetype, tcl, zlib +, tcl +, zlib }: stdenv.mkDerivation rec { pname = "openmsx"; - version = "16.0"; + version = "17.0"; src = fetchFromGitHub { owner = "openMSX"; repo = "openMSX"; rev = "RELEASE_${builtins.replaceStrings ["."] ["_"] version}"; - sha256 = "04sphn9ph378r0qv881riv90cgz58650jcqcwmi1mv6gbcb3img5"; + sha256 = "sha256-9PdUNahJZ2O6ASkzLW/uudP3hiIzTDpxzFy6Pjb8JiU="; fetchSubmodules = true; }; - nativeBuildInputs = [ pkg-config python ]; + nativeBuildInputs = [ + pkg-config + python + ]; - buildInputs = [ alsa-lib glew libGL libpng - libogg libtheora libvorbis freetype - SDL2 SDL2_image SDL2_ttf tcl zlib ]; + buildInputs = [ + SDL2 + SDL2_image + SDL2_ttf + alsa-lib + freetype + glew + libGL + libogg + libpng + libtheora + libvorbis + tcl + zlib + ]; postPatch = '' cp ${./custom-nix.mk} build/custom.mk @@ -30,19 +57,19 @@ stdenv.mkDerivation rec { dontAddPrefix = true; - # Many thanks @mthuurne from OpenMSX project - # for providing support to Nixpkgs :) + # Many thanks @mthuurne from OpenMSX project for providing support to + # Nixpkgs! :) TCL_CONFIG="${tcl}/lib/"; - meta = with lib;{ + meta = with lib; { + homepage = "https://openmsx.org"; description = "The MSX emulator that aims for perfection"; longDescription = '' OpenMSX is an emulator for the MSX home computer system. Its goal is to emulate all aspects of the MSX with 100% accuracy. ''; - homepage = "https://openmsx.org"; + license = with licenses; [ bsd2 boost gpl2Plus ]; maintainers = with maintainers; [ AndersonTorres ]; platforms = platforms.unix; - license = with licenses; [ bsd2 boost gpl2 ]; }; } From b12ba3668482b49bb275dad733da30becafbd9ff Mon Sep 17 00:00:00 2001 From: AndersonTorres Date: Sun, 1 Aug 2021 01:12:59 -0300 Subject: [PATCH 16/27] mgba: 0.9.0 -> 0.9.2 --- pkgs/misc/emulators/mgba/default.nix | 35 ++++++++++++++-------------- 1 file changed, 18 insertions(+), 17 deletions(-) diff --git a/pkgs/misc/emulators/mgba/default.nix b/pkgs/misc/emulators/mgba/default.nix index fa25609dcdb8..4d0f98552717 100644 --- a/pkgs/misc/emulators/mgba/default.nix +++ b/pkgs/misc/emulators/mgba/default.nix @@ -18,26 +18,15 @@ , wrapQtAppsHook }: -let - desktopItem = makeDesktopItem { - name = "mgba"; - exec = "mgba-qt"; - icon = "mgba"; - comment = "A Game Boy Advance Emulator"; - desktopName = "mgba"; - genericName = "Game Boy Advance Emulator"; - categories = "Game;Emulator;"; - startupNotify = "false"; - }; -in stdenv.mkDerivation rec { +stdenv.mkDerivation rec { pname = "mgba"; - version = "0.9.0"; + version = "0.9.2"; src = fetchFromGitHub { owner = "mgba-emu"; repo = "mgba"; rev = version; - hash = "sha256-JVauGyHJVfiXVG4Z+Ydh1lRypy5rk9SKeTbeHFNFYJs="; + hash = "sha256-A48PVUCekdRYel/BddPCeIcEDllOvcU7pk4i4P58dpo="; }; nativeBuildInputs = [ @@ -59,9 +48,21 @@ in stdenv.mkDerivation rec { qttools ]; - postInstall = '' - cp -r ${desktopItem}/share/applications $out/share - ''; + postInstall = let + desktopItem = makeDesktopItem { + name = "mgba"; + exec = "mgba-qt"; + icon = "mgba"; + comment = "A Game Boy Advance Emulator"; + desktopName = "mgba"; + genericName = "Game Boy Advance Emulator"; + categories = "Game;Emulator;"; + startupNotify = "false"; + }; + in + '' + cp -r ${desktopItem}/share/applications $out/share + ''; meta = with lib; { homepage = "https://mgba.io"; From 555c3afaf2b17af6ad06ae82b545ca06e252bcd1 Mon Sep 17 00:00:00 2001 From: Michael Weiss Date: Sat, 31 Jul 2021 12:36:49 +0200 Subject: [PATCH 17/27] chromium: Restructure gnFlags This doesn't cause any rebuilds because we use a set but should make it a bit easier to understand what's going on. This also moves two flags that where incorrectly in "optionalAttrs pulseSupport" (enabled by default) out of there. The native client deprecation is stated here: https://developer.chrome.com/docs/native-client/ --- .../networking/browsers/chromium/common.nix | 50 ++++++++++--------- 1 file changed, 27 insertions(+), 23 deletions(-) diff --git a/pkgs/applications/networking/browsers/chromium/common.nix b/pkgs/applications/networking/browsers/chromium/common.nix index 377835489a2b..15d415fdd54f 100644 --- a/pkgs/applications/networking/browsers/chromium/common.nix +++ b/pkgs/applications/networking/browsers/chromium/common.nix @@ -259,25 +259,12 @@ let ''; gnFlags = mkGnFlags ({ + # Main build and toolchain settings: is_official_build = true; custom_toolchain = "//build/toolchain/linux/unbundle:default"; host_toolchain = "//build/toolchain/linux/unbundle:default"; - system_wayland_scanner_path = "${wayland}/bin/wayland-scanner"; - use_sysroot = false; - use_gnome_keyring = gnomeKeyringSupport; - use_gio = gnomeSupport; - # ninja: error: '../../native_client/toolchain/linux_x86/pnacl_newlib/bin/x86_64-nacl-objcopy', - # needed by 'nacl_irt_x86_64.nexe', missing and no known rule to make it - enable_nacl = false; - # Enabling the Widevine component here doesn't affect whether we can - # redistribute the chromium package; the Widevine component is either - # added later in the wrapped -wv build or downloaded from Google. - enable_widevine = true; - use_cups = cupsSupport; - # Provides the enable-webrtc-pipewire-capturer flag to support Wayland screen capture. - rtc_use_pipewire = true; - + system_wayland_scanner_path = "${wayland}/bin/wayland-scanner"; treat_warnings_as_errors = false; clang_use_chrome_plugins = false; blink_symbol_level = 0; @@ -288,6 +275,31 @@ let # Note: The API key is for NixOS/nixpkgs use ONLY. # For your own distribution, please get your own set of keys. google_api_key = "AIzaSyDGi15Zwl11UNe6Y-5XW_upsfyw31qwZPI"; + + # Optional features: + use_cups = cupsSupport; + use_gio = gnomeSupport; + use_gnome_keyring = gnomeKeyringSupport; + + # Feature overrides: + # Native Client support was deprecated in 2020 and support will end in June 2021: + enable_nacl = false; + # Enabling the Widevine component here doesn't affect whether we can + # redistribute the chromium package; the Widevine component is either + # added later in the wrapped -wv build or downloaded from Google: + enable_widevine = true; + # Provides the enable-webrtc-pipewire-capturer flag to support Wayland screen capture: + rtc_use_pipewire = true; + + # TODOs: + # Disable PGO (defaults to 2 since M89) because it fails without additional changes: + # error: Could not read profile ../../chrome/build/pgo_profiles/chrome-linux-master-1610647094-405a32bcf15e5a84949640f99f84a5b9f61e2f2e.profdata: Unsupported instrumentation profile format version + chrome_pgo_phase = 0; # TODO + # Disable build with TFLite library because it fails without additional changes: + # ninja: error: '../../chrome/test/data/simple_test.tflite', needed by 'test_data/simple_test.tflite', missing and no known rule to make it + # Note: chrome/test/data/simple_test.tflite is in the Git repository but not in chromium-90.0.4400.8.tar.xz + # See also chrome/services/machine_learning/README.md + build_with_tflite_lib = false; # TODO } // optionalAttrs proprietaryCodecs { # enable support for the H.264 codec proprietary_codecs = true; @@ -296,14 +308,6 @@ let } // optionalAttrs pulseSupport { use_pulseaudio = true; link_pulseaudio = true; - # Disable PGO (defaults to 2 since M89) because it fails without additional changes: - # error: Could not read profile ../../chrome/build/pgo_profiles/chrome-linux-master-1610647094-405a32bcf15e5a84949640f99f84a5b9f61e2f2e.profdata: Unsupported instrumentation profile format version - chrome_pgo_phase = 0; - # Disable build with TFLite library because it fails without additional changes: - # ninja: error: '../../chrome/test/data/simple_test.tflite', needed by 'test_data/simple_test.tflite', missing and no known rule to make it - # Note: chrome/test/data/simple_test.tflite is in the Git repository but not in chromium-90.0.4400.8.tar.xz - # See also chrome/services/machine_learning/README.md - build_with_tflite_lib = false; } // optionalAttrs ungoogled { chrome_pgo_phase = 0; enable_hangout_services_extension = false; From 6e4c660f49644bd2860b5149a2bb52f36d526712 Mon Sep 17 00:00:00 2001 From: "R. RyanTM" Date: Sat, 31 Jul 2021 19:32:47 +0000 Subject: [PATCH 18/27] eksctl: 0.58.0 -> 0.59.0 --- pkgs/tools/admin/eksctl/default.nix | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/pkgs/tools/admin/eksctl/default.nix b/pkgs/tools/admin/eksctl/default.nix index aeeb6b2ca423..81585c924760 100644 --- a/pkgs/tools/admin/eksctl/default.nix +++ b/pkgs/tools/admin/eksctl/default.nix @@ -2,13 +2,13 @@ buildGoModule rec { pname = "eksctl"; - version = "0.58.0"; + version = "0.59.0"; src = fetchFromGitHub { owner = "weaveworks"; repo = pname; rev = version; - sha256 = "sha256-g7Lfx8Q2yEFk6/3r8+MUl8jehbRfVGfrZb1+WgA6TYA="; + sha256 = "sha256-qSZos1BO48Z5aiay8B/9DFGPgAOC8ib7IRjlFhzFh5Y="; }; vendorSha256 = "sha256-mapok/c3uh7xmLZnN5S9zavgxSOfytqtqxBScv4Ao8w="; From 7c312a6cf9be35d7bde0e0c92fa21e4658f7e030 Mon Sep 17 00:00:00 2001 From: Aaron Janse Date: Sat, 31 Jul 2021 01:23:50 -0700 Subject: [PATCH 19/27] tahoe-lafs: 1.13.0 -> 2021-07-09 --- .../networking/p2p/tahoe-lafs/default.nix | 33 +++++++++++-------- 1 file changed, 19 insertions(+), 14 deletions(-) diff --git a/pkgs/tools/networking/p2p/tahoe-lafs/default.nix b/pkgs/tools/networking/p2p/tahoe-lafs/default.nix index d55a46f609b1..9f3ba60af84f 100644 --- a/pkgs/tools/networking/p2p/tahoe-lafs/default.nix +++ b/pkgs/tools/networking/p2p/tahoe-lafs/default.nix @@ -1,18 +1,20 @@ -{ fetchurl, lib, nettools, pythonPackages, texinfo }: +{ lib, nettools, python3Packages, texinfo, fetchFromGitHub }: # FAILURES: The "running build_ext" phase fails to compile Twisted # plugins, because it tries to write them into Twisted's (immutable) # store path. The problem appears to be non-fatal, but there's probably # some loss of functionality because of it. -pythonPackages.buildPythonApplication rec { - version = "1.13.0"; +python3Packages.buildPythonApplication rec { + version = "2021-07-09"; pname = "tahoe-lafs"; namePrefix = ""; - src = fetchurl { - url = "https://tahoe-lafs.org/downloads/tahoe-lafs-${version}.tar.bz2"; - sha256 = "11pfz9yyy6qkkyi0kskxlbn2drfppx6yawqyv4kpkrkj4q7x5m42"; + src = fetchFromGitHub { + owner = "tahoe-lafs"; + repo = "tahoe-lafs"; + rev = "8e28a9d0e02fde2388aca549da2b5c452ac4337f"; + sha256 = "sha256-MuD/ZY+die7RCsuVdcePSD0DdwatXRi7CxW2iFt22L0="; }; outputs = [ "out" "doc" "info" ]; @@ -38,26 +40,30 @@ pythonPackages.buildPythonApplication rec { cd src/allmydata/test # Buggy? - rm cli/test_create.py test_backupdb.py + rm cli/test_create.py test_client.py # These require Tor and I2P. rm test_connections.py test_iputil.py test_hung_server.py test_i2p_provider.py test_tor_provider.py + # Fails due to the above tests missing + rm test_python3.py + # Expensive rm test_system.py ) ''; - nativeBuildInputs = with pythonPackages; [ sphinx texinfo ]; + nativeBuildInputs = with python3Packages; [ sphinx texinfo ]; # The `backup' command requires `sqlite3'. - propagatedBuildInputs = with pythonPackages; [ - twisted foolscap nevow simplejson zfec pycryptopp darcsver - setuptoolsTrial setuptoolsDarcs pycrypto pyasn1 zope_interface - service-identity pyyaml magic-wormhole treq characteristic + propagatedBuildInputs = with python3Packages; [ + appdirs beautifulsoup4 characteristic distro eliot fixtures foolscap future + html5lib magic-wormhole netifaces pyasn1 pycrypto pyutil pyyaml recommonmark + service-identity simplejson sphinx_rtd_theme testtools treq twisted zfec + zope_interface ]; - checkInputs = with pythonPackages; [ mock hypothesis twisted ]; + checkInputs = with python3Packages; [ mock hypothesis twisted ]; # Install the documentation. postInstall = '' @@ -90,6 +96,5 @@ pythonPackages.buildPythonApplication rec { license = [ lib.licenses.gpl2Plus /* or */ "TGPPLv1+" ]; maintainers = with lib.maintainers; [ MostAwesomeDude ]; platforms = lib.platforms.gnu ++ lib.platforms.linux; - broken = true; }; } From a5d975648da42e79dc4da422939d0fc588b23765 Mon Sep 17 00:00:00 2001 From: Fabian Affolter Date: Sun, 1 Aug 2021 11:10:05 +0200 Subject: [PATCH 20/27] python3Packages.dufte: 0.2.12 -> 0.2.27 --- .../python-modules/dufte/default.nix | 25 ++++++++----------- 1 file changed, 11 insertions(+), 14 deletions(-) diff --git a/pkgs/development/python-modules/dufte/default.nix b/pkgs/development/python-modules/dufte/default.nix index d1c9680cb7b9..b9a96cbc8298 100644 --- a/pkgs/development/python-modules/dufte/default.nix +++ b/pkgs/development/python-modules/dufte/default.nix @@ -1,23 +1,23 @@ { lib , buildPythonPackage -, fetchPypi -, isPy3k +, fetchFromGitHub , pythonOlder , importlib-metadata , matplotlib , numpy -, exdown , pytestCheckHook }: buildPythonPackage rec { pname = "dufte"; - version = "0.2.12"; - disabled = !isPy3k; + version = "0.2.27"; + disabled = pythonOlder "3.6"; - src = fetchPypi { - inherit pname version; - sha256 = "0ag1d7h1wijkc7v2vpgkbqjlnpiwd4nh8zhxiby0989bpmlp3jr3"; + src = fetchFromGitHub { + owner = "nschloe"; + repo = pname; + rev = version; + sha256 = "1i68h224hx9clxj3l0rd2yigsi6fqsr3x10vj5hf3j6s69iah7r3"; }; format = "pyproject"; @@ -28,13 +28,10 @@ buildPythonPackage rec { importlib-metadata ]; - preCheck = '' - export HOME=$TMPDIR - mkdir -p $HOME/.matplotlib - echo "backend: ps" > $HOME/.matplotlib/matplotlibrc - ''; + checkInputs = [ + pytestCheckHook + ]; - checkInputs = [ exdown pytestCheckHook ]; pythonImportsCheck = [ "dufte" ]; meta = with lib; { From 5b683507ec4be2d17540df047614b5fa692ee24e Mon Sep 17 00:00:00 2001 From: Fabian Affolter Date: Sun, 1 Aug 2021 11:11:21 +0200 Subject: [PATCH 21/27] python3Packages.perfplot: 0.9.5 -> 0.9.6 --- .../python-modules/perfplot/default.nix | 23 ++++++++----------- 1 file changed, 9 insertions(+), 14 deletions(-) diff --git a/pkgs/development/python-modules/perfplot/default.nix b/pkgs/development/python-modules/perfplot/default.nix index 76f2f8d2931b..8e15cc0be8db 100644 --- a/pkgs/development/python-modules/perfplot/default.nix +++ b/pkgs/development/python-modules/perfplot/default.nix @@ -7,20 +7,20 @@ , pipdate , tqdm , rich -, pytest -, isPy27 +, pytestCheckHook +, pythonOlder }: buildPythonPackage rec { pname = "perfplot"; - version = "0.9.5"; - disabled = isPy27; + version = "0.9.6"; + disabled = pythonOlder "3.7"; src = fetchFromGitHub { owner = "nschloe"; - repo = "perfplot"; + repo = pname; rev = "v${version}"; - sha256 = "1nr31a7qvipqjycw2flkabnhnc4drbi1xpjm8yjxw2gjzznd1jg4"; + sha256 = "11f31d6xqxp04693symc2dl8890gjaycrb2a35y5xy023abwir5b"; }; format = "pyproject"; @@ -34,20 +34,15 @@ buildPythonPackage rec { ]; checkInputs = [ - pytest + pytestCheckHook ]; - checkPhase = '' - export HOME=$TMPDIR - mkdir -p $HOME/.matplotlib - echo "backend: ps" > $HOME/.matplotlib/matplotlibrc - pytest test/perfplot_test.py - ''; + pythonImportsCheck = [ "perfplot" ]; meta = with lib; { description = "Performance plots for Python code snippets"; homepage = "https://github.com/nschloe/perfplot"; license = licenses.mit; - maintainers = [ maintainers.costrouc ]; + maintainers = with maintainers; [ costrouc ]; }; } From 85a09cf3a3edbdef5cd71856d424b3ce16b5978a Mon Sep 17 00:00:00 2001 From: Angus Trau Date: Sat, 31 Jul 2021 21:38:12 +1000 Subject: [PATCH 22/27] pulseaudio: fix build on aarch64-darwin --- pkgs/servers/pulseaudio/default.nix | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/pkgs/servers/pulseaudio/default.nix b/pkgs/servers/pulseaudio/default.nix index 10b18dd1ae1d..232b228394bb 100644 --- a/pkgs/servers/pulseaudio/default.nix +++ b/pkgs/servers/pulseaudio/default.nix @@ -92,7 +92,10 @@ stdenv.mkDerivation rec { "--with-bash-completion-dir=${placeholder "out"}/share/bash-completions/completions" ] ++ lib.optional (jackaudioSupport && !libOnly) "--enable-jack" - ++ lib.optional stdenv.isDarwin "--with-mac-sysroot=/" + ++ lib.optionals stdenv.isDarwin [ + "--with-mac-sysroot=/" + "--disable-neon-opt" + ] ++ lib.optional (stdenv.isLinux && useSystemd) "--with-systemduserunitdir=${placeholder "out"}/lib/systemd/user" ++ lib.optional (stdenv.buildPlatform != stdenv.hostPlatform) "--disable-gsettings"; From bc3416a2dddd3c7a2a3182373c392292ed8e22b6 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Vladim=C3=ADr=20=C4=8Cun=C3=A1t?= Date: Sun, 1 Aug 2021 11:28:58 +0200 Subject: [PATCH 23/27] squashfsTools: patch a channel-blocking bug Fixes #132286. --- pkgs/tools/filesystems/squashfs/default.nix | 7 +++++++ 1 file changed, 7 insertions(+) diff --git a/pkgs/tools/filesystems/squashfs/default.nix b/pkgs/tools/filesystems/squashfs/default.nix index 2c8cd317f661..bec344631511 100644 --- a/pkgs/tools/filesystems/squashfs/default.nix +++ b/pkgs/tools/filesystems/squashfs/default.nix @@ -1,6 +1,7 @@ { lib , stdenv , fetchFromGitHub +, fetchpatch , zlib , xz , lz4 @@ -23,6 +24,12 @@ stdenv.mkDerivation rec { # This patch adds an option to pad filesystems (increasing size) in # exchange for better chunking / binary diff calculation. ./4k-align.patch + # Otherwise sizes of some files may break in our ISO; see + # https://github.com/NixOS/nixpkgs/issues/132286 + (fetchpatch { + url = "https://github.com/plougher/squashfs-tools/commit/19b161c1cd3e31f7a396ea92dea4390ad43f27b9.diff"; + sha256 = "15ng8m2my3a6a9hnfx474bip2vwdh08hzs2k0l5gwd36jv2z1h3f"; + }) ] ++ lib.optional stdenv.isDarwin ./darwin.patch; buildInputs = [ zlib xz zstd lz4 lzo ]; From 2808286add3e873db6e16e01b7062d3811d61afb Mon Sep 17 00:00:00 2001 From: Jamie McClymont Date: Sun, 1 Aug 2021 21:31:07 +1200 Subject: [PATCH 24/27] squashfsTools: add NixOS cdrom boot as passthru test This is the same test which blocks nixos-unstable-small. It recently caused a long blockage, due to a regression in squashfsTools itself corrupting the iso image, see #132286. --- pkgs/tools/filesystems/squashfs/default.nix | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/pkgs/tools/filesystems/squashfs/default.nix b/pkgs/tools/filesystems/squashfs/default.nix index bec344631511..ee6a9d9a4c39 100644 --- a/pkgs/tools/filesystems/squashfs/default.nix +++ b/pkgs/tools/filesystems/squashfs/default.nix @@ -7,6 +7,7 @@ , lz4 , lzo , zstd +, nixosTests }: stdenv.mkDerivation rec { @@ -47,6 +48,10 @@ stdenv.mkDerivation rec { "LZO_SUPPORT=1" ]; + passthru.tests = { + nixos-iso-boots-and-verifies = nixosTests.boot.biosCdrom; + }; + meta = with lib; { homepage = "https://github.com/plougher/squashfs-tools"; description = "Tool for creating and unpacking squashfs filesystems"; From abdd33edea66b9668c3b2d941d3cda2f6cb40730 Mon Sep 17 00:00:00 2001 From: Fabian Affolter Date: Sun, 1 Aug 2021 11:48:12 +0200 Subject: [PATCH 25/27] python3Packages.pyfma: fix build --- .../python-modules/pyfma/default.nix | 30 +++++++++++-------- 1 file changed, 18 insertions(+), 12 deletions(-) diff --git a/pkgs/development/python-modules/pyfma/default.nix b/pkgs/development/python-modules/pyfma/default.nix index d53c62e2f3a9..e41d51c17719 100644 --- a/pkgs/development/python-modules/pyfma/default.nix +++ b/pkgs/development/python-modules/pyfma/default.nix @@ -1,31 +1,37 @@ { lib , buildPythonPackage -, isPy27 -, fetchPypi -, pybind11 -, exdown +, fetchFromGitHub +, importlib-metadata , numpy +, pybind11 , pytestCheckHook +, pythonOlder }: buildPythonPackage rec { pname = "pyfma"; version = "0.1.4"; + disabled = pythonOlder "3.7"; - disabled = isPy27; - - src = fetchPypi { - inherit pname version; - sha256 = "5bc6bf57d960a5232b7a56bd38e9fe3dce0911016746029931044b66bdec46e9"; + src = fetchFromGitHub { + owner = "nschloe"; + repo = pname; + rev = "v${version}"; + sha256 = "1wkcl41j2d1yflc5dl30ys1yxx68w9zn3vj8brwkm1ar9jnfmg4h"; }; + format = "pyproject"; buildInputs = [ pybind11 ]; - checkInputs = [ - exdown + propagatedBuildInputs = [ numpy + ] ++ lib.optionals (pythonOlder "3.8") [ + importlib-metadata + ]; + + checkInputs = [ pytestCheckHook ]; @@ -35,6 +41,6 @@ buildPythonPackage rec { description = "Fused multiply-add for Python"; homepage = "https://github.com/nschloe/pyfma"; license = licenses.mit; - maintainers = [ maintainers.costrouc]; + maintainers = with maintainers; [ costrouc ]; }; } From 976fbe0f1354485c326fbb85632eaa017f385299 Mon Sep 17 00:00:00 2001 From: Fabian Affolter Date: Sun, 1 Aug 2021 12:09:34 +0200 Subject: [PATCH 26/27] python3Packages.dipy: 1.3.0 -> 1.4.1 --- pkgs/development/python-modules/dipy/default.nix | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/pkgs/development/python-modules/dipy/default.nix b/pkgs/development/python-modules/dipy/default.nix index 51d689f98596..3712dfbaee1a 100644 --- a/pkgs/development/python-modules/dipy/default.nix +++ b/pkgs/development/python-modules/dipy/default.nix @@ -14,7 +14,7 @@ buildPythonPackage rec { pname = "dipy"; - version = "1.3.0"; + version = "1.4.1"; disabled = isPy27; @@ -22,7 +22,7 @@ buildPythonPackage rec { owner = "dipy"; repo = pname; rev = version; - sha256 = "0555abx0fwqmk6dc3im7r45d9j7r9xh6gm9mbwfwvlf7laf8h098"; + sha256 = "0zaqsiq73vprbqbzvzswjfmqgappl5vhpl2fwjrrda33c27klpzj"; }; nativeBuildInputs = [ cython packaging ]; From 6376458424433ced446cbb9045641cb23c9b832d Mon Sep 17 00:00:00 2001 From: Profpatsch Date: Fri, 30 Jul 2021 14:58:39 +0200 Subject: [PATCH 27/27] sane: Add support for the unfree Fujitsu ScanSnap drivers MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit This adds the scanner files already linked from the `etc/sane.d/epjitsu.conf` file, which are extracted from the Windows drivers and mirrored on GitHub. Being a Japanese hardware vendor, Fujitsu’s software release & licensing methods are horrifying, but their scanners are some of the best, so we should definitly have discoverable support for them, which this patch hopefully adds. Inspiration was taken from the following sources: https://www.josharcher.uk/code/install-scansnap-s1300-drivers-linux/ https://ubuntuforums.org/archive/index.php/t-1461915.html https://github.com/stevleibelt/scansnap-firmware --- nixos/modules/services/hardware/sane.nix | 27 ++++++++++++++++++- .../graphics/sane/backends/default.nix | 13 ++++++++- pkgs/applications/graphics/sane/drivers.nix | 13 +++++++++ pkgs/top-level/all-packages.nix | 2 ++ 4 files changed, 53 insertions(+), 2 deletions(-) create mode 100644 pkgs/applications/graphics/sane/drivers.nix diff --git a/nixos/modules/services/hardware/sane.nix b/nixos/modules/services/hardware/sane.nix index 8c1bde7b4158..ccf726bd182b 100644 --- a/nixos/modules/services/hardware/sane.nix +++ b/nixos/modules/services/hardware/sane.nix @@ -4,7 +4,10 @@ with lib; let - pkg = pkgs.sane-backends; + pkg = pkgs.sane-backends.override { + scanSnapDriversUnfree = config.hardware.sane.drivers.scanSnap.enable; + scanSnapDriversPackage = config.hardware.sane.drivers.scanSnap.package; + }; sanedConf = pkgs.writeTextFile { name = "saned.conf"; @@ -98,6 +101,28 @@ in ''; }; + hardware.sane.drivers.scanSnap.enable = mkOption { + type = types.bool; + default = false; + example = true; + description = '' + Whether to enable drivers for the Fujitsu ScanSnap scanners. + + The driver files are unfree and extracted from the Windows driver image. + ''; + }; + + hardware.sane.drivers.scanSnap.package = mkOption { + type = types.package; + default = pkgs.sane-drivers.epjitsu; + description = '' + Epjitsu driver package to use. Useful if you want to extract the driver files yourself. + + The process is described in the /etc/sane.d/epjitsu.conf file in + the sane-backends package. + ''; + }; + services.saned.enable = mkOption { type = types.bool; default = false; diff --git a/pkgs/applications/graphics/sane/backends/default.nix b/pkgs/applications/graphics/sane/backends/default.nix index 821a97e35871..3d3c752dcdef 100644 --- a/pkgs/applications/graphics/sane/backends/default.nix +++ b/pkgs/applications/graphics/sane/backends/default.nix @@ -2,12 +2,16 @@ , gettext, pkg-config, python3 , avahi, libgphoto2, libieee1284, libjpeg, libpng, libtiff, libusb1, libv4l, net-snmp , curl, systemd, libxml2, poppler +, sane-drivers # List of { src name backend } attibute sets - see installFirmware below: , extraFirmware ? [] # For backwards compatibility with older setups; use extraFirmware instead: , gt68xxFirmware ? null, snapscanFirmware ? null + +# Not included by default, scan snap drivers require fetching of unfree binaries. +, scanSnapDriversUnfree ? false, scanSnapDriversPackage ? sane-drivers.epjitsu }: stdenv.mkDerivation { @@ -88,7 +92,14 @@ stdenv.mkDerivation { # net.conf conflicts with the file generated by the nixos module rm $out/etc/sane.d/net.conf - '' + lib.concatStrings (builtins.map installFirmware compatFirmware); + + '' + + lib.optionalString scanSnapDriversUnfree '' + # the ScanSnap drivers live under the epjitsu subdirectory, which was already created by the build but is empty. + rmdir $out/share/sane/epjitsu + ln -svT ${scanSnapDriversPackage} $out/share/sane/epjitsu + '' + + lib.concatStrings (builtins.map installFirmware compatFirmware); meta = with lib; { description = "SANE (Scanner Access Now Easy) backends"; diff --git a/pkgs/applications/graphics/sane/drivers.nix b/pkgs/applications/graphics/sane/drivers.nix new file mode 100644 index 000000000000..9f1a644f4fac --- /dev/null +++ b/pkgs/applications/graphics/sane/drivers.nix @@ -0,0 +1,13 @@ +{ lib, fetchFromGitHub }: + +{ + # Fujitsu ScanSnap + epjitsu = fetchFromGitHub { + name = "scansnap-firmware"; + owner = "stevleibelt"; + repo = "scansnap-firmware"; + rev = "96c3a8b2a4e4f1ccc4e5827c5eb5598084fd17c8"; + sha256 = "1inchnvaqyw9d0skpg8hp5rpn27c09q58lsr42by4bahpbx5qday"; + meta.license = lib.licenses.unfree; + }; +} diff --git a/pkgs/top-level/all-packages.nix b/pkgs/top-level/all-packages.nix index 1fb91e0c20e6..63c64bb3e3bd 100644 --- a/pkgs/top-level/all-packages.nix +++ b/pkgs/top-level/all-packages.nix @@ -31830,6 +31830,8 @@ in sane-backends = callPackage ../applications/graphics/sane/backends (config.sane or {}); + sane-drivers = callPackage ../applications/graphics/sane/drivers.nix {}; + senv = callPackage ../applications/misc/senv { }; brlaser = callPackage ../misc/cups/drivers/brlaser { };