From 5c01936d7d2b6904476c79342261cbb4ef62db11 Mon Sep 17 00:00:00 2001 From: Michael Roitzsch Date: Tue, 10 Dec 2019 11:55:52 +0100 Subject: [PATCH 01/54] docker-machine-xhyve: update repository location The zchee repository now redirects to machine-drivers. --- pkgs/applications/networking/cluster/docker-machine/xhyve.nix | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/pkgs/applications/networking/cluster/docker-machine/xhyve.nix b/pkgs/applications/networking/cluster/docker-machine/xhyve.nix index 1c2caff50d5..ae24f39adf8 100644 --- a/pkgs/applications/networking/cluster/docker-machine/xhyve.nix +++ b/pkgs/applications/networking/cluster/docker-machine/xhyve.nix @@ -9,7 +9,7 @@ buildGoPackage rec { src = fetchFromGitHub { rev = "v${version}"; - owner = "zchee"; + owner = "machine-drivers"; repo = "docker-machine-driver-xhyve"; sha256 = "0rj6pyqp4yv4j28bglqjs95rip5i77vv8mrkmqv1rxrsl3i8aqqy"; }; @@ -18,7 +18,7 @@ buildGoPackage rec { buildInputs = [ Hypervisor vmnet ]; meta = with stdenv.lib; { - homepage = https://github.com/zchee/docker-machine-driver-xhyve; + homepage = https://github.com/machine-drivers/docker-machine-driver-xhyve; description = "Xhyve driver for docker-machine."; license = licenses.bsd3; maintainers = with maintainers; [ periklis ]; From 183a99734f666b6bd508f4c81e887dbc746fec69 Mon Sep 17 00:00:00 2001 From: Gabriel Gonzalez Date: Wed, 11 Dec 2019 16:30:05 -0800 Subject: [PATCH 02/54] Add `pkgs.lib.renderOptions` This adds a new utility to intelligently convert Nix records to command line options to reduce boilerplate for simple use cases and to also reduce the likelihood of malformed command lines --- lib/cli.nix | 33 +++++++++++++++++++++++++++++++++ lib/default.nix | 2 ++ lib/tests/misc.nix | 16 ++++++++++++++++ 3 files changed, 51 insertions(+) create mode 100644 lib/cli.nix diff --git a/lib/cli.nix b/lib/cli.nix new file mode 100644 index 00000000000..d794778b21a --- /dev/null +++ b/lib/cli.nix @@ -0,0 +1,33 @@ +{ lib }: + +{ /* Automatically convert an attribute set to command-line options. + + This helps protect against malformed command lines and also to reduce + boilerplate related to command-line construction for simple use cases. + + Example: + renderOptions { foo = "A"; bar = 1; baz = null; qux = true; v = true; } + => " --bar '1' --foo 'A' --qux -v" + */ + renderOptions = + options: + let + render = key: value: + let + hyphenate = + k: if builtins.stringLength k == 1 then "-${k}" else "--${k}"; + + renderOption = v: if v == null then "" else " ${hyphenate key} ${lib.escapeShellArg v}"; + + renderSwitch = if value then " ${hyphenate key}" else ""; + + in + if builtins.isBool value + then renderSwitch + else if builtins.isList value + then lib.concatMapStrings renderOption value + else renderOption value; + + in + lib.concatStrings (lib.mapAttrsToList render options); +} diff --git a/lib/default.nix b/lib/default.nix index 8af53152586..5798c6bba00 100644 --- a/lib/default.nix +++ b/lib/default.nix @@ -39,6 +39,7 @@ let # misc asserts = callLibs ./asserts.nix; + cli = callLibs ./cli.nix; debug = callLibs ./debug.nix; generators = callLibs ./generators.nix; misc = callLibs ./deprecated.nix; @@ -120,6 +121,7 @@ let isOptionType mkOptionType; inherit (asserts) assertMsg assertOneOf; + inherit (cli) renderOptions; inherit (debug) addErrorContextToAttrs traceIf traceVal traceValFn traceXMLVal traceXMLValMarked traceSeq traceSeqN traceValSeq traceValSeqFn traceValSeqN traceValSeqNFn traceShowVal diff --git a/lib/tests/misc.nix b/lib/tests/misc.nix index b064faa1e1b..a5f191410e5 100644 --- a/lib/tests/misc.nix +++ b/lib/tests/misc.nix @@ -441,4 +441,20 @@ runTests { expected = "«foo»"; }; + testRenderOptions = { + expr = + renderOptions + { foo = "A"; + + bar = 1; + + baz = null; + + qux = true; + + v = true; + }; + + expected = " --bar '1' --foo 'A' --qux -v"; + }; } From 8c6a05c8c99819dbd85d555cb50596637d57df44 Mon Sep 17 00:00:00 2001 From: Gabriel Gonzalez Date: Fri, 13 Dec 2019 18:19:24 -0800 Subject: [PATCH 03/54] Rename `renderOptions` to `encodeGNUCommandLine` ... as suggested by @edolstra --- lib/cli.nix | 4 ++-- lib/default.nix | 2 +- lib/tests/misc.nix | 2 +- 3 files changed, 4 insertions(+), 4 deletions(-) diff --git a/lib/cli.nix b/lib/cli.nix index d794778b21a..23fab8ec970 100644 --- a/lib/cli.nix +++ b/lib/cli.nix @@ -6,10 +6,10 @@ boilerplate related to command-line construction for simple use cases. Example: - renderOptions { foo = "A"; bar = 1; baz = null; qux = true; v = true; } + encodeGNUCommandLine { foo = "A"; bar = 1; baz = null; qux = true; v = true; } => " --bar '1' --foo 'A' --qux -v" */ - renderOptions = + encodeGNUCommandLine = options: let render = key: value: diff --git a/lib/default.nix b/lib/default.nix index 5798c6bba00..a7b00f01e0d 100644 --- a/lib/default.nix +++ b/lib/default.nix @@ -121,7 +121,7 @@ let isOptionType mkOptionType; inherit (asserts) assertMsg assertOneOf; - inherit (cli) renderOptions; + inherit (cli) encodeGNUCommandLine; inherit (debug) addErrorContextToAttrs traceIf traceVal traceValFn traceXMLVal traceXMLValMarked traceSeq traceSeqN traceValSeq traceValSeqFn traceValSeqN traceValSeqNFn traceShowVal diff --git a/lib/tests/misc.nix b/lib/tests/misc.nix index a5f191410e5..c0a48f472cc 100644 --- a/lib/tests/misc.nix +++ b/lib/tests/misc.nix @@ -443,7 +443,7 @@ runTests { testRenderOptions = { expr = - renderOptions + encodeGNUCommandLine { foo = "A"; bar = 1; From 693096d283763ce71fcd2002d965c07546aaafda Mon Sep 17 00:00:00 2001 From: Gabriel Gonzalez Date: Fri, 13 Dec 2019 18:25:52 -0800 Subject: [PATCH 04/54] Make behavior of `encodeGNUCommandLine` customizable ... based on feedback from @edolstra --- lib/cli.nix | 30 +++++++++++++++++------------- lib/tests/misc.nix | 1 + 2 files changed, 18 insertions(+), 13 deletions(-) diff --git a/lib/cli.nix b/lib/cli.nix index 23fab8ec970..f3a81cb9e9c 100644 --- a/lib/cli.nix +++ b/lib/cli.nix @@ -6,27 +6,31 @@ boilerplate related to command-line construction for simple use cases. Example: - encodeGNUCommandLine { foo = "A"; bar = 1; baz = null; qux = true; v = true; } + encodeGNUCommandLine { } { foo = "A"; bar = 1; baz = null; qux = true; v = true; } => " --bar '1' --foo 'A' --qux -v" */ encodeGNUCommandLine = + { renderKey ? + key: if builtins.stringLength key == 1 then "-${key}" else "--${key}" + + , renderOption ? + key: value: + if value == null + then "" + else " ${renderKey key} ${lib.escapeShellArg value}" + + , renderBool ? key: value: if value then " ${renderKey key}" else "" + + , renderList ? key: value: lib.concatMapStrings renderOption value + }: options: let render = key: value: - let - hyphenate = - k: if builtins.stringLength k == 1 then "-${k}" else "--${k}"; - - renderOption = v: if v == null then "" else " ${hyphenate key} ${lib.escapeShellArg v}"; - - renderSwitch = if value then " ${hyphenate key}" else ""; - - in if builtins.isBool value - then renderSwitch + then renderBool key value else if builtins.isList value - then lib.concatMapStrings renderOption value - else renderOption value; + then renderList key value + else renderOption key value; in lib.concatStrings (lib.mapAttrsToList render options); diff --git a/lib/tests/misc.nix b/lib/tests/misc.nix index c0a48f472cc..021d0e88c91 100644 --- a/lib/tests/misc.nix +++ b/lib/tests/misc.nix @@ -444,6 +444,7 @@ runTests { testRenderOptions = { expr = encodeGNUCommandLine + { } { foo = "A"; bar = 1; From 5edd4dd44c5f3de1886744aeac49bd396c24f966 Mon Sep 17 00:00:00 2001 From: Gabriel Gonzalez Date: Sun, 15 Dec 2019 08:21:41 -0800 Subject: [PATCH 05/54] Use a more realistic example that exercises all encodings ... as suggested by @roberth This also caught a bug in rendering lists, which this change also fixes --- lib/cli.nix | 21 ++++++++++++++++++--- lib/tests/misc.nix | 16 ++++++++++------ 2 files changed, 28 insertions(+), 9 deletions(-) diff --git a/lib/cli.nix b/lib/cli.nix index f3a81cb9e9c..b6703b2ca82 100644 --- a/lib/cli.nix +++ b/lib/cli.nix @@ -6,8 +6,23 @@ boilerplate related to command-line construction for simple use cases. Example: - encodeGNUCommandLine { } { foo = "A"; bar = 1; baz = null; qux = true; v = true; } - => " --bar '1' --foo 'A' --qux -v" + encodeGNUCommandLine + { } + { data = builtins.toJSON { id = 0; }; + + X = "PUT"; + + retry = 3; + + retry-delay = null; + + url = [ "https://example.com/foo" "https://example.com/bar" ]; + + silent = false; + + verbose = true; + }; + => " -X 'PUT' --data '{\"id\":0}' --retry '3' --url 'https://example.com/foo' --url 'https://example.com/bar' --verbose" */ encodeGNUCommandLine = { renderKey ? @@ -21,7 +36,7 @@ , renderBool ? key: value: if value then " ${renderKey key}" else "" - , renderList ? key: value: lib.concatMapStrings renderOption value + , renderList ? key: value: lib.concatMapStrings (renderOption key) value }: options: let diff --git a/lib/tests/misc.nix b/lib/tests/misc.nix index 021d0e88c91..29c5fad91f9 100644 --- a/lib/tests/misc.nix +++ b/lib/tests/misc.nix @@ -445,17 +445,21 @@ runTests { expr = encodeGNUCommandLine { } - { foo = "A"; + { data = builtins.toJSON { id = 0; }; - bar = 1; + X = "PUT"; - baz = null; + retry = 3; - qux = true; + retry-delay = null; - v = true; + url = [ "https://example.com/foo" "https://example.com/bar" ]; + + silent = false; + + verbose = true; }; - expected = " --bar '1' --foo 'A' --qux -v"; + expected = " -X 'PUT' --data '{\"id\":0}' --retry '3' --url 'https://example.com/foo' --url 'https://example.com/bar' --verbose"; }; } From 475bf6d2a5f3ba2e4c3d2b31b6e54f26e1aa7163 Mon Sep 17 00:00:00 2001 From: Michael Roitzsch Date: Tue, 10 Dec 2019 11:57:20 +0100 Subject: [PATCH 06/54] docker-machine-xhyve: 0.3.3 -> 0.4.0 remove explicit dependencies, upstream vendorizes them properly --- .../cluster/docker-machine/xhyve-deps.nix | 21 ------------------- .../cluster/docker-machine/xhyve.nix | 5 ++--- 2 files changed, 2 insertions(+), 24 deletions(-) delete mode 100644 pkgs/applications/networking/cluster/docker-machine/xhyve-deps.nix diff --git a/pkgs/applications/networking/cluster/docker-machine/xhyve-deps.nix b/pkgs/applications/networking/cluster/docker-machine/xhyve-deps.nix deleted file mode 100644 index 99cb7b98f5c..00000000000 --- a/pkgs/applications/networking/cluster/docker-machine/xhyve-deps.nix +++ /dev/null @@ -1,21 +0,0 @@ -# This file was generated by https://github.com/kamilchm/go2nix v1.2.1 -[ - { - goPackagePath = "github.com/docker/machine"; - fetch = { - type = "git"; - url = "https://github.com/docker/machine"; - rev = "5b274558ea6ca822c06dd407a4e774a0105c3f60"; - sha256 = "1wdq9h4bx7awgclh969gvmcnl9jvgv7ldfklnclh5iv47mi7q22d"; - }; - } - { - goPackagePath = "github.com/zchee/libhyperkit"; - fetch = { - type = "git"; - url = "https://github.com/zchee/libhyperkit"; - rev = "1a19a7693fac32b46ec6cdd22da6fbec974447fc"; - sha256 = "119f5gcl24znwnmi837jk667asd3lirx32jldpd4mbyb3sm9nz24"; - }; - } -] diff --git a/pkgs/applications/networking/cluster/docker-machine/xhyve.nix b/pkgs/applications/networking/cluster/docker-machine/xhyve.nix index ae24f39adf8..d448d4ae8e7 100644 --- a/pkgs/applications/networking/cluster/docker-machine/xhyve.nix +++ b/pkgs/applications/networking/cluster/docker-machine/xhyve.nix @@ -2,16 +2,15 @@ buildGoPackage rec { pname = "docker-machine-xhyve"; - version = "0.3.3"; + version = "0.4.0"; goPackagePath = "github.com/zchee/docker-machine-driver-xhyve"; - goDeps = ./xhyve-deps.nix; src = fetchFromGitHub { rev = "v${version}"; owner = "machine-drivers"; repo = "docker-machine-driver-xhyve"; - sha256 = "0rj6pyqp4yv4j28bglqjs95rip5i77vv8mrkmqv1rxrsl3i8aqqy"; + sha256 = "0000v97fr8xc5b39v44hsa87wrbk4bcwyaaivxv4hxlf4vlgg863"; }; nativeBuildInputs = [ pkgconfig ]; From 08ecf22b0332de05b6b2290ef4bdac2e2ce10f34 Mon Sep 17 00:00:00 2001 From: Michael Roitzsch Date: Tue, 10 Dec 2019 12:00:39 +0100 Subject: [PATCH 07/54] docker-machine-xhyve: support lib9p shared file system The lib9p library for host-guest file sharing in xhyve needs to be built separately. --- .../networking/cluster/docker-machine/xhyve.nix | 9 ++++++++- pkgs/top-level/all-packages.nix | 1 + 2 files changed, 9 insertions(+), 1 deletion(-) diff --git a/pkgs/applications/networking/cluster/docker-machine/xhyve.nix b/pkgs/applications/networking/cluster/docker-machine/xhyve.nix index d448d4ae8e7..f9c7fbf6065 100644 --- a/pkgs/applications/networking/cluster/docker-machine/xhyve.nix +++ b/pkgs/applications/networking/cluster/docker-machine/xhyve.nix @@ -1,4 +1,4 @@ -{ stdenv, buildGoPackage, fetchFromGitHub, pkgconfig, Hypervisor, vmnet }: +{ stdenv, buildGoPackage, fetchFromGitHub, pkgconfig, cctools, Hypervisor, vmnet }: buildGoPackage rec { pname = "docker-machine-xhyve"; @@ -6,6 +6,13 @@ buildGoPackage rec { goPackagePath = "github.com/zchee/docker-machine-driver-xhyve"; + preBuild = '' + make -C go/src/${goPackagePath} CC=${stdenv.cc}/bin/cc LIBTOOL=${cctools}/bin/libtool GIT_CMD=: lib9p + export CGO_CFLAGS=-I$(pwd)/go/src/${goPackagePath}/vendor/github.com/jceel/lib9p + export CGO_LDFLAGS=$(pwd)/go/src/${goPackagePath}/vendor/build/lib9p/lib9p.a + ''; + buildFlags = "--tags lib9p"; + src = fetchFromGitHub { rev = "v${version}"; owner = "machine-drivers"; diff --git a/pkgs/top-level/all-packages.nix b/pkgs/top-level/all-packages.nix index fe1ebed12f2..0276ae63934 100644 --- a/pkgs/top-level/all-packages.nix +++ b/pkgs/top-level/all-packages.nix @@ -18373,6 +18373,7 @@ in docker-machine-kvm2 = callPackage ../applications/networking/cluster/docker-machine/kvm2.nix { }; docker-machine-xhyve = callPackage ../applications/networking/cluster/docker-machine/xhyve.nix { inherit (darwin.apple_sdk.frameworks) Hypervisor vmnet; + inherit (darwin) cctools; }; docker-distribution = callPackage ../applications/virtualization/docker/distribution.nix { }; From 338386b95d881175ec5e27dda07daccec525f84c Mon Sep 17 00:00:00 2001 From: Michael Roitzsch Date: Tue, 10 Dec 2019 12:02:28 +0100 Subject: [PATCH 08/54] docker-machine-xhyve: fix file mode inconsistencies File modes are not properly translated from L9P to host values. Instead, they are assumed to be identical, which is wrong on macOS. https://github.com/machine-drivers/docker-machine-driver-xhyve/pull/225 --- .../networking/cluster/docker-machine/xhyve.nix | 8 +++++++- 1 file changed, 7 insertions(+), 1 deletion(-) diff --git a/pkgs/applications/networking/cluster/docker-machine/xhyve.nix b/pkgs/applications/networking/cluster/docker-machine/xhyve.nix index f9c7fbf6065..1f1e59a56a4 100644 --- a/pkgs/applications/networking/cluster/docker-machine/xhyve.nix +++ b/pkgs/applications/networking/cluster/docker-machine/xhyve.nix @@ -1,4 +1,4 @@ -{ stdenv, buildGoPackage, fetchFromGitHub, pkgconfig, cctools, Hypervisor, vmnet }: +{ stdenv, buildGoPackage, fetchFromGitHub, fetchpatch, pkgconfig, cctools, Hypervisor, vmnet }: buildGoPackage rec { pname = "docker-machine-xhyve"; @@ -6,6 +6,12 @@ buildGoPackage rec { goPackagePath = "github.com/zchee/docker-machine-driver-xhyve"; + # https://github.com/machine-drivers/docker-machine-driver-xhyve/pull/225 + patches = fetchpatch { + url = "https://github.com/machine-drivers/docker-machine-driver-xhyve/commit/546256494bf2ccc33e4125bf45f504b0e3027d5a.patch"; + sha256 = "1i8wxqccqkxvqrbsyd0g9s0kdskd8xi2jv0c1bji9aj4rq0a8cgz"; + }; + preBuild = '' make -C go/src/${goPackagePath} CC=${stdenv.cc}/bin/cc LIBTOOL=${cctools}/bin/libtool GIT_CMD=: lib9p export CGO_CFLAGS=-I$(pwd)/go/src/${goPackagePath}/vendor/github.com/jceel/lib9p From 1e840fc421d3538404f041d7d3e61fb0f567e281 Mon Sep 17 00:00:00 2001 From: Linus Heckemann Date: Wed, 1 Jan 2020 20:37:38 +0100 Subject: [PATCH 09/54] rgl: fix build It seems that the dev output of libGLU needs to be included explicitly for this to work. I've also moved the libraries from nativeBuildInputs to buildInputs to be more semantically correct (and maybe support cross compilation, not tested though). --- pkgs/development/r-modules/default.nix | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/pkgs/development/r-modules/default.nix b/pkgs/development/r-modules/default.nix index 2019ee45f3c..5fa0cd15962 100644 --- a/pkgs/development/r-modules/default.nix +++ b/pkgs/development/r-modules/default.nix @@ -311,7 +311,6 @@ let rgdal = [ pkgs.proj.dev pkgs.gdal ]; rgeos = [ pkgs.geos ]; rggobi = [ pkgs.ggobi pkgs.gtk2.dev pkgs.libxml2.dev ]; - rgl = [ pkgs.libGLU pkgs.libGL pkgs.xlibsWrapper ]; Rglpk = [ pkgs.glpk ]; RGtk2 = [ pkgs.gtk2.dev ]; rhdf5 = [ pkgs.zlib ]; @@ -404,6 +403,7 @@ let RCurl = [ pkgs.curl.dev ]; R2SWF = [ pkgs.pkgconfig ]; rggobi = [ pkgs.pkgconfig ]; + rgl = [ pkgs.libGLU pkgs.libGLU.dev pkgs.libGL pkgs.xlibsWrapper ]; RGtk2 = [ pkgs.pkgconfig ]; RProtoBuf = [ pkgs.pkgconfig ]; Rpoppler = [ pkgs.pkgconfig ]; From 6d584c26143f68bf6963bc7fc5661e05d90f7ab7 Mon Sep 17 00:00:00 2001 From: Gabriel Gonzalez Date: Sun, 5 Jan 2020 13:03:00 -0800 Subject: [PATCH 10/54] Factor out a `toGNUCommandLine` utility ... as suggested by @roberth --- lib/cli.nix | 18 +++++++++++------- lib/tests/misc.nix | 2 +- 2 files changed, 12 insertions(+), 8 deletions(-) diff --git a/lib/cli.nix b/lib/cli.nix index b6703b2ca82..f47625d2f53 100644 --- a/lib/cli.nix +++ b/lib/cli.nix @@ -1,6 +1,7 @@ { lib }: -{ /* Automatically convert an attribute set to command-line options. +rec { + /* Automatically convert an attribute set to command-line options. This helps protect against malformed command lines and also to reduce boilerplate related to command-line construction for simple use cases. @@ -22,21 +23,24 @@ verbose = true; }; - => " -X 'PUT' --data '{\"id\":0}' --retry '3' --url 'https://example.com/foo' --url 'https://example.com/bar' --verbose" + => "'-X' 'PUT' '--data' '{\"id\":0}' '--retry' '3' '--url' 'https://example.com/foo' '--url' 'https://example.com/bar' '--verbose'" */ encodeGNUCommandLine = + options: attrs: lib.escapeShellArgs (toGNUCommandLine options attrs); + + toGNUCommandLine = { renderKey ? key: if builtins.stringLength key == 1 then "-${key}" else "--${key}" , renderOption ? key: value: if value == null - then "" - else " ${renderKey key} ${lib.escapeShellArg value}" + then [] + else [ (renderKey key) (builtins.toString value) ] - , renderBool ? key: value: if value then " ${renderKey key}" else "" + , renderBool ? key: value: lib.optional value (renderKey key) - , renderList ? key: value: lib.concatMapStrings (renderOption key) value + , renderList ? key: value: lib.concatMap (renderOption key) value }: options: let @@ -48,5 +52,5 @@ else renderOption key value; in - lib.concatStrings (lib.mapAttrsToList render options); + builtins.concatLists (lib.mapAttrsToList render options); } diff --git a/lib/tests/misc.nix b/lib/tests/misc.nix index 29c5fad91f9..e47b48b5017 100644 --- a/lib/tests/misc.nix +++ b/lib/tests/misc.nix @@ -460,6 +460,6 @@ runTests { verbose = true; }; - expected = " -X 'PUT' --data '{\"id\":0}' --retry '3' --url 'https://example.com/foo' --url 'https://example.com/bar' --verbose"; + expected = "'-X' 'PUT' '--data' '{\"id\":0}' '--retry' '3' '--url' 'https://example.com/foo' '--url' 'https://example.com/bar' '--verbose'"; }; } From a46679facd38ef7031ea3a79def60b98e384f155 Mon Sep 17 00:00:00 2001 From: Gabriel Gonzalez Date: Sun, 5 Jan 2020 14:44:42 -0800 Subject: [PATCH 11/54] Export toGNUCommandLine ... as suggested by @roberth Co-Authored-By: Robert Hensing --- lib/default.nix | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/lib/default.nix b/lib/default.nix index a7b00f01e0d..be7d118969e 100644 --- a/lib/default.nix +++ b/lib/default.nix @@ -121,7 +121,7 @@ let isOptionType mkOptionType; inherit (asserts) assertMsg assertOneOf; - inherit (cli) encodeGNUCommandLine; + inherit (cli) encodeGNUCommandLine toGNUCommandLine; inherit (debug) addErrorContextToAttrs traceIf traceVal traceValFn traceXMLVal traceXMLValMarked traceSeq traceSeqN traceValSeq traceValSeqFn traceValSeqN traceValSeqNFn traceShowVal From e57392dbc29ffbb88a8dbdced811e553291a9030 Mon Sep 17 00:00:00 2001 From: Dmitry Kalinkin Date: Tue, 7 Jan 2020 13:21:36 -0500 Subject: [PATCH 12/54] blender: switch to OpenJPEG 2.x Fixes: -- Could NOT find OpenJPEG (missing: OPENJPEG_LIBRARY OPENJPEG_INCLUDE_DIR) and - WITH_IMAGE_OPENJPEG OFF --- pkgs/applications/misc/blender/default.nix | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/pkgs/applications/misc/blender/default.nix b/pkgs/applications/misc/blender/default.nix index 0af78852204..92d3a81fb06 100644 --- a/pkgs/applications/misc/blender/default.nix +++ b/pkgs/applications/misc/blender/default.nix @@ -1,7 +1,7 @@ { config, stdenv, lib, fetchurl, boost, cmake, ffmpeg, gettext, glew , ilmbase, libXi, libX11, libXext, libXrender , libjpeg, libpng, libsamplerate, libsndfile -, libtiff, libGLU, libGL, openal, opencolorio, openexr, openimageio, openjpeg_1, python3Packages +, libtiff, libGLU, libGL, openal, opencolorio, openexr, openimageio, openjpeg, python3Packages , openvdb, libXxf86vm, tbb , zlib, fftw, opensubdiv, freetype, jemalloc, ocl-icd, addOpenGLRunpath , jackaudioSupport ? false, libjack2 @@ -28,7 +28,7 @@ stdenv.mkDerivation rec { [ boost ffmpeg gettext glew ilmbase libXi libX11 libXext libXrender freetype libjpeg libpng libsamplerate libsndfile libtiff libGLU libGL openal - opencolorio openexr openimageio openjpeg_1 python zlib fftw jemalloc + opencolorio openexr openimageio openjpeg python zlib fftw jemalloc (opensubdiv.override { inherit cudaSupport; }) openvdb libXxf86vm tbb makeWrapper From 95b8c8533197fd127f87955226ff1d4db24ae7ae Mon Sep 17 00:00:00 2001 From: Dmitry Kalinkin Date: Tue, 7 Jan 2020 20:32:16 -0500 Subject: [PATCH 13/54] openimageio: enable on darwin --- pkgs/applications/graphics/openimageio/default.nix | 1 - 1 file changed, 1 deletion(-) diff --git a/pkgs/applications/graphics/openimageio/default.nix b/pkgs/applications/graphics/openimageio/default.nix index c743f8bd653..23cad7e859d 100644 --- a/pkgs/applications/graphics/openimageio/default.nix +++ b/pkgs/applications/graphics/openimageio/default.nix @@ -39,6 +39,5 @@ stdenv.mkDerivation rec { license = licenses.bsd3; maintainers = [ maintainers.goibhniu ]; platforms = platforms.unix; - badPlatforms = [ "x86_64-darwin" ]; }; } From 2287d54e7dcdf647cb73b227e9f404ccc7cf3731 Mon Sep 17 00:00:00 2001 From: Dmitry Kalinkin Date: Tue, 7 Jan 2020 20:42:02 -0500 Subject: [PATCH 14/54] blender: fix on darwin This enables building of Blender.app. The standard build process assumes that the dependencies are installed in subdirectoris inside $LIBDIR with libraries built as static. In current implementation we are not looking to achieve portability, so cmake files are patched to link dynamically with the libraries in the nix store. Linking to the transitive dependencies is not needed in the shared case. There are also some minor inconsistensies in the expected paths, which also need to be patched. Alternatively, we could patch cmake files to treat darwin as "unix", but that would require more tweaking to ensure that the frameworks are being linked properly. --- pkgs/applications/misc/blender/darwin.patch | 105 ++++++++++++++++++++ pkgs/applications/misc/blender/default.nix | 56 +++++++++-- pkgs/top-level/all-packages.nix | 4 +- 3 files changed, 156 insertions(+), 9 deletions(-) create mode 100644 pkgs/applications/misc/blender/darwin.patch diff --git a/pkgs/applications/misc/blender/darwin.patch b/pkgs/applications/misc/blender/darwin.patch new file mode 100644 index 00000000000..43b96466df2 --- /dev/null +++ b/pkgs/applications/misc/blender/darwin.patch @@ -0,0 +1,105 @@ +diff a/build_files/cmake/platform/platform_apple.cmake b/build_files/cmake/platform/platform_apple.cmake +--- a/build_files/cmake/platform/platform_apple.cmake ++++ b/build_files/cmake/platform/platform_apple.cmake +@@ -35,7 +35,6 @@ else() + message(STATUS "Using pre-compiled LIBDIR: ${LIBDIR}") + endif() + if(NOT EXISTS "${LIBDIR}/") +- message(FATAL_ERROR "Mac OSX requires pre-compiled libs at: '${LIBDIR}'") + endif() + + if(WITH_OPENAL) +@@ -79,7 +78,7 @@ endif() + if(WITH_CODEC_SNDFILE) + set(LIBSNDFILE ${LIBDIR}/sndfile) + set(LIBSNDFILE_INCLUDE_DIRS ${LIBSNDFILE}/include) +- set(LIBSNDFILE_LIBRARIES sndfile FLAC ogg vorbis vorbisenc) ++ set(LIBSNDFILE_LIBRARIES sndfile) + set(LIBSNDFILE_LIBPATH ${LIBSNDFILE}/lib ${LIBDIR}/ffmpeg/lib) # TODO, deprecate + endif() + +@@ -90,7 +89,7 @@ if(WITH_PYTHON) + # normally cached but not since we include them with blender + set(PYTHON_INCLUDE_DIR "${LIBDIR}/python/include/python${PYTHON_VERSION}m") + set(PYTHON_EXECUTABLE "${LIBDIR}/python/bin/python${PYTHON_VERSION}m") +- set(PYTHON_LIBRARY ${LIBDIR}/python/lib/libpython${PYTHON_VERSION}m.a) ++ set(PYTHON_LIBRARY "${LIBDIR}/python/lib/libpython${PYTHON_VERSION}m.dylib") + set(PYTHON_LIBPATH "${LIBDIR}/python/lib/python${PYTHON_VERSION}") + # set(PYTHON_LINKFLAGS "-u _PyMac_Error") # won't build with this enabled + else() +@@ -155,10 +154,7 @@ if(WITH_CODEC_FFMPEG) + set(FFMPEG_INCLUDE_DIRS ${FFMPEG}/include) + set(FFMPEG_LIBRARIES + avcodec avdevice avformat avutil +- mp3lame swscale x264 xvidcore +- theora theoradec theoraenc +- vorbis vorbisenc vorbisfile ogg opus +- vpx swresample) ++ swscale swresample) + set(FFMPEG_LIBPATH ${FFMPEG}/lib) + endif() + +@@ -199,14 +195,14 @@ if(WITH_OPENCOLLADA) + set(OPENCOLLADA ${LIBDIR}/opencollada) + + set(OPENCOLLADA_INCLUDE_DIRS +- ${LIBDIR}/opencollada/include/COLLADAStreamWriter +- ${LIBDIR}/opencollada/include/COLLADABaseUtils +- ${LIBDIR}/opencollada/include/COLLADAFramework +- ${LIBDIR}/opencollada/include/COLLADASaxFrameworkLoader +- ${LIBDIR}/opencollada/include/GeneratedSaxParser ++ ${LIBDIR}/opencollada/include/opencollada/COLLADAStreamWriter ++ ${LIBDIR}/opencollada/include/opencollada/COLLADABaseUtils ++ ${LIBDIR}/opencollada/include/opencollada/COLLADAFramework ++ ${LIBDIR}/opencollada/include/opencollada/COLLADASaxFrameworkLoader ++ ${LIBDIR}/opencollada/include/opencollada/GeneratedSaxParser + ) + +- set(OPENCOLLADA_LIBPATH ${OPENCOLLADA}/lib) ++ set(OPENCOLLADA_LIBPATH ${OPENCOLLADA}/lib/opencollada) + set(OPENCOLLADA_LIBRARIES + OpenCOLLADASaxFrameworkLoader + -lOpenCOLLADAFramework +@@ -215,7 +211,7 @@ if(WITH_OPENCOLLADA) + -lMathMLSolver + -lGeneratedSaxParser + -lbuffer -lftoa -lUTF +- ${OPENCOLLADA_LIBPATH}/libxml2.a ++ xml2 + ) + # PCRE is bundled with openCollada + # set(PCRE ${LIBDIR}/pcre) +@@ -276,14 +272,13 @@ if(WITH_BOOST) + endif() + + if(WITH_INTERNATIONAL OR WITH_CODEC_FFMPEG) +- set(PLATFORM_LINKFLAGS "${PLATFORM_LINKFLAGS} -liconv") # boost_locale and ffmpeg needs it ! + endif() + + if(WITH_OPENIMAGEIO) + set(OPENIMAGEIO ${LIBDIR}/openimageio) + set(OPENIMAGEIO_INCLUDE_DIRS ${OPENIMAGEIO}/include) + set(OPENIMAGEIO_LIBRARIES +- ${OPENIMAGEIO}/lib/libOpenImageIO.a ++ ${OPENIMAGEIO}/lib/libOpenImageIO.dylib + ${PNG_LIBRARIES} + ${JPEG_LIBRARIES} + ${TIFF_LIBRARY} +@@ -306,7 +301,7 @@ endif() + if(WITH_OPENCOLORIO) + set(OPENCOLORIO ${LIBDIR}/opencolorio) + set(OPENCOLORIO_INCLUDE_DIRS ${OPENCOLORIO}/include) +- set(OPENCOLORIO_LIBRARIES OpenColorIO tinyxml yaml-cpp) ++ set(OPENCOLORIO_LIBRARIES OpenColorIO) + set(OPENCOLORIO_LIBPATH ${OPENCOLORIO}/lib) + endif() + +@@ -443,7 +438,7 @@ else() + set(CMAKE_CXX_FLAGS_RELEASE "-mdynamic-no-pic -fno-strict-aliasing") + endif() + +-if(${XCODE_VERSION} VERSION_EQUAL 5 OR ${XCODE_VERSION} VERSION_GREATER 5) ++if(FALSE) + # Xcode 5 is always using CLANG, which has too low template depth of 128 for libmv + set(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -ftemplate-depth=1024") + endif() diff --git a/pkgs/applications/misc/blender/default.nix b/pkgs/applications/misc/blender/default.nix index 92d3a81fb06..2c45de3b3fe 100644 --- a/pkgs/applications/misc/blender/default.nix +++ b/pkgs/applications/misc/blender/default.nix @@ -8,6 +8,7 @@ , cudaSupport ? config.cudaSupport or false, cudatoolkit , colladaSupport ? true, opencollada , enableNumpy ? false, makeWrapper +, pugixml, SDL, Cocoa, CoreGraphics, ForceFeedback, OpenAL, OpenGL }: with lib; @@ -23,22 +24,53 @@ stdenv.mkDerivation rec { sha256 = "1zl0ar95qkxsrbqw9miz2hrjijlqjl06vg3clfk9rm7krr2l3b2j"; }; + patches = lib.optional stdenv.isDarwin ./darwin.patch; + nativeBuildInputs = [ cmake ] ++ optional cudaSupport addOpenGLRunpath; buildInputs = [ boost ffmpeg gettext glew ilmbase - libXi libX11 libXext libXrender - freetype libjpeg libpng libsamplerate libsndfile libtiff libGLU libGL openal + freetype libjpeg libpng libsamplerate libsndfile libtiff opencolorio openexr openimageio openjpeg python zlib fftw jemalloc (opensubdiv.override { inherit cudaSupport; }) - openvdb libXxf86vm tbb + tbb makeWrapper ] + ++ (if (!stdenv.isDarwin) then [ + libXi libX11 libXext libXrender + libGLU libGL openal + libXxf86vm + # OpenVDB currently doesn't build on darwin + openvdb + ] + else [ + pugixml SDL Cocoa CoreGraphics ForceFeedback OpenAL OpenGL + ]) ++ optional jackaudioSupport libjack2 ++ optional cudaSupport cudatoolkit ++ optional colladaSupport opencollada; postPatch = - '' + if stdenv.isDarwin then '' + : > build_files/cmake/platform/platform_apple_xcode.cmake + substituteInPlace source/creator/CMakeLists.txt \ + --replace '${"$"}{LIBDIR}/python' \ + '${python}' + substituteInPlace build_files/cmake/platform/platform_apple.cmake \ + --replace '${"$"}{LIBDIR}/python' \ + '${python}' \ + --replace '${"$"}{LIBDIR}/opencollada' \ + '${opencollada}' \ + --replace '${"$"}{PYTHON_LIBPATH}/site-packages/numpy' \ + '${python3Packages.numpy}/${python.sitePackages}/numpy' \ + --replace 'set(OPENJPEG_INCLUDE_DIRS ' \ + 'set(OPENJPEG_INCLUDE_DIRS "'$(echo ${openjpeg.dev}/include/openjpeg-*)'") #' \ + --replace 'set(OPENJPEG_LIBRARIES ' \ + 'set(OPENJPEG_LIBRARIES "${openjpeg}/lib/libopenjp2.dylib") #' \ + --replace 'set(OPENIMAGEIO ' \ + 'set(OPENIMAGEIO "${openimageio.out}") #' \ + --replace 'set(OPENEXR_INCLUDE_DIRS ' \ + 'set(OPENEXR_INCLUDE_DIRS "${openexr.dev}/include/OpenEXR") #' + '' else '' substituteInPlace extern/clew/src/clew.c --replace '"libOpenCL.so"' '"${ocl-icd}/lib/libOpenCL.so"' ''; @@ -48,7 +80,7 @@ stdenv.mkDerivation rec { "-DWITH_CODEC_SNDFILE=ON" "-DWITH_INSTALL_PORTABLE=OFF" "-DWITH_FFTW3=ON" - #"-DWITH_SDL=ON" + "-DWITH_SDL=OFF" "-DWITH_OPENCOLORIO=ON" "-DWITH_OPENSUBDIV=ON" "-DPYTHON_LIBRARY=${python.libPrefix}m" @@ -61,10 +93,18 @@ stdenv.mkDerivation rec { "-DWITH_OPENVDB=ON" "-DWITH_TBB=ON" "-DWITH_IMAGE_OPENJPEG=ON" + "-DWITH_OPENCOLLADA=${if colladaSupport then "ON" else "OFF"}" ] + ++ optionals stdenv.isDarwin [ + "-DWITH_CYCLES_OSL=OFF" # requires LLVM + "-DWITH_OPENVDB=OFF" # OpenVDB currently doesn't build on darwin + + "-DLIBDIR=/does-not-exist" + ] + # Clang doesn't support "-export-dynamic" + ++ optional stdenv.cc.isClang "-DPYTHON_LINKFLAGS=" ++ optional jackaudioSupport "-DWITH_JACK=ON" - ++ optional cudaSupport "-DWITH_CYCLES_CUDA_BINARIES=ON" - ++ optional colladaSupport "-DWITH_OPENCOLLADA=ON"; + ++ optional cudaSupport "-DWITH_CYCLES_CUDA_BINARIES=ON"; NIX_CFLAGS_COMPILE = "-I${ilmbase.dev}/include/OpenEXR -I${python}/include/${python.libPrefix}"; @@ -95,7 +135,7 @@ stdenv.mkDerivation rec { # They comment two licenses: GPLv2 and Blender License, but they # say: "We've decided to cancel the BL offering for an indefinite period." license = licenses.gpl2Plus; - platforms = [ "x86_64-linux" ]; + platforms = [ "x86_64-linux" "x86_64-darwin" ]; maintainers = [ maintainers.goibhniu ]; }; } diff --git a/pkgs/top-level/all-packages.nix b/pkgs/top-level/all-packages.nix index 906617b9218..d7a6b5d75d6 100644 --- a/pkgs/top-level/all-packages.nix +++ b/pkgs/top-level/all-packages.nix @@ -18210,7 +18210,9 @@ in bleachbit = callPackage ../applications/misc/bleachbit { }; - blender = callPackage ../applications/misc/blender { }; + blender = callPackage ../applications/misc/blender { + inherit (darwin.apple_sdk.frameworks) Cocoa CoreGraphics ForceFeedback OpenAL OpenGL; + }; bluefish = callPackage ../applications/editors/bluefish { gtk = gtk3; From 8aa0e2fe1dca75e39582a633d1e7f41e20cf750a Mon Sep 17 00:00:00 2001 From: Dmitry Kalinkin Date: Fri, 10 Jan 2020 13:55:49 -0500 Subject: [PATCH 15/54] blender: switch from openimageio to openimageio2 --- pkgs/applications/misc/blender/default.nix | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/pkgs/applications/misc/blender/default.nix b/pkgs/applications/misc/blender/default.nix index 2c45de3b3fe..83f2bf63642 100644 --- a/pkgs/applications/misc/blender/default.nix +++ b/pkgs/applications/misc/blender/default.nix @@ -1,7 +1,7 @@ { config, stdenv, lib, fetchurl, boost, cmake, ffmpeg, gettext, glew , ilmbase, libXi, libX11, libXext, libXrender , libjpeg, libpng, libsamplerate, libsndfile -, libtiff, libGLU, libGL, openal, opencolorio, openexr, openimageio, openjpeg, python3Packages +, libtiff, libGLU, libGL, openal, opencolorio, openexr, openimageio2, openjpeg, python3Packages , openvdb, libXxf86vm, tbb , zlib, fftw, opensubdiv, freetype, jemalloc, ocl-icd, addOpenGLRunpath , jackaudioSupport ? false, libjack2 @@ -30,7 +30,7 @@ stdenv.mkDerivation rec { buildInputs = [ boost ffmpeg gettext glew ilmbase freetype libjpeg libpng libsamplerate libsndfile libtiff - opencolorio openexr openimageio openjpeg python zlib fftw jemalloc + opencolorio openexr openimageio2 openjpeg python zlib fftw jemalloc (opensubdiv.override { inherit cudaSupport; }) tbb makeWrapper @@ -67,7 +67,7 @@ stdenv.mkDerivation rec { --replace 'set(OPENJPEG_LIBRARIES ' \ 'set(OPENJPEG_LIBRARIES "${openjpeg}/lib/libopenjp2.dylib") #' \ --replace 'set(OPENIMAGEIO ' \ - 'set(OPENIMAGEIO "${openimageio.out}") #' \ + 'set(OPENIMAGEIO "${openimageio2.out}") #' \ --replace 'set(OPENEXR_INCLUDE_DIRS ' \ 'set(OPENEXR_INCLUDE_DIRS "${openexr.dev}/include/OpenEXR") #' '' else '' From 669318bd0268d56636df95db2692e8f27510840e Mon Sep 17 00:00:00 2001 From: Pass Automated Testing Suite Date: Mon, 13 Jan 2020 09:00:25 -0800 Subject: [PATCH 16/54] Disable further pass tests that end up relying on gpg-agent on Darwin Fixes #58975 --- pkgs/tools/security/pass/default.nix | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/pkgs/tools/security/pass/default.nix b/pkgs/tools/security/pass/default.nix index 5d0e94bc803..54a8f4de7d7 100644 --- a/pkgs/tools/security/pass/default.nix +++ b/pkgs/tools/security/pass/default.nix @@ -111,6 +111,12 @@ let '' + stdenv.lib.optionalString stdenv.isDarwin '' # 'pass edit' uses hdid, which is not available from the sandbox. rm -f tests/t0200-edit-tests.sh + rm -f tests/t0010-generate-tests.sh + rm -f tests/t0020-show-tests.sh + rm -f tests/t0050-mv-tests.sh + rm -f tests/t0100-insert-tests.sh + rm -f tests/t0300-reencryption.sh + rm -f tests/t0400-grep.sh ''; doCheck = false; From cc4b59f138491700bbb1588b161ad0319c67ff17 Mon Sep 17 00:00:00 2001 From: Markus Kowalewski Date: Mon, 13 Jan 2020 21:47:57 +0100 Subject: [PATCH 17/54] soapysdr: 0.7.1 -> 0.7.2 --- pkgs/applications/radio/soapysdr/default.nix | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/pkgs/applications/radio/soapysdr/default.nix b/pkgs/applications/radio/soapysdr/default.nix index c4879f01e60..e072ec97b97 100644 --- a/pkgs/applications/radio/soapysdr/default.nix +++ b/pkgs/applications/radio/soapysdr/default.nix @@ -8,7 +8,7 @@ let - version = "0.7.1"; + version = "0.7.2"; modulesVersion = with lib; versions.major version + "." + versions.minor version; modulesPath = "lib/SoapySDR/modules" + modulesVersion; extraPackagesSearchPath = lib.makeSearchPath modulesPath extraPackages; @@ -21,7 +21,7 @@ in stdenv.mkDerivation { owner = "pothosware"; repo = "SoapySDR"; rev = "soapy-sdr-${version}"; - sha256 = "1rbnd3w12kzsh94fiywyn4vch7h0kf75m88fi6nq992b3vnmiwvl"; + sha256 = "102wnpjxrwba20pzdh1vvx0yg1h8vqd8z914idxflg9p14r6v5am"; }; nativeBuildInputs = [ cmake makeWrapper pkgconfig ]; From e1e61f31a3b0f5521c0242590d672615c83dc061 Mon Sep 17 00:00:00 2001 From: Florian Klink Date: Mon, 13 Jan 2020 21:49:18 +0100 Subject: [PATCH 18/54] gitaly: a4b6c71d4b7c1588587345e2dfe0c6bd7cc63a83 -> 1.77.1 --- .../version-management/gitlab/gitaly/default.nix | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/pkgs/applications/version-management/gitlab/gitaly/default.nix b/pkgs/applications/version-management/gitlab/gitaly/default.nix index 97d7404de8b..a4b4540e87a 100644 --- a/pkgs/applications/version-management/gitlab/gitaly/default.nix +++ b/pkgs/applications/version-management/gitlab/gitaly/default.nix @@ -17,14 +17,14 @@ let }; }; in buildGoPackage rec { - version = "a4b6c71d4b7c1588587345e2dfe0c6bd7cc63a83"; + version = "1.77.1"; pname = "gitaly"; src = fetchFromGitLab { owner = "gitlab-org"; repo = "gitaly"; - rev = version; - sha256 = "1pxmhq1nrc8q2kk83bz5afx14hshqgzqm6j4vgmyjvbmdvgl80wv"; + rev = "v${version}"; + sha256 = "08xc9lxlvga36yq1wdvb1h4zk70c36qspyd7azhkw84kzwfrif1c"; }; # Fix a check which assumes that hook files are writeable by their From 57560cc028b9a612890e83ecbee15da96cd98d20 Mon Sep 17 00:00:00 2001 From: Florian Klink Date: Mon, 13 Jan 2020 21:49:34 +0100 Subject: [PATCH 19/54] gitlab: 12.6.2 -> 12.6.4 --- pkgs/applications/version-management/gitlab/data.json | 8 ++++---- .../version-management/gitlab/rubyEnv/Gemfile | 2 +- .../version-management/gitlab/rubyEnv/Gemfile.lock | 8 ++++---- .../version-management/gitlab/rubyEnv/gemset.nix | 8 ++++---- 4 files changed, 13 insertions(+), 13 deletions(-) diff --git a/pkgs/applications/version-management/gitlab/data.json b/pkgs/applications/version-management/gitlab/data.json index be7f0afdc77..3f1aef360ba 100644 --- a/pkgs/applications/version-management/gitlab/data.json +++ b/pkgs/applications/version-management/gitlab/data.json @@ -1,11 +1,11 @@ { - "version": "12.6.2", - "repo_hash": "0bchamvr3f0ph49f7xa76gsp2mjj1ajy4q0wy1hjvr9bayxx94av", + "version": "12.6.4", + "repo_hash": "0jsww785bxvjdrp1wsz6zkvx9zr69j24bway6nfyjkz8a7vbl9ls", "owner": "gitlab-org", "repo": "gitlab", - "rev": "v12.6.2-ee", + "rev": "v12.6.4-ee", "passthru": { - "GITALY_SERVER_VERSION": "a4b6c71d4b7c1588587345e2dfe0c6bd7cc63a83", + "GITALY_SERVER_VERSION": "1.77.1", "GITLAB_PAGES_VERSION": "1.12.0", "GITLAB_SHELL_VERSION": "10.3.0", "GITLAB_WORKHORSE_VERSION": "8.18.0" diff --git a/pkgs/applications/version-management/gitlab/rubyEnv/Gemfile b/pkgs/applications/version-management/gitlab/rubyEnv/Gemfile index b6f57297c07..2c4a5f2e816 100644 --- a/pkgs/applications/version-management/gitlab/rubyEnv/Gemfile +++ b/pkgs/applications/version-management/gitlab/rubyEnv/Gemfile @@ -327,7 +327,7 @@ group :metrics do gem 'influxdb', '~> 0.2', require: false # Prometheus - gem 'prometheus-client-mmap', '~> 0.9.10' + gem 'prometheus-client-mmap', '~> 0.10.0' gem 'raindrops', '~> 0.18' end diff --git a/pkgs/applications/version-management/gitlab/rubyEnv/Gemfile.lock b/pkgs/applications/version-management/gitlab/rubyEnv/Gemfile.lock index 0e322705862..57e428ca955 100644 --- a/pkgs/applications/version-management/gitlab/rubyEnv/Gemfile.lock +++ b/pkgs/applications/version-management/gitlab/rubyEnv/Gemfile.lock @@ -531,8 +531,8 @@ GEM regexp_parser (~> 1.1) regexp_property_values (~> 0.3) json (1.8.6) - json-jwt (1.9.4) - activesupport + json-jwt (1.11.0) + activesupport (>= 4.2) aes_key_wrap bindata json-schema (2.8.0) @@ -746,7 +746,7 @@ GEM parser unparser procto (0.0.3) - prometheus-client-mmap (0.9.10) + prometheus-client-mmap (0.10.0) pry (0.11.3) coderay (~> 1.1.0) method_source (~> 0.9.0) @@ -1283,7 +1283,7 @@ DEPENDENCIES peek (~> 1.1) pg (~> 1.1) premailer-rails (~> 1.10.3) - prometheus-client-mmap (~> 0.9.10) + prometheus-client-mmap (~> 0.10.0) pry-byebug (~> 3.5.1) pry-rails (~> 0.3.4) rack (~> 2.0.7) diff --git a/pkgs/applications/version-management/gitlab/rubyEnv/gemset.nix b/pkgs/applications/version-management/gitlab/rubyEnv/gemset.nix index 55cdfaa16b9..854178ffbe3 100644 --- a/pkgs/applications/version-management/gitlab/rubyEnv/gemset.nix +++ b/pkgs/applications/version-management/gitlab/rubyEnv/gemset.nix @@ -2326,10 +2326,10 @@ platforms = []; source = { remotes = ["https://rubygems.org"]; - sha256 = "065k7vffdki73f4nz89lxi6wxmcw5dlf593831pgvlbralll6x3r"; + sha256 = "18rf9v20i0dk5dblr7m22di959xpch2h7gsx0cl585cryr7apwp3"; type = "gem"; }; - version = "1.9.4"; + version = "1.11.0"; }; json-schema = { dependencies = ["addressable"]; @@ -3365,10 +3365,10 @@ platforms = []; source = { remotes = ["https://rubygems.org"]; - sha256 = "0immyg4as0isyj2dcjf44n0avg1jv5kx1qk0asrgb5ayzwmjqg1k"; + sha256 = "00d2c79xhz5k3fcclarjr1ffxbrvc6236f4rrvriad9kwqr7c1mp"; type = "gem"; }; - version = "0.9.10"; + version = "0.10.0"; }; pry = { dependencies = ["coderay" "method_source"]; From e664a142bf0e01d0f68c4e5e8c964214506a65d1 Mon Sep 17 00:00:00 2001 From: Markus Kowalewski Date: Mon, 13 Jan 2020 22:42:56 +0100 Subject: [PATCH 20/54] snapper: 0.8.7 -> 8.8.8 --- pkgs/tools/misc/snapper/default.nix | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/pkgs/tools/misc/snapper/default.nix b/pkgs/tools/misc/snapper/default.nix index 466a5f3faf1..283503f2878 100644 --- a/pkgs/tools/misc/snapper/default.nix +++ b/pkgs/tools/misc/snapper/default.nix @@ -5,13 +5,13 @@ stdenv.mkDerivation rec { pname = "snapper"; - version = "0.8.7"; + version = "0.8.8"; src = fetchFromGitHub { owner = "openSUSE"; repo = "snapper"; rev = "v${version}"; - sha256 = "0605j4f3plb6q8lwf82y2jhply6dwj49jgxk8j16wsbf5k7lqzfq"; + sha256 = "0wpf82xf61r9r20whhb83wk3408wac1if8awqm3bb36b9j7ni5jr"; }; nativeBuildInputs = [ From 32b5c579b069524514bad8551c6ef49cff992afb Mon Sep 17 00:00:00 2001 From: Jonathan Ringer Date: Mon, 13 Jan 2020 14:27:30 -0800 Subject: [PATCH 21/54] azure-cli: 2.0.79 -> 2.0.80 --- pkgs/tools/admin/azure-cli/default.nix | 4 ++-- pkgs/tools/admin/azure-cli/python-packages.nix | 4 ++-- 2 files changed, 4 insertions(+), 4 deletions(-) diff --git a/pkgs/tools/admin/azure-cli/default.nix b/pkgs/tools/admin/azure-cli/default.nix index 1a492c41aee..cc793f8300d 100644 --- a/pkgs/tools/admin/azure-cli/default.nix +++ b/pkgs/tools/admin/azure-cli/default.nix @@ -1,12 +1,12 @@ { stdenv, lib, python, fetchFromGitHub, installShellFiles }: let - version = "2.0.79"; + version = "2.0.80"; src = fetchFromGitHub { owner = "Azure"; repo = "azure-cli"; rev = "azure-cli-${version}"; - sha256 = "0fzpq5fnqxkjghsjk4hi3jng5lgywpvj3fzb5sb7nb7ymvkvhad2"; + sha256 = "05j74cfxjpi3w79w0i5av3h2m81bavbsc581vvh773ixivndds1k"; }; # put packages that needs to be overriden in the py package scope diff --git a/pkgs/tools/admin/azure-cli/python-packages.nix b/pkgs/tools/admin/azure-cli/python-packages.nix index ac0e633cb96..290800e4226 100644 --- a/pkgs/tools/admin/azure-cli/python-packages.nix +++ b/pkgs/tools/admin/azure-cli/python-packages.nix @@ -207,8 +207,8 @@ let azure-mgmt-authorization = overrideAzureMgmtPackage super.azure-mgmt-authorization "0.52.0" "zip" "0357laxgldb7lvvws81r8xb6mrq9dwwnr1bnwdnyj4bw6p21i9hn"; - azure-mgmt-storage = overrideAzureMgmtPackage super.azure-mgmt-storage "7.0.0" "zip" - "01f17fb1myskj72zarc67i1sxfvk66lid9zn12gwjrz2vqc6npkz"; + azure-mgmt-storage = overrideAzureMgmtPackage super.azure-mgmt-storage "7.1.0" "zip" + "03yjvw1dwkwsadsv60i625mr9zpdryy7ywvh7p8fg60djszh1p5l"; azure-mgmt-servicefabric = overrideAzureMgmtPackage super.azure-mgmt-servicefabric "0.2.0" "zip" "1bcq6fcgrsvmk6q7v8mxzn1180jm2qijdqkqbv1m117zp1wj5gxj"; From 2becf7ffedb32d1246aab87cb0f0aa4086e7683f Mon Sep 17 00:00:00 2001 From: taku0 Date: Tue, 14 Jan 2020 15:13:06 +0900 Subject: [PATCH 22/54] flashplayer: 32.0.0.303 -> 32.0.0.314 --- .../networking/browsers/chromium/plugins.nix | 4 ++-- .../browsers/mozilla-plugins/flashplayer/default.nix | 10 +++++----- .../mozilla-plugins/flashplayer/standalone.nix | 6 +++--- 3 files changed, 10 insertions(+), 10 deletions(-) diff --git a/pkgs/applications/networking/browsers/chromium/plugins.nix b/pkgs/applications/networking/browsers/chromium/plugins.nix index ef0b5ac0eb6..c4a09c8063d 100644 --- a/pkgs/applications/networking/browsers/chromium/plugins.nix +++ b/pkgs/applications/networking/browsers/chromium/plugins.nix @@ -45,11 +45,11 @@ let flash = stdenv.mkDerivation rec { pname = "flashplayer-ppapi"; - version = "32.0.0.303"; + version = "32.0.0.314"; src = fetchzip { url = "https://fpdownload.adobe.com/pub/flashplayer/pdc/${version}/flash_player_ppapi_linux.x86_64.tar.gz"; - sha256 = "0b2cw8y9rif2p0lyy2ir1v5lchxlsh543b9c743a2p85c9p7q62b"; + sha256 = "05xcscpzglpfpiiqc3ngs5snxli99irjk18g5vdhw91jk9808gnl"; stripRoot = false; }; diff --git a/pkgs/applications/networking/browsers/mozilla-plugins/flashplayer/default.nix b/pkgs/applications/networking/browsers/mozilla-plugins/flashplayer/default.nix index 7e3705a3b0b..5ecb6bfb076 100644 --- a/pkgs/applications/networking/browsers/mozilla-plugins/flashplayer/default.nix +++ b/pkgs/applications/networking/browsers/mozilla-plugins/flashplayer/default.nix @@ -74,7 +74,7 @@ let in stdenv.mkDerivation rec { pname = "flashplayer"; - version = "32.0.0.303"; + version = "32.0.0.314"; src = fetchurl { url = @@ -85,14 +85,14 @@ stdenv.mkDerivation rec { sha256 = if debug then if arch == "x86_64" then - "05hfc5ywmcvp6zf8aqmzjp3qy3byp0zdl0ssrv9gvzcskdqkhsj2" + "076l93wjcy15sic88cyq6msp87gdhcvbk4ym2vbvvjz2bav2z456" else - "12hl8lvxz648ha70gi3v85mwf0nnayjiaslr669vjan3ww94jymv" + "0kxr8d6fh00akqgk3lwv0z6rk7xswislicsbh9b9p33f19mj7c8a" else if arch == "x86_64" then - "0x0mabgswly2v8z13832pkbjsv404aq61pback6sgmp2lyycdg6w" + "0a3hvp0qmqlann8k875ajf0i70cv0an1a3mr8kbgji46dxqvwjxz" else - "16kbpf1i3aqlrfbfh5ncg1n46ncl9hp6qdp36s5j3ivbc68pj81z"; + "0jyywas2z7ssgzng82qgnp01gy6nccqavkbx9529m07xrclvqbxn"; }; nativeBuildInputs = [ unzip ]; diff --git a/pkgs/applications/networking/browsers/mozilla-plugins/flashplayer/standalone.nix b/pkgs/applications/networking/browsers/mozilla-plugins/flashplayer/standalone.nix index 28b4c8a36c9..353aff7e707 100644 --- a/pkgs/applications/networking/browsers/mozilla-plugins/flashplayer/standalone.nix +++ b/pkgs/applications/networking/browsers/mozilla-plugins/flashplayer/standalone.nix @@ -50,7 +50,7 @@ stdenv.mkDerivation { pname = "flashplayer-standalone"; - version = "32.0.0.303"; + version = "32.0.0.314"; src = fetchurl { url = @@ -60,9 +60,9 @@ stdenv.mkDerivation { "https://fpdownload.macromedia.com/pub/flashplayer/updaters/32/flash_player_sa_linux.x86_64.tar.gz"; sha256 = if debug then - "0xkzlv90lpyy54j6pllknrp1l9vjyh6dsl63l4c8cgh4i830gi14" + "0zlin94rip13rn58m7v5l6m20ylnw59l77rbg5j5qyxkr53zawdz" else - "0mi3ggv6zhzmdd1h68cgl87n6izhp0pbkhnidd2gl2cp95f23c2d"; + "0pfrm02iwa01pqx3adqj0sw27p1ddlz9knjky6x248ak8zywsqr2"; }; nativeBuildInputs = [ unzip ]; From f03b8332841ee40e6382bc5bdd5ed15107e2db75 Mon Sep 17 00:00:00 2001 From: Nikolay Korotkiy Date: Fri, 27 Dec 2019 14:31:15 +0300 Subject: [PATCH 23/54] osmctools: 0.8.5plus1.4.0 -> 0.9 --- pkgs/applications/misc/osmctools/default.nix | 49 ++++++-------------- 1 file changed, 15 insertions(+), 34 deletions(-) diff --git a/pkgs/applications/misc/osmctools/default.nix b/pkgs/applications/misc/osmctools/default.nix index 2dfbb7a2370..c03e57920da 100644 --- a/pkgs/applications/misc/osmctools/default.nix +++ b/pkgs/applications/misc/osmctools/default.nix @@ -1,46 +1,27 @@ -{ stdenv, fetchurl, zlib } : +{ stdenv, fetchFromGitLab, autoreconfHook, zlib }: -let - - convert_src = fetchurl { - url = http://m.m.i24.cc/osmconvert.c; - sha256 = "1mvmb171c1jqxrm80jc7qicwk4kgg7yq694n7ci65g6i284r984x"; - # version = 0.8.5 - }; - - filter_src = fetchurl { - url = http://m.m.i24.cc/osmfilter.c; - sha256 = "0vm3bls9jb2cb5b11dn82sxnc22qzkf4ghmnkivycigrwa74i6xl"; - # version = 1.4.0 - }; - -in - -stdenv.mkDerivation { +stdenv.mkDerivation rec { pname = "osmctools"; - version = "0.8.5plus1.4.0"; + version = "0.9"; + src = fetchFromGitLab { + owner = "osm-c-tools"; + repo = pname; + rev = version; + sha256 = "1m8d3r1q1v05pkr8k9czrmb4xjszw6hvgsf3kn9pf0v14gpn4r8f"; + }; + + nativeBuildInputs = [ autoreconfHook ]; buildInputs = [ zlib ]; - phases = [ "buildPhase" "installPhase" ]; - - buildPhase = '' - cc ${convert_src} -lz -O3 -o osmconvert - cc ${filter_src} -O3 -o osmfilter - ''; - - installPhase = '' - mkdir -p $out/bin - mv osmconvert $out/bin - mv osmfilter $out/bin - ''; - meta = with stdenv.lib; { description = "Command line tools for transforming Open Street Map files"; homepage = [ - https://wiki.openstreetmap.org/wiki/Osmconvert - https://wiki.openstreetmap.org/wiki/Osmfilter + https://wiki.openstreetmap.org/wiki/osmconvert + https://wiki.openstreetmap.org/wiki/osmfilter + https://wiki.openstreetmap.org/wiki/osmupdate ]; + maintainers = with maintainers; [ sikmir ]; platforms = platforms.unix; license = licenses.agpl3; }; From 7f69fdd182ef28ae049417a2a41153640ac185c6 Mon Sep 17 00:00:00 2001 From: Jacek Galowicz Date: Tue, 14 Jan 2020 10:10:45 +0100 Subject: [PATCH 24/54] nixos/transmission: Fix module code --- nixos/modules/services/torrent/transmission.nix | 16 ++++++++++------ 1 file changed, 10 insertions(+), 6 deletions(-) diff --git a/nixos/modules/services/torrent/transmission.nix b/nixos/modules/services/torrent/transmission.nix index aa1acdf7d20..5ba72e8d773 100644 --- a/nixos/modules/services/torrent/transmission.nix +++ b/nixos/modules/services/torrent/transmission.nix @@ -129,19 +129,23 @@ in # It's useful to have transmission in path, e.g. for remote control environment.systemPackages = [ pkgs.transmission ]; - users.users = optionalAttrs (cfg.user == "transmission") (singleton - { name = "transmission"; + users.users = optionalAttrs (cfg.user == "transmission") ({ + transmission = { + name = "transmission"; group = cfg.group; uid = config.ids.uids.transmission; description = "Transmission BitTorrent user"; home = homeDir; createHome = true; - }); + }; + }); - users.groups = optionalAttrs (cfg.group == "transmission") (singleton - { name = "transmission"; + users.groups = optionalAttrs (cfg.group == "transmission") ({ + transmission = { + name = "transmission"; gid = config.ids.gids.transmission; - }); + }; + }); # AppArmor profile security.apparmor.profiles = mkIf apparmor [ From e1b1f5a484f8f28d6b700a1872b2bddbbf6bf50e Mon Sep 17 00:00:00 2001 From: Jacek Galowicz Date: Tue, 14 Jan 2020 10:11:57 +0100 Subject: [PATCH 25/54] nixosTests.bittorrent: Fix declarative httpd description --- nixos/tests/bittorrent.nix | 8 ++++++-- 1 file changed, 6 insertions(+), 2 deletions(-) diff --git a/nixos/tests/bittorrent.nix b/nixos/tests/bittorrent.nix index e5be652c711..6889d4548b7 100644 --- a/nixos/tests/bittorrent.nix +++ b/nixos/tests/bittorrent.nix @@ -38,8 +38,12 @@ in # We need Apache on the tracker to serve the torrents. services.httpd.enable = true; - services.httpd.adminAddr = "foo@example.org"; - services.httpd.documentRoot = "/tmp"; + services.httpd.virtualHosts = { + "torrentserver.org" = { + adminAddr = "foo@example.org"; + documentRoot = "/tmp"; + }; + }; networking.firewall.enable = false; From adf5642ba656a54e482fb5ad427b6c98d0c4cc50 Mon Sep 17 00:00:00 2001 From: Jacek Galowicz Date: Tue, 14 Jan 2020 10:18:58 +0100 Subject: [PATCH 26/54] nixosTests.bittorrent: Refactor declarative part --- nixos/tests/bittorrent.nix | 159 ++++++++++++++++++------------------- 1 file changed, 78 insertions(+), 81 deletions(-) diff --git a/nixos/tests/bittorrent.nix b/nixos/tests/bittorrent.nix index 6889d4548b7..0a97d5556a2 100644 --- a/nixos/tests/bittorrent.nix +++ b/nixos/tests/bittorrent.nix @@ -18,6 +18,17 @@ let externalRouterAddress = "80.100.100.1"; externalClient2Address = "80.100.100.2"; externalTrackerAddress = "80.100.100.3"; + + transmissionConfig = { ... }: { + environment.systemPackages = [ pkgs.transmission ]; + services.transmission = { + enable = true; + settings = { + dht-enabled = false; + message-level = 3; + }; + }; + }; in { @@ -26,92 +37,79 @@ in maintainers = [ domenkozar eelco rob bobvanderlinden ]; }; - nodes = - { tracker = - { pkgs, ... }: - { environment.systemPackages = [ pkgs.transmission ]; + nodes = { + tracker = { pkgs, ... }: { + imports = [ transmissionConfig ]; - virtualisation.vlans = [ 1 ]; - networking.interfaces.eth1.ipv4.addresses = [ - { address = externalTrackerAddress; prefixLength = 24; } - ]; + virtualisation.vlans = [ 1 ]; + networking.firewall.enable = false; + networking.interfaces.eth1.ipv4.addresses = [ + { address = externalTrackerAddress; prefixLength = 24; } + ]; - # We need Apache on the tracker to serve the torrents. - services.httpd.enable = true; - services.httpd.virtualHosts = { - "torrentserver.org" = { - adminAddr = "foo@example.org"; - documentRoot = "/tmp"; - }; - }; - - networking.firewall.enable = false; - - services.opentracker.enable = true; - - services.transmission.enable = true; - services.transmission.settings.dht-enabled = false; - services.transmission.settings.port-forwaring-enabled = false; - }; - - router = - { pkgs, nodes, ... }: - { virtualisation.vlans = [ 1 2 ]; - networking.nat.enable = true; - networking.nat.internalInterfaces = [ "eth2" ]; - networking.nat.externalInterface = "eth1"; - networking.firewall.enable = true; - networking.firewall.trustedInterfaces = [ "eth2" ]; - networking.interfaces.eth0.ipv4.addresses = []; - networking.interfaces.eth1.ipv4.addresses = [ - { address = externalRouterAddress; prefixLength = 24; } - ]; - networking.interfaces.eth2.ipv4.addresses = [ - { address = internalRouterAddress; prefixLength = 24; } - ]; - services.miniupnpd = { - enable = true; - externalInterface = "eth1"; - internalIPs = [ "eth2" ]; - appendConfig = '' - ext_ip=${externalRouterAddress} - ''; + # We need Apache on the tracker to serve the torrents. + services.httpd = { + enable = true; + virtualHosts = { + "torrentserver.org" = { + adminAddr = "foo@example.org"; + documentRoot = "/tmp"; }; }; - - client1 = - { pkgs, nodes, ... }: - { environment.systemPackages = [ pkgs.transmission pkgs.miniupnpc ]; - virtualisation.vlans = [ 2 ]; - networking.interfaces.eth0.ipv4.addresses = []; - networking.interfaces.eth1.ipv4.addresses = [ - { address = internalClient1Address; prefixLength = 24; } - ]; - networking.defaultGateway = internalRouterAddress; - networking.firewall.enable = false; - services.transmission.enable = true; - services.transmission.settings.dht-enabled = false; - services.transmission.settings.message-level = 3; - }; - - client2 = - { pkgs, ... }: - { environment.systemPackages = [ pkgs.transmission ]; - virtualisation.vlans = [ 1 ]; - networking.interfaces.eth0.ipv4.addresses = []; - networking.interfaces.eth1.ipv4.addresses = [ - { address = externalClient2Address; prefixLength = 24; } - ]; - networking.firewall.enable = false; - services.transmission.enable = true; - services.transmission.settings.dht-enabled = false; - services.transmission.settings.port-forwaring-enabled = false; - }; + }; + services.opentracker.enable = true; }; - testScript = - { nodes, ... }: - '' + router = { pkgs, nodes, ... }: { + virtualisation.vlans = [ 1 2 ]; + networking.nat.enable = true; + networking.nat.internalInterfaces = [ "eth2" ]; + networking.nat.externalInterface = "eth1"; + networking.firewall.enable = true; + networking.firewall.trustedInterfaces = [ "eth2" ]; + networking.interfaces.eth0.ipv4.addresses = []; + networking.interfaces.eth1.ipv4.addresses = [ + { address = externalRouterAddress; prefixLength = 24; } + ]; + networking.interfaces.eth2.ipv4.addresses = [ + { address = internalRouterAddress; prefixLength = 24; } + ]; + services.miniupnpd = { + enable = true; + externalInterface = "eth1"; + internalIPs = [ "eth2" ]; + appendConfig = '' + ext_ip=${externalRouterAddress} + ''; + }; + }; + + client1 = { pkgs, nodes, ... }: { + imports = [ transmissionConfig ]; + environment.systemPackages = [ pkgs.miniupnpc ]; + + virtualisation.vlans = [ 2 ]; + networking.interfaces.eth0.ipv4.addresses = []; + networking.interfaces.eth1.ipv4.addresses = [ + { address = internalClient1Address; prefixLength = 24; } + ]; + networking.defaultGateway = internalRouterAddress; + networking.firewall.enable = false; + }; + + client2 = { pkgs, ... }: { + imports = [ transmissionConfig ]; + + virtualisation.vlans = [ 1 ]; + networking.interfaces.eth0.ipv4.addresses = []; + networking.interfaces.eth1.ipv4.addresses = [ + { address = externalClient2Address; prefixLength = 24; } + ]; + networking.firewall.enable = false; + }; + }; + + testScript = { nodes, ... }: '' start_all() # Wait for network and miniupnpd. @@ -163,5 +161,4 @@ in "cmp /tmp/test.tar.bz2 ${file}" ) ''; - }) From e306ee4a56eeb60eb38e97a33e65a769b0e99ad1 Mon Sep 17 00:00:00 2001 From: Jonathan Ringer Date: Mon, 13 Jan 2020 13:18:03 -0800 Subject: [PATCH 27/54] onnxruntime: 1.0.0 -> 1.1.0 --- .../development/libraries/onnxruntime/default.nix | 15 +++++++++++---- 1 file changed, 11 insertions(+), 4 deletions(-) diff --git a/pkgs/development/libraries/onnxruntime/default.nix b/pkgs/development/libraries/onnxruntime/default.nix index 33bc4c6e82c..90da6c19212 100644 --- a/pkgs/development/libraries/onnxruntime/default.nix +++ b/pkgs/development/libraries/onnxruntime/default.nix @@ -1,16 +1,16 @@ { stdenv, fetchFromGitHub, glibcLocales -, cmake, python3 +, cmake, python3, libpng, zlib }: stdenv.mkDerivation rec { pname = "onnxruntime"; - version = "1.0.0"; + version = "1.1.0"; src = fetchFromGitHub { owner = "microsoft"; repo = "onnxruntime"; rev = "v${version}"; - sha256 = "1d28lzrjnq69yl8j9ncxlsxl0bniacn3hnsr9van10zgp527436v"; + sha256 = "1ryf5v2h07c7b42q2p9id88i270ajyz5rlsradp00dy8in6dn2yr"; # TODO: use nix-versions of grpc, onnx, eigen, googletest, etc. # submodules increase src size and compile times significantly # not currently feasible due to how integrated cmake build is with git @@ -25,12 +25,19 @@ stdenv.mkDerivation rec { python3 # for shared-lib or server ]; + buildInputs = [ + # technically optional, but highly recommended + libpng + zlib + ]; + cmakeDir = "../cmake"; cmakeFlags = [ "-Donnxruntime_USE_OPENMP=ON" "-Donnxruntime_BUILD_SHARED_LIB=ON" - "-Donnxruntime_ENABLE_LTO=ON" + # flip back to ON next release + "-Donnxruntime_ENABLE_LTO=OFF" # https://github.com/microsoft/onnxruntime/issues/2828 ]; # ContribOpTest.StringNormalizerTest sets locale to en_US.UTF-8" From ef09cebc967ff08daeb9e8d5795d43633b4667bf Mon Sep 17 00:00:00 2001 From: Daiderd Jordan Date: Tue, 14 Jan 2020 10:56:52 +0100 Subject: [PATCH 28/54] diffoscope: enable on darwin --- pkgs/tools/misc/diffoscope/default.nix | 13 ++++++++----- 1 file changed, 8 insertions(+), 5 deletions(-) diff --git a/pkgs/tools/misc/diffoscope/default.nix b/pkgs/tools/misc/diffoscope/default.nix index b64c527a6b9..c9f61ee3459 100644 --- a/pkgs/tools/misc/diffoscope/default.nix +++ b/pkgs/tools/misc/diffoscope/default.nix @@ -35,11 +35,14 @@ python3Packages.buildPythonApplication rec { # # Still missing these tools: abootimg docx2txt dumpxsb enjarify js-beautify lipo oggDump otool procyon-decompiler Rscript wasm2wat zipnode # Also these libraries: python3-guestfs - pythonPath = with python3Packages; [ debian libarchive-c python_magic tlsh rpm pyxattr ] ++ [ - acl binutils-unwrapped bzip2 cdrkit colordiff coreutils cpio db diffutils + pythonPath = [ + binutils-unwrapped bzip2 colordiff coreutils cpio db diffutils dtc e2fsprogs file findutils fontforge-fonttools gettext gnutar gzip - libarchive libcaca lz4 pgpdump progressbar33 sng sqlite squashfsTools unzip xxd xz - ] ++ lib.optionals enableBloat [ + libarchive libcaca lz4 pgpdump sng sqlite squashfsTools unzip xxd xz + ] + ++ (with python3Packages; [ debian libarchive-c python_magic tlsh rpm progressbar33 ]) + ++ lib.optionals stdenv.isLinux [ python3Packages.pyxattr acl cdrkit ] + ++ lib.optionals enableBloat [ apktool cbfstool colord fpc ghc ghostscriptX giflib gnupg gnumeric imagemagick llvm jdk mono openssh pdftk poppler_utils tcpdump unoconv python3Packages.guestfs @@ -69,6 +72,6 @@ python3Packages.buildPythonApplication rec { homepage = https://wiki.debian.org/ReproducibleBuilds; license = licenses.gpl3Plus; maintainers = with maintainers; [ dezgeg ]; - platforms = platforms.linux; + platforms = platforms.unix; }; } From 730371336bb31892d4d63a462c44ae03ea254729 Mon Sep 17 00:00:00 2001 From: Alessandro Marrella Date: Tue, 14 Jan 2020 11:55:10 +0000 Subject: [PATCH 29/54] eksctl: 0.11.1 -> 0.12.0 --- pkgs/tools/admin/eksctl/default.nix | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/pkgs/tools/admin/eksctl/default.nix b/pkgs/tools/admin/eksctl/default.nix index e5fcf3933eb..3cadafc633e 100644 --- a/pkgs/tools/admin/eksctl/default.nix +++ b/pkgs/tools/admin/eksctl/default.nix @@ -2,16 +2,16 @@ buildGoModule rec { pname = "eksctl"; - version = "0.11.1"; + version = "0.12.0"; src = fetchFromGitHub { owner = "weaveworks"; repo = pname; rev = version; - sha256 = "197lf6cb1maam1yxy29wgp4dkakaavmwqvq2d9i4qxhscalrdra5"; + sha256 = "1m4hcj2bi9v3ngjj2x1fifcnb450jrij06vbi3j28slsdwn1bcc8"; }; - modSha256 = "04ba3dyfwlf0m6kn7yp7qyp3h2qdwp17y1f9pa79y3c6sd2nadk2"; + modSha256 = "1c8qyxzfazgw77rlv3yw2x39ymaq66jjd51im0jl4131a6hzj6fd"; subPackages = [ "cmd/eksctl" ]; From 1bea1a30b5d372289595292c861cea0317a646b5 Mon Sep 17 00:00:00 2001 From: Mike Sperber Date: Tue, 14 Jan 2020 13:15:17 +0100 Subject: [PATCH 30/54] vagrant: Unbreak replacing symlinks on macOS On a local installation on macOS, "cp -a" creates a write-protected directory, which can't be renamed. Do a "chmod +w" to unbreak. Fixes #77671. --- pkgs/development/tools/vagrant/default.nix | 2 ++ 1 file changed, 2 insertions(+) diff --git a/pkgs/development/tools/vagrant/default.nix b/pkgs/development/tools/vagrant/default.nix index 4ef723c9a1f..ea3382f3e70 100644 --- a/pkgs/development/tools/vagrant/default.nix +++ b/pkgs/development/tools/vagrant/default.nix @@ -33,6 +33,8 @@ let for gem in "$out"/lib/ruby/gems/*/gems/*; do cp -a "$gem/" "$gem.new" rm "$gem" + # needed on macOS, otherwise the mv yields permission denied + chmod +w "$gem.new" mv "$gem.new" "$gem" done ''; From b2f6aa631edc025cb6748133864317983bf5c6d1 Mon Sep 17 00:00:00 2001 From: adisbladis Date: Tue, 14 Jan 2020 12:23:37 +0000 Subject: [PATCH 31/54] libvterm-neovim: 2019-10-08 -> 0.1.3 --- pkgs/development/libraries/libvterm-neovim/default.nix | 7 ++++--- 1 file changed, 4 insertions(+), 3 deletions(-) diff --git a/pkgs/development/libraries/libvterm-neovim/default.nix b/pkgs/development/libraries/libvterm-neovim/default.nix index 50ee7e4d387..0cd1b64c1b9 100644 --- a/pkgs/development/libraries/libvterm-neovim/default.nix +++ b/pkgs/development/libraries/libvterm-neovim/default.nix @@ -6,13 +6,14 @@ stdenv.mkDerivation { pname = "libvterm-neovim"; - version = "2019-10-08"; + # Releases are not tagged, look at commit history to find latest release + version = "0.1.3"; src = fetchFromGitHub { owner = "neovim"; repo = "libvterm"; - rev = "7c72294d84ce20da4c27362dbd7fa4b08cfc91da"; - sha256 = "111qyxq33x74dwdnqcnzlv9j0n8hxyribd6ppwcsxmyrniyw9qrk"; + rev = "65dbda3ed214f036ee799d18b2e693a833a0e591"; + sha256 = "0r6yimzbkgrsi9aaxwvxahai2lzgjd1ysblr6m6by5w459853q3n"; }; buildInputs = [ perl ]; From 16fc4dd77dafc24f1fb0746d53435951e8fbcd2e Mon Sep 17 00:00:00 2001 From: Susan Potter Date: Tue, 14 Jan 2020 07:01:39 -0600 Subject: [PATCH 32/54] nixos/doc+manual: update copyright year range end 2019->2020 --- nixos/doc/manual/man-pages.xml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/nixos/doc/manual/man-pages.xml b/nixos/doc/manual/man-pages.xml index f5a1dd2d69f..49acfe7330b 100644 --- a/nixos/doc/manual/man-pages.xml +++ b/nixos/doc/manual/man-pages.xml @@ -6,7 +6,7 @@ EelcoDolstra Author - 2007-2019Eelco Dolstra + 2007-2020Eelco Dolstra From 8334b8359590da3958f36cd0da31b28f1dcd4be1 Mon Sep 17 00:00:00 2001 From: Jan Tojnar Date: Tue, 14 Jan 2020 15:04:21 +0100 Subject: [PATCH 33/54] doc: Make prompt unselectable Weirdly, no-one seems to have noticed this was broken. --- doc/overrides.css | 7 +++++++ 1 file changed, 7 insertions(+) diff --git a/doc/overrides.css b/doc/overrides.css index 4c7d4a31be2..cc21645a0dd 100644 --- a/doc/overrides.css +++ b/doc/overrides.css @@ -7,3 +7,10 @@ .calloutlist img { width: 1.5em; } + +.prompt { + -moz-user-select: none; + -webkit-user-select: none; + -ms-user-select: none; + user-select: none; +} From 1e6265afe9240469ae562e98013137ec872e5949 Mon Sep 17 00:00:00 2001 From: Jan Tojnar Date: Tue, 14 Jan 2020 15:24:57 +0100 Subject: [PATCH 34/54] doc: Make callout marks in code unselectable To make example copying easier. --- doc/overrides.css | 10 ++++++++-- 1 file changed, 8 insertions(+), 2 deletions(-) diff --git a/doc/overrides.css b/doc/overrides.css index cc21645a0dd..73901a3f543 100644 --- a/doc/overrides.css +++ b/doc/overrides.css @@ -1,6 +1,8 @@ .docbook .xref img[src^=images\/callouts\/], .screen img, -.programlisting img { +.programlisting img, +.literallayout img, +.synopsis img { width: 1em; } @@ -8,7 +10,11 @@ width: 1.5em; } -.prompt { +.prompt, +.screen img, +.programlisting img, +.literallayout img, +.synopsis img { -moz-user-select: none; -webkit-user-select: none; -ms-user-select: none; From d48a99346c7f64d1de2ea9d1cb63ad356231650b Mon Sep 17 00:00:00 2001 From: Tobias Mayer Date: Tue, 14 Jan 2020 15:56:19 +0100 Subject: [PATCH 35/54] glog: remove static flag --- pkgs/development/libraries/glog/default.nix | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/pkgs/development/libraries/glog/default.nix b/pkgs/development/libraries/glog/default.nix index 891aa2965ae..aa846e41d55 100644 --- a/pkgs/development/libraries/glog/default.nix +++ b/pkgs/development/libraries/glog/default.nix @@ -1,4 +1,4 @@ -{ stdenv, lib, fetchFromGitHub, fetchpatch, cmake, gflags, perl, static ? false }: +{ stdenv, lib, fetchFromGitHub, fetchpatch, cmake, gflags, perl }: stdenv.mkDerivation rec { pname = "glog"; @@ -30,7 +30,7 @@ stdenv.mkDerivation rec { propagatedBuildInputs = [ gflags ]; - cmakeFlags = [ "-DBUILD_SHARED_LIBS=${if static then "OFF" else "ON"}" ]; + cmakeFlags = [ "-DBUILD_SHARED_LIBS=ON" ]; checkInputs = [ perl ]; doCheck = false; # fails with "Mangled symbols (28 out of 380) found in demangle.dm" From cfc2ead8b3c2a5b60f0859e07a4646794bff52a0 Mon Sep 17 00:00:00 2001 From: David Wood Date: Tue, 14 Jan 2020 11:12:48 +0000 Subject: [PATCH 36/54] mdcat: 0.14.0 -> 0.15.0 --- pkgs/tools/text/mdcat/default.nix | 12 +++++++----- 1 file changed, 7 insertions(+), 5 deletions(-) diff --git a/pkgs/tools/text/mdcat/default.nix b/pkgs/tools/text/mdcat/default.nix index 626963bc601..6b19251acf8 100644 --- a/pkgs/tools/text/mdcat/default.nix +++ b/pkgs/tools/text/mdcat/default.nix @@ -2,26 +2,28 @@ rustPlatform.buildRustPackage rec { pname = "mdcat"; - version = "0.14.0"; + version = "0.15.0"; src = fetchFromGitHub { owner = "lunaryorn"; repo = pname; rev = "mdcat-${version}"; - sha256 = "1q8h6pc1i89j1zl4s234inl9v95vsdrry1fzlis89sl2mnbv8ywy"; + sha256 = "1x9c3cj3y8wvwr74kbz6nrdh61rinr98gcp3hnjpi6c3vg3xx4wh"; }; nativeBuildInputs = [ pkgconfig ]; buildInputs = [ openssl ] ++ stdenv.lib.optional stdenv.isDarwin Security; - cargoSha256 = "1hxsfls6fpllc9yg5ib3qz6pa62j1y1va8a6356j6812csk4ifnn"; + cargoSha256 = "1kc434pa72n9xll2r4ddmd9xdwv3ls36cwsmdry392j41zmics51"; checkInputs = [ ansi2html ]; checkPhase = '' # Skip tests that use the network and that include files. - cargo test -- --skip terminal::iterm2 --skip terminal::resources::tests::remote \ + cargo test -- --skip terminal::iterm2 \ --skip magic::tests::detect_mimetype_of_svg_image \ - --skip magic::tests::detect_mimetype_of_png_image + --skip magic::tests::detect_mimetype_of_png_image \ + --skip resources::tests::read_url_with_http_url_fails_when_status_404 \ + --skip resources::tests::read_url_with_http_url_returns_content_when_status_200 ''; meta = with stdenv.lib; { From 8df2444a35ad68ce55a9c4e62cdf1ea7e18a8be1 Mon Sep 17 00:00:00 2001 From: leenaars Date: Tue, 14 Jan 2020 18:25:33 +0100 Subject: [PATCH 37/54] Sylk: 2.1.0 -> 2.5.0 (#77606) --- pkgs/applications/networking/Sylk/default.nix | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/pkgs/applications/networking/Sylk/default.nix b/pkgs/applications/networking/Sylk/default.nix index 36f6279c209..d99a87954de 100644 --- a/pkgs/applications/networking/Sylk/default.nix +++ b/pkgs/applications/networking/Sylk/default.nix @@ -2,7 +2,7 @@ let pname = "Sylk"; - version = "2.1.0"; + version = "2.5.0"; in appimageTools.wrapType2 rec { @@ -10,7 +10,7 @@ appimageTools.wrapType2 rec { src = fetchurl { url = "http://download.ag-projects.com/Sylk/Sylk-${version}-x86_64.AppImage"; - sha256 = "1ifi8qr6f84dcssxhv5ar1s48nsqxiv2j1blc82248hmq5is24mf"; + sha256 = "1jhs25zzdac3r2wz886vlpb0bz77p52mdlrbsbv28h6is79pbd69"; }; profile = '' From 4490cfad6cda276fa753e66bff8183cfc15d9e07 Mon Sep 17 00:00:00 2001 From: Maximilian Bosch Date: Tue, 14 Jan 2020 18:25:05 +0100 Subject: [PATCH 38/54] bandwhich: 0.8.0 -> 0.9.0 https://github.com/imsnif/bandwhich/releases/tag/0.9.0 --- pkgs/tools/networking/bandwhich/default.nix | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/pkgs/tools/networking/bandwhich/default.nix b/pkgs/tools/networking/bandwhich/default.nix index cfccefab351..ae45e0c1fc1 100644 --- a/pkgs/tools/networking/bandwhich/default.nix +++ b/pkgs/tools/networking/bandwhich/default.nix @@ -2,16 +2,16 @@ rustPlatform.buildRustPackage rec { pname = "bandwhich"; - version = "0.8.0"; + version = "0.9.0"; src = fetchFromGitHub { owner = "imsnif"; repo = pname; rev = version; - sha256 = "1pd0hy17knalq4m5517ymbg95fa141843ir9283djlh3iqfgkm37"; + sha256 = "0gjk84a4ks5107vrchwwnslpbcrprmznjy3sqn2mrwfvw5biycb3"; }; - cargoSha256 = "14mb6rbjxv3r8awvy0rjc23lyhg92q1q1dik6q1za1aq9w8yipwf"; + cargoSha256 = "1sa81570cvvpqgdcpnb08b0q4c6ap8a2wxfp2z336jzbv0zgv8a6"; buildInputs = stdenv.lib.optional stdenv.isDarwin Security; From 92b464d57d9cf26996f2b04dfbca19caddc87d85 Mon Sep 17 00:00:00 2001 From: arcnmx Date: Tue, 14 Jan 2020 09:06:59 -0800 Subject: [PATCH 39/54] lib/types: prioritise coercedType in coercedTo This more intuitively matches `types.either` and allows paths to be coerced to submodules again, which was inhibited by #76861 --- lib/types.nix | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/lib/types.nix b/lib/types.nix index 57ddb45a237..d8a5db0c89f 100644 --- a/lib/types.nix +++ b/lib/types.nix @@ -590,7 +590,7 @@ rec { tail' = tail ts; in foldl' either head' tail'; - # Either value of type `finalType` or `coercedType`, the latter is + # Either value of type `coercedType` or `finalType`, the former is # converted to `finalType` using `coerceFunc`. coercedTo = coercedType: coerceFunc: finalType: assert lib.assertMsg (coercedType.getSubModules == null) @@ -599,12 +599,12 @@ rec { mkOptionType rec { name = "coercedTo"; description = "${finalType.description} or ${coercedType.description} convertible to it"; - check = x: finalType.check x || (coercedType.check x && finalType.check (coerceFunc x)); + check = x: (coercedType.check x && finalType.check (coerceFunc x)) || finalType.check x; merge = loc: defs: let coerceVal = val: - if finalType.check val then val - else coerceFunc val; + if coercedType.check val then coerceFunc val + else val; in finalType.merge loc (map (def: def // { value = coerceVal def.value; }) defs); emptyValue = finalType.emptyValue; getSubOptions = finalType.getSubOptions; From 8f1994c2cc27e7ccf6895391ac13738d612d105e Mon Sep 17 00:00:00 2001 From: Ben Darwin Date: Tue, 14 Jan 2020 12:59:23 -0500 Subject: [PATCH 40/54] pythonPackages.pynrrd: init at 0.4.2 --- .../python-modules/pynrrd/default.nix | 27 +++++++++++++++++++ pkgs/top-level/python-packages.nix | 2 ++ 2 files changed, 29 insertions(+) create mode 100644 pkgs/development/python-modules/pynrrd/default.nix diff --git a/pkgs/development/python-modules/pynrrd/default.nix b/pkgs/development/python-modules/pynrrd/default.nix new file mode 100644 index 00000000000..02361fe84de --- /dev/null +++ b/pkgs/development/python-modules/pynrrd/default.nix @@ -0,0 +1,27 @@ +{ lib +, buildPythonPackage +, fetchFromGitHub +, numpy +, pytest +}: + +buildPythonPackage rec { + pname = "pynrrd"; + version = "0.4.2"; + + src = fetchFromGitHub { + owner = "mhe"; + repo = pname; + rev = "v${version}"; + sha256 = "1wn3ara3i19fi1y9a5j4imyczpa6dkkzd5djggxg4kkl1ff9awrj"; + }; + + propagatedBuildInputs = [ numpy ]; + + meta = with lib; { + homepage = https://github.com/mhe/pynrrd; + description = "Simple pure-Python reader for NRRD files"; + license = licenses.mit; + maintainers = with maintainers; [ bcdarwin ]; + }; +} diff --git a/pkgs/top-level/python-packages.nix b/pkgs/top-level/python-packages.nix index f9c458aa79e..5b148263388 100644 --- a/pkgs/top-level/python-packages.nix +++ b/pkgs/top-level/python-packages.nix @@ -4941,6 +4941,8 @@ in { pynmea2 = callPackage ../development/python-modules/pynmea2 {}; + pynrrd = callPackage ../development/python-modules/pynrrd { }; + pynzb = callPackage ../development/python-modules/pynzb { }; process-tests = callPackage ../development/python-modules/process-tests { }; From 10b1ba0c936843c1e9b13d32a08ff8b51aeb7b24 Mon Sep 17 00:00:00 2001 From: Alyssa Ross Date: Sun, 12 Jan 2020 15:47:51 +0000 Subject: [PATCH 41/54] public-inbox: fix build This fixes some two-digit year rounding bugs that started triggering because 2020 is closer to 2070 than 1970. Apparently two digits years are still a thing. --- ...-msgtime-drop-Date-Parse-for-RFC2822.patch | 172 ++++++++++++++++++ pkgs/servers/mail/public-inbox/default.nix | 10 +- 2 files changed, 181 insertions(+), 1 deletion(-) create mode 100644 pkgs/servers/mail/public-inbox/0002-msgtime-drop-Date-Parse-for-RFC2822.patch diff --git a/pkgs/servers/mail/public-inbox/0002-msgtime-drop-Date-Parse-for-RFC2822.patch b/pkgs/servers/mail/public-inbox/0002-msgtime-drop-Date-Parse-for-RFC2822.patch new file mode 100644 index 00000000000..ebc9a6f2237 --- /dev/null +++ b/pkgs/servers/mail/public-inbox/0002-msgtime-drop-Date-Parse-for-RFC2822.patch @@ -0,0 +1,172 @@ +From c9b5164c954cd0de80d971f1c4ced16bf41ea81b Mon Sep 17 00:00:00 2001 +From: Eric Wong +Date: Fri, 29 Nov 2019 12:25:07 +0000 +Subject: [PATCH 2/2] msgtime: drop Date::Parse for RFC2822 + +Date::Parse is not optimized for RFC2822 dates and isn't +packaged on OpenBSD. It's still useful for historical +email when email clients were less conformant, but is +less relevant for new emails. +--- + lib/PublicInbox/MsgTime.pm | 115 ++++++++++++++++++++++++++++++++----- + t/msgtime.t | 6 ++ + 2 files changed, 107 insertions(+), 14 deletions(-) + +diff --git a/lib/PublicInbox/MsgTime.pm b/lib/PublicInbox/MsgTime.pm +index 58e11d72..e9b27a49 100644 +--- a/lib/PublicInbox/MsgTime.pm ++++ b/lib/PublicInbox/MsgTime.pm +@@ -7,24 +7,114 @@ use strict; + use warnings; + use base qw(Exporter); + our @EXPORT_OK = qw(msg_timestamp msg_datestamp); +-use Date::Parse qw(str2time strptime); ++use Time::Local qw(timegm); ++my @MoY = qw(january february march april may june ++ july august september october november december); ++my %MoY; ++@MoY{@MoY} = (0..11); ++@MoY{map { substr($_, 0, 3) } @MoY} = (0..11); ++ ++my %OBSOLETE_TZ = ( # RFC2822 4.3 (Obsolete Date and Time) ++ EST => '-0500', EDT => '-0400', ++ CST => '-0600', CDT => '-0500', ++ MST => '-0700', MDT => '-0600', ++ PST => '-0800', PDT => '-0700', ++ UT => '+0000', GMT => '+0000', Z => '+0000', ++ ++ # RFC2822 states: ++ # The 1 character military time zones were defined in a non-standard ++ # way in [RFC822] and are therefore unpredictable in their meaning. ++); ++my $OBSOLETE_TZ = join('|', keys %OBSOLETE_TZ); + + sub str2date_zone ($) { + my ($date) = @_; ++ my ($ts, $zone); ++ ++ # RFC822 is most likely for email, but we can tolerate an extra comma ++ # or punctuation as long as all the data is there. ++ # We'll use '\s' since Unicode spaces won't affect our parsing. ++ # SpamAssassin ignores commas and redundant spaces, too. ++ if ($date =~ /(?:[A-Za-z]+,?\s+)? # day-of-week ++ ([0-9]+),?\s+ # dd ++ ([A-Za-z]+)\s+ # mon ++ ([0-9]{2,})\s+ # YYYY or YY (or YYY :P) ++ ([0-9]+)[:\.] # HH: ++ ((?:[0-9]{2})|(?:\s?[0-9])) # MM ++ (?:[:\.]((?:[0-9]{2})|(?:\s?[0-9])))? # :SS ++ \s+ # a TZ offset is required: ++ ([\+\-])? # TZ sign ++ [\+\-]* # I've seen extra "-" e.g. "--500" ++ ([0-9]+|$OBSOLETE_TZ)(?:\s|$) # TZ offset ++ /xo) { ++ my ($dd, $m, $yyyy, $hh, $mm, $ss, $sign, $tz) = ++ ($1, $2, $3, $4, $5, $6, $7, $8); ++ # don't accept non-English months ++ defined(my $mon = $MoY{lc($m)}) or return; ++ ++ if (defined(my $off = $OBSOLETE_TZ{$tz})) { ++ $sign = substr($off, 0, 1); ++ $tz = substr($off, 1); ++ } ++ ++ # Y2K problems: 3-digit years, follow RFC2822 ++ if (length($yyyy) <= 3) { ++ $yyyy += 1900; ++ ++ # and 2-digit years from '09 (2009) (0..49) ++ $yyyy += 100 if $yyyy < 1950; ++ } ++ ++ $ts = timegm($ss // 0, $mm, $hh, $dd, $mon, $yyyy); + +- my $ts = str2time($date); +- return undef unless(defined $ts); ++ # Compute the time offset from [+-]HHMM ++ $tz //= 0; ++ my ($tz_hh, $tz_mm); ++ if (length($tz) == 1) { ++ $tz_hh = $tz; ++ $tz_mm = 0; ++ } elsif (length($tz) == 2) { ++ $tz_hh = 0; ++ $tz_mm = $tz; ++ } else { ++ $tz_hh = $tz; ++ $tz_hh =~ s/([0-9]{2})\z//; ++ $tz_mm = $1; ++ } ++ while ($tz_mm >= 60) { ++ $tz_mm -= 60; ++ $tz_hh += 1; ++ } ++ $sign //= '+'; ++ my $off = $sign . ($tz_mm * 60 + ($tz_hh * 60 * 60)); ++ $ts -= $off; ++ $sign = '+' if $off == 0; ++ $zone = sprintf('%s%02d%02d', $sign, $tz_hh, $tz_mm); + +- # off is the time zone offset in seconds from GMT +- my ($ss,$mm,$hh,$day,$month,$year,$off) = strptime($date); +- return undef unless(defined $off); ++ # Time::Zone and Date::Parse are part of the same distibution, ++ # and we need Time::Zone to deal with tz names like "EDT" ++ } elsif (eval { require Date::Parse }) { ++ $ts = Date::Parse::str2time($date); ++ return undef unless(defined $ts); + +- # Compute the time zone from offset +- my $sign = ($off < 0) ? '-' : '+'; +- my $hour = abs(int($off / 3600)); +- my $min = ($off / 60) % 60; +- my $zone = sprintf('%s%02d%02d', $sign, $hour, $min); ++ # off is the time zone offset in seconds from GMT ++ my ($ss,$mm,$hh,$day,$month,$year,$off) = ++ Date::Parse::strptime($date); ++ return undef unless(defined $off); ++ ++ # Compute the time zone from offset ++ my $sign = ($off < 0) ? '-' : '+'; ++ my $hour = abs(int($off / 3600)); ++ my $min = ($off / 60) % 60; ++ ++ $zone = sprintf('%s%02d%02d', $sign, $hour, $min); ++ } else { ++ warn "Date::Parse missing for non-RFC822 date: $date\n"; ++ return undef; ++ } + ++ # Note: we've already applied the offset to $ts at this point, ++ # but we want to keep "git fsck" happy. + # "-1200" is the furthest westermost zone offset, + # but git fast-import is liberal so we use "-1400" + if ($zone >= 1400 || $zone <= -1400) { +@@ -59,9 +149,6 @@ sub msg_date_only ($) { + my @date = $hdr->header_raw('Date'); + my ($ts); + foreach my $d (@date) { +- # Y2K problems: 3-digit years +- $d =~ s!([A-Za-z]{3}) ([0-9]{3}) ([0-9]{2}:[0-9]{2}:[0-9]{2})! +- my $yyyy = $2 + 1900; "$1 $yyyy $3"!e; + $ts = eval { str2date_zone($d) } and return $ts; + if ($@) { + my $mid = $hdr->header_raw('Message-ID'); +diff --git a/t/msgtime.t b/t/msgtime.t +index 6b396602..d9643b65 100644 +--- a/t/msgtime.t ++++ b/t/msgtime.t +@@ -84,4 +84,10 @@ is_deeply(datestamp('Fri, 28 Jun 2002 12:54:40 -700'), [1025294080, '-0700']); + is_deeply(datestamp('Sat, 12 Jan 2002 12:52:57 -200'), [1010847177, '-0200']); + is_deeply(datestamp('Mon, 05 Nov 2001 10:36:16 -800'), [1004985376, '-0800']); + ++# obsolete formats described in RFC2822 ++for (qw(UT GMT Z)) { ++ is_deeply(datestamp('Fri, 02 Oct 1993 00:00:00 '.$_), [ 749520000, '+0000']); ++} ++is_deeply(datestamp('Fri, 02 Oct 1993 00:00:00 EDT'), [ 749534400, '-0400']); ++ + done_testing(); +-- +2.24.1 + diff --git a/pkgs/servers/mail/public-inbox/default.nix b/pkgs/servers/mail/public-inbox/default.nix index b4749558500..affcb0e8b23 100644 --- a/pkgs/servers/mail/public-inbox/default.nix +++ b/pkgs/servers/mail/public-inbox/default.nix @@ -1,4 +1,4 @@ -{ buildPerlPackage, lib, fetchurl, makeWrapper +{ buildPerlPackage, lib, fetchurl, fetchpatch, makeWrapper , DBDSQLite, EmailMIME, IOSocketSSL, IPCRun, Plack, PlackMiddlewareReverseProxy , SearchXapian, TimeDate, URI , git, highlight, openssl, xapian @@ -29,6 +29,14 @@ buildPerlPackage rec { sha256 = "0sa2m4f2x7kfg3mi4im7maxqmqvawafma8f7g92nyfgybid77g6s"; }; + patches = [ + (fetchpatch { + url = "https://public-inbox.org/meta/20200101032822.GA13063@dcvr/raw"; + sha256 = "0ncxqqkvi5lwi8zaa7lk7l8mf8h278raxsvbvllh3z7jhfb48r3l"; + }) + ./0002-msgtime-drop-Date-Parse-for-RFC2822.patch + ]; + outputs = [ "out" "devdoc" "sa_config" ]; postConfigure = '' From 00a2084a409e65e9781e9792644bbf5b1b1bca5a Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?J=C3=B6rg=20Thalheim?= Date: Tue, 14 Jan 2020 14:19:04 +0000 Subject: [PATCH 42/54] openssl: fix build linux with clangStdenv --- pkgs/development/libraries/openssl/default.nix | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/pkgs/development/libraries/openssl/default.nix b/pkgs/development/libraries/openssl/default.nix index 118aa984c17..3016f025e9d 100644 --- a/pkgs/development/libraries/openssl/default.nix +++ b/pkgs/development/libraries/openssl/default.nix @@ -36,7 +36,7 @@ let outputs = [ "bin" "dev" "out" "man" ] ++ optional withDocs "doc"; setOutputFlags = false; - separateDebugInfo = stdenv.hostPlatform.isLinux; + separateDebugInfo = stdenv.cc.isGNU; nativeBuildInputs = [ perl ]; buildInputs = stdenv.lib.optional withCryptodev cryptodev; From eba1f794184f6bc08558a6506ed62eada008f37e Mon Sep 17 00:00:00 2001 From: Frederik Rietdijk Date: Mon, 13 Jan 2020 21:45:24 +0100 Subject: [PATCH 43/54] pythonPackages.venvShellHook: init This is a hook that loads a virtualenv from the specified `venvDir` location. If the virtualenv does not exist, it is created. --- doc/languages-frameworks/python.section.md | 1 + .../interpreters/python/hooks/default.nix | 12 +++++++++ .../python/hooks/venv-shell-hook.sh | 26 +++++++++++++++++++ pkgs/top-level/python-packages.nix | 2 +- 4 files changed, 40 insertions(+), 1 deletion(-) create mode 100644 pkgs/development/interpreters/python/hooks/venv-shell-hook.sh diff --git a/doc/languages-frameworks/python.section.md b/doc/languages-frameworks/python.section.md index 199e678bc29..bbcf82f7ed6 100644 --- a/doc/languages-frameworks/python.section.md +++ b/doc/languages-frameworks/python.section.md @@ -833,6 +833,7 @@ used in `buildPythonPackage`. - `pythonRemoveBinBytecode` to remove bytecode from the `/bin` folder. - `setuptoolsBuildHook` to build a wheel using `setuptools`. - `setuptoolsCheckHook` to run tests with `python setup.py test`. +- `venvShellHook` to source a Python 3 `venv` at the `venvDir` location. A `venv` is created if it does not yet exist. - `wheelUnpackHook` to move a wheel to the correct folder so it can be installed with the `pipInstallHook`. ### Development mode diff --git a/pkgs/development/interpreters/python/hooks/default.nix b/pkgs/development/interpreters/python/hooks/default.nix index f05b3b1eec6..159637ae9d5 100644 --- a/pkgs/development/interpreters/python/hooks/default.nix +++ b/pkgs/development/interpreters/python/hooks/default.nix @@ -2,6 +2,9 @@ { python , callPackage , makeSetupHook +, disabledIf +, isPy3k +, ensureNewerSourcesForZipFilesHook }: let @@ -109,6 +112,15 @@ in rec { }; } ./setuptools-check-hook.sh) {}; + venvShellHook = disabledIf (!isPy3k) (callPackage ({ }: + makeSetupHook { + name = "venv-shell-hook"; + deps = [ ensureNewerSourcesForZipFilesHook ]; + substitutions = { + inherit pythonInterpreter; + }; + } ./venv-shell-hook.sh) {}); + wheelUnpackHook = callPackage ({ wheel }: makeSetupHook { name = "wheel-unpack-hook.sh"; diff --git a/pkgs/development/interpreters/python/hooks/venv-shell-hook.sh b/pkgs/development/interpreters/python/hooks/venv-shell-hook.sh new file mode 100644 index 00000000000..3185b1f9fae --- /dev/null +++ b/pkgs/development/interpreters/python/hooks/venv-shell-hook.sh @@ -0,0 +1,26 @@ +venvShellHook() { + echo "Executing venvHook" + runHook preShellHook + + if [ -d "${venvDir}" ]; then + echo "Skipping venv creation, '${venvDir}' already exists" + else + echo "Creating new venv environment in path: '${venvDir}'" + @pythonInterpreter@ -m venv "${venvDir}" + fi + + source "${venvDir}/bin/activate" + + runHook postShellHook + echo "Finished executing venvShellHook" +} + +if [ -z "${dontUseVenvShellHook:-}" ] && [ -z "${shellHook-}" ]; then + echo "Using venvShellHook" + if [ -z "${venvDir-}" ]; then + echo "Error: \`venvDir\` should be set when using \`venvShellHook\`." + exit 1 + else + shellHook=venvShellHook + fi +fi diff --git a/pkgs/top-level/python-packages.nix b/pkgs/top-level/python-packages.nix index 5b148263388..a3ba61e27d5 100644 --- a/pkgs/top-level/python-packages.nix +++ b/pkgs/top-level/python-packages.nix @@ -108,7 +108,7 @@ in { inherit buildSetupcfg; inherit (callPackage ../development/interpreters/python/hooks { }) - eggUnpackHook eggBuildHook eggInstallHook flitBuildHook pipBuildHook pipInstallHook pytestCheckHook pythonCatchConflictsHook pythonImportsCheckHook pythonRemoveBinBytecodeHook setuptoolsBuildHook setuptoolsCheckHook wheelUnpackHook; + eggUnpackHook eggBuildHook eggInstallHook flitBuildHook pipBuildHook pipInstallHook pytestCheckHook pythonCatchConflictsHook pythonImportsCheckHook pythonRemoveBinBytecodeHook setuptoolsBuildHook setuptoolsCheckHook venvShellHook wheelUnpackHook; # helpers From a52195355312d2a9f5e71d4ff742bcc30c6f90ec Mon Sep 17 00:00:00 2001 From: Ruud van Asseldonk Date: Tue, 14 Jan 2020 17:10:30 +0100 Subject: [PATCH 44/54] python3Packages.sentry-sdk: add missing test dep The tests will fail with ModuleNotFoundError: No module named 'sqlalchemy' when sqlalchemy is not part of the test inputs, which prevents building the package. Therefore, add it as a checkInput. --- pkgs/development/python-modules/sentry-sdk/default.nix | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/pkgs/development/python-modules/sentry-sdk/default.nix b/pkgs/development/python-modules/sentry-sdk/default.nix index 67584789995..d556dcb74cf 100644 --- a/pkgs/development/python-modules/sentry-sdk/default.nix +++ b/pkgs/development/python-modules/sentry-sdk/default.nix @@ -13,6 +13,7 @@ , pyramid , rq , sanic +, sqlalchemy , stdenv , tornado , urllib3 @@ -27,7 +28,7 @@ buildPythonPackage rec { sha256 = "c6b919623e488134a728f16326c6f0bcdab7e3f59e7f4c472a90eea4d6d8fe82"; }; - checkInputs = [ django flask tornado bottle rq falcon ] + checkInputs = [ django flask tornado bottle rq falcon sqlalchemy ] ++ stdenv.lib.optionals isPy3k [ celery pyramid sanic aiohttp ]; propagatedBuildInputs = [ urllib3 certifi ]; From afe905246d890edf4026a565de3ca340a601de2a Mon Sep 17 00:00:00 2001 From: Will Dietz Date: Tue, 14 Jan 2020 15:54:19 -0600 Subject: [PATCH 45/54] nota: init at 1.0 Fixes #77590. --- .../science/math/nota/default.nix | 40 +++++++++++++++++++ pkgs/top-level/all-packages.nix | 3 +- 2 files changed, 42 insertions(+), 1 deletion(-) create mode 100644 pkgs/applications/science/math/nota/default.nix diff --git a/pkgs/applications/science/math/nota/default.nix b/pkgs/applications/science/math/nota/default.nix new file mode 100644 index 00000000000..897785ef6e8 --- /dev/null +++ b/pkgs/applications/science/math/nota/default.nix @@ -0,0 +1,40 @@ +{ mkDerivation, haskellPackages, fetchurl, lib }: + +mkDerivation rec { + pname = "nota"; + version = "1.0"; + + # Can't use fetchFromGitLab since codes.kary.us doesn't support https + src = fetchurl { + url = "http://codes.kary.us/nota/nota/-/archive/V${version}/nota-V${version}.tar.bz2"; + sha256 = "0bbs6bm9p852hvqadmqs428ir7m65h2prwyma238iirv42pk04v8"; + }; + + postUnpack = '' + export sourceRoot=$sourceRoot/source + ''; + + isLibrary = false; + isExecutable = true; + + libraryHaskellDepends = with haskellPackages; [ + base + bytestring + array + split + scientific + parsec + ansi-terminal + regex-compat + containers + terminal-size + numbers + text + time + ]; + + description = "The most beautiful command line calculator"; + homepage = "https://kary.us/nota"; + license = lib.licenses.mpl20; + maintainers = with lib.maintainers; [ dtzWill ]; +} diff --git a/pkgs/top-level/all-packages.nix b/pkgs/top-level/all-packages.nix index d84f18969f0..fe85cc25f4f 100644 --- a/pkgs/top-level/all-packages.nix +++ b/pkgs/top-level/all-packages.nix @@ -23915,6 +23915,8 @@ in nasc = callPackage ../applications/science/math/nasc { }; + nota = haskellPackages.callPackage ../applications/science/math/nota { }; + openblas = callPackage ../development/libraries/science/math/openblas { }; # A version of OpenBLAS using 32-bit integers on all platforms for compatibility with @@ -25799,5 +25801,4 @@ in sentencepiece = callPackage ../development/libraries/sentencepiece {}; kcli = callPackage ../development/tools/kcli {}; - } From 77752c6c086512a7c1eb066edcef731696fa2a8e Mon Sep 17 00:00:00 2001 From: Marek Fajkus Date: Fri, 20 Dec 2019 15:39:39 +0100 Subject: [PATCH 46/54] bs-platform: 6.2.1 -> 7.0.1 --- ...-platform-62.nix => build-bs-platform.nix} | 41 ++++++++----------- .../compilers/bs-platform/default.nix | 27 ++++++++---- .../compilers/bs-platform/ocaml.nix | 4 +- pkgs/top-level/all-packages.nix | 2 +- 4 files changed, 41 insertions(+), 33 deletions(-) rename pkgs/development/compilers/bs-platform/{bs-platform-62.nix => build-bs-platform.nix} (54%) diff --git a/pkgs/development/compilers/bs-platform/bs-platform-62.nix b/pkgs/development/compilers/bs-platform/build-bs-platform.nix similarity index 54% rename from pkgs/development/compilers/bs-platform/bs-platform-62.nix rename to pkgs/development/compilers/bs-platform/build-bs-platform.nix index d2913caaee6..03e01a7a0da 100644 --- a/pkgs/development/compilers/bs-platform/bs-platform-62.nix +++ b/pkgs/development/compilers/bs-platform/build-bs-platform.nix @@ -1,35 +1,33 @@ -{ stdenv, fetchFromGitHub, ninja, nodejs, python3 }: -let - version = "6.2.1"; - ocaml-version = "4.06.1"; - src = fetchFromGitHub { - owner = "BuckleScript"; - repo = "bucklescript"; - rev = "${version}"; - sha256 = "0zx9nq7cik0c60n3rndqfqy3vdbj5lcrx6zcqcz2d60jjxi1z32y"; - fetchSubmodules = true; - }; - ocaml = import ./ocaml.nix { - bs-version = version; +# This file is based on https://github.com/turboMaCk/bs-platform.nix/blob/master/build-bs-platform.nix +# to make potential future updates simpler + +{ stdenv, fetchFromGitHub, ninja, runCommand, nodejs, python3, + ocaml-version, version, src, + ocaml ? (import ./ocaml.nix { version = ocaml-version; inherit stdenv; src = "${src}/ocaml"; - }; -in + }), + custom-ninja ? (ninja.overrideAttrs (attrs: { + src = runCommand "ninja-patched-source" {} '' + mkdir -p $out + tar zxvf ${src}/vendor/ninja.tar.gz -C $out + ''; + patches = []; + })) +}: stdenv.mkDerivation { inherit src version; pname = "bs-platform"; BS_RELEASE_BUILD = "true"; - buildInputs = [ nodejs python3 ]; + buildInputs = [ nodejs python3 custom-ninja ]; patchPhase = '' sed -i 's:./configure.py --bootstrap:python3 ./configure.py --bootstrap:' ./scripts/install.js - mkdir -p ./native/${ocaml-version}/bin - ln -sf ${ocaml}/bin/* ./native/${ocaml-version}/bin - + ln -sf ${ocaml}/bin/* ./native/${ocaml-version}/bin rm -f vendor/ninja/snapshot/ninja.linux - cp ${ninja}/bin/ninja vendor/ninja/snapshot/ninja.linux + cp ${custom-ninja}/bin/ninja vendor/ninja/snapshot/ninja.linux ''; configurePhase = '' @@ -42,12 +40,9 @@ stdenv.mkDerivation { installPhase = '' node scripts/install.js - mkdir -p $out/bin - cp -rf jscomp lib vendor odoc_gen native $out cp bsconfig.json package.json $out - ln -s $out/lib/bsb $out/bin/bsb ln -s $out/lib/bsc $out/bin/bsc ln -s $out/lib/bsrefmt $out/bin/bsrefmt diff --git a/pkgs/development/compilers/bs-platform/default.nix b/pkgs/development/compilers/bs-platform/default.nix index 59a47bdab70..7abf7b306a5 100644 --- a/pkgs/development/compilers/bs-platform/default.nix +++ b/pkgs/development/compilers/bs-platform/default.nix @@ -1,15 +1,28 @@ -{ stdenv, fetchFromGitHub, ninja, nodejs, python3, ... }: +{ stdenv, runCommand, fetchFromGitHub, ninja, nodejs, python3, ... }: let + build-bs-platform = import ./build-bs-platform.nix; +in +(build-bs-platform { + inherit stdenv runCommand fetchFromGitHub ninja nodejs python3; + version = "7.0.1"; + ocaml-version = "4.06.1"; + + src = fetchFromGitHub { + owner = "BuckleScript"; + repo = "bucklescript"; + rev = "52770839e293ade2bcf187f2639000ca0a9a1d46"; + sha256 = "0s7g2zfhshsilv9zyp0246bypg34d294z27alpwz03ws9608yr7k"; + fetchSubmodules = true; + }; +}).overrideAttrs (attrs: { meta = with stdenv.lib; { description = "A JavaScript backend for OCaml focused on smooth integration and clean generated code."; homepage = https://bucklescript.github.io; license = licenses.lgpl3; maintainers = with maintainers; [ turbomack gamb anmonteiro ]; platforms = platforms.all; + # Currently there is an issue with aarch build in hydra + # https://github.com/BuckleScript/bucklescript/issues/4091 + badPlatforms = platforms.aarch64; }; -in -{ - bs-platform-621 = import ./bs-platform-62.nix { - inherit stdenv fetchFromGitHub ninja nodejs python3; - } // { inherit meta; }; -} +}) diff --git a/pkgs/development/compilers/bs-platform/ocaml.nix b/pkgs/development/compilers/bs-platform/ocaml.nix index 1f2fdd571f3..9aa34d02b36 100644 --- a/pkgs/development/compilers/bs-platform/ocaml.nix +++ b/pkgs/development/compilers/bs-platform/ocaml.nix @@ -1,7 +1,7 @@ -{ stdenv, src, version, bs-version }: +{ stdenv, src, version }: stdenv.mkDerivation rec { inherit src version; - name = "ocaml-${version}+bs-${bs-version}"; + name = "ocaml-${version}+bs"; configurePhase = '' ./configure -prefix $out ''; diff --git a/pkgs/top-level/all-packages.nix b/pkgs/top-level/all-packages.nix index fe85cc25f4f..082c8b80b1e 100644 --- a/pkgs/top-level/all-packages.nix +++ b/pkgs/top-level/all-packages.nix @@ -1298,7 +1298,7 @@ in burpsuite = callPackage ../tools/networking/burpsuite {}; - bs-platform = (callPackage ../development/compilers/bs-platform {}).bs-platform-621; + bs-platform = callPackage ../development/compilers/bs-platform {}; c3d = callPackage ../applications/graphics/c3d { inherit (darwin.apple_sdk.frameworks) Cocoa; From caa435fd1d164cc5d1059897f18970ad290b56db Mon Sep 17 00:00:00 2001 From: Erik Arvstedt Date: Tue, 14 Jan 2020 19:18:16 +0100 Subject: [PATCH 47/54] test-driver.py: specify coreutils dependency Otherwise the driver script fails when coreutils are not in PATH. --- nixos/lib/testing-python.nix | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/nixos/lib/testing-python.nix b/nixos/lib/testing-python.nix index 3d09be3b6cd..a7f6d792651 100644 --- a/nixos/lib/testing-python.nix +++ b/nixos/lib/testing-python.nix @@ -155,7 +155,7 @@ in rec { --add-flags "''${vms[*]}" \ ${lib.optionalString enableOCR "--prefix PATH : '${ocrProg}/bin:${imagemagick_tiff}/bin'"} \ - --run "export testScript=\"\$(cat $out/test-script)\"" \ + --run "export testScript=\"\$(${coreutils}/bin/cat $out/test-script)\"" \ --set VLANS '${toString vlans}' ln -s ${testDriver}/bin/nixos-test-driver $out/bin/nixos-run-vms wrapProgram $out/bin/nixos-run-vms \ From 5bdb653baf24ff73914a2c2d5101ceaa475e2298 Mon Sep 17 00:00:00 2001 From: Erik Arvstedt Date: Tue, 14 Jan 2020 19:18:17 +0100 Subject: [PATCH 48/54] test-driver.py: fix decoding of VM output The codec format 'unicode_escape' was introduced in 52ee102 to handle undecodable bytes in boot menus. This made the problem worse as unicode chars outside of iso-8859-1 produce garbled output and valid utf-8 strings (such as "\x" ) trigger decoding errors. Fix this by using the default 'utf-8' codec and by explicitly ignoring decoding errors. --- nixos/lib/test-driver/test-driver.py | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/nixos/lib/test-driver/test-driver.py b/nixos/lib/test-driver/test-driver.py index 7e575189209..c2cbedc5e3e 100644 --- a/nixos/lib/test-driver/test-driver.py +++ b/nixos/lib/test-driver/test-driver.py @@ -704,7 +704,8 @@ class Machine: def process_serial_output() -> None: for _line in self.process.stdout: - line = _line.decode("unicode_escape").replace("\r", "").rstrip() + # Ignore undecodable bytes that may occur in boot menus + line = _line.decode(errors="ignore").replace("\r", "").rstrip() eprint("{} # {}".format(self.name, line)) self.logger.enqueue({"msg": line, "machine": self.name}) From e43b456fceccd4fb5c9b7f38296e017c569888d1 Mon Sep 17 00:00:00 2001 From: Kevin Amado Date: Thu, 9 Jan 2020 18:02:03 -0500 Subject: [PATCH 49/54] pythonPackages.pylint-flask: init at 0.6 --- .../python-modules/pylint-flask/default.nix | 36 +++++++++++++++++++ pkgs/top-level/python-packages.nix | 2 ++ 2 files changed, 38 insertions(+) create mode 100644 pkgs/development/python-modules/pylint-flask/default.nix diff --git a/pkgs/development/python-modules/pylint-flask/default.nix b/pkgs/development/python-modules/pylint-flask/default.nix new file mode 100644 index 00000000000..5077d07a936 --- /dev/null +++ b/pkgs/development/python-modules/pylint-flask/default.nix @@ -0,0 +1,36 @@ +{ buildPythonPackage +, fetchPypi +, isPy3k +, lib + +# pythonPackages +, pylint-plugin-utils +}: + +buildPythonPackage rec { + pname = "pylint-flask"; + version = "0.6"; + disabled = !isPy3k; + + src = fetchPypi { + inherit pname version; + sha256 = "05qmwgkpvaa5k05abqjxfbrfk3wpdqb8ph690z7bzxvb47i7vngl"; + }; + + propagatedBuildInputs = [ + pylint-plugin-utils + ]; + + # Tests require a very old version of pylint + # also tests are only available at GitHub, with an old release tag + doCheck = false; + + meta = with lib; { + description = "A Pylint plugin to analyze Flask applications"; + homepage = "https://github.com/jschaf/pylint-flask"; + license = licenses.gpl2; + maintainers = with maintainers; [ + kamadorueda + ]; + }; +} diff --git a/pkgs/top-level/python-packages.nix b/pkgs/top-level/python-packages.nix index a3ba61e27d5..f95d81c3c87 100644 --- a/pkgs/top-level/python-packages.nix +++ b/pkgs/top-level/python-packages.nix @@ -4831,6 +4831,8 @@ in { pylint = if isPy3k then callPackage ../development/python-modules/pylint { } else callPackage ../development/python-modules/pylint/1.9.nix { }; + pylint-flask = callPackage ../development/python-modules/pylint-flask { }; + pylint-plugin-utils = callPackage ../development/python-modules/pylint-plugin-utils { }; pyomo = callPackage ../development/python-modules/pyomo { }; From 929dc2edd1d3f767c92753f90cb1e83eb4627715 Mon Sep 17 00:00:00 2001 From: Kevin Amado Date: Fri, 10 Jan 2020 01:35:01 -0500 Subject: [PATCH 50/54] pythonPackages.pylint-celery: init at 0.3 --- .../python-modules/pylint-celery/default.nix | 37 +++++++++++++++++++ pkgs/top-level/python-packages.nix | 2 + 2 files changed, 39 insertions(+) create mode 100644 pkgs/development/python-modules/pylint-celery/default.nix diff --git a/pkgs/development/python-modules/pylint-celery/default.nix b/pkgs/development/python-modules/pylint-celery/default.nix new file mode 100644 index 00000000000..6bc7a93049e --- /dev/null +++ b/pkgs/development/python-modules/pylint-celery/default.nix @@ -0,0 +1,37 @@ +{ buildPythonPackage +, fetchFromGitHub +, isPy3k +, lib + +# pythonPackages +, pylint-plugin-utils +}: + +buildPythonPackage rec { + pname = "pylint-celery"; + version = "0.3"; + disabled = !isPy3k; + + src = fetchFromGitHub { + owner = "PyCQA"; + repo = pname; + rev = version; + sha256 = "05fhwraq12c2724pn4py1bjzy5rmsrb1x68zck73nlp5icba6yap"; + }; + + propagatedBuildInputs = [ + pylint-plugin-utils + ]; + + # Testing requires a very old version of pylint, incompatible with other dependencies + doCheck = false; + + meta = with lib; { + description = "A Pylint plugin to analyze Celery applications"; + homepage = "https://github.com/PyCQA/pylint-celery"; + license = licenses.gpl2; + maintainers = with maintainers; [ + kamadorueda + ]; + }; +} diff --git a/pkgs/top-level/python-packages.nix b/pkgs/top-level/python-packages.nix index f95d81c3c87..28d719858b8 100644 --- a/pkgs/top-level/python-packages.nix +++ b/pkgs/top-level/python-packages.nix @@ -4831,6 +4831,8 @@ in { pylint = if isPy3k then callPackage ../development/python-modules/pylint { } else callPackage ../development/python-modules/pylint/1.9.nix { }; + pylint-celery = callPackage ../development/python-modules/pylint-celery { }; + pylint-flask = callPackage ../development/python-modules/pylint-flask { }; pylint-plugin-utils = callPackage ../development/python-modules/pylint-plugin-utils { }; From aaf4ecfddae2a9ffdb6a616d207f38903ce64209 Mon Sep 17 00:00:00 2001 From: Kevin Amado Date: Fri, 10 Jan 2020 01:35:46 -0500 Subject: [PATCH 51/54] pythonPackages.pylint-django: init at 2.0.12 --- .../python-modules/pylint-django/default.nix | 39 +++++++++++++++++++ pkgs/top-level/python-packages.nix | 2 + 2 files changed, 41 insertions(+) create mode 100644 pkgs/development/python-modules/pylint-django/default.nix diff --git a/pkgs/development/python-modules/pylint-django/default.nix b/pkgs/development/python-modules/pylint-django/default.nix new file mode 100644 index 00000000000..04010098807 --- /dev/null +++ b/pkgs/development/python-modules/pylint-django/default.nix @@ -0,0 +1,39 @@ +{ buildPythonPackage +, fetchFromGitHub +, isPy3k +, lib + +# pythonPackages +, django +, pylint-plugin-utils +}: + +buildPythonPackage rec { + pname = "pylint-django"; + version = "2.0.12"; + disabled = !isPy3k; + + src = fetchFromGitHub { + owner = "PyCQA"; + repo = pname; + rev = "v${version}"; + sha256 = "0ha06wpqqn5fp5dapgjhsdx3ahh3y62l7k2f3czlrdjmmivgdp9y"; + }; + + propagatedBuildInputs = [ + django + pylint-plugin-utils + ]; + + # Testing requires checkout from other repositories + doCheck = false; + + meta = with lib; { + description = "A Pylint plugin to analyze Django applications"; + homepage = "https://github.com/PyCQA/pylint-django"; + license = licenses.gpl2; + maintainers = with maintainers; [ + kamadorueda + ]; + }; +} diff --git a/pkgs/top-level/python-packages.nix b/pkgs/top-level/python-packages.nix index 28d719858b8..e8e15384c83 100644 --- a/pkgs/top-level/python-packages.nix +++ b/pkgs/top-level/python-packages.nix @@ -4833,6 +4833,8 @@ in { pylint-celery = callPackage ../development/python-modules/pylint-celery { }; + pylint-django = callPackage ../development/python-modules/pylint-django { }; + pylint-flask = callPackage ../development/python-modules/pylint-flask { }; pylint-plugin-utils = callPackage ../development/python-modules/pylint-plugin-utils { }; From 3773e45fbb789fd96cd233d9e34f16ca7f4e4003 Mon Sep 17 00:00:00 2001 From: Kevin Amado Date: Fri, 10 Jan 2020 01:50:21 -0500 Subject: [PATCH 52/54] pythonPackages.requirements-detector: fix source - The fetch expression was referencing another package (due to a copy paste error), this commit points that to the right repository --- .../python-modules/requirements-detector/default.nix | 9 +++++++-- 1 file changed, 7 insertions(+), 2 deletions(-) diff --git a/pkgs/development/python-modules/requirements-detector/default.nix b/pkgs/development/python-modules/requirements-detector/default.nix index a0f312389f1..0d91cbc7509 100644 --- a/pkgs/development/python-modules/requirements-detector/default.nix +++ b/pkgs/development/python-modules/requirements-detector/default.nix @@ -4,6 +4,7 @@ , lib # pythonPackages +, astroid , pytest }: @@ -13,12 +14,16 @@ buildPythonPackage rec { disabled = isPy27; src = fetchFromGitHub { - owner = "yuvadm"; + owner = "landscapeio"; repo = pname; rev = version; - sha256 = "15s0n1lhkz0zwi33waqkkjipal3f7s45rxsj1bw89xpr4dj87qx5"; + sha256 = "1sfmm7daz0kpdx6pynsvi6qlfhrzxx783l1wb69c8dfzya4xssym"; }; + propagatedBuildInputs = [ + astroid + ]; + checkInputs = [ pytest ]; From a892d9617d3936c64476a3bf3f2d59bdfbb1f96a Mon Sep 17 00:00:00 2001 From: Kevin Amado Date: Fri, 10 Jan 2020 01:56:52 -0500 Subject: [PATCH 53/54] prospector: init at 1.2.0 --- pkgs/development/tools/prospector/default.nix | 74 +++++++++++++++++++ .../tools/prospector/setoptconf.nix | 26 +++++++ pkgs/top-level/all-packages.nix | 4 + 3 files changed, 104 insertions(+) create mode 100644 pkgs/development/tools/prospector/default.nix create mode 100644 pkgs/development/tools/prospector/setoptconf.nix diff --git a/pkgs/development/tools/prospector/default.nix b/pkgs/development/tools/prospector/default.nix new file mode 100644 index 00000000000..38472ce86f0 --- /dev/null +++ b/pkgs/development/tools/prospector/default.nix @@ -0,0 +1,74 @@ +{ lib +, pkgs +, python +}: + +let + py = python.override { + packageOverrides = self: super: { + pep8-naming = super.pep8-naming.overridePythonAttrs(oldAttrs: rec { + version = "0.4.1"; + src = oldAttrs.src.override { + inherit version; + sha256 = "0nhf8p37y008shd4f21bkj5pizv8q0l8cpagyyb8gr059d6gvvaf"; + }; + }); + }; + }; + setoptconf = py.pkgs.callPackage ./setoptconf.nix { }; +in + +with py.pkgs; + +buildPythonApplication rec { + pname = "prospector"; + version = "1.2.0"; + disabled = isPy27; + + src = pkgs.fetchFromGitHub { + owner = "PyCQA"; + repo = pname; + rev = version; + sha256 = "07kb37zrrsriqzcmli0ghx7qb1iwkzh83qsiikl9jy50faby2sjg"; + }; + + checkInputs = [ + pytest + ]; + + checkPhase = '' + pytest + ''; + + patchPhase = '' + substituteInPlace setup.py \ + --replace 'pycodestyle<=2.4.0' 'pycodestyle<=2.5.0' + ''; + + propagatedBuildInputs = [ + astroid + django + dodgy + mccabe + pep8-naming + pycodestyle + pydocstyle + pyflakes + pylint + pylint-celery + pylint-django + pylint-flask + pyyaml + requirements-detector + setoptconf + ]; + + meta = with lib; { + description = "Tool to analyse Python code and output information about errors, potential problems, convention violations and complexity"; + homepage = "https://github.com/PyCQA/prospector"; + license = licenses.gpl2; + maintainers = with maintainers; [ + kamadorueda + ]; + }; +} diff --git a/pkgs/development/tools/prospector/setoptconf.nix b/pkgs/development/tools/prospector/setoptconf.nix new file mode 100644 index 00000000000..62b4e95357d --- /dev/null +++ b/pkgs/development/tools/prospector/setoptconf.nix @@ -0,0 +1,26 @@ +{ buildPythonPackage +, fetchPypi +, lib +}: + +buildPythonPackage rec { + pname = "setoptconf"; + version = "0.2.0"; + + src = fetchPypi { + inherit pname version; + sha256 = "177l7j68j751i781bgk6pfhxjj7hwqxzdm2ja5fkywbp0275s2sv"; + }; + + # Base tests provided via PyPi are broken + doCheck = false; + + meta = with lib; { + homepage = "https://pypi.org/project/setoptconf"; + description = "A module for retrieving program settings from various sources in a consistant method"; + license = licenses.mit; + maintainers = with maintainers; [ + kamadorueda + ]; + }; +} diff --git a/pkgs/top-level/all-packages.nix b/pkgs/top-level/all-packages.nix index f11cf3da6d5..245abf731dd 100644 --- a/pkgs/top-level/all-packages.nix +++ b/pkgs/top-level/all-packages.nix @@ -13653,6 +13653,10 @@ in buildPythonApplication click future six; }; + prospector = callPackage ../development/tools/prospector { + python = python37; + }; + protobuf = protobuf3_7; protobuf3_11 = callPackage ../development/libraries/protobuf/3.11.nix { }; From 841a5b99654ba9cf758a9de30a1bca125762e373 Mon Sep 17 00:00:00 2001 From: "R. RyanTM" Date: Wed, 15 Jan 2020 05:41:38 +0000 Subject: [PATCH 54/54] bftpd: 5.2 -> 5.4 --- pkgs/servers/ftp/bftpd/default.nix | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/pkgs/servers/ftp/bftpd/default.nix b/pkgs/servers/ftp/bftpd/default.nix index e7c22904cea..34757462a17 100644 --- a/pkgs/servers/ftp/bftpd/default.nix +++ b/pkgs/servers/ftp/bftpd/default.nix @@ -5,11 +5,11 @@ let in stdenv.mkDerivation rec { name = "${pname}-${version}"; - version = "5.2"; + version = "5.4"; src = fetchurl { url = "mirror://sourceforge/project/${pname}/${pname}/${name}/${name}.tar.gz"; - sha256 = "0kmavljj3zwpgdib9nb14fnriiv0l9zm3hglimcyz26sxbw5jqky"; + sha256 = "19fd9r233wkjk8gdxn6qsjgfijiw67a48xhgbm2kq46bx80yf3pg"; }; preConfigure = ''