From caaee8a55e4ce0a3e4324c6bb43a32794e212a8b Mon Sep 17 00:00:00 2001 From: embr Date: Wed, 28 Apr 2021 22:49:55 +0200 Subject: [PATCH 01/18] bozohttpd: init --- .../bozohttpd/0001-include-stdint.h.patch | 12 +++ .../bozohttpd/0002-dont-use-host-BUFSIZ.patch | 88 ++++++++++++++++++ pkgs/servers/http/bozohttpd/default.nix | 91 +++++++++++++++++++ pkgs/top-level/all-packages.nix | 2 + 4 files changed, 193 insertions(+) create mode 100644 pkgs/servers/http/bozohttpd/0001-include-stdint.h.patch create mode 100644 pkgs/servers/http/bozohttpd/0002-dont-use-host-BUFSIZ.patch create mode 100644 pkgs/servers/http/bozohttpd/default.nix diff --git a/pkgs/servers/http/bozohttpd/0001-include-stdint.h.patch b/pkgs/servers/http/bozohttpd/0001-include-stdint.h.patch new file mode 100644 index 000000000000..1d0d716290dd --- /dev/null +++ b/pkgs/servers/http/bozohttpd/0001-include-stdint.h.patch @@ -0,0 +1,12 @@ +diff --git a/libexec/httpd/bozohttpd.c b/libexec/httpd/bozohttpd.c +index 67083b2c6782..273cb5f5a42b 100644 +--- a/libexec/httpd/bozohttpd.c ++++ b/libexec/httpd/bozohttpd.c +@@ -138,6 +138,7 @@ + #include + #include + #include ++#include + #include + #include + #include diff --git a/pkgs/servers/http/bozohttpd/0002-dont-use-host-BUFSIZ.patch b/pkgs/servers/http/bozohttpd/0002-dont-use-host-BUFSIZ.patch new file mode 100644 index 000000000000..9a01a4adce7f --- /dev/null +++ b/pkgs/servers/http/bozohttpd/0002-dont-use-host-BUFSIZ.patch @@ -0,0 +1,88 @@ +diff --git a/libexec/httpd/auth-bozo.c b/libexec/httpd/auth-bozo.c +index a2f2ee4304c1..c9eefe3313dd 100644 +--- a/libexec/httpd/auth-bozo.c ++++ b/libexec/httpd/auth-bozo.c +@@ -54,7 +54,7 @@ bozo_auth_check(bozo_httpreq_t *request, const char *file) + bozohttpd_t *httpd = request->hr_httpd; + struct stat sb; + char dir[MAXPATHLEN], authfile[MAXPATHLEN], *basename; +- char user[BUFSIZ], *pass; ++ char user[BOZO_MINBUFSIZE], *pass; + FILE *fp; + int len; + +@@ -144,7 +144,7 @@ bozo_auth_check_headers(bozo_httpreq_t *request, char *val, char *str, + + if (strcasecmp(val, "authorization") == 0 && + strncasecmp(str, "Basic ", 6) == 0) { +- char authbuf[BUFSIZ]; ++ char authbuf[BOZO_MINBUFSIZE]; + char *pass = NULL; + ssize_t alen; + +diff --git a/libexec/httpd/bozohttpd.c b/libexec/httpd/bozohttpd.c +index 273cb5f5a42b..f619567ba822 100644 +--- a/libexec/httpd/bozohttpd.c ++++ b/libexec/httpd/bozohttpd.c +@@ -2275,7 +2275,7 @@ bozo_http_error(bozohttpd_t *httpd, int code, bozo_httpreq_t *request, + } + #endif /* !NO_USER_SUPPORT */ + +- size = snprintf(httpd->errorbuf, BUFSIZ, ++ size = snprintf(httpd->errorbuf, BOZO_MINBUFSIZE, + "%s\n" + "

%s

\n" + "%s%s:
%s
\n" +@@ -2285,10 +2285,10 @@ bozo_http_error(bozohttpd_t *httpd, int code, bozo_httpreq_t *request, + user ? user : "", file, + reason, hostname, portbuf, hostname, portbuf); + free(user); +- if (size >= (int)BUFSIZ) { ++ if (size >= (int)BOZO_MINBUFSIZE) { + bozowarn(httpd, + "bozo_http_error buffer too small, truncated"); +- size = (int)BUFSIZ; ++ size = (int)BOZO_MINBUFSIZE; + } + + if (file_alloc) +@@ -2515,7 +2515,7 @@ bozo_init_httpd(bozohttpd_t *httpd) + httpd->mmapsz = BOZO_MMAPSZ; + + /* error buffer for bozo_http_error() */ +- if ((httpd->errorbuf = malloc(BUFSIZ)) == NULL) { ++ if ((httpd->errorbuf = malloc(BOZO_MINBUFSIZE)) == NULL) { + fprintf(stderr, + "bozohttpd: memory_allocation failure\n"); + return 0; +diff --git a/libexec/httpd/bozohttpd.h b/libexec/httpd/bozohttpd.h +index c83bd112d9d7..7b19494cf5ad 100644 +--- a/libexec/httpd/bozohttpd.h ++++ b/libexec/httpd/bozohttpd.h +@@ -227,6 +227,8 @@ typedef struct bozoprefs_t { + /* only allow this many total headers bytes */ + #define BOZO_HEADERS_MAX_SIZE (16 * 1024) + ++#define BOZO_MINBUFSIZE (4 * 1024) ++ + /* debug flags */ + #define DEBUG_NORMAL 1 + #define DEBUG_FAT 2 +diff --git a/libexec/httpd/testsuite/t10.out b/libexec/httpd/testsuite/t10.out +index cf410110627c..b3ab88f94fb9 100644 +--- a/libexec/httpd/testsuite/t10.out ++++ b/libexec/httpd/testsuite/t10.out +@@ -1,8 +1,8 @@ + HTTP/1.0 404 Not Found + Content-Type: text/html +-Content-Length: 1024 +-Server: bozohttpd/20140708 ++Content-Length: 4096 ++Server: bozohttpd/20210403 + + 404 Not Found +

404 Not Found

