From 2ada4729645359ad7571c1927231bead70dadb32 Mon Sep 17 00:00:00 2001 From: sbond75 <43617712+sbond75@users.noreply.github.com> Date: Tue, 22 Dec 2020 22:51:01 -0500 Subject: [PATCH 01/45] maintainers: add sbond75 --- maintainers/maintainer-list.nix | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/maintainers/maintainer-list.nix b/maintainers/maintainer-list.nix index e3a0e4beee2..a8b7ae6346b 100644 --- a/maintainers/maintainer-list.nix +++ b/maintainers/maintainer-list.nix @@ -7921,6 +7921,12 @@ githubId = 720864; name = "Sébastien Bourdeauducq"; }; + sbond75 = { + name = "sbond75"; + email = "43617712+sbond75@users.noreply.github.com"; + github = "sbond75"; + githubId = 43617712; + }; sboosali = { email = "SamBoosalis@gmail.com"; github = "sboosali"; From 3c80a19ccd8e5c4dc2b9e2d969adf7d56e23fa9d Mon Sep 17 00:00:00 2001 From: Jamie Magee Date: Tue, 29 Dec 2020 18:56:49 +0100 Subject: [PATCH 02/45] pythonPackages.advantage_air: init at 0.2.2 --- .../python-modules/advantage-air/default.nix | 26 +++++++++++++++++++ pkgs/top-level/python-packages.nix | 4 ++- 2 files changed, 29 insertions(+), 1 deletion(-) create mode 100644 pkgs/development/python-modules/advantage-air/default.nix diff --git a/pkgs/development/python-modules/advantage-air/default.nix b/pkgs/development/python-modules/advantage-air/default.nix new file mode 100644 index 00000000000..4d6d91c5716 --- /dev/null +++ b/pkgs/development/python-modules/advantage-air/default.nix @@ -0,0 +1,26 @@ +{ aiohttp, buildPythonPackage, fetchPypi, lib, pythonOlder }: + +buildPythonPackage rec { + pname = "advantage_air"; + version = "0.2.2"; + + disabled = pythonOlder "3.6"; + + src = fetchPypi { + inherit version pname; + sha256 = "04q2sjw9r50c00m4sfv98w9cwmmr970830c97m32p5j8ijb10j5x"; + }; + + propagatedBuildInputs = [ aiohttp ]; + + # No tests + doCheck = false; + pythonImportsCheck = [ "advantage_air" ]; + + meta = with lib; { + description = "API helper for Advantage Air's MyAir and e-zone API"; + homepage = "https://github.com/Bre77/advantage_air"; + license = licenses.mit; + maintainers = with maintainers; [ jamiemagee ]; + }; +} diff --git a/pkgs/top-level/python-packages.nix b/pkgs/top-level/python-packages.nix index 80f5f6cab1c..d0957281eab 100644 --- a/pkgs/top-level/python-packages.nix +++ b/pkgs/top-level/python-packages.nix @@ -169,7 +169,9 @@ in { addic7ed-cli = callPackage ../development/python-modules/addic7ed-cli { }; - adguardhome= callPackage ../development/python-modules/adguardhome { }; + adguardhome = callPackage ../development/python-modules/adguardhome { }; + + advantage-air = callPackage ../development/python-modules/advantage-air { }; aenum = callPackage ../development/python-modules/aenum { }; From 43351b93e99e46de43075d5fa03e18935205c1c7 Mon Sep 17 00:00:00 2001 From: Jamie Magee Date: Tue, 29 Dec 2020 19:13:11 +0100 Subject: [PATCH 03/45] home-assistant: update component-packages --- pkgs/servers/home-assistant/component-packages.nix | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/pkgs/servers/home-assistant/component-packages.nix b/pkgs/servers/home-assistant/component-packages.nix index 9135ea549f3..d8353d356c1 100644 --- a/pkgs/servers/home-assistant/component-packages.nix +++ b/pkgs/servers/home-assistant/component-packages.nix @@ -11,7 +11,7 @@ "actiontec" = ps: with ps; [ ]; "adguard" = ps: with ps; [ adguardhome ]; "ads" = ps: with ps; [ pyads ]; - "advantage_air" = ps: with ps; [ ]; # missing inputs: advantage_air + "advantage_air" = ps: with ps; [ advantage_air ]; "aftership" = ps: with ps; [ pyaftership ]; "agent_dvr" = ps: with ps; [ ]; # missing inputs: agent-py "air_quality" = ps: with ps; [ ]; From a1e9a94785cf885487d823790aa82dc82fe5924c Mon Sep 17 00:00:00 2001 From: sternenseemann <0rpkxez4ksa01gb3typccl0i@systemli.org> Date: Sun, 3 Jan 2021 12:52:03 +0100 Subject: [PATCH 04/45] imv: 4.1.0 -> 4.2.0 * switch build system to wayland * enable all backends by adding the following to buildInputs as meson autodetects which backends are available. * libtiff * libheif * libpng Open questions: * imv prints a warning from the tiff backend everytime a non tiff file is opened: Is this normal? Seems harmless enough though. * Should we make backends configurable / optional? I readded some backends which apparently were removed, but still given as an argument to the derivation. Resolves #108185. --- pkgs/applications/graphics/imv/default.nix | 24 +++++++++++++++------- 1 file changed, 17 insertions(+), 7 deletions(-) diff --git a/pkgs/applications/graphics/imv/default.nix b/pkgs/applications/graphics/imv/default.nix index faf74873058..9b69aa9ec0f 100644 --- a/pkgs/applications/graphics/imv/default.nix +++ b/pkgs/applications/graphics/imv/default.nix @@ -18,20 +18,30 @@ , pkgconfig , stdenv , wayland +, meson +, ninja +, inih }: stdenv.mkDerivation rec { pname = "imv"; - version = "4.1.0"; + version = "4.2.0"; src = fetchFromGitHub { owner = "eXeC64"; repo = "imv"; rev = "v${version}"; - sha256 = "0gk8g178i961nn3bls75a8qpv6wvfvav6hd9lxca1skaikd33zdx"; + sha256 = "07pcpppmfvvj0czfvp1cyq03ha0jdj4whl13lzvw37q3vpxs5qqh"; }; - nativeBuildInputs = [ asciidoc cmocka docbook_xsl libxslt ]; + nativeBuildInputs = [ + asciidoc + cmocka + docbook_xsl + libxslt + meson + ninja + ]; buildInputs = [ freeimage @@ -44,12 +54,12 @@ stdenv.mkDerivation rec { pango pkgconfig wayland + inih + libtiff + libheif + libpng ]; - installFlags = [ "PREFIX=$(out)" "CONFIGPREFIX=$(out)/etc" ]; - - makeFlags = [ "BACKEND_LIBJPEG=yes" "BACKEND_LIBNSGIF=yes" ]; - postFixup = '' # The `bin/imv` script assumes imv-wayland or imv-x11 in PATH, # so we have to fix those to the binaries we installed into the /nix/store From 792dacacd58b7259da997c6784fa1d22f028fae4 Mon Sep 17 00:00:00 2001 From: sternenseemann <0rpkxez4ksa01gb3typccl0i@systemli.org> Date: Sun, 20 Dec 2020 21:58:42 +0100 Subject: [PATCH 05/45] libschrift: init at 0.9.1 Building a shared object file is probably not necessary since libschrift has no dependencies and is pretty small. --- .../libraries/libschrift/default.nix | 28 +++++++++++++++++++ pkgs/top-level/all-packages.nix | 2 ++ 2 files changed, 30 insertions(+) create mode 100644 pkgs/development/libraries/libschrift/default.nix diff --git a/pkgs/development/libraries/libschrift/default.nix b/pkgs/development/libraries/libschrift/default.nix new file mode 100644 index 00000000000..a06f6c50d66 --- /dev/null +++ b/pkgs/development/libraries/libschrift/default.nix @@ -0,0 +1,28 @@ +{ stdenv, fetchFromGitHub }: + +stdenv.mkDerivation rec { + pname = "libschrift"; + version = "0.9.1"; + + src = fetchFromGitHub { + owner = "tomolt"; + repo = pname; + rev = "c6d20460d6e602e8829d3a227fd7be4c4c3cda86"; + hash = "sha256-BuTmWaWFZ0DXujlbhbmK3Woit8fR9F4DWmKszHX6gOI="; + }; + + postPatch = '' + substituteInPlace config.mk \ + --replace "PREFIX = /usr/local" "PREFIX = $out" + ''; + + makeFlags = [ "libschrift.a" ]; + + meta = with stdenv.lib; { + homepage = "https://github.com/tomolt/libschrift"; + description = "A lightweight TrueType font rendering library"; + license = licenses.isc; + platforms = platforms.all; + maintainers = [ maintainers.sternenseemann ]; + }; +} diff --git a/pkgs/top-level/all-packages.nix b/pkgs/top-level/all-packages.nix index 4cdf4ec1650..eb3d101e0e5 100644 --- a/pkgs/top-level/all-packages.nix +++ b/pkgs/top-level/all-packages.nix @@ -14608,6 +14608,8 @@ in libs3 = callPackage ../development/libraries/libs3 { }; + libschrift = callPackage ../development/libraries/libschrift { }; + libsearpc = callPackage ../development/libraries/libsearpc { }; libsigcxx = callPackage ../development/libraries/libsigcxx { }; From 30ccbe8eec38870db7fc6d1e7c173e92fb835c96 Mon Sep 17 00:00:00 2001 From: Patryk Wychowaniec Date: Mon, 4 Jan 2021 10:59:19 +0100 Subject: [PATCH 06/45] nixos/lxd: disable cgroup v2 when LXD is active --- nixos/modules/virtualisation/lxd.nix | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/nixos/modules/virtualisation/lxd.nix b/nixos/modules/virtualisation/lxd.nix index 3958fc2c1d7..103e689abae 100644 --- a/nixos/modules/virtualisation/lxd.nix +++ b/nixos/modules/virtualisation/lxd.nix @@ -100,6 +100,10 @@ in packages = [ cfg.lxcPackage ]; }; + # TODO: remove once LXD gets proper support for cgroupsv2 + # (currently most of the e.g. CPU accounting stuff doesn't work) + systemd.enableUnifiedCgroupHierarchy = false; + systemd.services.lxd = { description = "LXD Container Management Daemon"; From fac1372074a8f6dcb6825b046ab95bfe9c2e9000 Mon Sep 17 00:00:00 2001 From: MarcFontaine Date: Wed, 30 Dec 2020 00:23:25 +0100 Subject: [PATCH 07/45] pcimem: init at unstable-2018-08-29 This commit adds the pcimem tool. pcimem is a simple method of reading and writing to memory registers on a PCI card. Compared to pkgs.devmem2, it does not work on the total memory space of the machine but restricts access to just one PCI resource. --- pkgs/os-specific/linux/pcimem/default.nix | 30 +++++++++++++++++++++++ pkgs/top-level/all-packages.nix | 2 ++ 2 files changed, 32 insertions(+) create mode 100644 pkgs/os-specific/linux/pcimem/default.nix diff --git a/pkgs/os-specific/linux/pcimem/default.nix b/pkgs/os-specific/linux/pcimem/default.nix new file mode 100644 index 00000000000..b559bd98b9c --- /dev/null +++ b/pkgs/os-specific/linux/pcimem/default.nix @@ -0,0 +1,30 @@ +{ stdenv, fetchFromGitHub }: + +stdenv.mkDerivation rec { + pname = "pcimem"; + version = "unstable-2018-08-29"; + + src = fetchFromGitHub { + owner = "billfarrow"; + repo = pname; + rev = "09724edb1783a98da2b7ae53c5aaa87493aabc9b"; + sha256 = "0zlbvcl5q4hgna11p3w00px1p8qgn8ga79lh6a2m7d597g86kbq3"; + }; + + outputs = [ "out" "doc" ]; + + makeFlags = [ "CFLAGS=-Wno-maybe-uninitialized" ]; + + installPhase = '' + install -D pcimem "$out/bin/pcimem" + install -D README "$doc/doc/README" + ''; + + meta = with stdenv.lib; { + description = "Simple method of reading and writing to memory registers on a PCI card"; + homepage = "https://github.com/billfarrow/pcimem"; + license = licenses.gpl2Only; + platforms = platforms.linux; + maintainers = with maintainers; [ mafo ]; + }; +} diff --git a/pkgs/top-level/all-packages.nix b/pkgs/top-level/all-packages.nix index bc1ddfa20e9..69587e0bf17 100644 --- a/pkgs/top-level/all-packages.nix +++ b/pkgs/top-level/all-packages.nix @@ -6527,6 +6527,8 @@ in pbzip2 = callPackage ../tools/compression/pbzip2 { }; + pcimem = callPackage ../os-specific/linux/pcimem { }; + pciutils = callPackage ../tools/system/pciutils { }; pcsclite = callPackage ../tools/security/pcsclite { From c391b303caee60cd80104d6fa99ef7bd7a0e6d2d Mon Sep 17 00:00:00 2001 From: sternenseemann <0rpkxez4ksa01gb3typccl0i@systemli.org> Date: Mon, 4 Jan 2021 14:41:45 +0100 Subject: [PATCH 08/45] imv: use substituteInPlace --- pkgs/applications/graphics/imv/default.nix | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/pkgs/applications/graphics/imv/default.nix b/pkgs/applications/graphics/imv/default.nix index 9b69aa9ec0f..f133dde6e4b 100644 --- a/pkgs/applications/graphics/imv/default.nix +++ b/pkgs/applications/graphics/imv/default.nix @@ -64,8 +64,9 @@ stdenv.mkDerivation rec { # The `bin/imv` script assumes imv-wayland or imv-x11 in PATH, # so we have to fix those to the binaries we installed into the /nix/store - sed -i "s|\bimv-wayland\b|$out/bin/imv-wayland|" $out/bin/imv - sed -i "s|\bimv-x11\b|$out/bin/imv-x11|" $out/bin/imv + substituteInPlace "$out/bin/imv" \ + --replace "imv-wayland" "$out/bin/imv-wayland" \ + --replace "imv-x11" "$out/bin/imv-x11" ''; doCheck = true; From b374d993edce3775c879bbd3d4abdd33051c6966 Mon Sep 17 00:00:00 2001 From: Daniel Nagy Date: Mon, 4 Jan 2021 15:37:23 +0100 Subject: [PATCH 09/45] ceph: enable aarch64-linux platform --- pkgs/tools/filesystems/ceph/default.nix | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/pkgs/tools/filesystems/ceph/default.nix b/pkgs/tools/filesystems/ceph/default.nix index 1a43d792ad3..d87c6331b79 100644 --- a/pkgs/tools/filesystems/ceph/default.nix +++ b/pkgs/tools/filesystems/ceph/default.nix @@ -81,7 +81,7 @@ let inherit description; license = with licenses; [ lgpl21 gpl2 bsd3 mit publicDomain ]; maintainers = with maintainers; [ adev ak johanot krav ]; - platforms = [ "x86_64-linux" ]; + platforms = [ "x86_64-linux" "aarch64-linux" ]; }; ceph-common = python3Packages.buildPythonPackage rec{ From 4f927ee34182154535e24cb7b8ed75a849609638 Mon Sep 17 00:00:00 2001 From: sternenseemann <0rpkxez4ksa01gb3typccl0i@systemli.org> Date: Mon, 4 Jan 2021 15:07:52 +0100 Subject: [PATCH 10/45] imv: make every backend and window system configurable The following new derivation inputs are added: * withBackends: a list of all backends to enable. The valid names are the same as specified in imv's meson_options.txt. Default is to enable all 7 backends: freeimage, libtiff, libjpeg(_turbo), libpng, librsvg, libnsgif and libheif * withWindowSystem: either all, x11 or wayland to describe window system support. --- pkgs/applications/graphics/imv/default.nix | 82 +++++++++++++++------- 1 file changed, 56 insertions(+), 26 deletions(-) diff --git a/pkgs/applications/graphics/imv/default.nix b/pkgs/applications/graphics/imv/default.nix index f133dde6e4b..71e156881c4 100644 --- a/pkgs/applications/graphics/imv/default.nix +++ b/pkgs/applications/graphics/imv/default.nix @@ -1,28 +1,60 @@ -{ asciidoc +{ stdenv +, lib +, fetchFromGitHub +, asciidoc , cmocka , docbook_xsl -, fetchFromGitHub +, libxslt , fontconfig -, freeimage +, meson +, ninja +, pkgconfig , icu +, pango +, inih +, withWindowSystem ? "all" +, xorg +, libxkbcommon , libGLU -, libheif +, wayland +, withBackends ? [ "freeimage" "libtiff" "libjpeg" "libpng" "librsvg" "libnsgif" "libheif" ] +, freeimage +, libtiff , libjpeg_turbo , libpng , librsvg -, libtiff -, libxkbcommon -, libxslt , netsurf -, pango -, pkgconfig -, stdenv -, wayland -, meson -, ninja -, inih +, libheif }: +let + windowSystems = { + all = windowSystems.x11 ++ windowSystems.wayland; + x11 = [ libGLU xorg.libxcb xorg.libX11 ]; + wayland = [ wayland ]; + }; + + backends = { + inherit freeimage libtiff libpng librsvg libheif; + libjpeg = libjpeg_turbo; + inherit (netsurf) libnsgif; + }; + + backendFlags = builtins.map + (b: if builtins.elem b withBackends + then "-D${b}=enabled" + else "-D${b}=disabled") + (builtins.attrNames backends); +in + +# check that given window system is valid +assert lib.assertOneOf "withWindowSystem" withWindowSystem + (builtins.attrNames windowSystems); +# check that every given backend is valid +assert builtins.all + (b: lib.assertOneOf "each backend" b (builtins.attrNames backends)) + withBackends; + stdenv.mkDerivation rec { pname = "imv"; version = "4.2.0"; @@ -34,6 +66,12 @@ stdenv.mkDerivation rec { sha256 = "07pcpppmfvvj0czfvp1cyq03ha0jdj4whl13lzvw37q3vpxs5qqh"; }; + mesonFlags = [ + "-Dwindows=${withWindowSystem}" + "-Dtest=enabled" + "-Dman=enabled" + ] ++ backendFlags; + nativeBuildInputs = [ asciidoc cmocka @@ -41,26 +79,18 @@ stdenv.mkDerivation rec { libxslt meson ninja + pkgconfig ]; buildInputs = [ - freeimage icu - libGLU - libjpeg_turbo - librsvg libxkbcommon - netsurf.libnsgif pango - pkgconfig - wayland inih - libtiff - libheif - libpng - ]; + ] ++ windowSystems."${withWindowSystem}" + ++ builtins.map (b: backends."${b}") withBackends; - postFixup = '' + postFixup = lib.optionalString (withWindowSystem == "all") '' # The `bin/imv` script assumes imv-wayland or imv-x11 in PATH, # so we have to fix those to the binaries we installed into the /nix/store From 1a828f66dc7fad2a44b2e022251d797893af7a70 Mon Sep 17 00:00:00 2001 From: Aaron Andersen Date: Mon, 4 Jan 2021 19:47:32 -0500 Subject: [PATCH 11/45] nixos/redis: replace extraConfig option with settings option --- nixos/modules/services/databases/redis.nix | 76 ++++++++++++++-------- 1 file changed, 48 insertions(+), 28 deletions(-) diff --git a/nixos/modules/services/databases/redis.nix b/nixos/modules/services/databases/redis.nix index 6b8853ae390..9628d30e76a 100644 --- a/nixos/modules/services/databases/redis.nix +++ b/nixos/modules/services/databases/redis.nix @@ -4,31 +4,16 @@ with lib; let cfg = config.services.redis; - redisBool = b: if b then "yes" else "no"; - condOption = name: value: if value != null then "${name} ${toString value}" else ""; - redisConfig = pkgs.writeText "redis.conf" '' - port ${toString cfg.port} - ${condOption "bind" cfg.bind} - ${condOption "unixsocket" cfg.unixSocket} - daemonize no - supervised systemd - loglevel ${cfg.logLevel} - logfile ${cfg.logfile} - syslog-enabled ${redisBool cfg.syslog} - databases ${toString cfg.databases} - ${concatMapStrings (d: "save ${toString (builtins.elemAt d 0)} ${toString (builtins.elemAt d 1)}\n") cfg.save} - dbfilename dump.rdb - dir /var/lib/redis - ${if cfg.slaveOf != null then "slaveof ${cfg.slaveOf.ip} ${toString cfg.slaveOf.port}" else ""} - ${condOption "masterauth" cfg.masterAuth} - ${condOption "requirepass" cfg.requirePass} - appendOnly ${redisBool cfg.appendOnly} - appendfsync ${cfg.appendFsync} - slowlog-log-slower-than ${toString cfg.slowLogLogSlowerThan} - slowlog-max-len ${toString cfg.slowLogMaxLen} - ${cfg.extraConfig} - ''; + mkValueString = value: + if value == true then "yes" + else if value == false then "no" + else generators.mkValueStringDefault { } value; + + redisConfig = pkgs.writeText "redis.conf" (generators.toKeyValue { + listsAsDuplicateKeys = true; + mkKeyValue = generators.mkKeyValueDefault { inherit mkValueString; } " "; + } cfg.settings); in { imports = [ @@ -37,6 +22,7 @@ in (mkRemovedOptionModule [ "services" "redis" "dbFilename" ] "The redis module now uses /var/lib/redis/dump.rdb as database dump location.") (mkRemovedOptionModule [ "services" "redis" "appendOnlyFilename" ] "This option was never used.") (mkRemovedOptionModule [ "services" "redis" "pidFile" ] "This option was removed.") + (mkRemovedOptionModule [ "services" "redis" "extraConfig" ] "Use services.redis.settings instead.") ]; ###### interface @@ -191,10 +177,20 @@ in description = "Maximum number of items to keep in slow log."; }; - extraConfig = mkOption { - type = types.lines; - default = ""; - description = "Extra configuration options for redis.conf."; + settings = mkOption { + type = with types; attrsOf (oneOf [ bool int str (listOf str) ]); + default = {}; + description = '' + Redis configuration. Refer to + + for details on supported values. + ''; + example = literalExample '' + { + unixsocketperm = "700"; + loadmodule = [ "/path/to/my_module.so" "/path/to/other_module.so" ]; + } + ''; }; }; @@ -225,6 +221,30 @@ in environment.systemPackages = [ cfg.package ]; + services.redis.settings = mkMerge [ + { + port = cfg.port; + daemonize = false; + supervised = "systemd"; + loglevel = cfg.logLevel; + logfile = cfg.logfile; + syslog-enabled = cfg.syslog; + databases = cfg.databases; + save = map (d: "${toString (builtins.elemAt d 0)} ${toString (builtins.elemAt d 1)}") cfg.save; + dbfilename = "dump.rdb"; + dir = "/var/lib/redis"; + appendOnly = cfg.appendOnly; + appendfsync = cfg.appendFsync; + slowlog-log-slower-than = cfg.slowLogLogSlowerThan; + slowlog-max-len = cfg.slowLogMaxLen; + } + (mkIf (cfg.bind != null) { bind = cfg.bind; }) + (mkIf (cfg.unixSocket != null) { unixsocket = cfg.unixSocket; }) + (mkIf (cfg.slaveOf != null) { slaveof = "${cfg.slaveOf.ip} ${cfg.slaveOf.port}"; }) + (mkIf (cfg.masterAuth != null) { masterauth = cfg.masterAuth; }) + (mkIf (cfg.requirePass != null) { requirepass = cfg.requirePass; }) + ]; + systemd.services.redis = { description = "Redis Server"; From 805788f40a63e65ea8e304a8965a0aba7bcc5a64 Mon Sep 17 00:00:00 2001 From: sbond75 <43617712+sbond75@users.noreply.github.com> Date: Tue, 22 Dec 2020 23:07:35 -0500 Subject: [PATCH 12/45] cakelisp: init at 0.1.0 --- .../compilers/cakelisp/default.nix | 42 +++++++++++++++++++ pkgs/top-level/all-packages.nix | 2 + 2 files changed, 44 insertions(+) create mode 100644 pkgs/development/compilers/cakelisp/default.nix diff --git a/pkgs/development/compilers/cakelisp/default.nix b/pkgs/development/compilers/cakelisp/default.nix new file mode 100644 index 00000000000..500c15a2aaa --- /dev/null +++ b/pkgs/development/compilers/cakelisp/default.nix @@ -0,0 +1,42 @@ +{ stdenv, fetchFromGitHub, gcc }: + +stdenv.mkDerivation rec { + pname = "cakelisp"; + version = "0.1.0"; + + src = fetchFromGitHub { + owner = "makuto"; + repo = "cakelisp"; + rev = "v${version}"; + sha256 = "126va59jy7rvy6c2wrf8j44m307f2d8jixqkc49s9wllxprj1dmg"; + }; + + buildInputs = [ gcc ]; + + postPatch = '' + substituteInPlace runtime/HotReloading.cake \ + --replace '"/usr/bin/g++"' '"${gcc}/bin/g++"' + substituteInPlace src/ModuleManager.cpp \ + --replace '"/usr/bin/g++"' '"${gcc}/bin/g++"' + '' + stdenv.lib.optionalString stdenv.isDarwin '' + substituteInPlace Build.sh --replace '--export-dynamic' '-export_dynamic' + substituteInPlace runtime/HotReloading.cake --replace '--export-dynamic' '-export_dynamic' + substituteInPlace Bootstrap.cake --replace '--export-dynamic' '-export_dynamic' + ''; + + buildPhase = '' + ./Build.sh + ''; + + installPhase = '' + install -Dm755 bin/cakelisp -t $out/bin + ''; + + meta = with stdenv.lib; { + description = "A performance-oriented Lisp-like language"; + homepage = "https://github.com/makuto/cakelisp"; + license = licenses.gpl3Plus; + platforms = platforms.darwin ++ platforms.linux; + maintainers = [ maintainers.sbond75 ]; + }; +} diff --git a/pkgs/top-level/all-packages.nix b/pkgs/top-level/all-packages.nix index 36dafc45585..92a6f5c208b 100644 --- a/pkgs/top-level/all-packages.nix +++ b/pkgs/top-level/all-packages.nix @@ -8892,6 +8892,8 @@ in gmp-static = gmp.override { withStatic = true; }; }; + cakelisp = callPackage ../development/compilers/cakelisp { }; + ciao = callPackage ../development/compilers/ciao { }; colm = callPackage ../development/compilers/colm { }; From 0f15ca239d19edbd84ae7638b8ecd7e222aae355 Mon Sep 17 00:00:00 2001 From: Ingo Blechschmidt Date: Wed, 6 Jan 2021 17:00:52 +0100 Subject: [PATCH 13/45] dsniff: unbreak the build We revert to using GCC 9 for compilation, in order to work around a GCC 10 bug resulting in a segfault when compiling. The alternative would be to restrict to optimization level -O1, but this disables fortify. --- pkgs/tools/networking/dsniff/default.nix | 10 +++++++--- 1 file changed, 7 insertions(+), 3 deletions(-) diff --git a/pkgs/tools/networking/dsniff/default.nix b/pkgs/tools/networking/dsniff/default.nix index db9c608e931..3a8eab862cb 100644 --- a/pkgs/tools/networking/dsniff/default.nix +++ b/pkgs/tools/networking/dsniff/default.nix @@ -1,6 +1,10 @@ -{ stdenv, fetchFromGitLab, autoreconfHook, libpcap, db, glib, libnet, libnids, symlinkJoin, openssl +{ gcc9Stdenv, lib, fetchFromGitLab, autoreconfHook, libpcap, db, glib, libnet, libnids, symlinkJoin, openssl , rpcsvc-proto, libtirpc, libnsl }: + +# We compile with GCC 9 since GCC 10 segfaults on the code +# (see https://bugzilla.redhat.com/show_bug.cgi?id=1862809). + let /* dsniff's build system unconditionnaly wants static libraries and does not @@ -38,7 +42,7 @@ let inherit (openssl) name; paths = with openssl.override { static = true; }; [ out dev ]; }; -in stdenv.mkDerivation rec { +in gcc9Stdenv.mkDerivation rec { pname = "dsniff"; version = "2.4b1"; # upstream is so old that nearly every distribution packages the beta version. @@ -71,7 +75,7 @@ in stdenv.mkDerivation rec { "--with-openssl=${ssl}" ]; - meta = with stdenv.lib; { + meta = with lib; { description = "collection of tools for network auditing and penetration testing"; longDescription = '' dsniff, filesnarf, mailsnarf, msgsnarf, urlsnarf, and webspy passively monitor a network for interesting data (passwords, e-mail, files, etc.). arpspoof, dnsspoof, and macof facilitate the interception of network traffic normally unavailable to an attacker (e.g, due to layer-2 switching). sshmitm and webmitm implement active monkey-in-the-middle attacks against redirected SSH and HTTPS sessions by exploiting weak bindings in ad-hoc PKI. From ab64e82e32626f6c8d484a123428f8d5f7e65fee Mon Sep 17 00:00:00 2001 From: Zeyi Fan Date: Wed, 6 Jan 2021 18:49:09 -0800 Subject: [PATCH 14/45] wezterm: add macOS support --- .../terminal-emulators/wezterm/default.nix | 23 +++++++++++++++---- pkgs/top-level/all-packages.nix | 4 +++- 2 files changed, 21 insertions(+), 6 deletions(-) diff --git a/pkgs/applications/terminal-emulators/wezterm/default.nix b/pkgs/applications/terminal-emulators/wezterm/default.nix index 35b2500c7c9..8f0c6777e37 100644 --- a/pkgs/applications/terminal-emulators/wezterm/default.nix +++ b/pkgs/applications/terminal-emulators/wezterm/default.nix @@ -1,4 +1,5 @@ -{ rustPlatform +{ stdenv +, rustPlatform , lib , fetchFromGitHub @@ -8,6 +9,11 @@ , openssl , perl +# Apple frameworks +, CoreGraphics +, Cocoa +, Foundation + , dbus , libX11 , xcbutil @@ -24,7 +30,12 @@ , zlib }: let - runtimeDeps = [ + commonRuntimeDeps = [ + zlib + fontconfig + freetype + ]; + linuxRuntimeDeps = [ libX11 xcbutil libxcb @@ -33,14 +44,14 @@ let libxkbcommon dbus libglvnd - zlib egl-wayland wayland libGLU libGL - fontconfig - freetype ]; + runtimeDeps = commonRuntimeDeps + ++ stdenv.lib.optionals (!stdenv.isDarwin) linuxRuntimeDeps + ++ stdenv.lib.optionals (stdenv.isDarwin) [ Foundation CoreGraphics Cocoa ]; pname = "wezterm"; in @@ -68,7 +79,9 @@ rustPlatform.buildRustPackage { installPhase = '' for artifact in wezterm wezterm-gui wezterm-mux-server strip-ansi-escapes; do + '' + stdenv.lib.optionalString stdenv.isLinux '' patchelf --set-rpath "${lib.makeLibraryPath runtimeDeps}" $releaseDir/$artifact + '' + '' install -D $releaseDir/$artifact -t $out/bin done ''; diff --git a/pkgs/top-level/all-packages.nix b/pkgs/top-level/all-packages.nix index f008ac7b102..eef014864f2 100644 --- a/pkgs/top-level/all-packages.nix +++ b/pkgs/top-level/all-packages.nix @@ -811,7 +811,9 @@ in wayst = callPackage ../applications/terminal-emulators/wayst { }; - wezterm = callPackage ../applications/terminal-emulators/wezterm { }; + wezterm = callPackage ../applications/terminal-emulators/wezterm { + inherit (darwin.apple_sdk.frameworks) Cocoa CoreGraphics Foundation; + }; x3270 = callPackage ../applications/terminal-emulators/x3270 { }; From a853e00e9d1ce8b65dbfd3bf0f51567e6669965f Mon Sep 17 00:00:00 2001 From: Mario Rodas Date: Thu, 7 Jan 2021 04:20:00 +0000 Subject: [PATCH 15/45] rubocop: 1.1.0 -> 1.8.0 --- pkgs/development/tools/rubocop/Gemfile.lock | 22 ++++++++-------- pkgs/development/tools/rubocop/gemset.nix | 28 ++++++++++----------- 2 files changed, 25 insertions(+), 25 deletions(-) diff --git a/pkgs/development/tools/rubocop/Gemfile.lock b/pkgs/development/tools/rubocop/Gemfile.lock index 6b6a3a99591..74ae51427a9 100644 --- a/pkgs/development/tools/rubocop/Gemfile.lock +++ b/pkgs/development/tools/rubocop/Gemfile.lock @@ -2,25 +2,25 @@ GEM remote: https://rubygems.org/ specs: ast (2.4.1) - parallel (1.19.2) - parser (2.7.2.0) + parallel (1.20.1) + parser (3.0.0.0) ast (~> 2.4.1) rainbow (3.0.0) - regexp_parser (1.8.2) + regexp_parser (2.0.3) rexml (3.2.4) - rubocop (1.1.0) + rubocop (1.8.0) parallel (~> 1.10) - parser (>= 2.7.1.5) + parser (>= 3.0.0.0) rainbow (>= 2.2.2, < 4.0) - regexp_parser (>= 1.8) + regexp_parser (>= 1.8, < 3.0) rexml - rubocop-ast (>= 1.0.1) + rubocop-ast (>= 1.2.0, < 2.0) ruby-progressbar (~> 1.7) - unicode-display_width (>= 1.4.0, < 2.0) - rubocop-ast (1.1.0) + unicode-display_width (>= 1.4.0, < 3.0) + rubocop-ast (1.4.0) parser (>= 2.7.1.5) - ruby-progressbar (1.10.1) - unicode-display_width (1.7.0) + ruby-progressbar (1.11.0) + unicode-display_width (2.0.0) PLATFORMS ruby diff --git a/pkgs/development/tools/rubocop/gemset.nix b/pkgs/development/tools/rubocop/gemset.nix index c1f55f7aca2..e22424c1ae6 100644 --- a/pkgs/development/tools/rubocop/gemset.nix +++ b/pkgs/development/tools/rubocop/gemset.nix @@ -14,10 +14,10 @@ platforms = []; source = { remotes = ["https://rubygems.org"]; - sha256 = "17b127xxmm2yqdz146qwbs57046kn0js1h8synv01dwqz2z1kp2l"; + sha256 = "0055br0mibnqz0j8wvy20zry548dhkakws681bhj3ycb972awkzd"; type = "gem"; }; - version = "1.19.2"; + version = "1.20.1"; }; parser = { dependencies = ["ast"]; @@ -25,10 +25,10 @@ platforms = []; source = { remotes = ["https://rubygems.org"]; - sha256 = "1f7gmm60yla325wlnd3qkxs59qm2y0aan8ljpg6k18rwzrrfil6z"; + sha256 = "1jixakyzmy0j5c1rb0fjrrdhgnyryvrr6vgcybs14jfw09akv5ml"; type = "gem"; }; - version = "2.7.2.0"; + version = "3.0.0.0"; }; rainbow = { groups = ["default"]; @@ -45,10 +45,10 @@ platforms = []; source = { remotes = ["https://rubygems.org"]; - sha256 = "0x4s82lgf0l71y3xc9gp4qxkrgx1kv8f6avdqd68l46ijbyvicdm"; + sha256 = "0zm86k9q8m5jkcnpb1f93wsvc57saldfj8czxkx1aw031i95inip"; type = "gem"; }; - version = "1.8.2"; + version = "2.0.3"; }; rexml = { groups = ["default"]; @@ -66,10 +66,10 @@ platforms = []; source = { remotes = ["https://rubygems.org"]; - sha256 = "1nw87ngw4a9r3dpgykb872zcm640m7k0nk17qv537fmss2hl8shl"; + sha256 = "12arfnsj32126ps6mxbn7dwrw43cy70sq45rm0ib7qfrmhp5qyid"; type = "gem"; }; - version = "1.1.0"; + version = "1.8.0"; }; rubocop-ast = { dependencies = ["parser"]; @@ -77,29 +77,29 @@ platforms = []; source = { remotes = ["https://rubygems.org"]; - sha256 = "0ami6n3vnpm9y5z6wd4c6y2infijajizjjwv8fq0wrcjvr3zivzz"; + sha256 = "1qvfp567aprjgcwj757p55ynj0dx2b3c3hd76za9z3c43sphprcj"; type = "gem"; }; - version = "1.1.0"; + version = "1.4.0"; }; ruby-progressbar = { groups = ["default"]; platforms = []; source = { remotes = ["https://rubygems.org"]; - sha256 = "1k77i0d4wsn23ggdd2msrcwfy0i376cglfqypkk2q77r2l3408zf"; + sha256 = "02nmaw7yx9kl7rbaan5pl8x5nn0y4j5954mzrkzi9i3dhsrps4nc"; type = "gem"; }; - version = "1.10.1"; + version = "1.11.0"; }; unicode-display_width = { groups = ["default"]; platforms = []; source = { remotes = ["https://rubygems.org"]; - sha256 = "06i3id27s60141x6fdnjn5rar1cywdwy64ilc59cz937303q3mna"; + sha256 = "1bilbnc8j6jkb59lrf177i3p1pdyxll0n8400hzqr35vl3r3kv2m"; type = "gem"; }; - version = "1.7.0"; + version = "2.0.0"; }; } \ No newline at end of file From b9f0b2885b1986b12a1fe1e527b12d5c58e936dd Mon Sep 17 00:00:00 2001 From: Zeyi Fan Date: Wed, 6 Jan 2021 20:48:25 -0800 Subject: [PATCH 16/45] wezterm: build as macOS app --- .../terminal-emulators/wezterm/default.nix | 25 +++++++++++++------ 1 file changed, 17 insertions(+), 8 deletions(-) diff --git a/pkgs/applications/terminal-emulators/wezterm/default.nix b/pkgs/applications/terminal-emulators/wezterm/default.nix index 8f0c6777e37..a30afa1ce68 100644 --- a/pkgs/applications/terminal-emulators/wezterm/default.nix +++ b/pkgs/applications/terminal-emulators/wezterm/default.nix @@ -30,12 +30,11 @@ , zlib }: let - commonRuntimeDeps = [ + runtimeDeps = [ zlib fontconfig freetype - ]; - linuxRuntimeDeps = [ + ] ++ stdenv.lib.optionals (stdenv.isLinux) [ libX11 xcbutil libxcb @@ -48,10 +47,11 @@ let wayland libGLU libGL + ] ++ stdenv.lib.optionals (stdenv.isDarwin) [ + Foundation + CoreGraphics + Cocoa ]; - runtimeDeps = commonRuntimeDeps - ++ stdenv.lib.optionals (!stdenv.isDarwin) linuxRuntimeDeps - ++ stdenv.lib.optionals (stdenv.isDarwin) [ Foundation CoreGraphics Cocoa ]; pname = "wezterm"; in @@ -78,12 +78,21 @@ rustPlatform.buildRustPackage { buildInputs = runtimeDeps; installPhase = '' - for artifact in wezterm wezterm-gui wezterm-mux-server strip-ansi-escapes; do '' + stdenv.lib.optionalString stdenv.isLinux '' + for artifact in wezterm wezterm-gui wezterm-mux-server strip-ansi-escapes; do patchelf --set-rpath "${lib.makeLibraryPath runtimeDeps}" $releaseDir/$artifact - '' + '' install -D $releaseDir/$artifact -t $out/bin done + '' + stdenv.lib.optionalString stdenv.isDarwin '' + mkdir -p "$out/Applications" + OUT_APP="$out/Applications/WezTerm.app" + cp -r assets/macos/WezTerm.app "$OUT_APP" + rm $OUT_APP/*.dylib + cp -r assets/shell-integration/* "$OUT_APP" + cp $releaseDir/wezterm "$OUT_APP" + cp $releaseDir/wezterm-mux-server "$OUT_APP" + cp $releaseDir/wezterm-gui "$OUT_APP" + cp $releaseDir/strip-ansi-escapes "$OUT_APP" ''; # prevent further changes to the RPATH From bdf3d727ca04b98aed1f917e33ebd77176521d64 Mon Sep 17 00:00:00 2001 From: Justin Bedo Date: Tue, 5 Jan 2021 09:57:42 +1100 Subject: [PATCH 17/45] fastp: init 0.20.1 --- .../science/biology/fastp/default.nix | 30 +++++++++++++++++++ pkgs/top-level/all-packages.nix | 2 ++ 2 files changed, 32 insertions(+) create mode 100644 pkgs/applications/science/biology/fastp/default.nix diff --git a/pkgs/applications/science/biology/fastp/default.nix b/pkgs/applications/science/biology/fastp/default.nix new file mode 100644 index 00000000000..c68486dbcd6 --- /dev/null +++ b/pkgs/applications/science/biology/fastp/default.nix @@ -0,0 +1,30 @@ +{ stdenv +, fetchFromGitHub +, zlib +}: + +stdenv.mkDerivation rec { + pname = "fastp"; + version = "0.20.1"; + + src = fetchFromGitHub { + owner = "OpenGene"; + repo = "fastp"; + rev = "v${version}"; + sha256 = "sha256-pANwppkO9pfV9vctB7HmNCzYRtf+Xt+5HMKzvFuvyFM="; + }; + + buildInputs = [ zlib ]; + + installPhase = '' + install -D fastp $out/bin/fastp + ''; + + meta = with stdenv.lib; { + description = "Ultra-fast all-in-one FASTQ preprocessor"; + license = licenses.mit; + homepage = "https://github.com/OpenGene/fastp"; + maintainers = with maintainers; [ jbedo ]; + platforms = platforms.x86_64; + }; +} diff --git a/pkgs/top-level/all-packages.nix b/pkgs/top-level/all-packages.nix index 036d4c3d590..3ca61187acf 100644 --- a/pkgs/top-level/all-packages.nix +++ b/pkgs/top-level/all-packages.nix @@ -26949,6 +26949,8 @@ in exonerate = callPackage ../applications/science/biology/exonerate { }; + fastp = callPackage ../applications/science/biology/fastp { }; + hisat2 = callPackage ../applications/science/biology/hisat2 { }; htslib = callPackage ../development/libraries/science/biology/htslib { }; From 66dd1123bf2e516ffce9a4e49ea77eae5dd92383 Mon Sep 17 00:00:00 2001 From: "R. RyanTM" Date: Thu, 7 Jan 2021 09:17:40 +0000 Subject: [PATCH 18/45] obsidian: 0.10.1 -> 0.10.6 --- pkgs/applications/misc/obsidian/default.nix | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/pkgs/applications/misc/obsidian/default.nix b/pkgs/applications/misc/obsidian/default.nix index 3379e2e9b9d..bfe215487af 100644 --- a/pkgs/applications/misc/obsidian/default.nix +++ b/pkgs/applications/misc/obsidian/default.nix @@ -30,12 +30,12 @@ let in stdenv.mkDerivation rec { pname = "obsidian"; - version = "0.10.1"; + version = "0.10.6"; src = fetchurl { url = "https://github.com/obsidianmd/obsidian-releases/releases/download/v${version}/obsidian-${version}.asar.gz"; - sha256 = "wnCgW4EAcg0Oc1fqOZBYKN2g8N27riL+yonoIy0AfxA="; + sha256 = "KfGVc3nXu5ilYKQPLc5qaksTwsdhSVtty9CfjSoiCU8="; }; nativeBuildInputs = [ makeWrapper graphicsmagick ]; From 4d76eb1621cd416c06d04a95f02be7895485f084 Mon Sep 17 00:00:00 2001 From: Bruno Bigras Date: Mon, 21 Dec 2020 16:34:45 -0500 Subject: [PATCH 19/45] tab-rs: init at 0.5.5 Co-authored-by: Sandro --- pkgs/tools/misc/tab-rs/default.nix | 27 +++++++++++++++++++++++++++ pkgs/top-level/all-packages.nix | 4 ++++ 2 files changed, 31 insertions(+) create mode 100644 pkgs/tools/misc/tab-rs/default.nix diff --git a/pkgs/tools/misc/tab-rs/default.nix b/pkgs/tools/misc/tab-rs/default.nix new file mode 100644 index 00000000000..e3bd9792c45 --- /dev/null +++ b/pkgs/tools/misc/tab-rs/default.nix @@ -0,0 +1,27 @@ +{ stdenv, fetchFromGitHub, rustPlatform, IOKit }: + +rustPlatform.buildRustPackage rec { + pname = "tab-rs"; + version = "0.5.5"; + + src = fetchFromGitHub { + owner = "austinjones"; + repo = pname; + rev = "v${version}"; + sha256 = "06nip7g5y7jslqj8anvn2z7w1c8yr0gl32bpnzv26xschan4gc2h"; + }; + + cargoSha256 = "1clpl9fi07lms0din8f9m4y6br5jg8k5xsklsqmvgdwf83wyn321"; + + buildInputs = stdenv.lib.optionals stdenv.isDarwin [ IOKit ]; + + # many tests are failing + doCheck = false; + + meta = with stdenv.lib; { + description = "Intuitive, config-driven terminal multiplexer designed for software & systems engineers"; + homepage = "https://github.com/austinjones/tab-rs"; + license = licenses.mit; + maintainers = with maintainers; [ bbigras ]; + }; +} diff --git a/pkgs/top-level/all-packages.nix b/pkgs/top-level/all-packages.nix index f979f56083f..71a09689fbd 100644 --- a/pkgs/top-level/all-packages.nix +++ b/pkgs/top-level/all-packages.nix @@ -7753,6 +7753,10 @@ in tabnine = callPackage ../development/tools/tabnine { }; + tab-rs = callPackage ../tools/misc/tab-rs { + inherit (darwin.apple_sdk.frameworks) IOKit; + }; + t1utils = callPackage ../tools/misc/t1utils { }; talkfilters = callPackage ../misc/talkfilters {}; From 5d815cce8abc0e20ba0455dd0f15080e0c3a302d Mon Sep 17 00:00:00 2001 From: Justin Humm Date: Tue, 5 Jan 2021 13:22:13 +0100 Subject: [PATCH 20/45] ghostwriter: 1.0.1 -> 2.0.0-rc3, build with newest libsForQt5 - mark as broken on darwin - add myself as maintainer --- pkgs/applications/editors/ghostwriter/default.nix | 9 +++++---- pkgs/top-level/all-packages.nix | 2 +- 2 files changed, 6 insertions(+), 5 deletions(-) diff --git a/pkgs/applications/editors/ghostwriter/default.nix b/pkgs/applications/editors/ghostwriter/default.nix index 8c1b95a1d26..aa67124c114 100644 --- a/pkgs/applications/editors/ghostwriter/default.nix +++ b/pkgs/applications/editors/ghostwriter/default.nix @@ -2,13 +2,13 @@ mkDerivation rec { pname = "ghostwriter"; - version = "1.8.1"; + version = "2.0.0-rc3"; src = fetchFromGitHub { owner = "wereturtle"; repo = pname; - rev = "v${version}"; - sha256 = "0jc6szfh5sdnafhwsr1xv7cn1fznniq58bix41hb9wlbkvq7wzi6"; + rev = version; + sha256 = "sha256-Ag97iE++f3nG2zlwqn0qxSL9RpF8O3XWH9NtQ5kFuWg="; }; nativeBuildInputs = [ qmake pkgconfig qttools ]; @@ -20,6 +20,7 @@ mkDerivation rec { homepage = src.meta.homepage; license = licenses.gpl3Plus; platforms = platforms.unix; - maintainers = with maintainers; [ dotlambda ]; + maintainers = with maintainers; [ dotlambda erictapen ]; + broken = stdenv.isDarwin; }; } diff --git a/pkgs/top-level/all-packages.nix b/pkgs/top-level/all-packages.nix index c11c82800f7..c621cd9003e 100644 --- a/pkgs/top-level/all-packages.nix +++ b/pkgs/top-level/all-packages.nix @@ -21506,7 +21506,7 @@ in geoipupdate = callPackage ../applications/misc/geoipupdate/default.nix { }; - ghostwriter = libsForQt514.callPackage ../applications/editors/ghostwriter { }; + ghostwriter = libsForQt5.callPackage ../applications/editors/ghostwriter { }; gitweb = callPackage ../applications/version-management/git-and-tools/gitweb { }; From 15da30e04a8da461a3937b3a453f2b52d77ea2f8 Mon Sep 17 00:00:00 2001 From: Fabian Affolter Date: Thu, 7 Jan 2021 13:55:55 +0100 Subject: [PATCH 21/45] subjs: init at 1.0.1 --- pkgs/tools/security/subjs/default.nix | 32 +++++++++++++++++++++++++++ pkgs/top-level/all-packages.nix | 2 ++ 2 files changed, 34 insertions(+) create mode 100644 pkgs/tools/security/subjs/default.nix diff --git a/pkgs/tools/security/subjs/default.nix b/pkgs/tools/security/subjs/default.nix new file mode 100644 index 00000000000..ad10ef5eaf2 --- /dev/null +++ b/pkgs/tools/security/subjs/default.nix @@ -0,0 +1,32 @@ +{ buildGoModule +, fetchFromGitHub +, stdenv +}: + +buildGoModule rec { + pname = "subjs"; + version = "1.0.1"; + + src = fetchFromGitHub { + owner = "lc"; + repo = pname; + rev = "v${version}"; + sha256 = "01cip5rf35dnh3l325p03y6axyqdpf48ry4zcwiyd7hlfsglbk3j"; + }; + + vendorSha256 = "1y01k8pvv7y9zb15wbk068cvkx0g83484jak2dvcvghqcf5j1fr1"; + + buildFlagsArray = [ "-ldflags=-s -w -X main.AppVersion=${version}" ]; + + meta = with stdenv.lib; { + description = "Fetcher for Javascript files"; + longDescription = '' + subjs fetches Javascript files from a list of URLs or subdomains. + Analyzing Javascript files can help you find undocumented endpoints, + secrets and more. + ''; + homepage = "https://github.com/lc/subjs"; + license = with licenses; [ mit ]; + maintainers = with maintainers; [ fab ]; + }; +} diff --git a/pkgs/top-level/all-packages.nix b/pkgs/top-level/all-packages.nix index 100a2aea853..d3a2df90f0f 100644 --- a/pkgs/top-level/all-packages.nix +++ b/pkgs/top-level/all-packages.nix @@ -7702,6 +7702,8 @@ in su = shadow.su; + subjs = callPackage ../tools/security/subjs { }; + subsonic = callPackage ../servers/misc/subsonic { }; subfinder = callPackage ../tools/networking/subfinder { }; From 701ece608b562435374411c17b38905ac763c755 Mon Sep 17 00:00:00 2001 From: Norbert Melzer Date: Thu, 7 Jan 2021 15:44:51 +0100 Subject: [PATCH 22/45] lttng-ust: python2 => python3 whitespace cleanup --- pkgs/development/tools/misc/lttng-ust/default.nix | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/pkgs/development/tools/misc/lttng-ust/default.nix b/pkgs/development/tools/misc/lttng-ust/default.nix index 1b59045c6fd..ba3930642b1 100644 --- a/pkgs/development/tools/misc/lttng-ust/default.nix +++ b/pkgs/development/tools/misc/lttng-ust/default.nix @@ -1,4 +1,4 @@ -{ stdenv, fetchurl, liburcu, python }: +{ stdenv, fetchurl, liburcu, python3 }: # NOTE: # ./configure ... @@ -20,12 +20,12 @@ stdenv.mkDerivation rec { sha256 = "0ddwk0nl28bkv2xb78gz16a2bvlpfbjmzwfbgwf5p1cq46dyvy86"; }; - buildInputs = [ python ]; + buildInputs = [ python3 ]; preConfigure = '' patchShebangs . ''; - + propagatedBuildInputs = [ liburcu ]; meta = with stdenv.lib; { From cf2c95a19f7973d1676039b19b62948cd60c18d1 Mon Sep 17 00:00:00 2001 From: Rouven Czerwinski Date: Thu, 7 Jan 2021 16:39:21 +0100 Subject: [PATCH 23/45] mpris-scrobbler: init at 0.4.0.1 Minimalistic scrobbler using the the MPRIS specification to scrobble to libre.fm and last.fm. --- pkgs/tools/audio/mpris-scrobbler/default.nix | 60 ++++++++++++++++++++ pkgs/top-level/all-packages.nix | 2 + 2 files changed, 62 insertions(+) create mode 100644 pkgs/tools/audio/mpris-scrobbler/default.nix diff --git a/pkgs/tools/audio/mpris-scrobbler/default.nix b/pkgs/tools/audio/mpris-scrobbler/default.nix new file mode 100644 index 00000000000..b768e016643 --- /dev/null +++ b/pkgs/tools/audio/mpris-scrobbler/default.nix @@ -0,0 +1,60 @@ +{ stdenv +, fetchFromGitHub +, nix-update-script +, curl +, dbus +, libevent +, m4 +, meson +, ninja +, pkg-config +, scdoc +, json_c +, xdg_utils +}: + +stdenv.mkDerivation rec { + pname = "mpris-scrobbler"; + version = "0.4.0.1"; + + src = fetchFromGitHub { + owner = "mariusor"; + repo = "mpris-scrobbler"; + rev = "v${version}"; + sha256 = "0jzmgcb9a19hl8y7iwy8l3cc2vgzi0scw7r5q72kszfyxn0yk2gs"; + }; + + postPatch = '' + substituteInPlace src/signon.c \ + --replace "/usr/bin/xdg-open" "${xdg_utils}/bin/xdg-open" + ''; + + nativeBuildInputs = [ + m4 + meson + ninja + pkg-config + scdoc + ]; + + buildInputs = [ + curl + dbus + json_c + libevent + ]; + + passthru = { + updateScript = nix-update-script { + attrPath = pname; + }; + }; + + meta = with stdenv.lib; { + description = "Minimalistic scrobbler for libre.fm & last.fm"; + homepage = "https://github.com/mariusor/mpris-scrobbler"; + license = licenses.mit; + maintainers = with maintainers; [ emantor ]; + platforms = platforms.unix; + }; +} diff --git a/pkgs/top-level/all-packages.nix b/pkgs/top-level/all-packages.nix index b3d9840ab89..5d7089fa330 100644 --- a/pkgs/top-level/all-packages.nix +++ b/pkgs/top-level/all-packages.nix @@ -2510,6 +2510,8 @@ in mpd-mpris = callPackage ../tools/audio/mpd-mpris { }; + mpris-scrobbler = callPackage ../tools/audio/mpris-scrobbler { }; + mq-cli = callPackage ../tools/system/mq-cli { }; nextdns = callPackage ../applications/networking/nextdns { }; From c5f894866541f22b08abca79cee4a04618429a59 Mon Sep 17 00:00:00 2001 From: Luke Granger-Brown Date: Thu, 7 Jan 2021 10:37:28 +0000 Subject: [PATCH 24/45] oven-media-engine: 0.10.8 -> 0.10.9-hotfix --- .../misc/oven-media-engine/default.nix | 19 +++++++++++++++---- 1 file changed, 15 insertions(+), 4 deletions(-) diff --git a/pkgs/servers/misc/oven-media-engine/default.nix b/pkgs/servers/misc/oven-media-engine/default.nix index 7faf8a9cfee..d6bdef68732 100644 --- a/pkgs/servers/misc/oven-media-engine/default.nix +++ b/pkgs/servers/misc/oven-media-engine/default.nix @@ -1,5 +1,6 @@ { stdenv , fetchFromGitHub +, fetchpatch , srt , ffmpeg_3_4 , bc @@ -12,6 +13,7 @@ , libopus , srtp , jemalloc +, pcre2 }: let @@ -27,21 +29,30 @@ let in stdenv.mkDerivation rec { pname = "oven-media-engine"; - version = "0.10.8"; + version = "0.10.9-hotfix"; src = fetchFromGitHub { owner = "AirenSoft"; repo = "OvenMediaEngine"; rev = "v${version}"; - sha256 = "ec4yvS+4/rTBHGEx2OP0yoNGDtzPucFOcZJ0o0cCAHg="; + sha256 = "1fhria0vwqsgmsglv5gn858li33vfy2dwy1f1qdd2jwikskb53am"; }; + patches = [ + (fetchpatch { + # Needed to fix compilation under GCC 10. + url = "https://github.com/AirenSoft/OvenMediaEngine/commit/ad83e1d2226445d649e4b7e0c75106e31af4940d.patch"; + sha256 = "1zk1rgi1wsjl6gdx3hdmgxlgindv6a3lsnkwcgi87ga9abw4vafw"; + stripLen = 1; + }) + ]; + sourceRoot = "source/src"; makeFlags = "release CONFIG_LIBRARY_PATHS= CONFIG_PKG_PATHS= GLOBAL_CC=$(CC) GLOBAL_CXX=$(CXX) GLOBAL_LD=$(CXX) SHELL=${stdenv.shell}"; enableParallelBuilding = true; nativeBuildInputs = [ bc pkgconfig perl ]; - buildInputs = [ openssl srt zlib ffmpeg libvpx libopus srtp jemalloc ]; + buildInputs = [ openssl srt zlib ffmpeg libvpx libopus srtp jemalloc pcre2 ]; preBuild = '' patchShebangs core/colorg++ @@ -62,7 +73,7 @@ stdenv.mkDerivation rec { meta = with stdenv.lib; { description = "Open-source streaming video service with sub-second latency"; homepage = "https://ovenmediaengine.com"; - license = licenses.gpl2; + license = licenses.gpl2Only; maintainers = with maintainers; [ lukegb ]; platforms = [ "x86_64-linux" ]; }; From 3c21ca726640a577deb66d4df0cc3b48938458b5 Mon Sep 17 00:00:00 2001 From: Fabian Affolter Date: Thu, 7 Jan 2021 17:09:39 +0100 Subject: [PATCH 25/45] python3Packages.pylacrosse: init at 0.4 --- .../python-modules/pylacrosse/default.nix | 37 +++++++++++++++++++ pkgs/top-level/python-packages.nix | 2 + 2 files changed, 39 insertions(+) create mode 100644 pkgs/development/python-modules/pylacrosse/default.nix diff --git a/pkgs/development/python-modules/pylacrosse/default.nix b/pkgs/development/python-modules/pylacrosse/default.nix new file mode 100644 index 00000000000..74b244f5296 --- /dev/null +++ b/pkgs/development/python-modules/pylacrosse/default.nix @@ -0,0 +1,37 @@ +{ lib +, buildPythonPackage +, fetchFromGitHub +, mock +, nose +, pyserial +, pytestCheckHook +}: + +buildPythonPackage rec { + pname = "pylacrosse"; + version = "0.4"; + + src = fetchFromGitHub { + owner = "hthiery"; + repo = "python-lacrosse"; + rev = version; + sha256 = "0g5hqm8lq0gsnvhcydjk54rjf7lpxzph8k7w1nnvnqfbhf31xfcf"; + }; + + propagatedBuildInputs = [ pyserial ]; + + checkInputs = [ + mock + nose + pytestCheckHook + ]; + + pythonImportsCheck = [ "pylacrosse" ]; + + meta = with lib; { + description = "Python library for Jeelink LaCrosse"; + homepage = "https://github.com/hthiery/python-lacrosse"; + license = with licenses; [ lgpl2Plus ]; + maintainers = with maintainers; [ fab ]; + }; +} diff --git a/pkgs/top-level/python-packages.nix b/pkgs/top-level/python-packages.nix index ad775f0712b..86bac183f2d 100644 --- a/pkgs/top-level/python-packages.nix +++ b/pkgs/top-level/python-packages.nix @@ -5341,6 +5341,8 @@ in { pykwalify = callPackage ../development/python-modules/pykwalify { }; + pylacrosse = callPackage ../development/python-modules/pylacrosse { }; + pylama = callPackage ../development/python-modules/pylama { }; pylast = callPackage ../development/python-modules/pylast { }; From 897815b331da449f296917956e9f57fb0de2a7e2 Mon Sep 17 00:00:00 2001 From: Fabian Affolter Date: Thu, 7 Jan 2021 17:11:15 +0100 Subject: [PATCH 26/45] home-assistant: update component-packages --- pkgs/servers/home-assistant/component-packages.nix | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/pkgs/servers/home-assistant/component-packages.nix b/pkgs/servers/home-assistant/component-packages.nix index 6df1239537e..ea98b38500b 100644 --- a/pkgs/servers/home-assistant/component-packages.nix +++ b/pkgs/servers/home-assistant/component-packages.nix @@ -424,7 +424,7 @@ "konnected" = ps: with ps; [ aiohttp-cors ]; # missing inputs: konnected "kulersky" = ps: with ps; [ ]; # missing inputs: pykulersky "kwb" = ps: with ps; [ ]; # missing inputs: pykwb - "lacrosse" = ps: with ps; [ ]; # missing inputs: pylacrosse + "lacrosse" = ps: with ps; [ pylacrosse ]; "lametric" = ps: with ps; [ ]; # missing inputs: lmnotify "lannouncer" = ps: with ps; [ ]; "lastfm" = ps: with ps; [ pylast ]; From 70e72558318b11a10152e112c743cf696d41e005 Mon Sep 17 00:00:00 2001 From: David Wood Date: Thu, 7 Jan 2021 17:08:11 +0000 Subject: [PATCH 27/45] mdcat: 0.22.1 -> 0.22.2 --- pkgs/tools/text/mdcat/default.nix | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/pkgs/tools/text/mdcat/default.nix b/pkgs/tools/text/mdcat/default.nix index c89d1526257..eb51ad6d260 100644 --- a/pkgs/tools/text/mdcat/default.nix +++ b/pkgs/tools/text/mdcat/default.nix @@ -11,19 +11,19 @@ rustPlatform.buildRustPackage rec { pname = "mdcat"; - version = "0.22.1"; + version = "0.22.2"; src = fetchFromGitHub { owner = "lunaryorn"; repo = pname; rev = "mdcat-${version}"; - hash = "sha256-4sM1xT/JQ+yM5tZkGwK7r0gUT5so9o1MnDJ7apZkRd4="; + hash = "sha256-i36MYTMkbSuWxxlWUDsyYMay/4Mg7M5jEFhHM60UrkM="; }; nativeBuildInputs = [ pkgconfig asciidoctor installShellFiles ]; buildInputs = [ openssl ] ++ stdenv.lib.optional stdenv.isDarwin Security; - cargoSha256 = "sha256-LoNm2/6/FgTKp95ETODY39D8Ou+9X+IXIy625YW9AFI="; + cargoSha256 = "sha256-mnDUIJhEGNoh3eq2Vhww1T/tpZh9RP+RxbRsBNrpOzw="; checkInputs = [ ansi2html ]; # Skip tests that use the network and that include files. From 02e8f39c2aa2aab8d683c4908b3872fd9531bea8 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Fabian=20M=C3=B6ller?= Date: Thu, 7 Jan 2021 15:27:53 +0100 Subject: [PATCH 28/45] libopenshot: fix build with gcc10 --- pkgs/applications/video/openshot-qt/libopenshot.nix | 12 ++++++++++-- 1 file changed, 10 insertions(+), 2 deletions(-) diff --git a/pkgs/applications/video/openshot-qt/libopenshot.nix b/pkgs/applications/video/openshot-qt/libopenshot.nix index 1b6084a1d2f..1ab7a5266a2 100644 --- a/pkgs/applications/video/openshot-qt/libopenshot.nix +++ b/pkgs/applications/video/openshot-qt/libopenshot.nix @@ -1,4 +1,4 @@ -{ stdenv, fetchFromGitHub +{ stdenv, fetchFromGitHub, fetchpatch , pkgconfig, cmake, doxygen , libopenshot-audio, imagemagick, ffmpeg_3 , swig, python3 @@ -19,7 +19,15 @@ stdenv.mkDerivation rec { sha256 = "1mxjkgjmjzgf628y3rscc6rqf55hxgjpmvwxlncfk1216i5xskwp"; }; - patchPhase = '' + patches = [ + (fetchpatch { + name = "fix-build-with-gcc-10.patch"; + url = "https://github.com/OpenShot/libopenshot/commit/13290364e7bea54164ab83d973951f2898ad9e23.diff"; + sha256 = "0i7rpdsr8y9dphil8yq75qbh20vfqjc2hp5ahv0ws58z9wj6ngnz"; + }) + ]; + + postPatch = '' sed -i 's/{UNITTEST++_INCLUDE_DIR}/ENV{UNITTEST++_INCLUDE_DIR}/g' tests/CMakeLists.txt sed -i 's/{_REL_PYTHON_MODULE_PATH}/ENV{_REL_PYTHON_MODULE_PATH}/g' src/bindings/python/CMakeLists.txt export _REL_PYTHON_MODULE_PATH=$(toPythonPath $out) From d4e7efc1159449225a367552b6e0e44acaa8c7e5 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Fabian=20M=C3=B6ller?= Date: Thu, 7 Jan 2021 16:47:11 +0100 Subject: [PATCH 29/45] openshot-qt: unbreak --- pkgs/applications/video/openshot-qt/default.nix | 3 --- 1 file changed, 3 deletions(-) diff --git a/pkgs/applications/video/openshot-qt/default.nix b/pkgs/applications/video/openshot-qt/default.nix index 9245bdf03e4..ede47ad061f 100644 --- a/pkgs/applications/video/openshot-qt/default.nix +++ b/pkgs/applications/video/openshot-qt/default.nix @@ -55,8 +55,5 @@ mkDerivationWith python3Packages.buildPythonApplication rec { license = with licenses; gpl3Plus; maintainers = with maintainers; [ AndersonTorres ]; platforms = with platforms; unix; - # Cannot use a newer Qt (5.15) version because it requires qtwebkit - # and our qtwebkit fails to build with 5.15. 01bcfd3579219d60e5d07df309a000f96b2b658b - broken = true; }; } From d8306e18eaa89ed6caddfc311daeb904b7fe81eb Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Fabian=20M=C3=B6ller?= Date: Thu, 7 Jan 2021 16:03:21 +0100 Subject: [PATCH 30/45] qmltermwidget: fix build with gcc10 --- pkgs/development/libraries/qmltermwidget/default.nix | 12 ++++++++++-- 1 file changed, 10 insertions(+), 2 deletions(-) diff --git a/pkgs/development/libraries/qmltermwidget/default.nix b/pkgs/development/libraries/qmltermwidget/default.nix index ac258457311..53e83182c2b 100644 --- a/pkgs/development/libraries/qmltermwidget/default.nix +++ b/pkgs/development/libraries/qmltermwidget/default.nix @@ -1,4 +1,4 @@ -{ stdenv, fetchFromGitHub, qtbase, qtquick1, qmake, qtmultimedia, utmp }: +{ stdenv, fetchFromGitHub, qtbase, qtquick1, qmake, qtmultimedia, utmp, fetchpatch }: stdenv.mkDerivation { version = "2018-11-24"; @@ -15,7 +15,15 @@ stdenv.mkDerivation { ++ stdenv.lib.optional stdenv.isDarwin utmp; nativeBuildInputs = [ qmake ]; - patchPhase = '' + patches = [ + (fetchpatch { + name = "fix-missing-includes.patch"; + url = "https://github.com/Swordfish90/qmltermwidget/pull/27/commits/485f8d6d841b607ba49e55a791f7f587e4e193bc.diff"; + sha256 = "186s8pv3642vr4lxsds919h0y2vrkl61r7wqq9mc4a5zk5vprinj"; + }) + ]; + + postPatch = '' substituteInPlace qmltermwidget.pro \ --replace '$$[QT_INSTALL_QML]' "/$qtQmlPrefix/" ''; From e2945ada1388c9322017ded9d95465640e2cd1ee Mon Sep 17 00:00:00 2001 From: David Wood Date: Thu, 7 Jan 2021 17:22:34 +0000 Subject: [PATCH 31/45] doctest: 2.4.1 -> 2.4.4 --- pkgs/development/libraries/doctest/default.nix | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/pkgs/development/libraries/doctest/default.nix b/pkgs/development/libraries/doctest/default.nix index d647d5f3888..43ca46ce551 100644 --- a/pkgs/development/libraries/doctest/default.nix +++ b/pkgs/development/libraries/doctest/default.nix @@ -2,13 +2,13 @@ stdenv.mkDerivation rec { pname = "doctest"; - version = "2.4.1"; + version = "2.4.4"; src = fetchFromGitHub { owner = "onqtam"; repo = "doctest"; rev = version; - sha256 = "17g7n6rjs90i0b231x5s934qnr8m80ga2yg1z344bnsdiqcjd63w"; + hash = "sha256-NqXC5948prTCi4gsaR8bJPBTrmH+rJbHsGvwkJlpjXY="; }; nativeBuildInputs = [ cmake ]; From 61759faf107cd6ba9e5db53711600c3ec9888662 Mon Sep 17 00:00:00 2001 From: David Wood Date: Thu, 7 Jan 2021 17:27:46 +0000 Subject: [PATCH 32/45] computecpp: 2.2.1 -> 2.3.0 --- pkgs/development/compilers/computecpp/default.nix | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/pkgs/development/compilers/computecpp/default.nix b/pkgs/development/compilers/computecpp/default.nix index 7cfc60f050e..acdcc2014f8 100644 --- a/pkgs/development/compilers/computecpp/default.nix +++ b/pkgs/development/compilers/computecpp/default.nix @@ -9,11 +9,11 @@ stdenv.mkDerivation rec { pname = "computecpp"; - version = "2.2.1"; + version = "2.3.0"; src = fetchzip { url = "https://computecpp.codeplay.com/downloads/computecpp-ce/${version}/x86_64-linux-gnu.tar.gz"; - hash = "sha256-niXNWbkXjd35col6dS66HdxFurXfJw/Xb2c5njukxcg="; + hash = "sha256-AUHSls4BOX20PVKzDAp3RqpeRDwgbgYzz6CRvRN+kdk="; stripRoot = true; }; From d620de4a69a0e83b537ca3f982cc7ae43bb2ac32 Mon Sep 17 00:00:00 2001 From: Anthony Cowley Date: Thu, 7 Jan 2021 12:51:16 -0500 Subject: [PATCH 33/45] bibtex2html: add perl dependency The `aux2bib` tool that is part of the bibtex2html package requires perl. Without this dependency, the `aux2bib` script is installed with a shebang pointing to `/usr/bin/perl`. --- pkgs/tools/misc/bibtex2html/default.nix | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/pkgs/tools/misc/bibtex2html/default.nix b/pkgs/tools/misc/bibtex2html/default.nix index ddda4ef4445..6ca528e2b1a 100644 --- a/pkgs/tools/misc/bibtex2html/default.nix +++ b/pkgs/tools/misc/bibtex2html/default.nix @@ -1,4 +1,4 @@ -{ stdenv, fetchurl, ocaml }: +{ stdenv, fetchurl, ocaml, perl }: stdenv.mkDerivation { pname = "bibtex2html"; @@ -9,7 +9,7 @@ stdenv.mkDerivation { sha256 = "07gzrs4lfrkvbn48cgn2gn6c7cx3jsanakkrb2irj0gmjzfxl96j"; }; - buildInputs = [ ocaml ]; + buildInputs = [ ocaml perl ]; meta = with stdenv.lib; { description = "A collection of tools for translating from BibTeX to HTML"; From 1976d796271408268da6df07c9047debcecf970e Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?J=C3=B6rg=20Thalheim?= Date: Thu, 7 Jan 2021 13:55:04 +0100 Subject: [PATCH 34/45] tensorflow: drop 1.x it no longer works without our default python version and needs many patches to compile. --- .../tensorflow-estimator/1/default.nix | 30 -- .../tensorflow-estimator/{2 => }/default.nix | 0 .../{2 => }/default.nix | 0 .../python-modules/tensorflow/1/bin.nix | 120 ----- .../tensorflow/1/binary-hashes.nix | 43 -- .../python-modules/tensorflow/1/default.nix | 456 ------------------ .../tensorflow/1/lift-gast-restriction.patch | 13 - .../python-modules/tensorflow/1/prefetcher.sh | 33 -- .../python-modules/tensorflow/{2 => }/bin.nix | 0 .../tensorflow/{2 => }/binary-hashes.nix | 0 .../tensorflow/cuda-10.2-no-bin2c-path.patch | 10 - .../tensorflow/{2 => }/default.nix | 2 +- .../tensorflow/no-saved-proto.patch | 14 - .../tensorflow/{2 => }/prefetcher.sh | 0 .../{2 => }/relax-dependencies.patch | 0 pkgs/top-level/python-packages.nix | 41 +- 16 files changed, 10 insertions(+), 752 deletions(-) delete mode 100644 pkgs/development/python-modules/tensorflow-estimator/1/default.nix rename pkgs/development/python-modules/tensorflow-estimator/{2 => }/default.nix (100%) rename pkgs/development/python-modules/tensorflow-tensorboard/{2 => }/default.nix (100%) delete mode 100644 pkgs/development/python-modules/tensorflow/1/bin.nix delete mode 100644 pkgs/development/python-modules/tensorflow/1/binary-hashes.nix delete mode 100644 pkgs/development/python-modules/tensorflow/1/default.nix delete mode 100644 pkgs/development/python-modules/tensorflow/1/lift-gast-restriction.patch delete mode 100755 pkgs/development/python-modules/tensorflow/1/prefetcher.sh rename pkgs/development/python-modules/tensorflow/{2 => }/bin.nix (100%) rename pkgs/development/python-modules/tensorflow/{2 => }/binary-hashes.nix (100%) delete mode 100644 pkgs/development/python-modules/tensorflow/cuda-10.2-no-bin2c-path.patch rename pkgs/development/python-modules/tensorflow/{2 => }/default.nix (99%) delete mode 100644 pkgs/development/python-modules/tensorflow/no-saved-proto.patch rename pkgs/development/python-modules/tensorflow/{2 => }/prefetcher.sh (100%) rename pkgs/development/python-modules/tensorflow/{2 => }/relax-dependencies.patch (100%) diff --git a/pkgs/development/python-modules/tensorflow-estimator/1/default.nix b/pkgs/development/python-modules/tensorflow-estimator/1/default.nix deleted file mode 100644 index c34d6948d89..00000000000 --- a/pkgs/development/python-modules/tensorflow-estimator/1/default.nix +++ /dev/null @@ -1,30 +0,0 @@ -{ stdenv, fetchPypi, buildPythonPackage -, numpy -, absl-py -, mock -}: - -buildPythonPackage rec { - pname = "tensorflow-estimator"; - # This is effectively 1.15.0. Upstream tagged 1.15.0 by mistake before - # actually updating the version in setup.py, which is why this tag is called - # 1.15.1. - version = "1.15.1"; - format = "wheel"; - - src = fetchPypi { - pname = "tensorflow_estimator"; - inherit version format; - sha256 = "1fc61wmc0w22frs79j2x4g6wnv5g21xc6rix1g4bsvy9qfvvylw8"; - }; - - propagatedBuildInputs = [ mock numpy absl-py ]; - - meta = with stdenv.lib; { - description = "TensorFlow Estimator is a high-level API that encapsulates model training, evaluation, prediction, and exporting."; - homepage = "http://tensorflow.org"; - license = licenses.asl20; - maintainers = with maintainers; [ jyp ]; - }; -} - diff --git a/pkgs/development/python-modules/tensorflow-estimator/2/default.nix b/pkgs/development/python-modules/tensorflow-estimator/default.nix similarity index 100% rename from pkgs/development/python-modules/tensorflow-estimator/2/default.nix rename to pkgs/development/python-modules/tensorflow-estimator/default.nix diff --git a/pkgs/development/python-modules/tensorflow-tensorboard/2/default.nix b/pkgs/development/python-modules/tensorflow-tensorboard/default.nix similarity index 100% rename from pkgs/development/python-modules/tensorflow-tensorboard/2/default.nix rename to pkgs/development/python-modules/tensorflow-tensorboard/default.nix diff --git a/pkgs/development/python-modules/tensorflow/1/bin.nix b/pkgs/development/python-modules/tensorflow/1/bin.nix deleted file mode 100644 index 5c93e957f7c..00000000000 --- a/pkgs/development/python-modules/tensorflow/1/bin.nix +++ /dev/null @@ -1,120 +0,0 @@ -{ stdenv -, lib -, fetchurl -, buildPythonPackage -, isPy3k, pythonOlder, pythonAtLeast -, astor -, gast -, google-pasta -, wrapt -, numpy -, six -, termcolor -, protobuf -, absl-py -, grpcio -, mock -, backports_weakref -, tensorflow-estimator_1 -, tensorflow-tensorboard -, cudaSupport ? false -, cudatoolkit ? null -, cudnn ? null -, nvidia_x11 ? null -, zlib -, python -, symlinkJoin -, keras-applications -, keras-preprocessing -, addOpenGLRunpath -}: - -# We keep this binary build for two reasons: -# - the source build doesn't work on Darwin. -# - the source build is currently brittle and not easy to maintain - -assert cudaSupport -> cudatoolkit != null - && cudnn != null - && nvidia_x11 != null; - -# unsupported combination -assert ! (stdenv.isDarwin && cudaSupport); - -let - packages = import ./binary-hashes.nix; - - variant = if cudaSupport then "-gpu" else ""; - pname = "tensorflow${variant}"; - -in buildPythonPackage { - inherit pname; - inherit (packages) version; - format = "wheel"; - disabled = pythonAtLeast "3.8"; - - src = let - pyVerNoDot = lib.strings.stringAsChars (x: if x == "." then "" else x) python.pythonVersion; - pyver = if stdenv.isDarwin then builtins.substring 0 1 pyVerNoDot else pyVerNoDot; - platform = if stdenv.isDarwin then "mac" else "linux"; - unit = if cudaSupport then "gpu" else "cpu"; - key = "${platform}_py_${pyver}_${unit}"; - in fetchurl packages.${key}; - - propagatedBuildInputs = [ - protobuf - numpy - termcolor - grpcio - six - astor - absl-py - gast - google-pasta - wrapt - tensorflow-estimator_1 - tensorflow-tensorboard - keras-applications - keras-preprocessing - ] ++ lib.optional (!isPy3k) mock - ++ lib.optionals (pythonOlder "3.4") [ backports_weakref ]; - - nativeBuildInputs = lib.optional cudaSupport addOpenGLRunpath; - - # Upstream has a pip hack that results in bin/tensorboard being in both tensorflow - # and the propageted input tensorflow-tensorboard which causes environment collisions. - # another possibility would be to have tensorboard only in the buildInputs - # https://github.com/tensorflow/tensorflow/blob/v1.7.1/tensorflow/tools/pip_package/setup.py#L79 - postInstall = '' - rm $out/bin/tensorboard - ''; - - # Note that we need to run *after* the fixup phase because the - # libraries are loaded at runtime. If we run in preFixup then - # patchelf --shrink-rpath will remove the cuda libraries. - postFixup = let - rpath = stdenv.lib.makeLibraryPath - ([ stdenv.cc.cc.lib zlib ] ++ lib.optionals cudaSupport [ cudatoolkit.out cudatoolkit.lib cudnn nvidia_x11 ]); - in - lib.optionalString stdenv.isLinux '' - rrPath="$out/${python.sitePackages}/tensorflow/:$out/${python.sitePackages}/tensorflow/contrib/tensor_forest/:${rpath}" - internalLibPath="$out/${python.sitePackages}/tensorflow/python/_pywrap_tensorflow_internal.so" - find $out -type f \( -name '*.so' -or -name '*.so.*' \) | while read lib; do - patchelf --set-rpath "$rrPath" "$lib" - ${lib.optionalString cudaSupport '' - addOpenGLRunpath "$lib" - ''} - done - ''; - - - meta = with stdenv.lib; { - description = "Computation using data flow graphs for scalable machine learning"; - homepage = "http://tensorflow.org"; - license = licenses.asl20; - maintainers = with maintainers; [ jyp abbradar ]; - platforms = [ "x86_64-linux" "x86_64-darwin" ]; - # Python 2.7 build uses different string encoding. - # See https://github.com/NixOS/nixpkgs/pull/37044#issuecomment-373452253 - broken = stdenv.isDarwin && !isPy3k; - }; -} diff --git a/pkgs/development/python-modules/tensorflow/1/binary-hashes.nix b/pkgs/development/python-modules/tensorflow/1/binary-hashes.nix deleted file mode 100644 index fa4809dc3f1..00000000000 --- a/pkgs/development/python-modules/tensorflow/1/binary-hashes.nix +++ /dev/null @@ -1,43 +0,0 @@ -{ -version = "1.14.0"; -linux_py_27_cpu = { - url = "https://storage.googleapis.com/tensorflow/linux/cpu/tensorflow-1.14.0-cp27-none-linux_x86_64.whl"; - sha256 = "0yywdrfk97dh1bxhibspg0raz70fx9lcczj6xlimqy4xb60clx7k"; -}; -linux_py_35_cpu = { - url = "https://storage.googleapis.com/tensorflow/linux/cpu/tensorflow-1.14.0-cp35-cp35m-linux_x86_64.whl"; - sha256 = "1xvyb6xcrjhlwvrmrhn5vs9xy7g98smqmpv4i3hhpry4qyasphhj"; -}; -linux_py_36_cpu = { - url = "https://storage.googleapis.com/tensorflow/linux/cpu/tensorflow-1.14.0-cp36-cp36m-linux_x86_64.whl"; - sha256 = "1psd9vyxz9f39dwj77nvrg373sxv3p5vdp9fnz81dpsm0b0mwl44"; -}; -linux_py_37_cpu = { - url = "https://storage.googleapis.com/tensorflow/linux/cpu/tensorflow-1.14.0-cp37-cp37m-linux_x86_64.whl"; - sha256 = "0bg2sb1n2ag27r7ww695kg5hb0mjrw4kc5893krmixx2j71860c5"; -}; -linux_py_27_gpu = { - url = "https://storage.googleapis.com/tensorflow/linux/gpu/tensorflow_gpu-1.14.0-cp27-none-linux_x86_64.whl"; - sha256 = "0y1x91gayg6pjddgl8ndcm63wfzhyv4s5khgl7ffzsgni1ivaqw5"; -}; -linux_py_35_gpu = { - url = "https://storage.googleapis.com/tensorflow/linux/gpu/tensorflow_gpu-1.14.0-cp35-cp35m-linux_x86_64.whl"; - sha256 = "03piggpbz1jx8m2b95spq3jrdff4w6xx63ji07am7hyw2nsgx3mx"; -}; -linux_py_36_gpu = { - url = "https://storage.googleapis.com/tensorflow/linux/gpu/tensorflow_gpu-1.14.0-cp36-cp36m-linux_x86_64.whl"; - sha256 = "0ypkp8cfhharsyyikb1qgf44cfm6284km9xswzvzymjzz75vg3gd"; -}; -linux_py_37_gpu = { - url = "https://storage.googleapis.com/tensorflow/linux/gpu/tensorflow_gpu-1.14.0-cp37-cp37m-linux_x86_64.whl"; - sha256 = "0virp8nn2ysx4855hq29kas6fm6b3dsiybwzdxy9nnb9n2d8qlm2"; -}; -mac_py_2_cpu = { - url = "https://storage.googleapis.com/tensorflow/mac/cpu/tensorflow-1.14.0-py2-none-any.whl"; - sha256 = "14f86k3pgq7z6i4s4im55zpp38f0drnm7xlclavsgcc0nxnj3z26"; -}; -mac_py_3_cpu = { - url = "https://storage.googleapis.com/tensorflow/mac/cpu/tensorflow-1.14.0-py3-none-any.whl"; - sha256 = "0f3swpcjfgqhj6h5wnx8snc0xjkx4hnkqx83fmlrwpncs8c131d3"; -}; -} diff --git a/pkgs/development/python-modules/tensorflow/1/default.nix b/pkgs/development/python-modules/tensorflow/1/default.nix deleted file mode 100644 index 4dd30e4687a..00000000000 --- a/pkgs/development/python-modules/tensorflow/1/default.nix +++ /dev/null @@ -1,456 +0,0 @@ -{ stdenv, pkgs, bazel_0_26, buildBazelPackage, lib, fetchFromGitHub, fetchpatch, symlinkJoin -, addOpenGLRunpath -# Python deps -, buildPythonPackage, isPy3k, isPy27, pythonOlder, pythonAtLeast, python -# Python libraries -, numpy, tensorflow-tensorboard_1, backports_weakref, mock, enum34, absl-py -, future, setuptools, wheel, keras-preprocessing, keras-applications, google-pasta -, functools32 -, opt-einsum -, termcolor, grpcio, six, wrapt, protobuf, tensorflow-estimator_1 -# Common deps -, git, swig, which, binutils, glibcLocales, cython -# Common libraries -, jemalloc, openmpi, astor, gast, grpc, sqlite, openssl, jsoncpp, re2 -, curl, snappy, flatbuffers, icu, double-conversion, libpng, libjpeg, giflib -# Upsteam by default includes cuda support since tensorflow 1.15. We could do -# that in nix as well. It would make some things easier and less confusing, but -# it would also make the default tensorflow package unfree. See -# https://groups.google.com/a/tensorflow.org/forum/#!topic/developers/iRCt5m4qUz0 -, cudaSupport ? false, nvidia_x11 ? null, cudatoolkit ? null, cudnn ? null, nccl ? null -, mklSupport ? false, mkl ? null -# XLA without CUDA is broken -, xlaSupport ? cudaSupport -# Default from ./configure script -, cudaCapabilities ? [ "3.5" "5.2" ] -, sse42Support ? stdenv.hostPlatform.sse4_2Support -, avx2Support ? stdenv.hostPlatform.avx2Support -, fmaSupport ? stdenv.hostPlatform.fmaSupport -# Darwin deps -, Foundation, Security -}: - -assert cudaSupport -> nvidia_x11 != null - && cudatoolkit != null - && cudnn != null; - -# unsupported combination -assert ! (stdenv.isDarwin && cudaSupport); - -assert mklSupport -> mkl != null; - -let - withTensorboard = pythonOlder "3.6"; - - cudatoolkit_joined = symlinkJoin { - name = "${cudatoolkit.name}-merged"; - paths = [ - cudatoolkit.lib - cudatoolkit.out - # for some reason some of the required libs are in the targets/x86_64-linux - # directory; not sure why but this works around it - "${cudatoolkit}/targets/${stdenv.system}" - ]; - }; - - cudatoolkit_cc_joined = symlinkJoin { - name = "${cudatoolkit.cc.name}-merged"; - paths = [ - cudatoolkit.cc - binutils.bintools # for ar, dwp, nm, objcopy, objdump, strip - ]; - }; - - # Needed for _some_ system libraries, grep INCLUDEDIR. - includes_joined = symlinkJoin { - name = "tensorflow-deps-merged"; - paths = [ - pkgs.protobuf - jsoncpp - ]; - }; - - tfFeature = x: if x then "1" else "0"; - - version = "1.15.4"; - variant = if cudaSupport then "-gpu" else ""; - pname = "tensorflow${variant}"; - - pythonEnv = python.withPackages (_: - [ # python deps needed during wheel build time (not runtime, see the buildPythonPackage part for that) - numpy - keras-preprocessing - protobuf - wrapt - gast - astor - absl-py - termcolor - keras-applications - setuptools - wheel - ] ++ lib.optionals (!isPy3k) - [ future - functools32 - mock - ]); - - bazel-build = buildBazelPackage { - name = "${pname}-${version}"; - bazel = bazel_0_26; - - src = fetchFromGitHub { - owner = "tensorflow"; - repo = "tensorflow"; - rev = "v${version}"; - sha256 = "0lg8ahyr2k7dmp0yfypk8ivl9a0xcg3j0f0dakmn5ljk8nsji0bj"; - }; - - patches = [ - # Work around https://github.com/tensorflow/tensorflow/issues/24752 - ../no-saved-proto.patch - # Fixes for NixOS jsoncpp - ../system-jsoncpp.patch - - # https://github.com/tensorflow/tensorflow/pull/29673 - (fetchpatch { - name = "fix-compile-with-cuda-and-mpi.patch"; - url = "https://github.com/tensorflow/tensorflow/pull/29673/commits/498e35a3bfe38dd75cf1416a1a23c07c3b59e6af.patch"; - sha256 = "1m2qmwv1ysqa61z6255xggwbq6mnxbig749bdvrhnch4zydxb4di"; - }) - (fetchpatch { - name = "backport-pr-18950.patch"; - url = "https://github.com/tensorflow/tensorflow/commit/73640aaec2ab0234d9fff138e3c9833695570c0a.patch"; - sha256 = "1n9ypbrx36fc1kc9cz5b3p9qhg15xxhq4nz6ap3hwqba535nakfz"; - }) - - (fetchpatch { - # be compatible with gast >0.2 instead of only gast 0.2.2 - name = "gast-update.patch"; - url = "https://github.com/tensorflow/tensorflow/commit/85751ad6c7f5fd12c6c79545d96896cba92fa8b4.patch"; - sha256 = "077cpj0kzyqxzdya1dwh8df17zfzhqn7c685hx6iskvw2979zg2n"; - }) - ./lift-gast-restriction.patch - - (fetchpatch { - # fix compilation with numpy >= 1.19 - name = "add-const-overload.patch"; - url = "https://github.com/tensorflow/tensorflow/commit/75ea0b31477d6ba9e990e296bbbd8ca4e7eebadf.patch"; - sha256 = "1xp1icacig0xm0nmb05sbrf4nw4xbln9fhc308birrv8286zx7wv"; - }) - - # cuda 10.2 does not have "-bin2c-path" option anymore - # https://github.com/tensorflow/tensorflow/issues/34429 - ../cuda-10.2-no-bin2c-path.patch - ]; - - # On update, it can be useful to steal the changes from gentoo - # https://gitweb.gentoo.org/repo/gentoo.git/tree/sci-libs/tensorflow - - nativeBuildInputs = [ - swig which pythonEnv - ] ++ lib.optional cudaSupport addOpenGLRunpath; - - buildInputs = [ - jemalloc - openmpi - glibcLocales - git - - # libs taken from system through the TF_SYS_LIBS mechanism - # grpc - sqlite - openssl - jsoncpp - pkgs.protobuf - curl - snappy - flatbuffers - icu - double-conversion - libpng - libjpeg - giflib - re2 - pkgs.lmdb - ] ++ lib.optionals cudaSupport [ - cudatoolkit - cudnn - nvidia_x11 - ] ++ lib.optionals mklSupport [ - mkl - ] ++ lib.optionals stdenv.isDarwin [ - Foundation - Security - ]; - - # arbitrarily set to the current latest bazel version, overly careful - TF_IGNORE_MAX_BAZEL_VERSION = true; - - # Take as many libraries from the system as possible. Keep in sync with - # list of valid syslibs in - # https://github.com/tensorflow/tensorflow/blob/master/third_party/systemlibs/syslibs_configure.bzl - TF_SYSTEM_LIBS = lib.concatStringsSep "," [ - "absl_py" - "astor_archive" - "boringssl" - # Not packaged in nixpkgs - # "com_github_googleapis_googleapis" - # "com_github_googlecloudplatform_google_cloud_cpp" - "com_google_protobuf" - "com_googlesource_code_re2" - "curl" - "cython" - "double_conversion" - "flatbuffers" - "gast_archive" - "gif_archive" - # Lots of errors, requires an older version - # "grpc" - "hwloc" - "icu" - "jpeg" - "jsoncpp_git" - "keras_applications_archive" - "lmdb" - "nasm" - # "nsync" # not packaged in nixpkgs - "opt_einsum_archive" - "org_sqlite" - "pasta" - "pcre" - "png_archive" - "six_archive" - "snappy" - "swig" - "termcolor_archive" - "wrapt" - "zlib_archive" - ]; - - INCLUDEDIR = "${includes_joined}/include"; - - PYTHON_BIN_PATH = pythonEnv.interpreter; - - TF_NEED_GCP = true; - TF_NEED_HDFS = true; - TF_ENABLE_XLA = tfFeature xlaSupport; - - CC_OPT_FLAGS = " "; - - # https://github.com/tensorflow/tensorflow/issues/14454 - TF_NEED_MPI = tfFeature cudaSupport; - - TF_NEED_CUDA = tfFeature cudaSupport; - TF_CUDA_PATHS = lib.optionalString cudaSupport "${cudatoolkit_joined},${cudnn},${nccl}"; - GCC_HOST_COMPILER_PREFIX = lib.optionalString cudaSupport "${cudatoolkit_cc_joined}/bin"; - GCC_HOST_COMPILER_PATH = lib.optionalString cudaSupport "${cudatoolkit_cc_joined}/bin/gcc"; - TF_CUDA_COMPUTE_CAPABILITIES = lib.concatStringsSep "," cudaCapabilities; - - postPatch = '' - # https://github.com/tensorflow/tensorflow/issues/20919 - sed -i '/androidndk/d' tensorflow/lite/kernels/internal/BUILD - - # Tensorboard pulls in a bunch of dependencies, some of which may - # include security vulnerabilities. So we make it optional. - # https://github.com/tensorflow/tensorflow/issues/20280#issuecomment-400230560 - sed -i '/tensorboard >=/d' tensorflow/tools/pip_package/setup.py - - substituteInPlace tensorflow/tools/pip_package/setup.py \ - --replace "numpy >= 1.16.0, < 1.19.0" "numpy >= 1.16.0" - - # glibc 2.31+ does not have sys/sysctl.h - # see https://github.com/tensorflow/tensorflow/issues/45861 - substituteInPlace third_party/hwloc/BUILD.bazel\ - --replace "#define HAVE_SYS_SYSCTL_H 1" "#undef HAVE_SYS_SYSCTL_H" - ''; - - preConfigure = let - opt_flags = [] - ++ lib.optionals sse42Support ["-msse4.2"] - ++ lib.optionals avx2Support ["-mavx2"] - ++ lib.optionals fmaSupport ["-mfma"]; - in '' - patchShebangs configure - - # dummy ldconfig - mkdir dummy-ldconfig - echo "#!${stdenv.shell}" > dummy-ldconfig/ldconfig - chmod +x dummy-ldconfig/ldconfig - export PATH="$PWD/dummy-ldconfig:$PATH" - - export PYTHON_LIB_PATH="$NIX_BUILD_TOP/site-packages" - export CC_OPT_FLAGS="${lib.concatStringsSep " " opt_flags}" - mkdir -p "$PYTHON_LIB_PATH" - - # To avoid mixing Python 2 and Python 3 - unset PYTHONPATH - ''; - - configurePhase = '' - runHook preConfigure - ./configure - runHook postConfigure - ''; - - # FIXME: Tensorflow uses dlopen() for CUDA libraries. - NIX_LDFLAGS = lib.optionalString cudaSupport "-lcudart -lcublas -lcufft -lcurand -lcusolver -lcusparse -lcudnn"; - - hardeningDisable = [ "format" ]; - - bazelFlags = [ - # temporary fixes to make the build work with bazel 0.27 - "--incompatible_no_support_tools_in_action_inputs=false" - ]; - bazelBuildFlags = [ - "--config=opt" # optimize using the flags set in the configure phase - ] - ++ lib.optionals (mklSupport) [ "--config=mkl" ]; - - bazelTarget = "//tensorflow/tools/pip_package:build_pip_package //tensorflow/tools/lib_package:libtensorflow"; - - fetchAttrs = { - # So that checksums don't depend on these. - TF_SYSTEM_LIBS = null; - - # cudaSupport causes fetch of ncclArchive, resulting in different hashes - sha256 = if cudaSupport then - "1bi6aydidgi943hiqj0d279jbz2g173hvafdqla1ifw2qdsm73pb" - else - "0l5510fr8n22c4hx9llr0vqqhx9wlgkyxl55fxbixhssd0ai05r4"; - }; - - buildAttrs = { - outputs = [ "out" "python" ]; - - preBuild = '' - patchShebangs . - ''; - - installPhase = '' - mkdir -p "$out" - tar -xf bazel-bin/tensorflow/tools/lib_package/libtensorflow.tar.gz -C "$out" - # Write pkgconfig file. - mkdir "$out/lib/pkgconfig" - cat > "$out/lib/pkgconfig/tensorflow.pc" << EOF - Name: TensorFlow - Version: ${version} - Description: Library for computation using data flow graphs for scalable machine learning - Requires: - Libs: -L$out/lib -ltensorflow - Cflags: -I$out/include/tensorflow - EOF - - # build the source code, then copy it to $python (build_pip_package - # actually builds a symlink farm so we must dereference them). - bazel-bin/tensorflow/tools/pip_package/build_pip_package --src "$PWD/dist" - cp -Lr "$PWD/dist" "$python" - ''; - - postFixup = lib.optionalString cudaSupport '' - find $out -type f \( -name '*.so' -or -name '*.so.*' \) | while read lib; do - addOpenGLRunpath "$lib" - done - ''; - }; - - meta = with stdenv.lib; { - description = "Computation using data flow graphs for scalable machine learning"; - homepage = "http://tensorflow.org"; - license = licenses.asl20; - maintainers = with maintainers; [ jyp abbradar ]; - platforms = with platforms; linux ++ darwin; - # The py2 build fails due to some issue importing protobuf. Possibly related to the fix in - # https://github.com/akesandgren/easybuild-easyblocks/commit/1f2e517ddfd1b00a342c6abb55aef3fd93671a2b - broken = !(xlaSupport -> cudaSupport) || !isPy3k; - }; - }; - -in buildPythonPackage { - inherit version pname; - disabled = isPy27 || (pythonAtLeast "3.8"); - - src = bazel-build.python; - - # Upstream has a pip hack that results in bin/tensorboard being in both tensorflow - # and the propagated input tensorflow-tensorboard, which causes environment collisions. - # Another possibility would be to have tensorboard only in the buildInputs - # https://github.com/tensorflow/tensorflow/blob/v1.7.1/tensorflow/tools/pip_package/setup.py#L79 - postInstall = '' - rm $out/bin/tensorboard - ''; - - setupPyGlobalFlags = [ "--project_name ${pname}" ]; - - # tensorflow/tools/pip_package/setup.py - propagatedBuildInputs = [ - absl-py - astor - gast - google-pasta - keras-applications - keras-preprocessing - numpy - six - protobuf - tensorflow-estimator_1 - termcolor - wrapt - grpcio - opt-einsum - ] ++ lib.optionals (!isPy3k) [ - mock - future - functools32 - ] ++ lib.optionals (pythonOlder "3.4") [ - backports_weakref enum34 - ] ++ lib.optionals withTensorboard [ - tensorflow-tensorboard_1 - ]; - - nativeBuildInputs = lib.optional cudaSupport addOpenGLRunpath; - - postFixup = lib.optionalString cudaSupport '' - find $out -type f \( -name '*.so' -or -name '*.so.*' \) | while read lib; do - addOpenGLRunpath "$lib" - done - ''; - - # Actual tests are slow and impure. - # TODO try to run them anyway - # TODO better test (files in tensorflow/tools/ci_build/builds/*test) - checkPhase = '' - ${python.interpreter} <= 1.1.6;python_version<"3.4"', - # functools comes with python3, need to install the backport for python2 - 'functools32 >= 3.2.3;python_version<"3"', -- 'gast == 0.2.2', -+ 'gast >= 0.2.2', - 'google_pasta >= 0.1.6', - 'keras_applications >= 1.0.8', - 'keras_preprocessing >= 1.0.5', diff --git a/pkgs/development/python-modules/tensorflow/1/prefetcher.sh b/pkgs/development/python-modules/tensorflow/1/prefetcher.sh deleted file mode 100755 index d590fb0f173..00000000000 --- a/pkgs/development/python-modules/tensorflow/1/prefetcher.sh +++ /dev/null @@ -1,33 +0,0 @@ -#!/usr/bin/env bash - -version=1.14.0 -hashfile=binary-hashes.nix -rm -f $hashfile -echo "{" >> $hashfile -echo "version = \"$version\";" >> $hashfile -for sys in "linux" "mac"; do - for tfpref in "cpu/tensorflow" "gpu/tensorflow_gpu"; do - for pykind in "py2-none-any" "py3-none-any" "cp27-none-linux_x86_64" "cp35-cp35m-linux_x86_64" "cp36-cp36m-linux_x86_64" "cp37-cp37m-linux_x86_64"; do - if [ $sys == "mac" ]; then - [[ $pykind =~ py.* ]] && [[ $tfpref =~ cpu.* ]] - result=$? - pyver=${pykind:2:1} - flavour=cpu - else - [[ $pykind =~ .*linux.* ]] - result=$? - pyver=${pykind:2:2} - flavour=${tfpref:0:3} - fi - if [ $result == 0 ]; then - url=https://storage.googleapis.com/tensorflow/$sys/$tfpref-$version-$pykind.whl - hash=$(nix-prefetch-url $url) - echo "${sys}_py_${pyver}_${flavour} = {" >> $hashfile - echo " url = \"$url\";" >> $hashfile - echo " sha256 = \"$hash\";" >> $hashfile - echo "};" >> $hashfile - fi - done - done -done -echo "}" >> $hashfile diff --git a/pkgs/development/python-modules/tensorflow/2/bin.nix b/pkgs/development/python-modules/tensorflow/bin.nix similarity index 100% rename from pkgs/development/python-modules/tensorflow/2/bin.nix rename to pkgs/development/python-modules/tensorflow/bin.nix diff --git a/pkgs/development/python-modules/tensorflow/2/binary-hashes.nix b/pkgs/development/python-modules/tensorflow/binary-hashes.nix similarity index 100% rename from pkgs/development/python-modules/tensorflow/2/binary-hashes.nix rename to pkgs/development/python-modules/tensorflow/binary-hashes.nix diff --git a/pkgs/development/python-modules/tensorflow/cuda-10.2-no-bin2c-path.patch b/pkgs/development/python-modules/tensorflow/cuda-10.2-no-bin2c-path.patch deleted file mode 100644 index 25f1ba7a551..00000000000 --- a/pkgs/development/python-modules/tensorflow/cuda-10.2-no-bin2c-path.patch +++ /dev/null @@ -1,10 +0,0 @@ ---- a/third_party/nccl/build_defs.bzl.tpl -+++ b/third_party/nccl/build_defs.bzl.tpl -@@ -113,7 +113,6 @@ def _device_link_impl(ctx): - "--cmdline=--compile-only", - "--link", - "--compress-all", -- "--bin2c-path=%s" % bin2c.dirname, - "--create=%s" % tmp_fatbin.path, - "--embedded-fatbin=%s" % fatbin_h.path, - ] + images, diff --git a/pkgs/development/python-modules/tensorflow/2/default.nix b/pkgs/development/python-modules/tensorflow/default.nix similarity index 99% rename from pkgs/development/python-modules/tensorflow/2/default.nix rename to pkgs/development/python-modules/tensorflow/default.nix index 68c983c0594..cdf80336458 100644 --- a/pkgs/development/python-modules/tensorflow/2/default.nix +++ b/pkgs/development/python-modules/tensorflow/default.nix @@ -108,7 +108,7 @@ let patches = [ # Fixes for NixOS jsoncpp - ../system-jsoncpp.patch + ./system-jsoncpp.patch ./relax-dependencies.patch diff --git a/pkgs/development/python-modules/tensorflow/no-saved-proto.patch b/pkgs/development/python-modules/tensorflow/no-saved-proto.patch deleted file mode 100644 index ead112f8ddd..00000000000 --- a/pkgs/development/python-modules/tensorflow/no-saved-proto.patch +++ /dev/null @@ -1,14 +0,0 @@ -diff --git a/tensorflow/cc/saved_model/BUILD b/tensorflow/cc/saved_model/BUILD -index 8626ed0087..27deb34387 100644 ---- a/tensorflow/cc/saved_model/BUILD -+++ b/tensorflow/cc/saved_model/BUILD -@@ -49,9 +49,6 @@ cc_library( - # tf_lib depending on the build platform. - "//tensorflow/core:lib", - "//tensorflow/core:protos_all_cc", -- ]) + if_mobile([ -- # Mobile-friendly SavedModel proto. See go/portable-proto for more info. -- "//tensorflow/core:saved_model_portable_proto", - ]) + if_android([ - "//tensorflow/core:android_tensorflow_lib", - ]) + if_ios([ diff --git a/pkgs/development/python-modules/tensorflow/2/prefetcher.sh b/pkgs/development/python-modules/tensorflow/prefetcher.sh similarity index 100% rename from pkgs/development/python-modules/tensorflow/2/prefetcher.sh rename to pkgs/development/python-modules/tensorflow/prefetcher.sh diff --git a/pkgs/development/python-modules/tensorflow/2/relax-dependencies.patch b/pkgs/development/python-modules/tensorflow/relax-dependencies.patch similarity index 100% rename from pkgs/development/python-modules/tensorflow/2/relax-dependencies.patch rename to pkgs/development/python-modules/tensorflow/relax-dependencies.patch diff --git a/pkgs/top-level/python-packages.nix b/pkgs/top-level/python-packages.nix index 70b2cbdf0e1..470a23c0279 100644 --- a/pkgs/top-level/python-packages.nix +++ b/pkgs/top-level/python-packages.nix @@ -7352,34 +7352,16 @@ in { tensorboardx = callPackage ../development/python-modules/tensorboardx { }; - tensorflow-bin_1 = callPackage ../development/python-modules/tensorflow/1/bin.nix { + tensorflow-bin_2 = callPackage ../development/python-modules/tensorflow/bin.nix { cudaSupport = pkgs.config.cudaSupport or false; inherit (pkgs.linuxPackages) nvidia_x11; cudatoolkit = pkgs.cudatoolkit_10; cudnn = pkgs.cudnn_cudatoolkit_10; }; - tensorflow-bin_2 = callPackage ../development/python-modules/tensorflow/2/bin.nix { - cudaSupport = pkgs.config.cudaSupport or false; - inherit (pkgs.linuxPackages) nvidia_x11; - cudatoolkit = pkgs.cudatoolkit_10; - cudnn = pkgs.cudnn_cudatoolkit_10; - }; + tensorflow-bin = self.tensorflow-bin_2; - tensorflow-bin = self.tensorflow-bin_1; - - tensorflow-build_1 = callPackage ../development/python-modules/tensorflow/1 { - cudaSupport = pkgs.config.cudaSupport or false; - inherit (pkgs.linuxPackages) nvidia_x11; - cudatoolkit = pkgs.cudatoolkit_10; - cudnn = pkgs.cudnn_cudatoolkit_10; - nccl = pkgs.nccl_cudatoolkit_10; - openssl = pkgs.openssl_1_1; - inherit (pkgs.darwin.apple_sdk.frameworks) Foundation Security; - inherit (pkgs) flatbuffers; - }; - - tensorflow-build_2 = callPackage ../development/python-modules/tensorflow/2 { + tensorflow-build_2 = callPackage ../development/python-modules/tensorflow { cudaSupport = pkgs.config.cudaSupport or false; cudatoolkit = pkgs.cudatoolkit_11; cudnn = pkgs.cudnn_cudatoolkit_11; @@ -7389,25 +7371,20 @@ in { inherit (pkgs) flatbuffers; }; - tensorflow-build = self.tensorflow-build_1; + tensorflow-build = self.tensorflow-build_2; - tensorflow-estimator_1 = callPackage ../development/python-modules/tensorflow-estimator/1 { }; + tensorflow-estimator_2 = callPackage ../development/python-modules/tensorflow-estimator { }; - tensorflow-estimator_2 = callPackage ../development/python-modules/tensorflow-estimator/2 { }; - - tensorflow-estimator = self.tensorflow-estimator_1; + tensorflow-estimator = self.tensorflow-estimator_2; tensorflow-probability = callPackage ../development/python-modules/tensorflow-probability { }; - tensorflow = self.tensorflow_1; - tensorflow_1 = self.tensorflow-build_1; + tensorflow = self.tensorflow_2; tensorflow_2 = self.tensorflow-build_2; - tensorflow-tensorboard_1 = callPackage ../development/python-modules/tensorflow-tensorboard/1 { }; + tensorflow-tensorboard_2 = callPackage ../development/python-modules/tensorflow-tensorboard { }; - tensorflow-tensorboard_2 = callPackage ../development/python-modules/tensorflow-tensorboard/2 { }; - - tensorflow-tensorboard = self.tensorflow-tensorboard_1; + tensorflow-tensorboard = self.tensorflow-tensorboard_2; tensorflowWithCuda = self.tensorflow.override { cudaSupport = true; }; From 370ffaaca722b5f9124c0eb38b8e8f4a15b49c9c Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?J=C3=B6rg=20Thalheim?= Date: Thu, 7 Jan 2021 15:34:10 +0100 Subject: [PATCH 35/45] tensorflow: 2.3.1 -> 2.3.2 --- .../development/python-modules/tensorflow/default.nix | 11 +++++++---- pkgs/top-level/python-packages.nix | 8 ++++---- 2 files changed, 11 insertions(+), 8 deletions(-) diff --git a/pkgs/development/python-modules/tensorflow/default.nix b/pkgs/development/python-modules/tensorflow/default.nix index cdf80336458..8d859920c79 100644 --- a/pkgs/development/python-modules/tensorflow/default.nix +++ b/pkgs/development/python-modules/tensorflow/default.nix @@ -72,7 +72,7 @@ let tfFeature = x: if x then "1" else "0"; - version = "2.3.1"; + version = "2.3.2"; variant = if cudaSupport then "-gpu" else ""; pname = "tensorflow${variant}"; @@ -103,7 +103,7 @@ let owner = "tensorflow"; repo = "tensorflow"; rev = "v${version}"; - sha256 = "1lvmrqfnwzh24fl5rdkksiqfv2bn0ld5gvzq1z57rphfkf0zg996"; + sha256 = "sha256-ncwIkqLDqrB33pB9/FTlBklsIJUEvnDUmyAeUfufCFs="; }; patches = [ @@ -236,6 +236,9 @@ let rm -f .bazelversion ''; + # https://github.com/tensorflow/tensorflow/pull/39470 + NIX_CFLAGS_COMPILE = [ "-Wno-stringop-truncation" ]; + preConfigure = let opt_flags = [] ++ lib.optionals sse42Support ["-msse4.2"] @@ -281,9 +284,9 @@ let # cudaSupport causes fetch of ncclArchive, resulting in different hashes sha256 = if cudaSupport then - "11blnw3ghp1kdi9hh9pdqa4qni9ysc3nk9iqqk9bg4dlr9zl1yld" + "sha256-lEdPA9vhYO6vd5FgPMbFp2PkRvDBurPidYsxtJLXcbQ=" else - "1kkghhwhl8frs68kv28r408lps7mpgq1xvq6hc3k0j35asv1g2kc"; + "sha256-ZEY/bWo5M3Juw1x3CwhXYXZHD4q5LzWDlhgXnh4P95U="; }; buildAttrs = { diff --git a/pkgs/top-level/python-packages.nix b/pkgs/top-level/python-packages.nix index 470a23c0279..a1b7f33c626 100644 --- a/pkgs/top-level/python-packages.nix +++ b/pkgs/top-level/python-packages.nix @@ -7355,16 +7355,16 @@ in { tensorflow-bin_2 = callPackage ../development/python-modules/tensorflow/bin.nix { cudaSupport = pkgs.config.cudaSupport or false; inherit (pkgs.linuxPackages) nvidia_x11; - cudatoolkit = pkgs.cudatoolkit_10; - cudnn = pkgs.cudnn_cudatoolkit_10; + cudatoolkit = pkgs.cudatoolkit_11_0; + cudnn = pkgs.cudnn_cudatoolkit_11_0; }; tensorflow-bin = self.tensorflow-bin_2; tensorflow-build_2 = callPackage ../development/python-modules/tensorflow { cudaSupport = pkgs.config.cudaSupport or false; - cudatoolkit = pkgs.cudatoolkit_11; - cudnn = pkgs.cudnn_cudatoolkit_11; + cudatoolkit = pkgs.cudatoolkit_11_0; + cudnn = pkgs.cudnn_cudatoolkit_11_0; nccl = pkgs.nccl_cudatoolkit_11; openssl = pkgs.openssl_1_1; inherit (pkgs.darwin.apple_sdk.frameworks) Foundation Security; From ddf11daac70f9dd5b0e5d21f8566275d1c84f614 Mon Sep 17 00:00:00 2001 From: Kira Bruneau Date: Tue, 5 Jan 2021 21:25:48 -0500 Subject: [PATCH 36/45] nixos/pipewire: improve assertion messages --- nixos/modules/services/desktops/pipewire.nix | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/nixos/modules/services/desktops/pipewire.nix b/nixos/modules/services/desktops/pipewire.nix index 0ef988d9e69..134becf6b0c 100644 --- a/nixos/modules/services/desktops/pipewire.nix +++ b/nixos/modules/services/desktops/pipewire.nix @@ -93,11 +93,11 @@ in { assertions = [ { assertion = cfg.pulse.enable -> !config.hardware.pulseaudio.enable; - message = "PipeWire based PulseAudio server emulation replaces PulseAudio"; + message = "PipeWire based PulseAudio server emulation replaces PulseAudio. This option requires `hardware.pulseaudio.enable` to be set to false"; } { assertion = cfg.jack.enable -> !config.services.jack.jackd.enable; - message = "PipeWire based JACK emulation doesn't use the JACK service"; + message = "PipeWire based JACK emulation doesn't use the JACK service. This option requires `services.jack.jackd.enable` to be set to false"; } ]; From 8deca0d420644014b03c40d862bbe73096621174 Mon Sep 17 00:00:00 2001 From: MetaDark Date: Fri, 26 Jun 2020 22:24:35 -0400 Subject: [PATCH 37/45] zynaddsubfx: use zyn-fusion as default gui module - Added `guiModule` option that accepts "fltk", "ntk", "zest", or "off" - Split FLTK dependencies from NTK dependencies - Added support for building the FLTK gui - Added support for building the Zyn-Fusion (zest) gui - Added new derivation for the Zest UI framework (local to zynaddsubfx) It's not yet designed to be used outside of zynaddsubfx, but it may be in the future - Added flags for all optional features - Added & disabled `dssiSupport` by default - Disabled `lashSupport` by default Slows down startup looking for LASH server if not running - Added & enabled `portaudioSupport` by default Cross platform audio library that uses ALSA/JACK on Linux. Supports multiple audio streams without needing JACK. - Enabled tests - Removes nico202 as maintainer, as requested in code review --- .../audio/zynaddsubfx/default.nix | 117 +++++++++++++++--- .../audio/zynaddsubfx/mruby-zest/default.nix | 109 ++++++++++++++++ .../mruby-zest/force-gcc-as-linker.patch | 13 ++ .../zynaddsubfx/mruby-zest/system-libuv.patch | 113 +++++++++++++++++ pkgs/top-level/all-packages.nix | 14 ++- 5 files changed, 350 insertions(+), 16 deletions(-) create mode 100644 pkgs/applications/audio/zynaddsubfx/mruby-zest/default.nix create mode 100644 pkgs/applications/audio/zynaddsubfx/mruby-zest/force-gcc-as-linker.patch create mode 100644 pkgs/applications/audio/zynaddsubfx/mruby-zest/system-libuv.patch diff --git a/pkgs/applications/audio/zynaddsubfx/default.nix b/pkgs/applications/audio/zynaddsubfx/default.nix index 9a432f73d3f..3d5f392205f 100644 --- a/pkgs/applications/audio/zynaddsubfx/default.nix +++ b/pkgs/applications/audio/zynaddsubfx/default.nix @@ -1,30 +1,117 @@ -{ stdenv, fetchurl, alsaLib, cairo, cmake, libjack2, fftw, fltk13, lash, libjpeg -, libXpm, minixml, ntk, pkgconfig, zlib, liblo +{ lib +, stdenv +, fetchFromGitHub +, callPackage + + # Required build tools +, cmake +, makeWrapper +, pkg-config + + # Required dependencies +, fftw +, liblo +, minixml +, zlib + + # Optional dependencies +, alsaSupport ? true +, alsaLib +, dssiSupport ? false +, dssi +, ladspaH +, jackSupport ? true +, libjack2 +, lashSupport ? false +, lash +, ossSupport ? true +, portaudioSupport ? true +, portaudio + + # Optional GUI dependencies +, guiModule ? "off" +, cairo +, fltk13 +, libGL +, libjpeg +, libX11 +, libXpm +, ntk + + # Test dependencies +, cxxtest }: -stdenv.mkDerivation rec { +assert builtins.any (g: guiModule == g) [ "fltk" "ntk" "zest" "off" ]; + +let + guiName = { + "fltk" = "FLTK"; + "ntk" = "NTK"; + "zest" = "Zyn-Fusion"; + }.${guiModule}; + mruby-zest = callPackage ./mruby-zest { }; +in stdenv.mkDerivation rec { pname = "zynaddsubfx"; version = "3.0.5"; - src = fetchurl { - url = "mirror://sourceforge/zynaddsubfx/zynaddsubfx-${version}.tar.bz2"; - sha256 = "0qwzg14h043rmyf9jqdylxhyfy4sl0vsr0gjql51wjhid0i34ivl"; + src = fetchFromGitHub { + owner = pname; + repo = pname; + rev = version; + sha256 = "1vh1gszgjxwn8m32rk5222z1j2cnjax0bqpag7b47v6i36p2q4x8"; + fetchSubmodules = true; }; - buildInputs = [ alsaLib cairo libjack2 fftw fltk13 lash libjpeg libXpm minixml ntk zlib liblo ]; - nativeBuildInputs = [ cmake pkgconfig ]; - - patchPhase = '' + postPatch = '' substituteInPlace src/Misc/Config.cpp --replace /usr $out ''; - hardeningDisable = [ "format" ]; + nativeBuildInputs = [ cmake makeWrapper pkg-config ]; + + buildInputs = [ fftw liblo minixml zlib ] + ++ lib.optionals alsaSupport [ alsaLib ] + ++ lib.optionals dssiSupport [ dssi ladspaH ] + ++ lib.optionals jackSupport [ libjack2 ] + ++ lib.optionals lashSupport [ lash ] + ++ lib.optionals portaudioSupport [ portaudio ] + ++ lib.optionals (guiModule == "fltk") [ fltk13 libjpeg libXpm ] + ++ lib.optionals (guiModule == "ntk") [ ntk cairo libXpm ] + ++ lib.optionals (guiModule == "zest") [ libGL libX11 ]; + + cmakeFlags = [ "-DGuiModule=${guiModule}" ] + # OSS library is included in glibc. + # Must explicitly disable if support is not wanted. + ++ lib.optional (!ossSupport) "-DOssEnable=OFF" + # Find FLTK without requiring an OpenGL library in buildInputs + ++ lib.optional (guiModule == "fltk") "-DFLTK_SKIP_OPENGL=ON"; + + doCheck = true; + checkInputs = [ cxxtest ]; + + # When building with zest GUI, patch plugins + # and standalone executable to properly locate zest + postFixup = lib.optional (guiModule == "zest") '' + patchelf --set-rpath "${mruby-zest}:$(patchelf --print-rpath "$out/lib/lv2/ZynAddSubFX.lv2/ZynAddSubFX_ui.so")" \ + "$out/lib/lv2/ZynAddSubFX.lv2/ZynAddSubFX_ui.so" + + patchelf --set-rpath "${mruby-zest}:$(patchelf --print-rpath "$out/lib/vst/ZynAddSubFX.so")" \ + "$out/lib/vst/ZynAddSubFX.so" + + wrapProgram "$out/bin/zynaddsubfx" \ + --prefix PATH : ${mruby-zest} \ + --prefix LD_LIBRARY_PATH : ${mruby-zest} + ''; + + meta = with lib; { + description = "High quality software synthesizer (${guiName} GUI)"; + homepage = + if guiModule == "zest" + then "https://zynaddsubfx.sourceforge.io/zyn-fusion.html" + else "https://zynaddsubfx.sourceforge.io"; - meta = with stdenv.lib; { - description = "High quality software synthesizer"; - homepage = "http://zynaddsubfx.sourceforge.net"; license = licenses.gpl2; + maintainers = with maintainers; [ goibhniu metadark ]; platforms = platforms.linux; - maintainers = [ maintainers.goibhniu maintainers.nico202 ]; }; } diff --git a/pkgs/applications/audio/zynaddsubfx/mruby-zest/default.nix b/pkgs/applications/audio/zynaddsubfx/mruby-zest/default.nix new file mode 100644 index 00000000000..0f00e6244d1 --- /dev/null +++ b/pkgs/applications/audio/zynaddsubfx/mruby-zest/default.nix @@ -0,0 +1,109 @@ +{ stdenv +, fetchFromGitHub +, bison +, git +, python2 +, rake +, ruby +, libGL +, libuv +, libX11 +}: + +let + mgem-list = fetchFromGitHub { + owner = "mruby"; + repo = "mgem-list"; + rev = "2033837203c8a141b1f9d23bb781fe0cbaefbd24"; + sha256 = "0igf2nsx5i6g0yf7sjxxkngyriv213d0sjs3yidrflrabiywpxmm"; + }; + + mruby-dir = fetchFromGitHub { + owner = "iij"; + repo = "mruby-dir"; + rev = "89dceefa1250fb1ae868d4cb52498e9e24293cd1"; + sha256 = "0zrhiy9wmwmc9ls62iyb2z86j2ijqfn7rn4xfmrbrfxygczarsm9"; + }; + + mruby-errno = fetchFromGitHub { + owner = "iij"; + repo = "mruby-errno"; + rev = "b4415207ff6ea62360619c89a1cff83259dc4db0"; + sha256 = "12djcwjjw0fygai5kssxbfs3pzh3cpnq07h9m2h5b51jziw380xj"; + }; + + mruby-file-stat = fetchFromGitHub { + owner = "ksss"; + repo = "mruby-file-stat"; + rev = "aa474589f065c71d9e39ab8ba976f3bea6f9aac2"; + sha256 = "1clarmr67z133ivkbwla1a42wcjgj638j9w0mlv5n21mhim9rid5"; + }; + + mruby-process = fetchFromGitHub { + owner = "iij"; + repo = "mruby-process"; + rev = "fe171fbe2a6cc3c2cf7d713641bddde71024f7c8"; + sha256 = "00yrzc371f90gl5m1gbkw0qq8c394bpifssjr8p1wh5fmzhxqyml"; + }; + + mruby-pack = fetchFromGitHub { + owner = "iij"; + repo = "mruby-pack"; + rev = "383a9c79e191d524a9a2b4107cc5043ecbf6190b"; + sha256 = "003glxgxifk4ixl12sy4gn9bhwvgb79b4wga549ic79isgv81w2d"; + }; +in +stdenv.mkDerivation rec { + pname = "mruby-zest"; + version = "3.0.5"; + + src = fetchFromGitHub { + owner = pname; + repo = "${pname}-build"; + rev = version; + sha256 = "0fxljrgamgz2rm85mclixs00b0f2yf109jc369039n1vf0l5m57d"; + fetchSubmodules = true; + }; + + nativeBuildInputs = [ bison git python2 rake ruby ]; + buildInputs = [ libGL libuv libX11 ]; + + patches = [ + ./force-gcc-as-linker.patch + ./system-libuv.patch + ]; + + # Add missing dependencies of deps/mruby-dir-glob/mrbgem.rake + # Should be fixed in next release, see bcadb0a5490bd6d599f1a0e66ce09b46363c9dae + postPatch = '' + mkdir -p mruby/build/mrbgems + ln -s ${mgem-list} mruby/build/mrbgems/mgem-list + ln -s ${mruby-dir} mruby/build/mrbgems/mruby-dir + ln -s ${mruby-errno} mruby/build/mrbgems/mruby-errno + ln -s ${mruby-file-stat} mruby/build/mrbgems/mruby-file-stat + ln -s ${mruby-process} mruby/build/mrbgems/mruby-process + ln -s ${mruby-pack} mruby/build/mrbgems/mruby-pack + ''; + + installTargets = [ "pack" ]; + + postInstall = '' + ln -s "$out/zest" "$out/zyn-fusion" + cp -a package/{font,libzest.so,schema,zest} "$out" + + # mruby-widget-lib/src/api.c requires MainWindow.qml as part of a + # sanity check, even though qml files are compiled into the binary + # https://github.com/mruby-zest/mruby-zest-build/tree/3.0.5/src/mruby-widget-lib/src/api.c#L99-L116 + # https://github.com/mruby-zest/mruby-zest-build/tree/3.0.5/linux-pack.sh#L17-L18 + mkdir -p "$out/qml" + touch "$out/qml/MainWindow.qml" + ''; + + meta = with stdenv.lib; { + description = "The Zest Framework used in ZynAddSubFX's UI"; + homepage = "https://github.com/mruby-zest"; + license = licenses.lgpl21; + maintainers = with maintainers; [ metadark ]; + platforms = platforms.all; + }; +} diff --git a/pkgs/applications/audio/zynaddsubfx/mruby-zest/force-gcc-as-linker.patch b/pkgs/applications/audio/zynaddsubfx/mruby-zest/force-gcc-as-linker.patch new file mode 100644 index 00000000000..c521d240774 --- /dev/null +++ b/pkgs/applications/audio/zynaddsubfx/mruby-zest/force-gcc-as-linker.patch @@ -0,0 +1,13 @@ +diff --git a/mruby/tasks/toolchains/gcc.rake b/mruby/tasks/toolchains/gcc.rake +index f370c0ab..e5ab9f60 100644 +--- a/mruby/tasks/toolchains/gcc.rake ++++ b/mruby/tasks/toolchains/gcc.rake +@@ -22,7 +22,7 @@ MRuby::Toolchain.new(:gcc) do |conf, _params| + end + + conf.linker do |linker| +- linker.command = ENV['LD'] || 'gcc' ++ linker.command = 'gcc' + linker.flags = [ENV['LDFLAGS'] || %w()] + linker.libraries = %w(m) + linker.library_paths = [] diff --git a/pkgs/applications/audio/zynaddsubfx/mruby-zest/system-libuv.patch b/pkgs/applications/audio/zynaddsubfx/mruby-zest/system-libuv.patch new file mode 100644 index 00000000000..b7050abc123 --- /dev/null +++ b/pkgs/applications/audio/zynaddsubfx/mruby-zest/system-libuv.patch @@ -0,0 +1,113 @@ +diff --git a/Makefile b/Makefile +index f3e3be2..2398852 100644 +--- a/Makefile ++++ b/Makefile +@@ -1,8 +1,3 @@ +-UV_DIR = libuv-v1.9.1 +-UV_FILE = $(UV_DIR).tar.gz +-UV_URL = http://dist.libuv.org/dist/v1.9.1/$(UV_FILE) +- +- + all: + ruby ./rebuild-fcache.rb + cd deps/nanovg/src && $(CC) nanovg.c -c -fPIC +@@ -10,12 +5,12 @@ all: + # cd deps/pugl && python2 ./waf configure --no-cairo --static + cd deps/pugl && python2 ./waf configure --no-cairo --static --debug + cd deps/pugl && python2 ./waf +- cd src/osc-bridge && CFLAGS="-I ../../deps/$(UV_DIR)/include " make lib ++ cd src/osc-bridge && make lib + cd mruby && MRUBY_CONFIG=../build_config.rb rake + $(CC) -shared -o libzest.so `find mruby/build/host -type f | grep -e "\.o$$" | grep -v bin` ./deps/libnanovg.a \ + ./deps/libnanovg.a \ + src/osc-bridge/libosc-bridge.a \ +- ./deps/$(UV_DIR)/.libs/libuv.a -lm -lX11 -lGL -lpthread ++ -luv -lm -lX11 -lGL -lpthread + $(CC) test-libversion.c deps/pugl/build/libpugl-0.a -ldl -o zest -lX11 -lGL -lpthread -I deps/pugl -std=gnu99 + + osx: +@@ -25,12 +20,12 @@ osx: + cd deps/pugl && python2 ./waf configure --no-cairo --static + # cd deps/pugl && python2 ./waf configure --no-cairo --static --debug + cd deps/pugl && python2 ./waf +- cd src/osc-bridge && CFLAGS="-I ../../deps/$(UV_DIR)/include " make lib ++ cd src/osc-bridge && make lib + cd mruby && MRUBY_CONFIG=../build_config.rb rake + $(CC) -shared -o libzest.so `find mruby/build/host -type f | grep -e "\.o$$" | grep -v bin` ./deps/libnanovg.a \ + ./deps/libnanovg.a \ + src/osc-bridge/libosc-bridge.a \ +- ./deps/$(UV_DIR)/.libs/libuv.a -lm -framework OpenGL -lpthread ++ -luv -lm -framework OpenGL -lpthread + $(CC) test-libversion.c deps/pugl/build/libpugl-0.a -ldl -o zest -framework OpenGL -framework AppKit -lpthread -I deps/pugl -std=gnu99 + + windows: +@@ -38,38 +33,14 @@ windows: + $(AR) rc deps/libnanovg.a deps/nanovg/src/*.o + cd deps/pugl && CFLAGS="-mstackrealign" python2 ./waf configure --no-cairo --static --target=win32 + cd deps/pugl && python2 ./waf +- cd src/osc-bridge && CFLAGS="-mstackrealign -I ../../deps/$(UV_DIR)/include " make lib ++ cd src/osc-bridge && CFLAGS="-mstackrealign" make lib + cd mruby && WINDOWS=1 MRUBY_CONFIG=../build_config.rb rake + $(CC) -mstackrealign -shared -o libzest.dll -static-libgcc `find mruby/build/w64 -type f | grep -e "\.o$$" | grep -v bin` \ + ./deps/libnanovg.a \ + src/osc-bridge/libosc-bridge.a \ +- ./deps/libuv-win.a \ +- -lm -lpthread -lws2_32 -lkernel32 -lpsapi -luserenv -liphlpapi -lglu32 -lgdi32 -lopengl32 ++ -luv -lm -lpthread -lws2_32 -lkernel32 -lpsapi -luserenv -liphlpapi -lglu32 -lgdi32 -lopengl32 + $(CC) -mstackrealign -DWIN32 test-libversion.c deps/pugl/build/libpugl-0.a -o zest.exe -lpthread -I deps/pugl -std=c99 -lws2_32 -lkernel32 -lpsapi -luserenv -liphlpapi -lglu32 -lgdi32 -lopengl32 + +- +-builddep: deps/libuv.a +-deps/libuv.a: +- cd deps/$(UV_DIR) && ./autogen.sh +- cd deps/$(UV_DIR) && CFLAGS=-fPIC ./configure +- cd deps/$(UV_DIR) && CFLAGS=-fPIC make +- cp deps/$(UV_DIR)/.libs/libuv.a deps/ +- +-builddepwin: deps/libuv-win.a +-deps/libuv-win.a: +- cd deps/$(UV_DIR) && ./autogen.sh +- cd deps/$(UV_DIR) && CFLAGS="-mstackrealign" ./configure --host=x86_64-w64-mingw32 +- cd deps/$(UV_DIR) && LD=x86_64-w64-mingw32-gcc make +- cp deps/$(UV_DIR)/.libs/libuv.a deps/libuv-win.a +- +-deps/$(UV_DIR): +- cd deps && wget -4 $(UV_URL) && tar xvf $(UV_FILE) +-setup: deps/$(UV_DIR) +- +-setupwin: +- cd deps && wget -4 $(UV_URL) +- cd deps && tar xvf $(UV_FILE) +- + push: + cd src/osc-bridge && git push + cd src/mruby-qml-parse && git push +diff --git a/build_config.rb b/build_config.rb +index 00f1f69..11ac15b 100644 +--- a/build_config.rb ++++ b/build_config.rb +@@ -96,7 +96,6 @@ build_type.new(build_name) do |conf| + conf.cc do |cc| + cc.include_paths << "#{`pwd`.strip}/../deps/nanovg/src" + cc.include_paths << "#{`pwd`.strip}/../deps/pugl/" +- cc.include_paths << "#{`pwd`.strip}/../deps/libuv-v1.9.1/include/" + cc.include_paths << "/usr/share/mingw-w64/include/" if windows + cc.include_paths << "/usr/x86_64-w64-mingw32/include/" if windows + cc.flags << "-DLDBL_EPSILON=1e-6" if windows +@@ -117,14 +116,14 @@ build_type.new(build_name) do |conf| + linker.flags_after_libraries << "#{`pwd`.strip}/../deps/pugl/build/libpugl-0.a" + linker.flags_after_libraries << "#{`pwd`.strip}/../deps/libnanovg.a" + if(!windows) +- linker.flags_after_libraries << "#{`pwd`.strip}/../deps/libuv.a" ++ linker.flags_after_libraries << "-luv" + if(ENV['OS'] != "Mac") + linker.libraries << 'GL' + linker.libraries << 'X11' + end + linker.flags_after_libraries << "-lpthread -ldl -lm" + else +- linker.flags_after_libraries << "#{`pwd`.strip}/../deps/libuv-win.a" ++ linker.flags_after_libraries << "-luv" + linker.flags_after_libraries << "-lws2_32 -lkernel32 -lpsapi -luserenv -liphlpapi" + linker.flags_after_libraries << "-lglu32 -lgdi32 -lopengl32" + end diff --git a/pkgs/top-level/all-packages.nix b/pkgs/top-level/all-packages.nix index 817e475979d..4c171b4da9b 100644 --- a/pkgs/top-level/all-packages.nix +++ b/pkgs/top-level/all-packages.nix @@ -24920,7 +24920,19 @@ in zscroll = callPackage ../applications/misc/zscroll {}; - zynaddsubfx = callPackage ../applications/audio/zynaddsubfx { }; + zynaddsubfx = zyn-fusion; + + zynaddsubfx-fltk = callPackage ../applications/audio/zynaddsubfx { + guiModule = "fltk"; + }; + + zynaddsubfx-ntk = callPackage ../applications/audio/zynaddsubfx { + guiModule = "ntk"; + }; + + zyn-fusion = callPackage ../applications/audio/zynaddsubfx { + guiModule = "zest"; + }; ### BLOCKCHAINS / CRYPTOCURRENCIES / WALLETS From 7b0aed2b06b1b4ad7d62d66805fab0b3f0c8f874 Mon Sep 17 00:00:00 2001 From: Tad Fisher <129148+tadfisher@users.noreply.github.com> Date: Thu, 7 Jan 2021 12:25:50 -0800 Subject: [PATCH 38/45] enyo-doom: update license (#101410) Co-authored-by: Sandro --- pkgs/games/enyo-doom/default.nix | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/pkgs/games/enyo-doom/default.nix b/pkgs/games/enyo-doom/default.nix index 0158dc2b531..7b6655d6464 100644 --- a/pkgs/games/enyo-doom/default.nix +++ b/pkgs/games/enyo-doom/default.nix @@ -20,7 +20,7 @@ mkDerivation rec { meta = { homepage = "https://gitlab.com/sdcofer70/enyo-doom"; description = "Frontend for Doom engines"; - license = stdenv.lib.licenses.gpl2; + license = stdenv.lib.licenses.gpl3Plus; platforms = stdenv.lib.platforms.unix; maintainers = [ stdenv.lib.maintainers.tadfisher ]; }; From 976c3999a2275efb9e313885b019fe1e265f7aab Mon Sep 17 00:00:00 2001 From: Phillip Cloud Date: Thu, 7 Jan 2021 15:56:08 -0500 Subject: [PATCH 39/45] nvidia-docker: fix VERSION reporting bug --- pkgs/applications/virtualization/nvidia-docker/default.nix | 3 +++ 1 file changed, 3 insertions(+) diff --git a/pkgs/applications/virtualization/nvidia-docker/default.nix b/pkgs/applications/virtualization/nvidia-docker/default.nix index 6dfe3fb874e..3f75e36ccae 100644 --- a/pkgs/applications/virtualization/nvidia-docker/default.nix +++ b/pkgs/applications/virtualization/nvidia-docker/default.nix @@ -62,7 +62,10 @@ stdenv.mkDerivation rec { buildPhase = '' mkdir bin + cp nvidia-docker bin + substituteInPlace bin/nvidia-docker --subst-var-by VERSION ${version} + cp ${libnvidia-container}/bin/nvidia-container-cli bin cp ${nvidia-container-toolkit}/bin/nvidia-container-{toolkit,runtime-hook} bin cp ${nvidia-container-runtime}/bin/nvidia-container-runtime bin From 86e29a0b72fa01c87b1ce78ba2dd3dc501b22791 Mon Sep 17 00:00:00 2001 From: Evils Date: Wed, 23 Dec 2020 12:44:46 +0100 Subject: [PATCH 40/45] kicad: fix update.sh multiple tag reply handling and fix tabs in update.sh --- pkgs/applications/science/electronics/kicad/update.sh | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/pkgs/applications/science/electronics/kicad/update.sh b/pkgs/applications/science/electronics/kicad/update.sh index cfd78323b77..099440956ae 100755 --- a/pkgs/applications/science/electronics/kicad/update.sh +++ b/pkgs/applications/science/electronics/kicad/update.sh @@ -144,7 +144,7 @@ for version in "${all_versions[@]}"; do for lib in "${libs[@]}"; do echo "Checking ${lib}" >&2 url="${gitlab}/libraries/kicad-${lib}.git" - lib_rev="$(${get_rev} "${url}" "${version}" | cut -f1 | head -n1)" + lib_rev="$(${get_rev} "${url}" "${version}" | cut -f1 | tail -n1)" has_rev="$(grep -sm 1 "\"${pname}\"" -A 19 "${file}" | grep -sm 1 "${lib_rev}" || true)" has_hash="$(grep -sm 1 "\"${pname}\"" -A 20 "${file}" | grep -sm 1 "${lib}.sha256" || true)" if [[ -n ${has_rev} && -n ${has_hash} && -z ${clean} ]]; then @@ -173,8 +173,8 @@ printf "}\n" } > "${tmp}" if grep '""' "${tmp}"; then - echo "empty value detected, out of space?" >&2 - exit "1" + echo "empty value detected, out of space?" >&2 + exit "1" fi mv "${tmp}" "${file}" From 9be551c1d84362a7af3dfd3a4d492aca216ec16f Mon Sep 17 00:00:00 2001 From: Evils Date: Wed, 23 Dec 2020 00:24:54 +0100 Subject: [PATCH 41/45] kicad: 5.1.8 -> 5.1.9 --- .../science/electronics/kicad/versions.nix | 16 ++++++++-------- 1 file changed, 8 insertions(+), 8 deletions(-) diff --git a/pkgs/applications/science/electronics/kicad/versions.nix b/pkgs/applications/science/electronics/kicad/versions.nix index 9f00f3fa8ba..4bdefade5f1 100644 --- a/pkgs/applications/science/electronics/kicad/versions.nix +++ b/pkgs/applications/science/electronics/kicad/versions.nix @@ -3,19 +3,19 @@ { "kicad" = { kicadVersion = { - version = "5.1.8"; + version = "5.1.9"; src = { - rev = "db9833491010954bc27fac92c83d2864bd95c23c"; - sha256 = "08ni9j2lw2hjc1csk6rkydcxwdal6da17ch60zkjij5vfsif2hix"; + rev = "73d0e3b20dec05c4350efa5b69916eb29a7bfcb5"; + sha256 = "1cqh3bc9y140hbryfk9qavs2y3lj5sm9q0qjxcf4mm472afzckky"; }; }; libVersion = { - version = "5.1.8"; + version = "5.1.9"; libSources = { - i18n.rev = "78adcd19e7ed53f4889d6db65a33dd8ec2d323e9"; - i18n.sha256 = "0x0w2m6d3xfm22y4anp5j2j67iwzby149ynj6qjlw2kcsi8kwk1j"; - symbols.rev = "bf475af94877e8fd9cf80e667578ff61835e02bb"; - symbols.sha256 = "1ii3r813653ng2ycggnknqx4g3ja7dbm4qyxrf9aq48ws0xkvhx3"; + i18n.rev = "04f3231f60d55400cb81564b2cd465a57d5192d5"; + i18n.sha256 = "04jq1dcag6i2ljjfqrib65mn4wg4c4nmi7i946l3bywc0rkqsx1f"; + symbols.rev = "6dec5004b6a2679c19d4857bda2f90c5ab3a5726"; + symbols.sha256 = "0n25rq32jwyigfw26faqraillwv6zbi2ywy26dkz5zqlf5xp56ad"; templates.rev = "1ccbaf3704e8ff4030d0915f71e051af621ef7d7"; templates.sha256 = "1a8xfcbdbb4ylrb5m7n2jjk9kwvgmlx1pmnn2cwj327a2b3m4jjs"; footprints.rev = "302ac78bac21825532f970fb92714fa5973ad79b"; From 0448f1c082322c4fc9eeffbb039e28dbbba27541 Mon Sep 17 00:00:00 2001 From: Evils Date: Wed, 23 Dec 2020 12:44:56 +0100 Subject: [PATCH 42/45] kicad-unstable: 2020-12-01 -> 2020-12-23 --- .../science/electronics/kicad/versions.nix | 18 +++++++++--------- 1 file changed, 9 insertions(+), 9 deletions(-) diff --git a/pkgs/applications/science/electronics/kicad/versions.nix b/pkgs/applications/science/electronics/kicad/versions.nix index 4bdefade5f1..8a5e5d8f5f5 100644 --- a/pkgs/applications/science/electronics/kicad/versions.nix +++ b/pkgs/applications/science/electronics/kicad/versions.nix @@ -27,25 +27,25 @@ }; "kicad-unstable" = { kicadVersion = { - version = "2020-12-01"; + version = "2020-12-23"; src = { - rev = "3c521942ed52e83482c82d426170b4fbf327f846"; - sha256 = "sha256:09qab69sy3n44kjlzxxx7gbksyr1kg8n14kz0zf8n71zfcqagci4"; + rev = "912657dd238ad78cfc5d9d5e426ea850d5554fb3"; + sha256 = "1p5kr4d4zpajwdmya1f351y1ix8qmvsx1hrnvhzh7yc3g72kgxah"; }; }; libVersion = { - version = "2020-12-01"; + version = "2020-12-23"; libSources = { i18n.rev = "e89d9a89bec59199c1ade56ee2556591412ab7b0"; - i18n.sha256 = "sha256:04zaqyhj3qr4ymyd3k5vjpcna64j8klpsygcgjcv29s3rdi8glfl"; + i18n.sha256 = "04zaqyhj3qr4ymyd3k5vjpcna64j8klpsygcgjcv29s3rdi8glfl"; symbols.rev = "e538abb015b4f289910a6f26b2f1b9cb8bf2efdb"; - symbols.sha256 = "sha256:117y4cm46anlrnw6y6mdjgl1a5gab6h6m7cwx3q7qb284m9bs5gi"; + symbols.sha256 = "117y4cm46anlrnw6y6mdjgl1a5gab6h6m7cwx3q7qb284m9bs5gi"; templates.rev = "32a4f6fab863976fdcfa232e3e08fdcf3323a954"; - templates.sha256 = "sha256:13r94dghrh9slpj7nkzv0zqv5hk49s6pxm4q5ndqx0y8037ivmhk"; + templates.sha256 = "13r94dghrh9slpj7nkzv0zqv5hk49s6pxm4q5ndqx0y8037ivmhk"; footprints.rev = "15ffd67e01257d4d8134dbd6708cb58977eeccbe"; - footprints.sha256 = "sha256:1ad5k3wh2zqfibrar7pd3g363jk2q51dvraxnq3zlxa2x4znh7mw"; + footprints.sha256 = "1ad5k3wh2zqfibrar7pd3g363jk2q51dvraxnq3zlxa2x4znh7mw"; packages3d.rev = "d8b7e8c56d535f4d7e46373bf24c754a8403da1f"; - packages3d.sha256 = "sha256:0dh8ixg0w43wzj5h3164dz6l1vl4llwxhi3qcdgj1lgvrs28aywd"; + packages3d.sha256 = "0dh8ixg0w43wzj5h3164dz6l1vl4llwxhi3qcdgj1lgvrs28aywd"; }; }; }; From e02bf0737b382a010e7930dd0529ea19e3d448fd Mon Sep 17 00:00:00 2001 From: Benjamin Asbach Date: Tue, 5 Jan 2021 01:52:44 +0100 Subject: [PATCH 43/45] nufraw: init at 0.43-3 `nufraw` is used to manipulate raw images. `nufraw-thumbnailer` is used to generate thumbnails for raw images. relates #108444 --- nixos/modules/config/system-path.nix | 1 + pkgs/applications/graphics/nufraw/default.nix | 71 +++++++++++++++++++ .../graphics/nufraw/nufraw.thumbnailer | 4 ++ pkgs/top-level/all-packages.nix | 6 ++ 4 files changed, 82 insertions(+) create mode 100644 pkgs/applications/graphics/nufraw/default.nix create mode 100644 pkgs/applications/graphics/nufraw/nufraw.thumbnailer diff --git a/nixos/modules/config/system-path.nix b/nixos/modules/config/system-path.nix index 27d1cef849b..aee7a041d04 100644 --- a/nixos/modules/config/system-path.nix +++ b/nixos/modules/config/system-path.nix @@ -144,6 +144,7 @@ in "/share/kservicetypes5" "/share/kxmlgui5" "/share/systemd" + "/share/thumbnailers" ]; system.path = pkgs.buildEnv { diff --git a/pkgs/applications/graphics/nufraw/default.nix b/pkgs/applications/graphics/nufraw/default.nix new file mode 100644 index 00000000000..678bc12278d --- /dev/null +++ b/pkgs/applications/graphics/nufraw/default.nix @@ -0,0 +1,71 @@ +{ stdenv +, fetchurl +, lib + +, autoreconfHook +, bzip2 +, cfitsio +, exiv2 +, gettext +, gtk2 +, gtkimageview +, lcms2 +, lensfun +, libjpeg +, libtiff +, perl +, pkg-config +, zlib + +, addThumbnailer ? false +}: + +stdenv.mkDerivation rec { + pname = "nufraw"; + version = "0.43-3"; + + src = fetchurl { + url = "mirror://sourceforge/nufraw/nufraw-${version}.tar.gz"; + sha256 = "0b63qvw9r8kaqw36bk3a9zwxc41h8fr6498indkw4glrj0awqz9c"; + }; + + nativeBuildInputs = [ autoreconfHook gettext perl pkg-config ]; + + buildInputs = [ + bzip2 + cfitsio + exiv2 + gtk2 + gtkimageview + lcms2 + lensfun + libjpeg + libtiff + zlib + ]; + + configureFlags = [ + "--enable-contrast" + "--enable-dst-correction" + ]; + + postInstall = lib.optionalString addThumbnailer '' + mkdir -p $out/share/thumbnailers + substituteAll ${./nufraw.thumbnailer} $out/share/thumbnailers/${pname}.thumbnailer + ''; + + meta = with stdenv.lib; { + homepage = "https://nufraw.sourceforge.io/"; + description = "Utility to read and manipulate raw images from digital cameras"; + longDescription = + '' + A new version of the popular raw digital images manipulator ufraw. + Forks from the version 0.23 of ufraw (that's why the first nufraw version is the 0.24). + Nufraw offers the same features (gimp plugin, batch, ecc) and the same quality of + ufraw in a brand new improved user interface. + ''; + license = licenses.gpl2Plus; + maintainers = with maintainers; [ asbachb ]; + platforms = [ "x86_64-linux" "i686-linux" ]; + }; +} diff --git a/pkgs/applications/graphics/nufraw/nufraw.thumbnailer b/pkgs/applications/graphics/nufraw/nufraw.thumbnailer new file mode 100644 index 00000000000..34b2adc43ae --- /dev/null +++ b/pkgs/applications/graphics/nufraw/nufraw.thumbnailer @@ -0,0 +1,4 @@ +[Thumbnailer Entry] +TryExec=@out@/bin/nufraw-batch +Exec=@out@/bin/nufraw-batch --silent --size %s --out-type=png --noexif --output=%o --embedded-image %i +MimeType=image/x-canon-cr2;image/x-canon-crw;image/x-minolta-mrw;image/x-nikon-nef;image/x-pentax-pef;image/x-panasonic-rw2;image/x-panasonic-raw2;image/x-samsung-srw;image/x-olympus-orf;image/x-sony-arw diff --git a/pkgs/top-level/all-packages.nix b/pkgs/top-level/all-packages.nix index 1796f04f308..66efc102d68 100644 --- a/pkgs/top-level/all-packages.nix +++ b/pkgs/top-level/all-packages.nix @@ -23504,6 +23504,12 @@ in muchsync = callPackage ../applications/networking/mailreaders/notmuch/muchsync.nix { }; + nufraw = callPackage ../applications/graphics/nufraw/default.nix { }; + + nufraw-thumbnailer = callPackage ../applications/graphics/nufraw/default.nix { + addThumbnailer = true; + }; + notmuch-addrlookup = callPackage ../applications/networking/mailreaders/notmuch-addrlookup { }; nova-filters = callPackage ../applications/audio/nova-filters { }; From f44ed8abd41d7fcd86a632ffb9c800f4665decbe Mon Sep 17 00:00:00 2001 From: Arthur Gautier Date: Thu, 7 Jan 2021 22:26:58 +0000 Subject: [PATCH 44/45] libplacebo: fixup glslang headers path See: https://github.com/NixOS/nixpkgs/issues/108723 Signed-off-by: Arthur Gautier --- pkgs/development/libraries/libplacebo/default.nix | 4 ++++ .../libraries/libplacebo/glsl-import.patch | 13 +++++++++++++ 2 files changed, 17 insertions(+) create mode 100644 pkgs/development/libraries/libplacebo/glsl-import.patch diff --git a/pkgs/development/libraries/libplacebo/default.nix b/pkgs/development/libraries/libplacebo/default.nix index ac8552fa9ef..7d120f604d8 100644 --- a/pkgs/development/libraries/libplacebo/default.nix +++ b/pkgs/development/libraries/libplacebo/default.nix @@ -17,6 +17,10 @@ stdenv.mkDerivation rec { pname = "libplacebo"; version = "2.72.2"; + patches = [ + ./glsl-import.patch + ]; + src = fetchFromGitLab { domain = "code.videolan.org"; owner = "videolan"; diff --git a/pkgs/development/libraries/libplacebo/glsl-import.patch b/pkgs/development/libraries/libplacebo/glsl-import.patch new file mode 100644 index 00000000000..f2ef362c65b --- /dev/null +++ b/pkgs/development/libraries/libplacebo/glsl-import.patch @@ -0,0 +1,13 @@ +diff --git a/src/glsl/glslang.cc b/src/glsl/glslang.cc +index f701acc..c64cbf5 100644 +--- a/src/glsl/glslang.cc ++++ b/src/glsl/glslang.cc +@@ -26,7 +26,7 @@ extern "C" { + + #include + #include +-#include ++#include + + #include "glslang.h" + From 4312cd74f13574cbe6a13c33064482964e4c5853 Mon Sep 17 00:00:00 2001 From: Tim Steinbach Date: Thu, 7 Jan 2021 14:39:27 -0500 Subject: [PATCH 45/45] linux-hardened: Track extra version Fixes #108707 --- pkgs/os-specific/linux/kernel/hardened/patches.json | 5 +++++ pkgs/os-specific/linux/kernel/hardened/update.py | 11 +++++++---- pkgs/os-specific/linux/kernel/patches.nix | 3 ++- pkgs/top-level/all-packages.nix | 2 +- 4 files changed, 15 insertions(+), 6 deletions(-) diff --git a/pkgs/os-specific/linux/kernel/hardened/patches.json b/pkgs/os-specific/linux/kernel/hardened/patches.json index e51b8c4bb2f..72849c58db8 100644 --- a/pkgs/os-specific/linux/kernel/hardened/patches.json +++ b/pkgs/os-specific/linux/kernel/hardened/patches.json @@ -1,25 +1,30 @@ { "4.14": { + "extra": "", "name": "linux-hardened-4.14.213.a.patch", "sha256": "0lkjgg6cbsaiypxij7p00q3y094qf0h172hc2p7wgy39777b45a7", "url": "https://github.com/anthraxx/linux-hardened/releases/download/4.14.213.a/linux-hardened-4.14.213.a.patch" }, "4.19": { + "extra": ".a", "name": "linux-hardened-4.19.165.a.patch", "sha256": "06v34jaj4jg6f3v05wbkkfnr69ahxqyyq0gam4ma3wgm74x6cf3s", "url": "https://github.com/anthraxx/linux-hardened/releases/download/4.19.165.a/linux-hardened-4.19.165.a.patch" }, "5.10": { + "extra": ".a", "name": "linux-hardened-5.10.5.a.patch", "sha256": "1fq2n60brhi6wjazkdgj2aqc4maskvlymbznl03hvj0x5kahjxvx", "url": "https://github.com/anthraxx/linux-hardened/releases/download/5.10.5.a/linux-hardened-5.10.5.a.patch" }, "5.4": { + "extra": ".a", "name": "linux-hardened-5.4.87.a.patch", "sha256": "01hpww6lm00iry8z4z86hh86x66h3xbmxknxhmmhh2zwz6ahkmfd", "url": "https://github.com/anthraxx/linux-hardened/releases/download/5.4.87.a/linux-hardened-5.4.87.a.patch" }, "5.9": { + "extra": "", "name": "linux-hardened-5.9.16.a.patch", "sha256": "024wdzc9bwgr4nd4z0l6bazcl35jczhsmdl2lb26bvffjwg207rw", "url": "https://github.com/anthraxx/linux-hardened/releases/download/5.9.16.a/linux-hardened-5.9.16.a.patch" diff --git a/pkgs/os-specific/linux/kernel/hardened/update.py b/pkgs/os-specific/linux/kernel/hardened/update.py index d6443d2e751..b831c649109 100755 --- a/pkgs/os-specific/linux/kernel/hardened/update.py +++ b/pkgs/os-specific/linux/kernel/hardened/update.py @@ -31,7 +31,7 @@ VersionComponent = Union[int, str] Version = List[VersionComponent] -Patch = TypedDict("Patch", {"name": str, "url": str, "sha256": str}) +Patch = TypedDict("Patch", {"name": str, "url": str, "sha256": str, "extra": str}) @dataclass @@ -99,7 +99,10 @@ def verify_openpgp_signature( return False -def fetch_patch(*, name: str, release: GitRelease) -> Optional[Patch]: +def fetch_patch(*, name: str, release_info: ReleaseInfo) -> Optional[Patch]: + release = release_info.release + extra = f'.{release_info.version[-1]}' + def find_asset(filename: str) -> str: try: it: Iterator[str] = ( @@ -130,7 +133,7 @@ def fetch_patch(*, name: str, release: GitRelease) -> Optional[Patch]: if not sig_ok: return None - return Patch(name=patch_filename, url=patch_url, sha256=sha256) + return Patch(name=patch_filename, url=patch_url, sha256=sha256, extra=extra) def parse_version(version_str: str) -> Version: @@ -252,7 +255,7 @@ for kernel_key in sorted(releases.keys()): update = True if update: - patch = fetch_patch(name=name, release=release) + patch = fetch_patch(name=name, release_info=release_info) if patch is None: failures = True else: diff --git a/pkgs/os-specific/linux/kernel/patches.nix b/pkgs/os-specific/linux/kernel/patches.nix index b0eb2be2a4c..a1a69000710 100644 --- a/pkgs/os-specific/linux/kernel/patches.nix +++ b/pkgs/os-specific/linux/kernel/patches.nix @@ -41,7 +41,8 @@ hardened = let mkPatch = kernelVersion: src: { name = lib.removeSuffix ".patch" src.name; - patch = fetchurl src; + patch = fetchurl (lib.filterAttrs (k: v: k != "extra") src); + extra = src.extra; }; patches = builtins.fromJSON (builtins.readFile ./hardened/patches.json); in lib.mapAttrs mkPatch patches; diff --git a/pkgs/top-level/all-packages.nix b/pkgs/top-level/all-packages.nix index 560d979621f..606b2d5cd66 100644 --- a/pkgs/top-level/all-packages.nix +++ b/pkgs/top-level/all-packages.nix @@ -19014,7 +19014,7 @@ in kernelPatches.tag_hardened kernelPatches.hardened.${kernel.meta.branch} ]; - modDirVersionArg = kernel.modDirVersion + "-hardened"; + modDirVersionArg = kernel.modDirVersion + (kernelPatches.hardened.${kernel.meta.branch}).extra + "-hardened"; isHardened = true; });