+-/xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx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xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx +\ No newline at end of file diff --git a/pkgs/servers/http/bozohttpd/default.nix b/pkgs/servers/http/bozohttpd/default.nix new file mode 100644 index 000000000000..12aa438cf122 --- /dev/null +++ b/pkgs/servers/http/bozohttpd/default.nix @@ -0,0 +1,91 @@ +{ lib +, stdenv +, fetchurl +, bmake +, groff +, inetutils +, wget +, openssl +, userSupport ? true +, cgiSupport ? true +, dirIndexSupport ? true +, dynamicContentSupport ? true +, sslSupport ? true +, luaSupport ? true +, lua +, htpasswdSupport ? true +}: + +let inherit (lib) optional optionals; +in +stdenv.mkDerivation rec { + pname = "bozohttpd"; + version = "20210227"; + + # bozohttpd is developed in-tree in pkgsrc, canonical hashes can be found at: + # http://cvsweb.netbsd.org/bsdweb.cgi/pkgsrc/www/bozohttpd/distinfo + src = fetchurl { + url = "http://www.eterna.com.au/${pname}/${pname}-${version}.tar.bz2"; + sha512 = "b838498626ffb7f7e84f31611e0e99aaa3af64bd9376e1a13ec16313c182eebfd9ea2c2d03904497239af723bf34a3d2202dac1f2d3e55f9fd076f6d45ccfa33"; + }; + + # backport two unreleased commits to fix builds on non-netbsd platforms. + patches = [ + # add missing `#include ` + # https://freshbsd.org/netbsd/src/commit/qMGNoXfgeieZBVRC + ./0001-include-stdint.h.patch + + # BUFSIZ is not guaranteed to be large enough + # https://freshbsd.org/netbsd/src/commit/A4ueIHIp3JgjNVRC + ./0002-dont-use-host-BUFSIZ.patch + ]; + patchFlags = [ "-p3" ]; + + buildInputs = [ openssl ] ++ optional (luaSupport) lua; + nativeBuildInputs = [ bmake groff ]; + + COPTS = + [ + "-DNO_BLOCKLIST_SUPPORT" # unpackaged dependency: https://man.netbsd.org/blocklist.3 + ] + ++ optional (!userSupport) "-DNO_USER_SUPPORT" + ++ optional (!dirIndexSupport) "-DNO_DIRINDEX_SUPPORT" + ++ optional (!dynamicContentSupport) "-DNO_DYNAMIC_CONTENT" + ++ optional (!luaSupport) "-DNO_LUA_SUPPORT" + ++ optional (!sslSupport) "-DNO_SSL_SUPPORT" + ++ optional (!cgiSupport) "-DNO_CGIBIN_SUPPORT" + ++ optional (htpasswdSupport) "-DDO_HTPASSWD"; + + _LDADD = [ "-lcrypt" "-lm" ] + ++ optional (luaSupport) "-llua" + ++ optionals (sslSupport) [ "-lssl" "-lcrypto" ]; + makeFlags = [ "LDADD=$(_LDADD)" ]; + + doCheck = true; + checkInputs = [ inetutils wget ]; + checkFlags = [ "-dx" "VERBOSE=yes" ] ++ optional (!cgiSupport) "CGITESTS="; + + installPhase = '' + install -m755 -Dt $out/bin bozohttpd + install -m644 -Dt $out/share/man/man8 bozohttpd.8 + ''; + + meta = with lib; { + description = "Bozotic HTTP server; small and secure"; + longDescription = '' + bozohttpd is a small and secure HTTP version 1.1 server. Its main + feature is the lack of features, reducing the code size and improving + verifiability. + + It supports CGI/1.1, HTTP/1.1, HTTP/1.0, HTTP/0.9, ~user translations, + virtual hosting support, as well as multiple IP-based servers on a + single machine. It is capable of servicing pages via the IPv6 protocol. + It has SSL support. It has no configuration file by design. + ''; + homepage = "http://www.eterna.com.au/bozohttpd/"; + changelog = "http://www.eterna.com.au/bozohttpd/CHANGES"; + license = licenses.bsd2; + maintainers = [ maintainers.embr ]; + platforms = platforms.all; + }; +} diff --git a/pkgs/top-level/all-packages.nix b/pkgs/top-level/all-packages.nix index f2a6953067e0..f6444216f400 100644 --- a/pkgs/top-level/all-packages.nix +++ b/pkgs/top-level/all-packages.nix @@ -1953,6 +1953,8 @@ in boxfs = callPackage ../tools/filesystems/boxfs { }; + bozohttpd = callPackage ../servers/http/bozohttpd { }; + bpytop = callPackage ../tools/system/bpytop { }; brasero-original = lowPrio (callPackage ../tools/cd-dvd/brasero { }); From 28508dce6a7e192339caacdb9dc7dd3d3e2e408c Mon Sep 17 00:00:00 2001 From: embr Date: Mon, 24 May 2021 13:35:09 +0200 Subject: [PATCH 02/18] bozohttpd: use bmake flags instead of a custom installPhase --- pkgs/servers/http/bozohttpd/default.nix | 7 +------ 1 file changed, 1 insertion(+), 6 deletions(-) diff --git a/pkgs/servers/http/bozohttpd/default.nix b/pkgs/servers/http/bozohttpd/default.nix index 12aa438cf122..0e97910e6f11 100644 --- a/pkgs/servers/http/bozohttpd/default.nix +++ b/pkgs/servers/http/bozohttpd/default.nix @@ -59,17 +59,12 @@ stdenv.mkDerivation rec { _LDADD = [ "-lcrypt" "-lm" ] ++ optional (luaSupport) "-llua" ++ optionals (sslSupport) [ "-lssl" "-lcrypto" ]; - makeFlags = [ "LDADD=$(_LDADD)" ]; + makeFlags = [ "LDADD=$(_LDADD)" "prefix=$(out)" "MANDIR=$(out)/share/man" "BINOWN=" ]; doCheck = true; checkInputs = [ inetutils wget ]; checkFlags = [ "-dx" "VERBOSE=yes" ] ++ optional (!cgiSupport) "CGITESTS="; - installPhase = '' - install -m755 -Dt $out/bin bozohttpd - install -m644 -Dt $out/share/man/man8 bozohttpd.8 - ''; - meta = with lib; { description = "Bozotic HTTP server; small and secure"; longDescription = '' From 77acedc33b2a90f9eab71a4582e655ea5c840869 Mon Sep 17 00:00:00 2001 From: embr Date: Mon, 24 May 2021 13:35:38 +0200 Subject: [PATCH 03/18] bozohttpd: remove unnecessary checkFlags --- pkgs/servers/http/bozohttpd/default.nix | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/pkgs/servers/http/bozohttpd/default.nix b/pkgs/servers/http/bozohttpd/default.nix index 0e97910e6f11..e934f86f2c17 100644 --- a/pkgs/servers/http/bozohttpd/default.nix +++ b/pkgs/servers/http/bozohttpd/default.nix @@ -63,7 +63,7 @@ stdenv.mkDerivation rec { doCheck = true; checkInputs = [ inetutils wget ]; - checkFlags = [ "-dx" "VERBOSE=yes" ] ++ optional (!cgiSupport) "CGITESTS="; + checkFlags = optional (!cgiSupport) "CGITESTS="; meta = with lib; { description = "Bozotic HTTP server; small and secure"; From dc9165346e18665191b39e2ae5309e1e50b7ff40 Mon Sep 17 00:00:00 2001 From: embr Date: Wed, 26 May 2021 11:20:59 +0200 Subject: [PATCH 04/18] bozohttpd: resolve warnings, serve >2GB files on 32bit host -D_DEFAULT_SOURCE *and* -D_GNU_SOURCE together resolve all warnings about implicitly defined functions. -D_LARGEFILE_SOURCE and -D_FILE_OFFSET_BITS=64 enable gcc's Large File Extensions to allow a 32-bit host to serve files larger than 2GB. Based on what Makefile.boot does, for platforms without bmake: http://cvsweb.netbsd.org/bsdweb.cgi/src/libexec/httpd/Makefile.boot --- pkgs/servers/http/bozohttpd/default.nix | 10 +++++++++- 1 file changed, 9 insertions(+), 1 deletion(-) diff --git a/pkgs/servers/http/bozohttpd/default.nix b/pkgs/servers/http/bozohttpd/default.nix index e934f86f2c17..6d403756bd28 100644 --- a/pkgs/servers/http/bozohttpd/default.nix +++ b/pkgs/servers/http/bozohttpd/default.nix @@ -46,7 +46,15 @@ stdenv.mkDerivation rec { COPTS = [ - "-DNO_BLOCKLIST_SUPPORT" # unpackaged dependency: https://man.netbsd.org/blocklist.3 + "-D_DEFAULT_SOURCE" + "-D_GNU_SOURCE" + + # Ensure that we can serve >2GB files even on 32-bit systems. + "-D_LARGEFILE_SOURCE" + "-D_FILE_OFFSET_BITS=64" + + # unpackaged dependency: https://man.netbsd.org/blocklist.3 + "-DNO_BLOCKLIST_SUPPORT" ] ++ optional (!userSupport) "-DNO_USER_SUPPORT" ++ optional (!dirIndexSupport) "-DNO_DIRINDEX_SUPPORT" From f4f05481e325aa8d5975f11f46340ca04ff729d6 Mon Sep 17 00:00:00 2001 From: embr Date: Wed, 26 May 2021 11:38:57 +0200 Subject: [PATCH 05/18] bozohttpd: add bozohttpd-minimal target --- pkgs/servers/http/bozohttpd/default.nix | 15 ++++++++------- pkgs/top-level/all-packages.nix | 1 + 2 files changed, 9 insertions(+), 7 deletions(-) diff --git a/pkgs/servers/http/bozohttpd/default.nix b/pkgs/servers/http/bozohttpd/default.nix index 6d403756bd28..32a21f842643 100644 --- a/pkgs/servers/http/bozohttpd/default.nix +++ b/pkgs/servers/http/bozohttpd/default.nix @@ -6,14 +6,15 @@ , inetutils , wget , openssl -, userSupport ? true -, cgiSupport ? true -, dirIndexSupport ? true -, dynamicContentSupport ? true -, sslSupport ? true -, luaSupport ? true +, minimal ? false +, userSupport ? !minimal +, cgiSupport ? !minimal +, dirIndexSupport ? !minimal +, dynamicContentSupport ? !minimal +, sslSupport ? !minimal +, luaSupport ? !minimal , lua -, htpasswdSupport ? true +, htpasswdSupport ? !minimal }: let inherit (lib) optional optionals; diff --git a/pkgs/top-level/all-packages.nix b/pkgs/top-level/all-packages.nix index f6444216f400..a86f41e44f2c 100644 --- a/pkgs/top-level/all-packages.nix +++ b/pkgs/top-level/all-packages.nix @@ -1954,6 +1954,7 @@ in boxfs = callPackage ../tools/filesystems/boxfs { }; bozohttpd = callPackage ../servers/http/bozohttpd { }; + bozohttpd-minimal = callPackage ../servers/http/bozohttpd { minimal = true; }; bpytop = callPackage ../tools/system/bpytop { }; From 2cc146464c720a93789d6f12852af0b7133cab0d Mon Sep 17 00:00:00 2001 From: "R. RyanTM" Date: Mon, 31 May 2021 06:20:10 +0000 Subject: [PATCH 06/18] janet: 1.15.5 -> 1.16.0 --- pkgs/development/interpreters/janet/default.nix | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/pkgs/development/interpreters/janet/default.nix b/pkgs/development/interpreters/janet/default.nix index b55c4b613a24..4c836264017b 100644 --- a/pkgs/development/interpreters/janet/default.nix +++ b/pkgs/development/interpreters/janet/default.nix @@ -2,13 +2,13 @@ stdenv.mkDerivation rec { pname = "janet"; - version = "1.15.5"; + version = "1.16.0"; src = fetchFromGitHub { owner = "janet-lang"; repo = pname; rev = "v${version}"; - sha256 = "sha256-szqH2Qqc+AKTuoZjYHhTmiHcFQ+PMsljh0RSD/q4gD4="; + sha256 = "sha256-Wrr2zie251oB+uhsLMmkPBV0b3MwTmcPTgNJOsgCems="; }; nativeBuildInputs = [ meson ninja ]; From ee4b583ae8b11a38065ed7aa3eef01389f44b30f Mon Sep 17 00:00:00 2001 From: embr Date: Mon, 31 May 2021 10:47:46 +0200 Subject: [PATCH 07/18] bozohttpd: minor formatting The Nix style guide isn't exactly comprehensive, but this at least seems slightly closer to the examples: https://nixos.org/manual/nixpkgs/stable/#sec-syntax I'm annoyed that nixpkgs-fmt as of writing won't accept: COPTS = [ # ... ] ++ optional (...) "..." ++ optional (...) "..."; ...which seems to be the actual convention, looking at eg. pkgs.nginx. --- pkgs/servers/http/bozohttpd/default.nix | 33 ++++++++++++------------- 1 file changed, 16 insertions(+), 17 deletions(-) diff --git a/pkgs/servers/http/bozohttpd/default.nix b/pkgs/servers/http/bozohttpd/default.nix index 32a21f842643..9a3526d380e1 100644 --- a/pkgs/servers/http/bozohttpd/default.nix +++ b/pkgs/servers/http/bozohttpd/default.nix @@ -45,25 +45,24 @@ stdenv.mkDerivation rec { buildInputs = [ openssl ] ++ optional (luaSupport) lua; nativeBuildInputs = [ bmake groff ]; - COPTS = - [ - "-D_DEFAULT_SOURCE" - "-D_GNU_SOURCE" + COPTS = [ + "-D_DEFAULT_SOURCE" + "-D_GNU_SOURCE" - # Ensure that we can serve >2GB files even on 32-bit systems. - "-D_LARGEFILE_SOURCE" - "-D_FILE_OFFSET_BITS=64" + # ensure that we can serve >2GB files even on 32-bit systems. + "-D_LARGEFILE_SOURCE" + "-D_FILE_OFFSET_BITS=64" - # unpackaged dependency: https://man.netbsd.org/blocklist.3 - "-DNO_BLOCKLIST_SUPPORT" - ] - ++ optional (!userSupport) "-DNO_USER_SUPPORT" - ++ optional (!dirIndexSupport) "-DNO_DIRINDEX_SUPPORT" - ++ optional (!dynamicContentSupport) "-DNO_DYNAMIC_CONTENT" - ++ optional (!luaSupport) "-DNO_LUA_SUPPORT" - ++ optional (!sslSupport) "-DNO_SSL_SUPPORT" - ++ optional (!cgiSupport) "-DNO_CGIBIN_SUPPORT" - ++ optional (htpasswdSupport) "-DDO_HTPASSWD"; + # unpackaged dependency: https://man.netbsd.org/blocklist.3 + "-DNO_BLOCKLIST_SUPPORT" + ] + ++ optional (!userSupport) "-DNO_USER_SUPPORT" + ++ optional (!dirIndexSupport) "-DNO_DIRINDEX_SUPPORT" + ++ optional (!dynamicContentSupport) "-DNO_DYNAMIC_CONTENT" + ++ optional (!luaSupport) "-DNO_LUA_SUPPORT" + ++ optional (!sslSupport) "-DNO_SSL_SUPPORT" + ++ optional (!cgiSupport) "-DNO_CGIBIN_SUPPORT" + ++ optional (htpasswdSupport) "-DDO_HTPASSWD"; _LDADD = [ "-lcrypt" "-lm" ] ++ optional (luaSupport) "-llua" From a75c0a7f8702f62258300de15ce99216d0a12e92 Mon Sep 17 00:00:00 2001 From: embr Date: Mon, 31 May 2021 10:53:33 +0200 Subject: [PATCH 08/18] bozohttpd: experimental darwin compat patch As far as I can tell, libSystem on darwin provides a libm compatibility symlink, but not a libcrypt one. Prior art (eg. CPython) appears to use `stdenv.isDarwin` as a proxy for `stdenv.hostPlatform.libc == "libSystem"`, but the latter also works in cases where we're building on Darwin, but with eg. musl for some reason. --- pkgs/servers/http/bozohttpd/default.nix | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/pkgs/servers/http/bozohttpd/default.nix b/pkgs/servers/http/bozohttpd/default.nix index 9a3526d380e1..c01be041e86f 100644 --- a/pkgs/servers/http/bozohttpd/default.nix +++ b/pkgs/servers/http/bozohttpd/default.nix @@ -64,7 +64,8 @@ stdenv.mkDerivation rec { ++ optional (!cgiSupport) "-DNO_CGIBIN_SUPPORT" ++ optional (htpasswdSupport) "-DDO_HTPASSWD"; - _LDADD = [ "-lcrypt" "-lm" ] + _LDADD = [ "-lm" ] + ++ optional (stdenv.hostPlatform.libc != "libSystem") "-lcrypt" ++ optional (luaSupport) "-llua" ++ optionals (sslSupport) [ "-lssl" "-lcrypto" ]; makeFlags = [ "LDADD=$(_LDADD)" "prefix=$(out)" "MANDIR=$(out)/share/man" "BINOWN=" ]; From 29c70d515a827c043fcef37ddbb675cd620f9301 Mon Sep 17 00:00:00 2001 From: Ilan Joselevich Date: Mon, 31 May 2021 15:09:22 +0300 Subject: [PATCH 09/18] jitsi-meet-electron: 2.8.5 -> 2.8.6 --- .../instant-messengers/jitsi-meet-electron/default.nix | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/pkgs/applications/networking/instant-messengers/jitsi-meet-electron/default.nix b/pkgs/applications/networking/instant-messengers/jitsi-meet-electron/default.nix index 363d123dbe12..27bc38cf6c2c 100644 --- a/pkgs/applications/networking/instant-messengers/jitsi-meet-electron/default.nix +++ b/pkgs/applications/networking/instant-messengers/jitsi-meet-electron/default.nix @@ -11,11 +11,11 @@ let in stdenv.mkDerivation rec { pname = "jitsi-meet-electron"; - version = "2.8.5"; + version = "2.8.6"; src = fetchurl { url = "https://github.com/jitsi/jitsi-meet-electron/releases/download/v${version}/jitsi-meet-x86_64.AppImage"; - sha256 = "0r3jj3qjx38l1g733vhrwcm2yg7ppp23ciz84x2kqq51mlzr84c6"; + sha256 = "sha256-kLX8SZERlyNVSvszkV/fkQh/Z/Z20PAPJ9eug2oKlqI="; name = "${pname}-${version}.AppImage"; }; From 5de82b83a35bd39995f616ebb0aacb184d888eab Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Robert=20Sch=C3=BCtz?= Date: Mon, 31 May 2021 14:35:24 +0200 Subject: [PATCH 10/18] kdeltachat: unstable-2021-05-22 -> unstable-2021-05-31 --- .../networking/instant-messengers/kdeltachat/default.nix | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/pkgs/applications/networking/instant-messengers/kdeltachat/default.nix b/pkgs/applications/networking/instant-messengers/kdeltachat/default.nix index cdda2fccc18e..dfd4f266f813 100644 --- a/pkgs/applications/networking/instant-messengers/kdeltachat/default.nix +++ b/pkgs/applications/networking/instant-messengers/kdeltachat/default.nix @@ -13,13 +13,13 @@ mkDerivation rec { pname = "kdeltachat"; - version = "unstable-2021-05-22"; + version = "unstable-2021-05-31"; src = fetchFromSourcehut { owner = "~link2xt"; repo = "kdeltachat"; - rev = "9c22c6d6a03f620f14f289b464354159b8a76f6b"; - sha256 = "1qmal6dng8ynp5mrkrgykz78c8zp1gbv53s479qvj0h3axrp2s8p"; + rev = "318ae67c17f3e64532bad23c2a61a93446db553d"; + sha256 = "1qy0hlp0r91sqn26ai9isxw4rl8kcmmb10a2p9yqynhm8py3dfn4"; }; nativeBuildInputs = [ From 19120ab49753fb29feb5a49a20398f7d39a96ea4 Mon Sep 17 00:00:00 2001 From: Sebastian Sellmeier Date: Mon, 31 May 2021 16:36:26 +0200 Subject: [PATCH 11/18] sane-airscan: 0.99.24 -> 0.99.26 --- pkgs/applications/graphics/sane/backends/airscan/default.nix | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/pkgs/applications/graphics/sane/backends/airscan/default.nix b/pkgs/applications/graphics/sane/backends/airscan/default.nix index d2ff4339890d..8d0e32e2b4e1 100644 --- a/pkgs/applications/graphics/sane/backends/airscan/default.nix +++ b/pkgs/applications/graphics/sane/backends/airscan/default.nix @@ -2,7 +2,7 @@ , libxml2, gnutls, sane-backends }: stdenv.mkDerivation rec { pname = "sane-airscan"; - version = "0.99.24"; + version = "0.99.26"; nativeBuildInputs = [ meson ninja pkg-config ]; buildInputs = [ avahi gnutls libjpeg libpng libxml2 sane-backends ]; @@ -11,7 +11,7 @@ stdenv.mkDerivation rec { owner = "alexpevzner"; repo = pname; rev = version; - sha256 = "sha256-2zSLC9P7Q/GMefHvmrUz6nV2hgScb4BhPAkahNBouqk="; + sha256 = "08snfg5zx9924ryww0kxf1kgl085yw7fg6l4f1kzlhcmqf1958w5"; }; meta = with lib; { From 7cdccfafb72c9a2df0cbced0bfc501b32c092cb1 Mon Sep 17 00:00:00 2001 From: oxalica Date: Tue, 25 May 2021 04:08:04 +0800 Subject: [PATCH 12/18] rust-analyzer: 2021-05-17 -> 2021-05-31 --- .../tools/rust/rust-analyzer/default.nix | 24 ++++--------------- 1 file changed, 4 insertions(+), 20 deletions(-) diff --git a/pkgs/development/tools/rust/rust-analyzer/default.nix b/pkgs/development/tools/rust/rust-analyzer/default.nix index a038e9d65d25..066ecefaa143 100644 --- a/pkgs/development/tools/rust/rust-analyzer/default.nix +++ b/pkgs/development/tools/rust/rust-analyzer/default.nix @@ -1,4 +1,4 @@ -{ lib, stdenv, fetchFromGitHub, rustPlatform, CoreServices, cmake, fetchpatch +{ lib, stdenv, fetchFromGitHub, rustPlatform, CoreServices, cmake , libiconv , useMimalloc ? false , doCheck ? true @@ -6,32 +6,16 @@ rustPlatform.buildRustPackage rec { pname = "rust-analyzer-unwrapped"; - version = "2021-05-17"; - cargoSha256 = "sha256-uSBukInJ3FEMmMpG9DN3XeXm+hzUFqCrZORb4NIEJhw="; + version = "2021-05-31"; + cargoSha256 = "sha256-atfpcP3esMQQ2lOFTKksQH1nV78KAic51XZi+R++vHg="; src = fetchFromGitHub { owner = "rust-analyzer"; repo = "rust-analyzer"; rev = version; - sha256 = "sha256-BsabpY4LArfsDPAMsggxKu1+OQZmqRe//+a5uBcuFps="; + sha256 = "sha256-v2zS9qnvNrImQ3UqU80YagwLJKkVxwvwMMISimFbMOI="; }; - patches = [ - # Revert updates which require rust 1.52.0. - # We currently have rust 1.51.0 in nixpkgs. - # https://github.com/rust-analyzer/rust-analyzer/pull/8718 - (fetchpatch { - url = "https://github.com/rust-analyzer/rust-analyzer/pull/8718/commits/607d8a2f61e56fabb7a3bc5132592917fcdca970.patch"; - sha256 = "sha256-g1yyq/XSwGxftnqSW1bR5UeMW4gW28f4JciGvwQ/n08="; - revert = true; - }) - (fetchpatch { - url = "https://github.com/rust-analyzer/rust-analyzer/pull/8718/commits/6a16ec52aa0d91945577c99cdf421b303b59301e.patch"; - sha256 = "sha256-n7Ew/0fG8zPaMFCi8FVLjQZwJSaczI/QoehC6pDLrAk="; - revert = true; - }) - ]; - buildAndTestSubdir = "crates/rust-analyzer"; cargoBuildFlags = lib.optional useMimalloc "--features=mimalloc"; From 79a477b1c6ba341d49560c8c664e8f21aeb67097 Mon Sep 17 00:00:00 2001 From: Izorkin Date: Tue, 1 Jun 2021 13:28:49 +0300 Subject: [PATCH 13/18] unit: 1.22.0 -> 1.24.0 --- pkgs/servers/http/unit/default.nix | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/pkgs/servers/http/unit/default.nix b/pkgs/servers/http/unit/default.nix index e6863479f54a..e8d51f9efffb 100644 --- a/pkgs/servers/http/unit/default.nix +++ b/pkgs/servers/http/unit/default.nix @@ -30,14 +30,14 @@ let php74-unit = php74.override phpConfig; in stdenv.mkDerivation rec { - version = "1.22.0"; + version = "1.24.0"; pname = "unit"; src = fetchFromGitHub { owner = "nginx"; repo = pname; rev = version; - sha256 = "sha256-M5Q8sxI1nZi8+ixO1PHuQpQ81EwyLAsnBI5PTtm+bKA="; + sha256 = "0214dvwz31hxjxnqk3fkqhn2xznaqdrb96m5s2k8ll8rldmk1gd6"; }; nativeBuildInputs = [ which ]; From 43d59e94dca3d49d73112d4697c7d5033263f021 Mon Sep 17 00:00:00 2001 From: adisbladis Date: Tue, 1 Jun 2021 16:59:39 -0500 Subject: [PATCH 14/18] poetry2nix: 1.16.1 -> 1.17.0 --- .../tools/poetry2nix/poetry2nix/default.nix | 11 +- .../{fetch-wheel.sh => fetch-from-pypi.sh} | 4 +- .../poetry2nix/fetch_from_legacy.py | 72 +++++ .../tools/poetry2nix/poetry2nix/lib.nix | 57 ++-- .../poetry2nix/poetry2nix/mk-poetry-dep.nix | 14 +- .../tools/poetry2nix/poetry2nix/overrides.nix | 277 ++++++++++++++++-- .../tools/poetry2nix/poetry2nix/pep508.nix | 2 +- 7 files changed, 376 insertions(+), 61 deletions(-) rename pkgs/development/tools/poetry2nix/poetry2nix/{fetch-wheel.sh => fetch-from-pypi.sh} (86%) create mode 100644 pkgs/development/tools/poetry2nix/poetry2nix/fetch_from_legacy.py diff --git a/pkgs/development/tools/poetry2nix/poetry2nix/default.nix b/pkgs/development/tools/poetry2nix/poetry2nix/default.nix index 62063ff09947..9b55b72c2fa0 100644 --- a/pkgs/development/tools/poetry2nix/poetry2nix/default.nix +++ b/pkgs/development/tools/poetry2nix/poetry2nix/default.nix @@ -5,7 +5,7 @@ }: let # Poetry2nix version - version = "1.16.1"; + version = "1.17.0"; inherit (poetryLib) isCompatible readTOML moduleName; @@ -163,7 +163,7 @@ lib.makeScope pkgs.newScope (self: { compatible = partitions.right; incompatible = partitions.wrong; - # Create an overriden version of pythonPackages + # Create an overridden version of pythonPackages # # We need to avoid mixing multiple versions of pythonPackages in the same # closure as python can only ever have one version of a dependency @@ -229,7 +229,12 @@ lib.makeScope pkgs.newScope (self: { inputAttrs = mkInputAttrs { inherit py pyProject; attrs = { }; includeBuildSystem = false; }; - storePackages = builtins.foldl' (acc: v: acc ++ v) [ ] (lib.attrValues inputAttrs); + requiredPythonModules = python.pkgs.requiredPythonModules; + /* Include all the nested dependencies which are required for each package. + This guarantees that using the "poetryPackages" attribute will return + complete list of dependencies for the poetry project to be portable. + */ + storePackages = requiredPythonModules (builtins.foldl' (acc: v: acc ++ v) [ ] (lib.attrValues inputAttrs)); in { python = py; diff --git a/pkgs/development/tools/poetry2nix/poetry2nix/fetch-wheel.sh b/pkgs/development/tools/poetry2nix/poetry2nix/fetch-from-pypi.sh similarity index 86% rename from pkgs/development/tools/poetry2nix/poetry2nix/fetch-wheel.sh rename to pkgs/development/tools/poetry2nix/poetry2nix/fetch-from-pypi.sh index 97f54b23416d..e56dee6849b2 100644 --- a/pkgs/development/tools/poetry2nix/poetry2nix/fetch-wheel.sh +++ b/pkgs/development/tools/poetry2nix/poetry2nix/fetch-from-pypi.sh @@ -9,12 +9,12 @@ curl="curl \ --cookie-jar cookies \ --insecure \ --speed-time 5 \ - -# \ + --progress-bar \ --fail \ $curlOpts \ $NIX_CURL_FLAGS" -echo "Trying to fetch wheel with predicted URL: $predictedURL" +echo "Trying to fetch with predicted URL: $predictedURL" $curl $predictedURL --output $out && exit 0 diff --git a/pkgs/development/tools/poetry2nix/poetry2nix/fetch_from_legacy.py b/pkgs/development/tools/poetry2nix/poetry2nix/fetch_from_legacy.py new file mode 100644 index 000000000000..5931d4c92708 --- /dev/null +++ b/pkgs/development/tools/poetry2nix/poetry2nix/fetch_from_legacy.py @@ -0,0 +1,72 @@ +# Some repositories (such as Devpi) expose the Pypi legacy API +# (https://warehouse.pypa.io/api-reference/legacy.html). +# +# Note it is not possible to use pip +# https://discuss.python.org/t/pip-download-just-the-source-packages-no-building-no-metadata-etc/4651/12 + +import sys +from urllib.parse import urlparse +from html.parser import HTMLParser +import urllib.request +import shutil +import ssl +import os + + +# Parse the legacy index page to extract the href and package names +class Pep503(HTMLParser): + def __init__(self): + super().__init__() + self.sources = {} + self.url = None + self.name = None + + def handle_data(self, data): + if self.url is not None: + self.name = data + + def handle_starttag(self, tag, attrs): + if tag == "a": + for name, value in attrs: + if name == "href": + self.url = value + + def handle_endtag(self, tag): + if self.url is not None: + self.sources[self.name] = self.url + self.url = None + + +url = sys.argv[1] +package_name = sys.argv[2] +index_url = url + "/" + package_name +package_filename = sys.argv[3] + +print("Reading index %s" % index_url) + +response = urllib.request.urlopen( + index_url, + context=ssl.CERT_NONE) +index = response.read() + +parser = Pep503() +parser.feed(str(index)) +if package_filename not in parser.sources: + print("The file %s has not be found in the index %s" % ( + package_filename, index_url)) + exit(1) + +package_file = open(package_filename, "wb") +# Sometimes the href is a relative path +if urlparse(parser.sources[package_filename]).netloc == '': + package_url = index_url + "/" + parser.sources[package_filename] +else: + package_url = parser.sources[package_filename] +print("Downloading %s" % package_url) + +response = urllib.request.urlopen( + package_url, + context=ssl.CERT_NONE) + +with response as r: + shutil.copyfileobj(r, package_file) diff --git a/pkgs/development/tools/poetry2nix/poetry2nix/lib.nix b/pkgs/development/tools/poetry2nix/poetry2nix/lib.nix index 6af37b395e0c..cb1cd8af1316 100644 --- a/pkgs/development/tools/poetry2nix/poetry2nix/lib.nix +++ b/pkgs/development/tools/poetry2nix/poetry2nix/lib.nix @@ -93,17 +93,19 @@ let ); - # Fetch the wheels from the PyPI index. - # We need to first get the proper URL to the wheel. + # Fetch from the PyPI index. + # At first we try to fetch the predicated URL but if that fails we + # will use the Pypi API to determine the correct URL. # Args: # pname: package name # file: filename including extension + # version: the version string of the dependency # hash: SRI hash # kind: Language implementation and version tag - fetchWheelFromPypi = lib.makeOverridable ( - { pname, file, hash, kind, curlOpts ? "" }: + fetchFromPypi = lib.makeOverridable ( + { pname, file, version, hash, kind, curlOpts ? "" }: let - version = builtins.elemAt (builtins.split "-" file) 2; + predictedURL = predictURLFromPypi { inherit pname file hash kind; }; in (pkgs.stdenvNoCC.mkDerivation { name = file; @@ -111,7 +113,7 @@ let pkgs.curl pkgs.jq ]; - isWheel = true; + isWheel = lib.strings.hasSuffix "whl" file; system = "builtin"; preferLocalBuild = true; @@ -119,36 +121,35 @@ let "NIX_CURL_FLAGS" ]; - predictedURL = predictURLFromPypi { inherit pname file hash kind; }; - inherit pname file version curlOpts; + inherit pname file version curlOpts predictedURL; - builder = ./fetch-wheel.sh; + builder = ./fetch-from-pypi.sh; outputHashMode = "flat"; outputHashAlgo = "sha256"; outputHash = hash; + + passthru = { + urls = [ predictedURL ]; # retain compatibility with nixpkgs' fetchurl + }; }) ); - # Fetch the artifacts from the PyPI index. Since we get all - # info we need from the lock file we don't use nixpkgs' fetchPyPi - # as it modifies casing while not providing anything we don't already - # have. - # - # Args: - # pname: package name - # file: filename including extension - # hash: SRI hash - # kind: Language implementation and version tag https://www.python.org/dev/peps/pep-0427/#file-name-convention - fetchFromPypi = lib.makeOverridable ( - { pname, file, hash, kind }: - if lib.strings.hasSuffix "whl" file then fetchWheelFromPypi { inherit pname file hash kind; } - else - pkgs.fetchurl { - url = predictURLFromPypi { inherit pname file hash kind; }; - inherit hash; - } + fetchFromLegacy = lib.makeOverridable ( + { python, pname, url, file, hash }: + pkgs.runCommand file + { + nativeBuildInputs = [ python ]; + impureEnvVars = lib.fetchers.proxyImpureEnvVars; + outputHashMode = "flat"; + outputHashAlgo = "sha256"; + outputHash = hash; + } '' + python ${./fetch_from_legacy.py} ${url} ${pname} ${file} + mv ${file} $out + '' ); + getBuildSystemPkgs = { pythonPackages , pyProject @@ -215,7 +216,7 @@ in { inherit fetchFromPypi - fetchWheelFromPypi + fetchFromLegacy getManyLinuxDeps isCompatible readTOML diff --git a/pkgs/development/tools/poetry2nix/poetry2nix/mk-poetry-dep.nix b/pkgs/development/tools/poetry2nix/poetry2nix/mk-poetry-dep.nix index bb7b4e39b037..b403e9941f34 100644 --- a/pkgs/development/tools/poetry2nix/poetry2nix/mk-poetry-dep.nix +++ b/pkgs/development/tools/poetry2nix/poetry2nix/mk-poetry-dep.nix @@ -28,7 +28,7 @@ pythonPackages.callPackage }@args: let inherit (pkgs) stdenv; - inherit (poetryLib) isCompatible getManyLinuxDeps fetchFromPypi moduleName; + inherit (poetryLib) isCompatible getManyLinuxDeps fetchFromLegacy fetchFromPypi moduleName; inherit (import ./pep425.nix { inherit lib poetryLib python; @@ -37,7 +37,7 @@ pythonPackages.callPackage ; fileCandidates = let - supportedRegex = ("^.*?(" + builtins.concatStringsSep "|" supportedExtensions + ")"); + supportedRegex = ("^.*(" + builtins.concatStringsSep "|" supportedExtensions + ")"); matchesVersion = fname: builtins.match ("^.*" + builtins.replaceStrings [ "." ] [ "\\." ] version + ".*$") fname != null; hasSupportedExtension = fname: builtins.match supportedRegex fname != null; isCompatibleEgg = fname: ! lib.strings.hasSuffix ".egg" fname || lib.strings.hasSuffix "py${python.pythonVersion}.egg" fname; @@ -48,6 +48,7 @@ pythonPackages.callPackage isGit = isSource && source.type == "git"; isUrl = isSource && source.type == "url"; isLocal = isSource && source.type == "directory"; + isLegacy = isSource && source.type == "legacy"; localDepPath = toPath source.url; buildSystemPkgs = @@ -171,10 +172,19 @@ pythonPackages.callPackage } else if isLocal then (poetryLib.cleanPythonSources { src = localDepPath; }) + else if isLegacy then + fetchFromLegacy + { + pname = name; + inherit python; + inherit (fileInfo) file hash; + inherit (source) url; + } else fetchFromPypi { pname = name; inherit (fileInfo) file hash kind; + inherit version; }; } ) diff --git a/pkgs/development/tools/poetry2nix/poetry2nix/overrides.nix b/pkgs/development/tools/poetry2nix/poetry2nix/overrides.nix index f217aefc2d26..ea0045c11474 100644 --- a/pkgs/development/tools/poetry2nix/poetry2nix/overrides.nix +++ b/pkgs/development/tools/poetry2nix/poetry2nix/overrides.nix @@ -8,7 +8,13 @@ self: super: { automat = super.automat.overridePythonAttrs ( old: rec { - propagatedBuildInputs = old.propagatedBuildInputs ++ [ self.m2r ]; + propagatedBuildInputs = (old.propagatedBuildInputs or [ ]) ++ [ self.m2r ]; + } + ); + + aiohttp-swagger3 = super.aiohttp-swagger3.overridePythonAttrs ( + old: { + nativeBuildInputs = (old.nativeBuildInputs or [ ]) ++ [ self.pytest-runner ]; } ); @@ -21,7 +27,7 @@ self: super: # Inputs copied from nixpkgs as ansible doesn't specify it's dependencies # in a correct manner. - propagatedBuildInputs = old.propagatedBuildInputs ++ [ + propagatedBuildInputs = (old.propagatedBuildInputs or [ ]) ++ [ self.pycrypto self.paramiko self.jinja2 @@ -170,7 +176,7 @@ self: super: dictdiffer = super.dictdiffer.overridePythonAttrs ( old: { buildInputs = (old.buildInputs or [ ]) ++ [ self.pytest-runner ]; - propagatedBuildInputs = old.propagatedBuildInputs ++ [ self.setuptools ]; + propagatedBuildInputs = (old.propagatedBuildInputs or [ ]) ++ [ self.setuptools ]; } ); @@ -178,7 +184,7 @@ self: super: super.django.overridePythonAttrs ( old: { propagatedNativeBuildInputs = (old.propagatedNativeBuildInputs or [ ]) - ++ [ pkgs.gettext ]; + ++ [ pkgs.gettext self.pytest-runner ]; } ) ); @@ -193,6 +199,36 @@ self: super: } ); + django-cors-headers = super.django-cors-headers.overridePythonAttrs ( + old: { + nativeBuildInputs = (old.nativeBuildInputs or [ ]) ++ [ self.pytest-runner ]; + } + ); + + django-hijack = super.django-hijack.overridePythonAttrs ( + old: { + nativeBuildInputs = (old.nativeBuildInputs or [ ]) ++ [ self.pytest-runner ]; + } + ); + + django-prometheus = super.django-prometheus.overridePythonAttrs ( + old: { + nativeBuildInputs = (old.nativeBuildInputs or [ ]) ++ [ self.pytest-runner ]; + } + ); + + django-rosetta = super.django-rosetta.overridePythonAttrs ( + old: { + nativeBuildInputs = (old.nativeBuildInputs or [ ]) ++ [ self.pytest-runner ]; + } + ); + + django-stubs-ext = super.django-stubs-ext.overridePythonAttrs ( + old: { + prePatch = (old.prePatch or "") + "touch ../LICENSE.txt"; + } + ); + dlib = super.dlib.overridePythonAttrs ( old: { # Parallel building enabled @@ -227,6 +263,16 @@ self: super: ''; }; + # remove eth-hash dependency because eth-hash also depends on eth-utils causing a cycle. + eth-utils = super.eth-utils.overridePythonAttrs (old: { + propagatedBuildInputs = + builtins.filter (i: i.pname != "eth-hash") old.propagatedBuildInputs; + preConfigure = '' + ${old.preConfigure or ""} + sed -i '/eth-hash/d' setup.py + ''; + }); + faker = super.faker.overridePythonAttrs ( old: { buildInputs = (old.buildInputs or [ ]) ++ [ self.pytest-runner ]; @@ -244,6 +290,10 @@ self: super: } ); + fastecdsa = super.fastecdsa.overridePythonAttrs (old: { + buildInputs = old.buildInputs ++ [ pkgs.gmp.dev ]; + }); + fastparquet = super.fastparquet.overridePythonAttrs ( old: { buildInputs = (old.buildInputs or [ ]) ++ [ self.pytest-runner ]; @@ -313,11 +363,11 @@ self: super: nativeBuildInputs = (old.nativeBuildInputs or [ ]) ++ [ pkgs.pkg-config ]; buildInputs = (old.buildInputs or [ ]) - ++ [ pkgs.hdf5 self.pkg-config self.cython ] + ++ [ pkgs.hdf5 self.pkgconfig self.cython ] ++ lib.optional mpiSupport mpi ; propagatedBuildInputs = - old.propagatedBuildInputs + (old.propagatedBuildInputs or [ ]) ++ lib.optionals mpiSupport [ self.mpi4py self.openssh ] ; preBuild = if mpiSupport then "export CC=${mpi}/bin/mpicc" else ""; @@ -333,9 +383,25 @@ self: super: ) else old ); + hid = super.hid.overridePythonAttrs ( + old: { + postPatch = '' + found= + for name in libhidapi-hidraw libhidapi-libusb libhidapi-iohidmanager libhidapi; do + full_path=${pkgs.hidapi.out}/lib/$name${pkgs.stdenv.hostPlatform.extensions.sharedLibrary} + if test -f $full_path; then + found=t + sed -i -e "s|'$name\..*'|'$full_path'|" hid/__init__.py + fi + done + test -n "$found" || { echo "ERROR: No known libraries found in ${pkgs.hidapi.out}/lib, please update/fix this build expression."; exit 1; } + ''; + } + ); + horovod = super.horovod.overridePythonAttrs ( old: { - propagatedBuildInputs = old.propagatedBuildInputs ++ [ pkgs.mpi ]; + propagatedBuildInputs = (old.propagatedBuildInputs or [ ]) ++ [ pkgs.mpi ]; } ); @@ -399,7 +465,10 @@ self: super: # importlib-metadata has an incomplete dependency specification importlib-metadata = super.importlib-metadata.overridePythonAttrs ( old: { - propagatedBuildInputs = old.propagatedBuildInputs ++ lib.optional self.python.isPy2 self.pathlib2; + propagatedBuildInputs = (old.propagatedBuildInputs or [ ]) ++ lib.optional self.python.isPy2 self.pathlib2; + + # disable the removal of pyproject.toml, required because of setuptools_scm + dontPreferSetupPy = true; } ); @@ -411,7 +480,7 @@ self: super: isort = super.isort.overridePythonAttrs ( old: { - propagatedBuildInputs = old.propagatedBuildInputs ++ [ self.setuptools ]; + propagatedBuildInputs = (old.propagatedBuildInputs or [ ]) ++ [ self.setuptools ]; } ); @@ -453,7 +522,7 @@ self: super: ); jsonslicer = super.jsonslicer.overridePythonAttrs (old: { - nativeBuildInputs = (old.nativeBuildInputs or [ ]) ++ [ pkgs.pkg-config ]; + nativeBuildInputs = (old.nativeBuildInputs or [ ]) ++ [ pkgs.pkgconfig ]; buildInputs = (old.buildInputs or [ ]) ++ [ pkgs.yajl ]; }); @@ -487,7 +556,7 @@ self: super: lap = super.lap.overridePythonAttrs ( old: { - propagatedBuildInputs = old.propagatedBuildInputs ++ [ + propagatedBuildInputs = (old.propagatedBuildInputs or [ ]) ++ [ self.numpy ]; } @@ -512,7 +581,7 @@ self: super: # Set directory containing llvm-config binary preConfigure = '' - export LLVM_CONFIG=${pkgs.llvm.dev}/bin/llvm-config + export LLVM_CONFIG=${pkgs.llvm}/bin/llvm-config ''; __impureHostDeps = lib.optionals pkgs.stdenv.isDarwin [ "/usr/lib/libm.dylib" ]; @@ -523,7 +592,7 @@ self: super: lockfile = super.lockfile.overridePythonAttrs ( old: { - propagatedBuildInputs = old.propagatedBuildInputs ++ [ self.pbr ]; + propagatedBuildInputs = (old.propagatedBuildInputs or [ ]) ++ [ self.pbr ]; } ); @@ -570,7 +639,7 @@ self: super: EOF ''; - propagatedBuildInputs = old.propagatedBuildInputs ++ [ + propagatedBuildInputs = (old.propagatedBuildInputs or [ ]) ++ [ pkgs.libpng pkgs.freetype ] @@ -650,7 +719,7 @@ self: super: }; in { - propagatedBuildInputs = old.propagatedBuildInputs ++ [ pkgs.mpi ]; + propagatedBuildInputs = (old.propagatedBuildInputs or [ ]) ++ [ pkgs.mpi ]; enableParallelBuilding = true; preBuild = '' ln -sf ${cfg} mpi.cfg @@ -670,8 +739,15 @@ self: super: } ); + mypy = super.mypy.overridePythonAttrs ( + old: { + MYPY_USE_MYPYC = pkgs.stdenv.buildPlatform.is64bit; + } + ); + mysqlclient = super.mysqlclient.overridePythonAttrs ( old: { + nativeBuildInputs = (old.nativeBuildInputs or [ ]) ++ [ pkgs.libmysqlclient ]; buildInputs = (old.buildInputs or [ ]) ++ [ pkgs.libmysqlclient ]; } ); @@ -682,7 +758,7 @@ self: super: self.cython ]; - propagatedBuildInputs = old.propagatedBuildInputs ++ [ + propagatedBuildInputs = (old.propagatedBuildInputs or [ ]) ++ [ pkgs.zlib pkgs.netcdf pkgs.hdf5 @@ -769,7 +845,7 @@ self: super: in { buildInputs = (old.buildInputs or [ ]) ++ [ pkgs.sqlite ]; - propagatedBuildInputs = old.propagatedBuildInputs or [ ] + propagatedBuildInputs = (old.propagatedBuildInputs or [ ]) ++ lib.optional withPostgres self.psycopg2 ++ lib.optional withMysql self.mysql-connector; } @@ -777,7 +853,7 @@ self: super: pillow = super.pillow.overridePythonAttrs ( old: { - nativeBuildInputs = [ pkgs.pkg-config ] ++ (old.nativeBuildInputs or [ ]); + nativeBuildInputs = [ pkgs.pkg-config self.pytest-runner ] ++ (old.nativeBuildInputs or [ ]); buildInputs = with pkgs; [ freetype libjpeg zlib libtiff libwebp tcl lcms2 ] ++ (old.buildInputs or [ ]); } ); @@ -924,7 +1000,7 @@ self: super: pkgs.pkg-config ]; - propagatedBuildInputs = old.propagatedBuildInputs ++ [ + propagatedBuildInputs = (old.propagatedBuildInputs or [ ]) ++ [ pkgs.cairo pkgs.xlibsWrapper ]; @@ -1028,6 +1104,16 @@ self: super: } ); + pyproject-flake8 = super.pyproject-flake8.overridePythonAttrs ( + old: { + buildInputs = (old.buildInputs or [ ]) ++ [ self.flit-core ]; + } + ); + + pytezos = super.pytezos.override (old: { + buildInputs = (old.buildInputs or [ ]) ++ [ pkgs.libsodium ]; + }); + python-bugzilla = super.python-bugzilla.overridePythonAttrs ( old: { nativeBuildInputs = (old.nativeBuildInputs or [ ]) ++ [ @@ -1214,6 +1300,12 @@ self: super: } ); + python-snappy = super.python-snappy.overridePythonAttrs ( + old: { + buildInputs = (old.buildInputs or [ ]) ++ [ pkgs.snappy ]; + } + ); + ffmpeg-python = super.ffmpeg-python.overridePythonAttrs ( old: { buildInputs = (old.buildInputs or [ ]) ++ [ self.pytest-runner ]; @@ -1228,10 +1320,20 @@ self: super: } ); + pyusb = super.pyusb.overridePythonAttrs ( + old: { + postPatch = '' + libusb=${pkgs.libusb1.out}/lib/libusb-1.0${pkgs.stdenv.hostPlatform.extensions.sharedLibrary} + test -f $libusb || { echo "ERROR: $libusb doesn't exist, please update/fix this build expression."; exit 1; } + sed -i -e "s|find_library=None|find_library=lambda _:\"$libusb\"|" usb/backend/libusb1.py + ''; + } + ); + pyzmq = super.pyzmq.overridePythonAttrs ( old: { nativeBuildInputs = (old.nativeBuildInputs or [ ]) ++ [ pkgs.pkg-config ]; - propagatedBuildInputs = old.propagatedBuildInputs ++ [ pkgs.zeromq ]; + propagatedBuildInputs = (old.propagatedBuildInputs or [ ]) ++ [ pkgs.zeromq ]; } ); @@ -1298,7 +1400,7 @@ self: super: old: if old.format != "wheel" then { nativeBuildInputs = (old.nativeBuildInputs or [ ]) ++ [ pkgs.gfortran ]; - propagatedBuildInputs = old.propagatedBuildInputs ++ [ self.pybind11 ]; + propagatedBuildInputs = (old.propagatedBuildInputs or [ ]) ++ [ self.pybind11 ]; setupPyBuildFlags = [ "--fcompiler='gnu95'" ]; enableParallelBuilding = true; buildInputs = (old.buildInputs or [ ]) ++ [ self.numpy.blas ]; @@ -1329,6 +1431,17 @@ self: super: } ); + secp256k1 = super.secp256k1.overridePythonAttrs (old: { + nativeBuildInputs = (old.nativeBuildInputs or [ ]) ++ [ pkgs.pkgconfig pkgs.autoconf pkgs.automake pkgs.libtool ]; + buildInputs = (old.buildInputs or [ ]) ++ [ self.pytest-runner ]; + doCheck = false; + # Local setuptools versions like "x.y.post0" confuse an internal check + postPatch = '' + substituteInPlace setup.py \ + --replace 'setuptools_version.' '"${self.setuptools.version}".' + ''; + }); + shapely = super.shapely.overridePythonAttrs ( old: { buildInputs = (old.buildInputs or [ ]) ++ [ pkgs.geos self.cython ]; @@ -1387,6 +1500,14 @@ self: super: } ); + # The tokenizers build requires a complex rust setup (cf. nixpkgs override) + # + # Instead of providing a full source build, we use a wheel to keep + # the complexity manageable for now. + tokenizers = super.tokenizers.override { + preferWheel = true; + }; + torch = lib.makeOverridable ({ enableCuda ? false , cudatoolkit ? pkgs.cudatoolkit_10_1 @@ -1415,11 +1536,34 @@ self: super: propagatedBuildInputs = [ self.numpy self.future + self.typing-extensions ]; }) ) { }; + torchvision = lib.makeOverridable + ({ enableCuda ? false + , cudatoolkit ? pkgs.cudatoolkit_10_1 + , pkg ? super.torchvision + }: pkg.overrideAttrs (old: { + + # without that autoPatchelfHook will fail because cudatoolkit is not in LD_LIBRARY_PATH + autoPatchelfIgnoreMissingDeps = true; + buildInputs = (old.buildInputs or [ ]) + ++ [ self.torch ] + ++ lib.optionals enableCuda [ + cudatoolkit + ]; + preConfigure = + if (enableCuda) then '' + export LD_LIBRARY_PATH="$LD_LIBRARY_PATH:${self.torch}/${self.python.sitePackages}/torch/lib:${lib.makeLibraryPath [ cudatoolkit "${cudatoolkit}" ]}" + '' else '' + export LD_LIBRARY_PATH="$LD_LIBRARY_PATH:${self.torch}/${self.python.sitePackages}/torch/lib" + ''; + })) + { }; + typeguard = super.typeguard.overridePythonAttrs (old: { postPatch = '' substituteInPlace setup.py \ @@ -1427,12 +1571,18 @@ self: super: ''; }); + typed_ast = super.typed-ast.overridePythonAttrs (old: { + nativeBuildInputs = (old.nativeBuildInputs or [ ]) ++ [ + self.pytest-runner + ]; + }); + # nix uses a dash, poetry uses an underscore typing_extensions = super.typing_extensions or self.typing-extensions; urwidtrees = super.urwidtrees.overridePythonAttrs ( old: { - propagatedBuildInputs = old.propagatedBuildInputs ++ [ + propagatedBuildInputs = (old.propagatedBuildInputs or [ ]) ++ [ self.urwid ]; } @@ -1476,6 +1626,7 @@ self: super: weasyprint = super.weasyprint.overridePythonAttrs ( old: { inherit (pkgs.python3.pkgs.weasyprint) patches; + nativeBuildInputs = (old.nativeBuildInputs or [ ]) ++ [ self.pytest-runner ]; buildInputs = (old.buildInputs or [ ]) ++ [ self.pytest-runner ]; } ); @@ -1524,7 +1675,7 @@ self: super: ) else super.zipp ).overridePythonAttrs ( old: { - propagatedBuildInputs = old.propagatedBuildInputs ++ [ + propagatedBuildInputs = (old.propagatedBuildInputs or [ ]) ++ [ self.toml ]; } @@ -1551,9 +1702,38 @@ self: super: } ); + psutil = super.psutil.overridePythonAttrs ( + old: { + buildInputs = (old.buildInputs or [ ]) ++ + lib.optional stdenv.isDarwin pkgs.darwin.apple_sdk.frameworks.IOKit; + } + ); + + sentencepiece = super.sentencepiece.overridePythonAttrs ( + old: { + dontUseCmakeConfigure = true; + nativeBuildInputs = (old.nativeBuildInputs or [ ]) ++ [ + pkgs.pkg-config + pkgs.cmake + pkgs.gperftools + ]; + buildInputs = (old.buildInputs or [ ]) ++ [ + pkgs.sentencepiece + ]; + } + ); + + sentence-transformers = super.sentence-transformers.overridePythonAttrs ( + old: { + buildInputs = + (old.buildInputs or [ ]) + ++ [ self.typing-extensions ]; + } + ); + supervisor = super.supervisor.overridePythonAttrs ( old: { - propagatedBuildInputs = old.propagatedBuildInputs ++ [ + propagatedBuildInputs = (old.propagatedBuildInputs or [ ]) ++ [ self.meld3 self.setuptools ]; @@ -1562,7 +1742,7 @@ self: super: cytoolz = super.cytoolz.overridePythonAttrs ( old: { - propagatedBuildInputs = old.propagatedBuildInputs ++ [ self.toolz ]; + propagatedBuildInputs = (old.propagatedBuildInputs or [ ]) ++ [ self.toolz ]; } ); @@ -1607,5 +1787,52 @@ self: super: } ); + wxpython = super.wxpython.overridePythonAttrs (old: + let + localPython = self.python.withPackages (ps: with ps; [ + setuptools + numpy + six + ]); + in + { + DOXYGEN = "${pkgs.doxygen}/bin/doxygen"; + + nativeBuildInputs = with pkgs; [ + which + doxygen + gtk3 + pkg-config + autoPatchelfHook + ] ++ (old.nativeBuildInputs or [ ]); + + buildInputs = with pkgs; [ + gtk3 + webkitgtk + ncurses + SDL2 + xorg.libXinerama + xorg.libSM + xorg.libXxf86vm + xorg.libXtst + xorg.xorgproto + gst_all_1.gstreamer + gst_all_1.gst-plugins-base + libGLU + libGL + libglvnd + mesa + ] ++ old.buildInputs; + + buildPhase = '' + ${localPython.interpreter} build.py -v build_wx + ${localPython.interpreter} build.py -v dox etg --nodoc sip + ${localPython.interpreter} build.py -v build_py + ''; + + installPhase = '' + ${localPython.interpreter} setup.py install --skip-build --prefix=$out + ''; + }); } diff --git a/pkgs/development/tools/poetry2nix/poetry2nix/pep508.nix b/pkgs/development/tools/poetry2nix/poetry2nix/pep508.nix index dc9cd2936d06..a5ec51a1345b 100644 --- a/pkgs/development/tools/poetry2nix/poetry2nix/pep508.nix +++ b/pkgs/development/tools/poetry2nix/poetry2nix/pep508.nix @@ -129,7 +129,7 @@ let if exprs.type == "expr" then ( let - mVal = ''[a-zA-Z0-9\'"_\. ]+''; + mVal = ''[a-zA-Z0-9\'"_\. \-]+''; mOp = "in|[!=<>]+"; e = stripStr exprs.value; m = builtins.map stripStr (builtins.match ''^(${mVal}) *(${mOp}) *(${mVal})$'' e); From 7ec26084b82f08811e4bb54cf7920bcfc3903383 Mon Sep 17 00:00:00 2001 From: "R. RyanTM" Date: Tue, 1 Jun 2021 08:44:01 +0000 Subject: [PATCH 15/18] erlang: 24.0.1 -> 24.0.2 --- pkgs/development/interpreters/erlang/R24.nix | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/pkgs/development/interpreters/erlang/R24.nix b/pkgs/development/interpreters/erlang/R24.nix index 84575e92cded..a4fe839bff4c 100644 --- a/pkgs/development/interpreters/erlang/R24.nix +++ b/pkgs/development/interpreters/erlang/R24.nix @@ -3,6 +3,6 @@ # How to obtain `sha256`: # nix-prefetch-url --unpack https://github.com/erlang/otp/archive/OTP-${version}.tar.gz mkDerivation { - version = "24.0.1"; - sha256 = "z01gaKNkKsIPKdPKhX6IUUY9uBSuyA33E4aVM0MdXsg="; + version = "24.0.2"; + sha256 = "gAiQc+AVj5xjwAnn9mF4xprjZOft1JvfEFVJMG5isxg="; } From d9d422285c2183b68a49c01eda179bd48526e6f2 Mon Sep 17 00:00:00 2001 From: "R. RyanTM" Date: Tue, 1 Jun 2021 22:20:16 +0000 Subject: [PATCH 16/18] fzf: 0.27.1 -> 0.27.2 --- pkgs/tools/misc/fzf/default.nix | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/pkgs/tools/misc/fzf/default.nix b/pkgs/tools/misc/fzf/default.nix index bcf53611b22c..3ef5a643259c 100644 --- a/pkgs/tools/misc/fzf/default.nix +++ b/pkgs/tools/misc/fzf/default.nix @@ -2,13 +2,13 @@ buildGoModule rec { pname = "fzf"; - version = "0.27.1"; + version = "0.27.2"; src = fetchFromGitHub { owner = "junegunn"; repo = pname; rev = version; - sha256 = "sha256-TMzyUhgOfcWXKhxy+2SeBy0mws/M+4YoitlPpYt6k9g="; + sha256 = "sha256-JWTyZRZrW1mFy91D+eZL6iYV0CcNxJUT4JA0hrBKZZU="; }; vendorSha256 = "sha256-FKDCIotyra/TZ48wbpzudJZ2aI2pn+ZR4EoZ+9+19Mw="; From dbb7e6bc8a6d35f8da7e74e5c47dce18a51955af Mon Sep 17 00:00:00 2001 From: Martin Weinelt Date: Wed, 2 Jun 2021 01:17:41 +0200 Subject: [PATCH 17/18] botamusique: unstable-2021-05-19 -> unstable-2021-06-01 --- pkgs/tools/audio/botamusique/node-packages.nix | 2 +- pkgs/tools/audio/botamusique/src.json | 8 ++++---- 2 files changed, 5 insertions(+), 5 deletions(-) diff --git a/pkgs/tools/audio/botamusique/node-packages.nix b/pkgs/tools/audio/botamusique/node-packages.nix index 8857e1e76f96..c9bdb6f00971 100644 --- a/pkgs/tools/audio/botamusique/node-packages.nix +++ b/pkgs/tools/audio/botamusique/node-packages.nix @@ -4527,7 +4527,7 @@ let name = "botamusique"; packageName = "botamusique"; version = "0.0.0"; - src = ../../../../../../../../../tmp/tmp.hWY9btrx5g; + src = ../../../../../../../../../tmp/tmp.UAoivnXH3n; dependencies = [ sources."@babel/code-frame-7.10.4" sources."@babel/compat-data-7.12.7" diff --git a/pkgs/tools/audio/botamusique/src.json b/pkgs/tools/audio/botamusique/src.json index c7e619474609..d1337f5ae68a 100644 --- a/pkgs/tools/audio/botamusique/src.json +++ b/pkgs/tools/audio/botamusique/src.json @@ -1,9 +1,9 @@ { "url": "https://github.com/azlux/botamusique", - "rev": "33a9e75ba9d0a382f7a76d23a0ceb626924a8b49", - "date": "2021-05-19T22:37:39+08:00", - "path": "/nix/store/dqc2vjd43cixm49w8g66wvi9zmdfwsdd-botamusique", - "sha256": "18lbgslx9vdwd5nrbkqfjvzaikp2swvv375v9gql7cg8p46w7i11", + "rev": "ba02cdebf2e175dc371995361eafcb88ad2c1b52", + "date": "2021-06-01T23:39:44+02:00", + "path": "/nix/store/dp5vnj7zqv1sp1ab5xycvvqdpia9xb71-botamusique", + "sha256": "01d51y6h38hs4ynjgz050ryy14sp5y2c3n7f80mcv0a4ls8413qp", "fetchSubmodules": false, "deepClone": false, "leaveDotGit": false From e910a281c6d1e6c0e91dc87ccaba5a79d71ad56c Mon Sep 17 00:00:00 2001 From: Greizgh Date: Tue, 1 Jun 2021 22:07:44 +0200 Subject: [PATCH 18/18] sqlx-cli: 0.5.2 -> 0.5.5 --- pkgs/development/tools/rust/sqlx-cli/default.nix | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/pkgs/development/tools/rust/sqlx-cli/default.nix b/pkgs/development/tools/rust/sqlx-cli/default.nix index d13481804c47..c183ddb760fe 100644 --- a/pkgs/development/tools/rust/sqlx-cli/default.nix +++ b/pkgs/development/tools/rust/sqlx-cli/default.nix @@ -2,16 +2,16 @@ rustPlatform.buildRustPackage rec { pname = "sqlx-cli"; - version = "0.5.2"; + version = "0.5.5"; src = fetchFromGitHub { owner = "launchbadge"; repo = "sqlx"; rev = "v${version}"; - sha256 = "0jz0gddw1xp51rnap0dsyq4886x2glmr087r1lf3fxlnv6anaqn9"; + sha256 = "1051vldajdbkcxvrw2cig201c4nm68cvvnr2yia9f2ysmr68x5rh"; }; - cargoSha256 = "046blw366d6zjpq944g9n4cdhhv2w97qfi1ynljc9bnz03d8v39c"; + cargoSha256 = "1ry893gjrwb670v80ff61yb00jvf49yp6194gqrjvnyarjc6bbb1"; doCheck = false; cargoBuildFlags = [ "-p sqlx-cli" ];