From 1f6bdeaa97b14ec5b282182c9ff39bc7dc472e9e Mon Sep 17 00:00:00 2001 From: Jan Tojnar Date: Wed, 20 Dec 2017 06:53:09 +0100 Subject: [PATCH 01/35] =?UTF-8?q?poppler:=200.56.0=20=E2=86=92=200.62.0?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../development/libraries/poppler/default.nix | 45 ++++++------------- 1 file changed, 13 insertions(+), 32 deletions(-) diff --git a/pkgs/development/libraries/poppler/default.nix b/pkgs/development/libraries/poppler/default.nix index 5fcb7d386fa..9a3d24fc0b2 100644 --- a/pkgs/development/libraries/poppler/default.nix +++ b/pkgs/development/libraries/poppler/default.nix @@ -1,24 +1,22 @@ -{ stdenv, lib, fetchurl, fetchpatch, pkgconfig, libiconv, libintlOrEmpty +{ stdenv, lib, fetchurl, cmake, ninja, pkgconfig, libiconv, libintlOrEmpty , zlib, curl, cairo, freetype, fontconfig, lcms, libjpeg, openjpeg , withData ? true, poppler_data -, qt4Support ? false, qt4 ? null , qt5Support ? false, qtbase ? null , introspectionSupport ? false, gobjectIntrospection ? null , utils ? false , minimal ? false, suffix ? "glib" -, hostPlatform }: let # beware: updates often break cups-filters build - version = "0.56.0"; - sha256 = "0wviayidfv2ix2ql0d4nl9r1ia6qi5kc1nybd9vjx27dk7gvm7c6"; + version = "0.62.0"; + mkFlag = optset: flag: "-DENABLE_${flag}=${if optset then "on" else "off"}"; in stdenv.mkDerivation rec { name = "poppler-${suffix}-${version}"; src = fetchurl { url = "${meta.homepage}/poppler-${version}.tar.xz"; - inherit sha256; + sha256 = "1ii9ly1pngyvs0aiq2wxpya08hidpl54y7nsb8b1vxnnskgp76jv"; }; outputs = [ "out" "dev" ]; @@ -29,36 +27,19 @@ stdenv.mkDerivation rec { propagatedBuildInputs = with lib; [ zlib freetype fontconfig libjpeg openjpeg ] ++ optionals (!minimal) [ cairo lcms curl ] - ++ optional qt4Support qt4 ++ optional qt5Support qtbase ++ optional introspectionSupport gobjectIntrospection; - nativeBuildInputs = [ pkgconfig ]; + nativeBuildInputs = [ cmake ninja pkgconfig ]; - NIX_CFLAGS_COMPILE = [ "-DQT_NO_DEBUG" ]; - - CXXFLAGS = lib.optional qt5Support "-std=c++11"; - - configureFlags = with lib; - [ - "--enable-xpdf-headers" - "--enable-libcurl" - "--enable-zlib" - "--enable-build-type=release" - ] - ++ optionals minimal [ - "--disable-poppler-glib" "--disable-poppler-cpp" - "--disable-libcurl" - ] - ++ optional (!utils) "--disable-utils" - ++ optional introspectionSupport "--enable-introspection"; - - enableParallelBuilding = true; - - crossAttrs.postPatch = - # there are tests using `strXXX_s` functions that are missing apparently - stdenv.lib.optionalString (hostPlatform.libc or null == "msvcrt") - "sed '/^SUBDIRS =/s/ test / /' -i Makefile.in"; + cmakeFlags = [ + (mkFlag true "XPDF_HEADERS") + (mkFlag (!minimal) "GLIB") + (mkFlag (!minimal) "CPP") + (mkFlag (!minimal) "LIBCURL") + (mkFlag utils "UTILS") + (mkFlag qt5Support "QT5") + ]; meta = with lib; { homepage = https://poppler.freedesktop.org/; From 10a4edb927ea9abee6dd952b2335649d6786ef29 Mon Sep 17 00:00:00 2001 From: Jan Tojnar Date: Fri, 2 Feb 2018 23:48:04 +0100 Subject: [PATCH 02/35] =?UTF-8?q?poppler=5Fqt4:=20downgrade=200.62.0=20?= =?UTF-8?q?=E2=86=92=200.61.1?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Poppler 0.62 removes QT4 support. We would drop it but unfortunately, some things still rely on it. --- pkgs/development/libraries/poppler/qt4.nix | 44 ++++++++++++++++++++++ pkgs/top-level/all-packages.nix | 5 +-- 2 files changed, 45 insertions(+), 4 deletions(-) create mode 100644 pkgs/development/libraries/poppler/qt4.nix diff --git a/pkgs/development/libraries/poppler/qt4.nix b/pkgs/development/libraries/poppler/qt4.nix new file mode 100644 index 00000000000..c82a543413e --- /dev/null +++ b/pkgs/development/libraries/poppler/qt4.nix @@ -0,0 +1,44 @@ +# TODO: get rid of this (https://github.com/NixOS/nixpkgs/issues/32883) +{ stdenv, lib, fetchurl, cmake, ninja, pkgconfig, libiconv, libintlOrEmpty +, zlib, curl, cairo, freetype, fontconfig, lcms2, libjpeg, openjpeg +, poppler_data, qt4 +}: + +let + # Last version supporting QT4 + version = "0.61.1"; +in +stdenv.mkDerivation rec { + name = "poppler-qt4-${version}"; + + src = fetchurl { + url = "${meta.homepage}/poppler-${version}.tar.xz"; + sha256 = "1afdrxxkaivvviazxkg5blsf2x24sjkfj92ib0d3q5pm8dihjrhj"; + }; + + outputs = [ "out" "dev" ]; + + buildInputs = [ libiconv poppler_data ] ++ libintlOrEmpty; + + propagatedBuildInputs = [ zlib freetype fontconfig libjpeg openjpeg cairo lcms2 curl qt4 ]; + + nativeBuildInputs = [ cmake ninja pkgconfig ]; + + cmakeFlags = [ + "-DENABLE_XPDF_HEADERS=on" + "-DENABLE_UTILS=off" + ]; + + meta = with lib; { + homepage = https://poppler.freedesktop.org/; + description = "A PDF rendering library"; + + longDescription = '' + Poppler is a PDF rendering library based on the xpdf-3.0 code base. + ''; + + license = licenses.gpl2; + platforms = platforms.all; + maintainers = with maintainers; [ ttuegel ]; + }; +} diff --git a/pkgs/top-level/all-packages.nix b/pkgs/top-level/all-packages.nix index 84b01ae9422..0dfcda44884 100644 --- a/pkgs/top-level/all-packages.nix +++ b/pkgs/top-level/all-packages.nix @@ -10573,10 +10573,7 @@ with pkgs; suffix = "min"; }; - poppler_qt4 = poppler.override { - qt4Support = true; - suffix = "qt4"; - }; + poppler_qt4 = callPackage ../development/libraries/poppler/qt4.nix { }; poppler_utils = poppler.override { suffix = "utils"; utils = true; }; From a711891a831e853f54d86878d0065ba6aba37f47 Mon Sep 17 00:00:00 2001 From: Jan Tojnar Date: Sat, 3 Feb 2018 01:01:44 +0100 Subject: [PATCH 03/35] =?UTF-8?q?poppler=5Fdata:=200.4.7=20=E2=86=92=200.4?= =?UTF-8?q?.8?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- pkgs/data/misc/poppler-data/default.nix | 12 ++++-------- 1 file changed, 4 insertions(+), 8 deletions(-) diff --git a/pkgs/data/misc/poppler-data/default.nix b/pkgs/data/misc/poppler-data/default.nix index f0f6505cb24..5c8e0970518 100644 --- a/pkgs/data/misc/poppler-data/default.nix +++ b/pkgs/data/misc/poppler-data/default.nix @@ -1,18 +1,14 @@ -{ fetchurl, stdenv }: +{ fetchurl, stdenv, cmake, ninja }: stdenv.mkDerivation rec { - name = "poppler-data-0.4.7"; + name = "poppler-data-0.4.8"; src = fetchurl { url = "http://poppler.freedesktop.org/${name}.tar.gz"; - sha256 = "1pm7wg6xqj4sppb5az4pa7psfdk4yxxkw52j85bm9fksibcb0lp7"; + sha256 = "0wi8yyynladny51r4q53z7ygh7y491ayp8nqqv6wqqzjc60s35hh"; }; - postPatch = '' - sed -i 's,$(datadir)/pkgconfig,$(prefix)/lib/pkgconfig,g' Makefile - ''; - - installFlags = [ "prefix=$(out)" ]; + nativeBuildInputs = [ cmake ninja ]; meta = with stdenv.lib; { homepage = https://poppler.freedesktop.org/; From 40eadf9eb07f8846280205401f213364b038abd1 Mon Sep 17 00:00:00 2001 From: Jan Tojnar Date: Sun, 18 Feb 2018 16:24:50 +0100 Subject: [PATCH 04/35] meson: print failed test logs --- pkgs/development/tools/build-managers/meson/setup-hook.sh | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/pkgs/development/tools/build-managers/meson/setup-hook.sh b/pkgs/development/tools/build-managers/meson/setup-hook.sh index 8f96e6146be..eeffa6bf6cf 100644 --- a/pkgs/development/tools/build-managers/meson/setup-hook.sh +++ b/pkgs/development/tools/build-managers/meson/setup-hook.sh @@ -29,7 +29,7 @@ fi mesonCheckPhase() { runHook preCheck - meson test + meson test --print-errorlogs runHook postCheck } From 9a9c2e65791d8f8a07b2b3b1555f633d47520197 Mon Sep 17 00:00:00 2001 From: Nikolay Amiantov Date: Wed, 21 Feb 2018 11:56:06 +0300 Subject: [PATCH 05/35] cc-wrapper: fix bool handling for empty and zero values Before the code would fail silently for zero values and with some output for empties. We now currently handle both via defaulting value to zero and making `let` return success error code when there's no syntax error. --- pkgs/build-support/cc-wrapper/utils.sh | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/pkgs/build-support/cc-wrapper/utils.sh b/pkgs/build-support/cc-wrapper/utils.sh index 4b2b1380918..9215fe2dc39 100644 --- a/pkgs/build-support/cc-wrapper/utils.sh +++ b/pkgs/build-support/cc-wrapper/utils.sh @@ -25,7 +25,11 @@ mangleVarBool() { for infix in "${role_infixes[@]}"; do local inputVar="${var/+/${infix}}" if [ -v "$inputVar" ]; then - let "${outputVar} |= ${!inputVar}" + # "1" in the end makes `let` return success error code when + # expression itself evaluates to zero. + # We don't use `|| true` because that would silence actual + # syntax errors from bad variable values. + let "${outputVar} |= ${!inputVar:-0}" "1" fi done } From 4a9a7d30368c66af9bb5e2d95c21012badd9b699 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Robert=20Sch=C3=BCtz?= Date: Mon, 19 Feb 2018 17:40:17 +0100 Subject: [PATCH 06/35] pythonPackages.binaryornot: 0.4.0 -> 0.4.4 --- .../python-modules/binaryornot/default.nix | 27 +++++++++++++++++++ pkgs/top-level/python-packages.nix | 22 +-------------- 2 files changed, 28 insertions(+), 21 deletions(-) create mode 100644 pkgs/development/python-modules/binaryornot/default.nix diff --git a/pkgs/development/python-modules/binaryornot/default.nix b/pkgs/development/python-modules/binaryornot/default.nix new file mode 100644 index 00000000000..2f0b01a5c23 --- /dev/null +++ b/pkgs/development/python-modules/binaryornot/default.nix @@ -0,0 +1,27 @@ +{ lib, buildPythonPackage, fetchPypi, chardet, hypothesis }: + +buildPythonPackage rec { + pname = "binaryornot"; + version = "0.4.4"; + + src = fetchPypi { + inherit pname version; + sha256 = "359501dfc9d40632edc9fac890e19542db1a287bbcfa58175b66658392018061"; + }; + + prePatch = '' + # See https://github.com/audreyr/binaryornot/issues/40 + substituteInPlace tests/test_check.py \ + --replace "average_size=512" "average_size=128" + ''; + + propagatedBuildInputs = [ chardet ]; + + checkInputs = [ hypothesis ]; + + meta = with lib; { + homepage = https://github.com/audreyr/binaryornot; + description = "Ultra-lightweight pure Python package to check if a file is binary or text"; + license = licenses.bsd3; + }; +} diff --git a/pkgs/top-level/python-packages.nix b/pkgs/top-level/python-packages.nix index 8c2317ffa0e..af1df92efda 100644 --- a/pkgs/top-level/python-packages.nix +++ b/pkgs/top-level/python-packages.nix @@ -1671,27 +1671,7 @@ in { }; }; - - binaryornot = buildPythonPackage rec { - name = "binaryornot-${version}"; - version = "0.4.0"; - - src = pkgs.fetchurl { - url ="mirror://pypi/b/binaryornot/${name}.tar.gz"; - sha256 = "1j4f51dxic39mdwf6alj7gd769wy6mhk916v031wjali51xkh3xb"; - }; - - buildInputs = with self; [ hypothesis ]; - - propagatedBuildInputs = with self; [ chardet ]; - - meta = { - homepage = https://github.com/audreyr/binaryornot; - description = "Ultra-lightweight pure Python package to check if a file is binary or text"; - license = licenses.bsd3; - }; - }; - + binaryornot = callPackage ../development/python-modules/binaryornot { }; bitbucket_api = buildPythonPackage rec { name = "bitbucket-api-0.4.4"; From e1176503e9a57fd073a2dd4a1cbf5df4910635d2 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Robert=20Sch=C3=BCtz?= Date: Mon, 19 Feb 2018 17:49:45 +0100 Subject: [PATCH 07/35] pythonPackages.bibtexparser: add propagatedBuildInputs --- pkgs/development/python-modules/bibtexparser/default.nix | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/pkgs/development/python-modules/bibtexparser/default.nix b/pkgs/development/python-modules/bibtexparser/default.nix index 50e389a9e14..72bc6835832 100644 --- a/pkgs/development/python-modules/bibtexparser/default.nix +++ b/pkgs/development/python-modules/bibtexparser/default.nix @@ -1,18 +1,21 @@ { lib , buildPythonPackage , fetchPypi +, pyparsing +, future }: buildPythonPackage rec { pname = "bibtexparser"; version = "1.0.1"; - name = "${pname}-${version}"; src = fetchPypi { inherit pname version; sha256 = "cc41cdd8332c2bf44b97daf1f135f4f267c3b744c33976655cd270b66f964c0a"; }; + propagatedBuildInputs = [ pyparsing future ]; + # No tests in archive doCheck = false; From d322a5b3ec58a3b0bcebb55bec0aa8c491f80d95 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Robert=20Sch=C3=BCtz?= Date: Mon, 19 Feb 2018 17:58:23 +0100 Subject: [PATCH 08/35] pythonPackages.bibtexparser: enable tests --- .../python-modules/bibtexparser/default.nix | 20 +++++++++++++------ 1 file changed, 14 insertions(+), 6 deletions(-) diff --git a/pkgs/development/python-modules/bibtexparser/default.nix b/pkgs/development/python-modules/bibtexparser/default.nix index 72bc6835832..06d7c689e65 100644 --- a/pkgs/development/python-modules/bibtexparser/default.nix +++ b/pkgs/development/python-modules/bibtexparser/default.nix @@ -1,23 +1,31 @@ { lib , buildPythonPackage -, fetchPypi +, fetchFromGitHub , pyparsing , future +, nose +, glibcLocales }: buildPythonPackage rec { pname = "bibtexparser"; version = "1.0.1"; - src = fetchPypi { - inherit pname version; - sha256 = "cc41cdd8332c2bf44b97daf1f135f4f267c3b744c33976655cd270b66f964c0a"; + # PyPI tarball does not ship tests + src = fetchFromGitHub { + owner = "sciunto-org"; + repo = "python-${pname}"; + rev = "v${version}"; + sha256 = "0lmlarkfbq2hp1wa04a62245jr2mqizqsdlgilj5aq6vy92gr6ai"; }; propagatedBuildInputs = [ pyparsing future ]; - # No tests in archive - doCheck = false; + checkInputs = [ nose glibcLocales ]; + + checkPhase = '' + LC_ALL="en_US.UTF-8" nosetests + ''; meta = { description = "Bibtex parser for python 2.7 and 3.3 and newer"; From 674ceb9c2bc501b1f5155b70f925856245d9b244 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Robert=20Sch=C3=BCtz?= Date: Mon, 19 Feb 2018 18:06:40 +0100 Subject: [PATCH 09/35] pythonPackages.curtsies: correct dependencies --- pkgs/development/python-modules/curtsies/default.nix | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/pkgs/development/python-modules/curtsies/default.nix b/pkgs/development/python-modules/curtsies/default.nix index 8d6052c5299..d29ad1d6474 100644 --- a/pkgs/development/python-modules/curtsies/default.nix +++ b/pkgs/development/python-modules/curtsies/default.nix @@ -1,4 +1,4 @@ -{ stdenv, buildPythonPackage, fetchPypi, blessings, mock, nose, pyte, pytest, wcwidth }: +{ stdenv, buildPythonPackage, fetchPypi, blessings, mock, nose, pyte, wcwidth, typing }: buildPythonPackage rec { pname = "curtsies"; @@ -8,12 +8,12 @@ buildPythonPackage rec { sha256 = "89c802ec051d01dec6fc983e9856a3706e4ea8265d2940b1f6d504a9e26ed3a9"; }; - propagatedBuildInputs = [ blessings wcwidth pyte ]; + propagatedBuildInputs = [ blessings wcwidth typing ]; - checkInputs = [ nose mock pytest ]; + checkInputs = [ mock pyte nose ]; checkPhase = '' - py.test + nosetests tests ''; meta = with stdenv.lib; { From 84fbf2a4102bf560bd7fd24c7ff7bd95f43a9ff9 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Robert=20Sch=C3=BCtz?= Date: Mon, 19 Feb 2018 19:04:16 +0100 Subject: [PATCH 10/35] pythonPackages.dbf: fix tests --- pkgs/development/python-modules/dbf/default.nix | 9 ++++++--- 1 file changed, 6 insertions(+), 3 deletions(-) diff --git a/pkgs/development/python-modules/dbf/default.nix b/pkgs/development/python-modules/dbf/default.nix index 2343ea2918b..ac8087be63e 100644 --- a/pkgs/development/python-modules/dbf/default.nix +++ b/pkgs/development/python-modules/dbf/default.nix @@ -1,21 +1,24 @@ -{ stdenv, fetchPypi, buildPythonPackage, aenum, isPy3k }: +{ stdenv, fetchPypi, buildPythonPackage, aenum, isPy3k, pythonOlder, enum34, python }: buildPythonPackage rec { pname = "dbf"; version = "0.96.8"; - name = "${pname}-${version}"; src = fetchPypi { inherit pname version; sha256 = "1z8n7s4cka6x9ybh4qpfhj51v2qrk38h2f06npizzhm0hmn6r3v1"; }; - propagatedBuildInputs = [ aenum ]; + propagatedBuildInputs = [ aenum ] ++ stdenv.lib.optional (pythonOlder "3.4") [ enum34 ]; doCheck = !isPy3k; # tests are not yet ported. # https://groups.google.com/forum/#!topic/python-dbase/96rx2xmCG4w + checkPhase = '' + ${python.interpreter} dbf/test.py + ''; + meta = with stdenv.lib; { description = "Pure python package for reading/writing dBase, FoxPro, and Visual FoxPro .dbf files"; homepage = "https://pypi.python.org/pypi/dbf"; From 09ae15ea50b5cbd030234d8ba17cf7e6baebc674 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Robert=20Sch=C3=BCtz?= Date: Mon, 19 Feb 2018 19:22:49 +0100 Subject: [PATCH 11/35] pythonPackages.termstyle: 0.1.10 -> 0.1.11 --- .../python-modules/termstyle/default.nix | 20 +++++++++++++++++++ pkgs/top-level/python-packages.nix | 16 +-------------- 2 files changed, 21 insertions(+), 15 deletions(-) create mode 100644 pkgs/development/python-modules/termstyle/default.nix diff --git a/pkgs/development/python-modules/termstyle/default.nix b/pkgs/development/python-modules/termstyle/default.nix new file mode 100644 index 00000000000..0a1c4e76412 --- /dev/null +++ b/pkgs/development/python-modules/termstyle/default.nix @@ -0,0 +1,20 @@ +{ lib, buildPythonPackage, fetchPypi }: + +buildPythonPackage rec { + pname = "termstyle"; + version = "0.1.11"; + + src = fetchPypi { + inherit pname version; + sha256 = "ef74b83698ea014112040cf32b1a093c1ab3d91c4dd18ecc03ec178fd99c9f9f"; + }; + + # Only manual tests + doCheck = false; + + meta = with lib; { + description = "Console colouring for python"; + homepage = "https://pypi.python.org/pypi/python-termstyle/0.1.10"; + license = licenses.bsdOriginal; + }; +} diff --git a/pkgs/top-level/python-packages.nix b/pkgs/top-level/python-packages.nix index af1df92efda..8b0c64012c3 100644 --- a/pkgs/top-level/python-packages.nix +++ b/pkgs/top-level/python-packages.nix @@ -20959,21 +20959,7 @@ EOF }; }; - termstyle = buildPythonPackage rec { - name = "python-termstyle-${version}"; - version = "0.1.10"; - src = pkgs.fetchurl { - url = "mirror://pypi/p/python-termstyle/${name}.tar.gz"; - sha256 = "1qllzkx1alf14zcfapppf8w87si4cpa7lgjmdp3f5idzdyqnnapl"; - }; - - meta = { - description = "Console colouring for python"; - homepage = "https://pypi.python.org/pypi/python-termstyle/0.1.10"; - license = licenses.bsdOriginal; - }; - - }; + termstyle = callPackage ../development/python-modules/termstyle { }; green = buildPythonPackage rec { name = "green-${version}"; From 276fb965324d724fb012774401f4d15bce3bfea9 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Robert=20Sch=C3=BCtz?= Date: Mon, 19 Feb 2018 19:33:06 +0100 Subject: [PATCH 12/35] pythonPackages.rednose: 1.2.1 -> 1.3.0 --- .../python-modules/rednose/default.nix | 24 +++++++++++++++++++ pkgs/top-level/python-packages.nix | 17 +------------ 2 files changed, 25 insertions(+), 16 deletions(-) create mode 100644 pkgs/development/python-modules/rednose/default.nix diff --git a/pkgs/development/python-modules/rednose/default.nix b/pkgs/development/python-modules/rednose/default.nix new file mode 100644 index 00000000000..d9736dcb6f3 --- /dev/null +++ b/pkgs/development/python-modules/rednose/default.nix @@ -0,0 +1,24 @@ +{ lib, buildPythonPackage, fetchPypi, nose, six, colorama, termstyle }: + +buildPythonPackage rec { + pname = "rednose"; + version = "1.3.0"; + + src = fetchPypi { + inherit pname version; + sha256 = "6da77917788be277b70259edc0bb92fc6f28fe268b765b4ea88206cc3543a3e1"; + }; + + prePatch = '' + substituteInPlace setup.py --replace "six==1.10.0" "six>=1.10.0" + ''; + + checkInputs = [ six ]; + propagatedBuildInputs = [ nose colorama termstyle ]; + + meta = with lib; { + description = "A python nose plugin adding color to console results"; + homepage = https://github.com/JBKahn/rednose; + license = licenses.mit; + }; +} diff --git a/pkgs/top-level/python-packages.nix b/pkgs/top-level/python-packages.nix index 8b0c64012c3..1dd91152543 100644 --- a/pkgs/top-level/python-packages.nix +++ b/pkgs/top-level/python-packages.nix @@ -15028,22 +15028,7 @@ in { redis = callPackage ../development/python-modules/redis { }; - rednose = buildPythonPackage rec { - name = "rednose-${version}"; - version = "1.2.1"; - - src = pkgs.fetchurl { - url = "mirror://pypi/r/rednose/${name}.tar.gz"; - sha256 = "0b0bsna217lr1nykyhl5fgjly15zhdvqd4prg4wy1zrgfv7al6m0"; - }; - - meta = { - description = "A python nose plugin adding color to console results."; - }; - - buildInputs = with self; [ nose six ]; - propagatedBuildInputs = with self; [ colorama termstyle ]; - }; + rednose = callPackage ../development/python-modules/rednose { }; reikna = callPackage ../development/python-modules/reikna { }; From 46d7d069efb99445cc0b81d344cd36cf1d76d1f5 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Robert=20Sch=C3=BCtz?= Date: Mon, 19 Feb 2018 19:48:32 +0100 Subject: [PATCH 13/35] pythonPackages.networkx: 1.11 -> 2.1 --- .../python-modules/networkx/default.nix | 16 ++++------------ 1 file changed, 4 insertions(+), 12 deletions(-) diff --git a/pkgs/development/python-modules/networkx/default.nix b/pkgs/development/python-modules/networkx/default.nix index f6fc4139c85..3388aef9cef 100644 --- a/pkgs/development/python-modules/networkx/default.nix +++ b/pkgs/development/python-modules/networkx/default.nix @@ -3,32 +3,24 @@ , fetchPypi , nose , decorator -, isPy36 -, isPyPy }: buildPythonPackage rec { pname = "networkx"; - version = "1.11"; - - # Currently broken on PyPy. - # https://github.com/networkx/networkx/pull/1361 - disabled = isPyPy; + version = "2.1"; src = fetchPypi { inherit pname version; - sha256 = "1f74s56xb4ggixiq0vxyfxsfk8p20c7a099lpcf60izv1php03hd"; + extension = "zip"; + sha256 = "64272ca418972b70a196cb15d9c85a5a6041f09a2f32e0d30c0255f25d458bb1"; }; checkInputs = [ nose ]; propagatedBuildInputs = [ decorator ]; - # 17 failures with 3.6 https://github.com/networkx/networkx/issues/2396#issuecomment-304437299 - doCheck = !(isPy36); - meta = { homepage = "https://networkx.github.io/"; description = "Library for the creation, manipulation, and study of the structure, dynamics, and functions of complex networks"; license = lib.licenses.bsd3; }; -} \ No newline at end of file +} From 8f93cba89c074ab89a997d846c4a0ee2532c2fc7 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Robert=20Sch=C3=BCtz?= Date: Mon, 19 Feb 2018 19:56:33 +0100 Subject: [PATCH 14/35] pythonPackages.prov: fix build and enable tests Tests do not actually take 60 minutes. --- pkgs/development/python-modules/prov/default.nix | 16 +++++++++++++++- 1 file changed, 15 insertions(+), 1 deletion(-) diff --git a/pkgs/development/python-modules/prov/default.nix b/pkgs/development/python-modules/prov/default.nix index 8866382ea8f..f5f5b719b06 100644 --- a/pkgs/development/python-modules/prov/default.nix +++ b/pkgs/development/python-modules/prov/default.nix @@ -7,6 +7,8 @@ , six , pydotplus , rdflib +, pydot +, glibcLocales }: buildPythonPackage rec { @@ -18,6 +20,10 @@ buildPythonPackage rec { sha256 = "640dc158d931403bc6c1a0ad80702caae71f810bac21f90ec605865c8444b7bb"; }; + prePatch = '' + substituteInPlace setup.py --replace "six==1.10.0" "six>=1.10.0" + ''; + propagatedBuildInputs = [ lxml networkx @@ -26,7 +32,15 @@ buildPythonPackage rec { pydotplus rdflib ]; - doCheck = false; # takes ~60 mins + + checkInputs = [ + pydot + glibcLocales + ]; + + preCheck = '' + export LC_ALL="en_US.utf-8" + ''; meta = with stdenv.lib; { description = "A Python library for W3C Provenance Data Model (PROV)"; From fac32de1db78aca0be8bd523162bf5e3eced5bdc Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Robert=20Sch=C3=BCtz?= Date: Mon, 19 Feb 2018 23:25:14 +0100 Subject: [PATCH 15/35] pythonPackages.xdot: move expression --- .../python-modules/xdot/default.nix | 21 +++++++++++++++++++ pkgs/top-level/python-packages.nix | 18 +--------------- 2 files changed, 22 insertions(+), 17 deletions(-) create mode 100644 pkgs/development/python-modules/xdot/default.nix diff --git a/pkgs/development/python-modules/xdot/default.nix b/pkgs/development/python-modules/xdot/default.nix new file mode 100644 index 00000000000..526376a4163 --- /dev/null +++ b/pkgs/development/python-modules/xdot/default.nix @@ -0,0 +1,21 @@ +{ lib, buildPythonPackage, fetchPypi +, wrapGAppsHook, gobjectIntrospection, pygobject3, graphviz, gnome3 }: + +buildPythonPackage rec { + pname = "xdot"; + version = "0.9"; + + src = fetchPypi { + inherit pname version; + sha256 = "01v9vmgdxz1q2m2vq2b4aqx4ycw7grc0l4is673ygvyg9rk02dx3"; + }; + + nativeBuildInputs = [ wrapGAppsHook ]; + propagatedBuildInputs = [ gobjectIntrospection pygobject3 graphviz gnome3.gtk ]; + + meta = with lib; { + description = "xdot.py is an interactive viewer for graphs written in Graphviz's dot"; + homepage = https://github.com/jrfonseca/xdot.py; + license = licenses.lgpl3Plus; + }; +} diff --git a/pkgs/top-level/python-packages.nix b/pkgs/top-level/python-packages.nix index 1dd91152543..48eb47890f2 100644 --- a/pkgs/top-level/python-packages.nix +++ b/pkgs/top-level/python-packages.nix @@ -18320,23 +18320,7 @@ EOF persistent = callPackage ../development/python-modules/persistent {}; - xdot = buildPythonPackage rec { - name = "xdot-0.9"; - - src = pkgs.fetchurl { - url = "mirror://pypi/x/xdot/${name}.tar.gz"; - sha256 = "01v9vmgdxz1q2m2vq2b4aqx4ycw7grc0l4is673ygvyg9rk02dx3"; - }; - - nativeBuildInputs = with pkgs; [ wrapGAppsHook ]; - propagatedBuildInputs = with self; [ pkgs.gobjectIntrospection pygobject3 pkgs.graphviz pkgs.gnome3.gtk ]; - - meta = { - description = "xdot.py is an interactive viewer for graphs written in Graphviz's dot"; - homepage = https://github.com/jrfonseca/xdot.py; - license = licenses.lgpl3Plus; - }; - }; + xdot = callPackage ../development/python-modules/xdot { }; zetup = callPackage ../development/python-modules/zetup { }; From 2bdee9b0c3877ff8d95239ff80c6bcb1ad8fa213 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Robert=20Sch=C3=BCtz?= Date: Tue, 20 Feb 2018 01:16:31 +0100 Subject: [PATCH 16/35] pythonPackages.green: 2.3.0 -> 2.12.0 --- .../python-modules/green/default.nix | 26 +++++++++++++++++++ pkgs/top-level/python-packages.nix | 18 +------------ 2 files changed, 27 insertions(+), 17 deletions(-) create mode 100644 pkgs/development/python-modules/green/default.nix diff --git a/pkgs/development/python-modules/green/default.nix b/pkgs/development/python-modules/green/default.nix new file mode 100644 index 00000000000..fa09e4ded21 --- /dev/null +++ b/pkgs/development/python-modules/green/default.nix @@ -0,0 +1,26 @@ +{ lib, buildPythonPackage, fetchPypi, isPy3k, colorama, coverage, termstyle, unidecode, mock, backports_shutil_get_terminal_size }: + +buildPythonPackage rec { + pname = "green"; + version = "2.12.0"; + + src = fetchPypi { + inherit pname version; + sha256 = "8cdd2934eff754c9664f373ee0d77cb1cb35dbbf3b719b8ae3b059718db875df"; + }; + + prePatch = '' + # See https://github.com/CleanCut/green/pull/182 + substituteInPlace setup.py --replace python-termstyle termstyle + ''; + + propagatedBuildInputs = [ + colorama coverage termstyle unidecode + ] ++ lib.optionals (!isPy3k) [ mock backports_shutil_get_terminal_size ]; + + meta = with lib; { + description = "Python test runner"; + homepage = https://github.com/CleanCut/green; + license = licenses.mit; + }; +} diff --git a/pkgs/top-level/python-packages.nix b/pkgs/top-level/python-packages.nix index 48eb47890f2..8cf6998420e 100644 --- a/pkgs/top-level/python-packages.nix +++ b/pkgs/top-level/python-packages.nix @@ -20930,23 +20930,7 @@ EOF termstyle = callPackage ../development/python-modules/termstyle { }; - green = buildPythonPackage rec { - name = "green-${version}"; - version = "2.3.0"; - src = pkgs.fetchurl { - url = "mirror://pypi/g/green/${name}.tar.gz"; - sha256 = "1888khfl9yxb8yfxq9b48dxwplqlxx8s0l530z5j7c6bx74v08b4"; - }; - - propagatedBuildInputs = with self; [ termstyle colorama ]; - buildInputs = with self; [ mock ]; - - meta = { - description = "Python test runner"; - homepage = "https://github.com/CleanCut/green"; - license = licenses.mit; - }; - }; + green = callPackage ../development/python-modules/green { }; topydo = throw "python3Packages.topydo was moved to topydo"; # 2017-09-22 From b49db62f9d2863f67d5d6e8bbe4b68db48eff5a8 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Robert=20Sch=C3=BCtz?= Date: Tue, 20 Feb 2018 02:28:40 +0100 Subject: [PATCH 17/35] pythonPackages.asgiref: correct dependencies and enable tests --- .../python-modules/asgiref/default.nix | 20 +++++++++++++------ 1 file changed, 14 insertions(+), 6 deletions(-) diff --git a/pkgs/development/python-modules/asgiref/default.nix b/pkgs/development/python-modules/asgiref/default.nix index 223f53698e9..b30faa19364 100644 --- a/pkgs/development/python-modules/asgiref/default.nix +++ b/pkgs/development/python-modules/asgiref/default.nix @@ -1,15 +1,23 @@ -{ stdenv, buildPythonPackage, fetchurl, six }: +{ stdenv, buildPythonPackage, fetchFromGitHub, async-timeout, pytest, pytest-asyncio }: buildPythonPackage rec { version = "2.1.5"; pname = "asgiref"; - name = "${pname}-${version}"; - src = fetchurl { - url = "mirror://pypi/a/asgiref/${name}.tar.gz"; - sha256 = "1a46196df28c67e046a54cc537ce5a8f6a59eb68649f54680d7e4fc3b113ab1b"; + # PyPI tarball doesn't include tests directory + src = fetchFromGitHub { + owner = "django"; + repo = pname; + rev = version; + sha256 = "1khhgg9cwjh4lax5c9aacp42a8sj0icdbrbzwp53if7f1irva58l"; }; - propagatedBuildInputs = [ six ]; + propagatedBuildInputs = [ async-timeout ]; + + checkInputs = [ pytest pytest-asyncio ]; + + checkPhase = '' + py.test + ''; meta = with stdenv.lib; { description = "Reference ASGI adapters and channel layers"; From 8747ebd89f71c88e088c4c68ef6482ca43c2d7a4 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Robert=20Sch=C3=BCtz?= Date: Tue, 20 Feb 2018 02:29:50 +0100 Subject: [PATCH 18/35] pythonPackages.asgiref: 2.1.5 -> 2.1.6 --- pkgs/development/python-modules/asgiref/default.nix | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/pkgs/development/python-modules/asgiref/default.nix b/pkgs/development/python-modules/asgiref/default.nix index b30faa19364..2b3be05d060 100644 --- a/pkgs/development/python-modules/asgiref/default.nix +++ b/pkgs/development/python-modules/asgiref/default.nix @@ -1,6 +1,6 @@ { stdenv, buildPythonPackage, fetchFromGitHub, async-timeout, pytest, pytest-asyncio }: buildPythonPackage rec { - version = "2.1.5"; + version = "2.1.6"; pname = "asgiref"; # PyPI tarball doesn't include tests directory @@ -8,7 +8,7 @@ buildPythonPackage rec { owner = "django"; repo = pname; rev = version; - sha256 = "1khhgg9cwjh4lax5c9aacp42a8sj0icdbrbzwp53if7f1irva58l"; + sha256 = "12p1i2ai03x2hx6b3i7xgicyfi2x11is6pkbdac4jpz7fmbz3zlh"; }; propagatedBuildInputs = [ async-timeout ]; From 40b0c5854938469b2e04db31c0c9c8721ad13660 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Robert=20Sch=C3=BCtz?= Date: Tue, 20 Feb 2018 03:26:25 +0100 Subject: [PATCH 19/35] pythonPackages.daphne: fix build and enable tests --- .../python-modules/daphne/default.nix | 26 ++++++++++++++----- 1 file changed, 19 insertions(+), 7 deletions(-) diff --git a/pkgs/development/python-modules/daphne/default.nix b/pkgs/development/python-modules/daphne/default.nix index 86b00ca7408..7fafee56b42 100644 --- a/pkgs/development/python-modules/daphne/default.nix +++ b/pkgs/development/python-modules/daphne/default.nix @@ -1,19 +1,31 @@ -{ stdenv, buildPythonPackage, fetchPypi, - asgiref, autobahn, twisted, hypothesis +{ stdenv, buildPythonPackage, isPy3k, fetchFromGitHub +, asgiref, autobahn, twisted, pytestrunner +, hypothesis, pytest, pytest-asyncio }: buildPythonPackage rec { pname = "daphne"; - name = "${pname}-${version}"; version = "2.0.3"; - src = fetchPypi { - inherit pname version; - sha256 = "bb2075ce35ca00f2e5440cc034dfebd5c00d346de62ea45f099db089b868c31f"; + disabled = !isPy3k; + + src = fetchFromGitHub { + owner = "django"; + repo = pname; + rev = version; + sha256 = "1rdnzpgyk5cnx4xc3c7k11v2x9xpihgjpq14fib80jfpcqggw687"; }; - buildInputs = [ hypothesis ]; + nativeBuildInputs = [ pytestrunner ]; + propagatedBuildInputs = [ asgiref autobahn twisted ]; + checkInputs = [ hypothesis pytest pytest-asyncio ]; + + checkPhase = '' + # Other tests fail, seems to be due to filesystem access + py.test -k "test_cli or test_utils" + ''; + meta = with stdenv.lib; { description = "Django ASGI (HTTP/WebSocket) server"; license = licenses.bsd3; From 958bd34ea44ae129dbd26c33de20b6e052ebc6d0 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Robert=20Sch=C3=BCtz?= Date: Tue, 20 Feb 2018 12:15:49 +0100 Subject: [PATCH 20/35] pythonPackages.pytest_xdist: 1.22.0 -> 1.22.1 --- pkgs/development/python-modules/pytest-xdist/default.nix | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/pkgs/development/python-modules/pytest-xdist/default.nix b/pkgs/development/python-modules/pytest-xdist/default.nix index 596ce38ed0a..27aed12c338 100644 --- a/pkgs/development/python-modules/pytest-xdist/default.nix +++ b/pkgs/development/python-modules/pytest-xdist/default.nix @@ -2,11 +2,11 @@ buildPythonPackage rec { pname = "pytest-xdist"; - version = "1.22.0"; + version = "1.22.1"; src = fetchPypi { inherit pname version; - sha256 = "65228a859191f2c74ee68c127317eefe35eedd3d43fc1431f19240663b0cafcd"; + sha256 = "fcd6f36bab93b0b24ec45ca12f798b9b3af71da826db0b0794b358d2f5c038de"; }; nativeBuildInputs = [ setuptools_scm ]; From d3a347547cf65814056de53c046a765e96a82771 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Robert=20Sch=C3=BCtz?= Date: Tue, 20 Feb 2018 21:34:44 +0100 Subject: [PATCH 21/35] pythonPackages.natsort: fix tests A coverage report is definitely not needed for Nixpkgs. --- pkgs/development/python-modules/natsort/default.nix | 8 ++------ 1 file changed, 2 insertions(+), 6 deletions(-) diff --git a/pkgs/development/python-modules/natsort/default.nix b/pkgs/development/python-modules/natsort/default.nix index a5940ed6c9f..3e4b0d1368b 100644 --- a/pkgs/development/python-modules/natsort/default.nix +++ b/pkgs/development/python-modules/natsort/default.nix @@ -1,12 +1,9 @@ { lib , buildPythonPackage , pythonOlder -, isPy35 -, isPy36 , fetchPypi , hypothesis , pytestcache -, pytestcov , pytestflakes , pytestpep8 , pytest @@ -19,10 +16,9 @@ buildPythonPackage rec { pname = "natsort"; version = "5.2.0"; - buildInputs = [ + checkInputs = [ hypothesis pytestcache - pytestcov pytestflakes pytestpep8 pytest @@ -41,7 +37,7 @@ buildPythonPackage rec { # testing based on project's tox.ini checkPhase = '' pytest --doctest-modules natsort - pytest --flakes --pep8 --cov natsort --cov-report term-missing + pytest --flakes --pep8 ''; meta = { From 35ee24f9665489c61b5196296c4e3c96454de1e8 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Robert=20Sch=C3=BCtz?= Date: Tue, 20 Feb 2018 22:37:35 +0100 Subject: [PATCH 22/35] pythonPackages.text-unidecode: init at 1.1 --- .../python-modules/text-unidecode/default.nix | 23 +++++++++++++++++++ pkgs/top-level/python-packages.nix | 2 ++ 2 files changed, 25 insertions(+) create mode 100644 pkgs/development/python-modules/text-unidecode/default.nix diff --git a/pkgs/development/python-modules/text-unidecode/default.nix b/pkgs/development/python-modules/text-unidecode/default.nix new file mode 100644 index 00000000000..79ee34c733b --- /dev/null +++ b/pkgs/development/python-modules/text-unidecode/default.nix @@ -0,0 +1,23 @@ +{ lib, buildPythonPackage, fetchPypi, pytest }: + +buildPythonPackage rec { + pname = "text-unidecode"; + version = "1.1"; + + src = fetchPypi { + inherit pname version; + sha256 = "1l081m1w8ibbx684ca71ibdy68iwqsivy6rf6yqvysdclzldbbyh"; + }; + + checkInputs = [ pytest ]; + + checkPhase = '' + py.test + ''; + + meta = with lib; { + description = "The most basic Text::Unidecode port"; + homepage = https://github.com/kmike/text-unidecode; + license = licenses.artistic1; + }; +} diff --git a/pkgs/top-level/python-packages.nix b/pkgs/top-level/python-packages.nix index 8cf6998420e..0ad8cdb5c53 100644 --- a/pkgs/top-level/python-packages.nix +++ b/pkgs/top-level/python-packages.nix @@ -15973,6 +15973,8 @@ in { stevedore = callPackage ../development/python-modules/stevedore {}; + text-unidecode = callPackage ../development/python-modules/text-unidecode { }; + Theano = callPackage ../development/python-modules/Theano rec { cudaSupport = pkgs.config.cudaSupport or false; cudnnSupport = cudaSupport; From 495bb794d12a62106c0317c4785ab7369c462fb7 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Robert=20Sch=C3=BCtz?= Date: Tue, 20 Feb 2018 22:41:01 +0100 Subject: [PATCH 23/35] pythonPackages.faker: 0.8.8 -> 0.8.11 This fixes the build failure by adding a missing dependency and because 0.8.11 allows a newer version of ukpostcodeparser. --- pkgs/development/python-modules/faker/default.nix | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/pkgs/development/python-modules/faker/default.nix b/pkgs/development/python-modules/faker/default.nix index 2d459d625d0..55750f5bf3b 100644 --- a/pkgs/development/python-modules/faker/default.nix +++ b/pkgs/development/python-modules/faker/default.nix @@ -1,6 +1,6 @@ { lib, buildPythonPackage, fetchPypi, pythonOlder, # Build inputs - dateutil, six, ipaddress ? null, + dateutil, six, text-unidecode, ipaddress ? null, # Test inputs email_validator, nose, mock, ukpostcodeparser }: @@ -8,12 +8,11 @@ assert pythonOlder "3.3" -> ipaddress != null; buildPythonPackage rec { pname = "Faker"; - version = "0.8.8"; - name = "${pname}-${version}"; + version = "0.8.11"; src = fetchPypi { inherit pname version; - sha256 = "e928cf853ef69d7471421f2a3716a1239e43de0fa9855f4016ee0c9f1057328a"; + sha256 = "126kdy6lj10rwgchzz0lzjabx0zcyskamhn0qib67k69fcksjmq8"; }; checkInputs = [ @@ -26,6 +25,7 @@ buildPythonPackage rec { propagatedBuildInputs = [ dateutil six + text-unidecode ] ++ lib.optional (pythonOlder "3.3") ipaddress; meta = with lib; { From e426e3f8371bc660e86e372c17a220e79c930f24 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Robert=20Sch=C3=BCtz?= Date: Mon, 19 Feb 2018 18:23:50 +0100 Subject: [PATCH 24/35] pythonPackages.cram: fix tests --- pkgs/development/python-modules/cram/default.nix | 16 ++++------------ 1 file changed, 4 insertions(+), 12 deletions(-) diff --git a/pkgs/development/python-modules/cram/default.nix b/pkgs/development/python-modules/cram/default.nix index c0fc5b177e0..232a4a19fd8 100644 --- a/pkgs/development/python-modules/cram/default.nix +++ b/pkgs/development/python-modules/cram/default.nix @@ -1,11 +1,10 @@ -{stdenv, lib, buildPythonPackage, fetchPypi, coverage, bash, which, writeText}: +{stdenv, lib, buildPythonPackage, fetchPypi, bash, which, writeText}: buildPythonPackage rec { - name = "${pname}-${version}"; version = "0.7"; pname = "cram"; - buildInputs = [ coverage which ]; + checkInputs = [ which ]; src = fetchPypi { inherit pname version; @@ -13,20 +12,13 @@ buildPythonPackage rec { }; postPatch = '' + patchShebangs scripts/cram substituteInPlace tests/test.t \ --replace "/bin/bash" "${bash}/bin/bash" ''; - # This testing is copied from Makefile. Simply using `make test` doesn't work - # because it uses the unpatched `scripts/cram` executable which has a bad - # shebang. Also, for some reason, coverage fails on one file so let's just - # ignore that one. checkPhase = '' - # scripts/cram tests - #COVERAGE=${coverage}/bin/coverage $out/bin/cram tests - #${coverage}/bin/coverage report --fail-under=100 - COVERAGE=coverage $out/bin/cram tests - coverage report --fail-under=100 --omit="*/_encoding.py,*/__main__.py" + scripts/cram tests ''; meta = { From 1977a2d5ee3eb426b0772cef1e9001945f399370 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Robert=20Sch=C3=BCtz?= Date: Mon, 19 Feb 2018 11:42:41 +0100 Subject: [PATCH 25/35] pythonPackages.pytest-mock: fix build This applies the following patch: https://github.com/pytest-dev/pytest-mock/pull/107 --- pkgs/development/python-modules/pytest-mock/default.nix | 7 ++++++- 1 file changed, 6 insertions(+), 1 deletion(-) diff --git a/pkgs/development/python-modules/pytest-mock/default.nix b/pkgs/development/python-modules/pytest-mock/default.nix index 51ec2a1f4cb..6b852583c7e 100644 --- a/pkgs/development/python-modules/pytest-mock/default.nix +++ b/pkgs/development/python-modules/pytest-mock/default.nix @@ -1,4 +1,4 @@ -{ lib, buildPythonPackage, fetchPypi, isPy3k, pytest, mock, setuptools_scm }: +{ lib, buildPythonPackage, fetchPypi, fetchpatch, isPy3k, pytest, mock, setuptools_scm }: buildPythonPackage rec { pname = "pytest-mock"; @@ -9,6 +9,11 @@ buildPythonPackage rec { sha256 = "8ed6c9ac6b7565b226b4da2da48876c9198d76401ec8d9c5e4c69b45423e33f8"; }; + patches = fetchpatch { + url = "${meta.homepage}/pull/107.patch"; + sha256 = "07p7ra6lilfv04wyxc855zmfwxvnpmi9s0v6vh5bx769cj9jwxck"; + }; + propagatedBuildInputs = [ pytest ] ++ lib.optional (!isPy3k) mock; nativeBuildInputs = [ setuptools_scm ]; From 882cf122bea1e89e7e2aff1ed3d741405d43589b Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Robert=20Sch=C3=BCtz?= Date: Wed, 21 Feb 2018 10:04:42 +0100 Subject: [PATCH 26/35] pythonPackages.promegranate: mark as broken "pomegranate does not yet work with networkx 2.0" --- pkgs/development/python-modules/pomegranate/default.nix | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/pkgs/development/python-modules/pomegranate/default.nix b/pkgs/development/python-modules/pomegranate/default.nix index 77b373de259..e611e2ea5b1 100644 --- a/pkgs/development/python-modules/pomegranate/default.nix +++ b/pkgs/development/python-modules/pomegranate/default.nix @@ -3,7 +3,6 @@ buildPythonPackage rec { pname = "pomegranate"; version = "0.8.1"; - name = "${pname}-${version}"; src = fetchFromGitHub { repo = pname; @@ -21,5 +20,9 @@ buildPythonPackage rec { homepage = https://github.com/jmschrei/pomegranate; license = licenses.mit; maintainers = with maintainers; [ rybern ]; + + # "pomegranate does not yet work with networkx 2.0" + # see https://github.com/jmschrei/pomegranate/issues/209 + broken = true; }; } From da31b4779095fec0e4b4c6f9316393895bc7a75d Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Robert=20Sch=C3=BCtz?= Date: Thu, 22 Feb 2018 00:12:44 +0100 Subject: [PATCH 27/35] pytrainer: fix tests --- pkgs/applications/misc/pytrainer/default.nix | 16 ++++++++++------ 1 file changed, 10 insertions(+), 6 deletions(-) diff --git a/pkgs/applications/misc/pytrainer/default.nix b/pkgs/applications/misc/pytrainer/default.nix index ecc4c341a68..8605801dea1 100644 --- a/pkgs/applications/misc/pytrainer/default.nix +++ b/pkgs/applications/misc/pytrainer/default.nix @@ -1,19 +1,19 @@ -{ stdenv, fetchFromGitHub, perl, python2Packages, sqlite, gpsbabel +{ stdenv, fetchFromGitHub, perl, python, sqlite, gpsbabel , withWebKit ? false }: let # Pytrainer needs a matplotlib with GTK backend. Also ensure we are # using the pygtk with glade support as needed by pytrainer. - matplotlibGtk = python2Packages.matplotlib.override { + matplotlibGtk = python.pkgs.matplotlib.override { enableGtk2 = true; - pygtk = python2Packages.pyGtkGlade; + pygtk = python.pkgs.pyGtkGlade; }; in -python2Packages.buildPythonApplication rec { - name = "pytrainer-${version}"; +python.pkgs.buildPythonApplication rec { + pname = "pytrainer"; version = "1.11.0"; src = fetchFromGitHub { @@ -35,7 +35,7 @@ python2Packages.buildPythonApplication rec { ./pytrainer-webkit.patch ]; - propagatedBuildInputs = with python2Packages; [ + propagatedBuildInputs = with python.pkgs; [ dateutil lxml matplotlibGtk pyGtkGlade sqlalchemy_migrate ] ++ stdenv.lib.optional withWebKit [ pywebkitgtk ]; @@ -45,6 +45,10 @@ python2Packages.buildPythonApplication rec { dontPatchELF = true; dontStrip = true; + checkPhase = '' + ${python.interpreter} -m unittest discover + ''; + meta = with stdenv.lib; { homepage = https://github.com/pytrainer/pytrainer/wiki; description = "Application for logging and graphing sporting excursions"; From c7a6483309c5ba08a6fccbfe1d211f98a9061b24 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Robert=20Sch=C3=BCtz?= Date: Thu, 22 Feb 2018 01:15:10 +0100 Subject: [PATCH 28/35] pythonPackages.konfig: move expression --- .../python-modules/konfig/default.nix | 39 +++++++++++++++++++ pkgs/top-level/python-packages.nix | 39 +------------------ 2 files changed, 40 insertions(+), 38 deletions(-) create mode 100644 pkgs/development/python-modules/konfig/default.nix diff --git a/pkgs/development/python-modules/konfig/default.nix b/pkgs/development/python-modules/konfig/default.nix new file mode 100644 index 00000000000..aba97c7204e --- /dev/null +++ b/pkgs/development/python-modules/konfig/default.nix @@ -0,0 +1,39 @@ +{ lib, buildPythonPackage, fetchPypi, isPy3k, writeText, configparser, six }: + +buildPythonPackage rec { + pname = "konfig"; + version = "1.1"; + + # konfig unconditionaly depend on configparser, even if it is part of + # the standard library in python 3.2 or above. + disabled = isPy3k; + + src = fetchPypi { + inherit pname version; + sha256 = "7aa4c6463d6c13f4c98c02a998cbef4729da9ad69b676627acc8d3b3efb02b57"; + }; + + propagatedBuildInputs = [ configparser six ]; + + patches = [ (writeText "konfig.patch" '' + diff --git a/setup.py b/setup.py + index 96fd858..bb4db06 100644 + --- a/setup.py + +++ b/setup.py + @@ -20,7 +20,7 @@ setup(name='konfig', + author_email="tarek@mozilla.com", + include_package_data=True, + install_requires = [ + - 'configparser', 'argparse', 'six' + + 'configparser', 'six' + ], + zip_safe=False, + classifiers=classifiers, + '') ]; + + meta = with lib; { + description = "Yet Another Config Parser"; + homepage = "https://github.com/mozilla-services/konfig"; + license = licenses.mpl20; + }; +} diff --git a/pkgs/top-level/python-packages.nix b/pkgs/top-level/python-packages.nix index 0ad8cdb5c53..d4a8f441175 100644 --- a/pkgs/top-level/python-packages.nix +++ b/pkgs/top-level/python-packages.nix @@ -9422,44 +9422,7 @@ in { }; }; - konfig = buildPythonPackage rec { - name = "konfig-${version}"; - version = "1.1"; - - # konfig unconditionaly depend on configparser, even if it is part of - # the standard library in python 3.2 or above. - disabled = isPy3k; - - src = pkgs.fetchgit { - url = https://github.com/mozilla-services/konfig.git; - rev = "refs/tags/${version}"; - sha256 = "1h780fbrv275dcik4cs3rincza805z6q726b48r4a0qmh5d8160c"; - }; - - propagatedBuildInputs = with self; [ configparser six ]; - - patches = [ (pkgs.writeText "konfig.patch" '' - diff --git a/setup.py b/setup.py - index 96fd858..bb4db06 100644 - --- a/setup.py - +++ b/setup.py - @@ -20,7 +20,7 @@ setup(name='konfig', - author_email="tarek@mozilla.com", - include_package_data=True, - install_requires = [ - - 'configparser', 'argparse', 'six' - + 'configparser', 'six' - ], - zip_safe=False, - classifiers=classifiers, - '') ]; - - meta = { - description = "Yet Another Config Parser"; - homepage = "https://github.com/mozilla-services/konfig"; - license = licenses.mpl20; - }; - }; + konfig = callPackage ../development/python-modules/konfig { }; kitchen = callPackage ../development/python-modules/kitchen/default.nix { }; From 0862ca375c97d30aba8bb724f4f4358eba73de68 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Robert=20Sch=C3=BCtz?= Date: Thu, 22 Feb 2018 01:22:48 +0100 Subject: [PATCH 29/35] pythonPackages.konfig: fix tests --- .../python-modules/konfig/default.nix | 17 +++++++++++++---- 1 file changed, 13 insertions(+), 4 deletions(-) diff --git a/pkgs/development/python-modules/konfig/default.nix b/pkgs/development/python-modules/konfig/default.nix index aba97c7204e..e7062bad5ee 100644 --- a/pkgs/development/python-modules/konfig/default.nix +++ b/pkgs/development/python-modules/konfig/default.nix @@ -1,4 +1,4 @@ -{ lib, buildPythonPackage, fetchPypi, isPy3k, writeText, configparser, six }: +{ lib, buildPythonPackage, fetchFromGitHub, isPy3k, writeText, configparser, six, pytest, glibcLocales }: buildPythonPackage rec { pname = "konfig"; @@ -8,9 +8,12 @@ buildPythonPackage rec { # the standard library in python 3.2 or above. disabled = isPy3k; - src = fetchPypi { - inherit pname version; - sha256 = "7aa4c6463d6c13f4c98c02a998cbef4729da9ad69b676627acc8d3b3efb02b57"; + # PyPI tarball is missing utf8.ini, required for tests + src = fetchFromGitHub { + owner = "mozilla-services"; + repo = pname; + rev = version; + sha256 = "1h780fbrv275dcik4cs3rincza805z6q726b48r4a0qmh5d8160c"; }; propagatedBuildInputs = [ configparser six ]; @@ -31,6 +34,12 @@ buildPythonPackage rec { classifiers=classifiers, '') ]; + checkInputs = [ pytest glibcLocales ]; + + checkPhase = '' + LC_ALL=en_US.utf8 pytest -v konfig/tests + ''; + meta = with lib; { description = "Yet Another Config Parser"; homepage = "https://github.com/mozilla-services/konfig"; From 9b37f0a06d9f33765e5759d00caf7d0fd3cc2782 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Robert=20Sch=C3=BCtz?= Date: Thu, 22 Feb 2018 01:36:10 +0100 Subject: [PATCH 30/35] pythonPackages.ecpy: disable for python 2 setup.py specifies python_requires='>=3' --- pkgs/development/python-modules/ecpy/default.nix | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/pkgs/development/python-modules/ecpy/default.nix b/pkgs/development/python-modules/ecpy/default.nix index 84830e7f2b8..277a5cece56 100644 --- a/pkgs/development/python-modules/ecpy/default.nix +++ b/pkgs/development/python-modules/ecpy/default.nix @@ -1,12 +1,13 @@ -{ stdenv, fetchPypi, buildPythonPackage, hidapi +{ stdenv, fetchPypi, buildPythonPackage, isPy3k, hidapi , pycrypto, pillow, protobuf, future, ecpy }: buildPythonPackage rec { - name = "${pname}-${version}"; pname = "ECPy"; version = "0.8.3"; + disabled = !isPy3k; + src = fetchPypi { inherit pname version; sha256 = "ef3d95419d53368f52fb7d4b883b8df0dfc2dd19a76243422d24981c3e5f27bd"; From 198bdf39b6b61e86cc9a50507e47e575aaf93e82 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Robert=20Sch=C3=BCtz?= Date: Thu, 22 Feb 2018 01:42:31 +0100 Subject: [PATCH 31/35] pythonPackages.mysql_connector_repackaged: uninit Package has last been updated in 2012. There is now also pythonPackages.mysql-connector. --- pkgs/top-level/python-packages.nix | 18 ------------------ 1 file changed, 18 deletions(-) diff --git a/pkgs/top-level/python-packages.nix b/pkgs/top-level/python-packages.nix index d4a8f441175..1551973296a 100644 --- a/pkgs/top-level/python-packages.nix +++ b/pkgs/top-level/python-packages.nix @@ -10814,24 +10814,6 @@ in { mysql-connector = callPackage ../development/python-modules/mysql-connector { }; - mysql_connector_repackaged = buildPythonPackage rec { - name = "mysql-connector-repackaged-0.3.1"; - - src = pkgs.fetchurl { - url = "mirror://pypi/m/mysql-connector-repackaged/${name}.tar.gz"; - sha256 = "170fbf11c54def1b5fcc919be0a890b760bb2eca81f56123a5dda0c69b5b099e"; - }; - - # Judging from SyntaxError - disabled = isPy3k; - - meta = { - maintainers = with maintainers; [ garbas domenkozar ]; - platforms = platforms.linux; - }; - }; - - namebench = buildPythonPackage (rec { name = "namebench-1.3.1"; disabled = isPy3k || isPyPy; From 102ed109c42652b856c49aa7062cca21fa1371c4 Mon Sep 17 00:00:00 2001 From: Tuomas Tynkkynen Date: Thu, 22 Feb 2018 02:57:55 +0200 Subject: [PATCH 32/35] e2fsprogs: 1.43.8 -> 1.43.9 --- pkgs/tools/filesystems/e2fsprogs/default.nix | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/pkgs/tools/filesystems/e2fsprogs/default.nix b/pkgs/tools/filesystems/e2fsprogs/default.nix index 6326cda3539..62eab06c387 100644 --- a/pkgs/tools/filesystems/e2fsprogs/default.nix +++ b/pkgs/tools/filesystems/e2fsprogs/default.nix @@ -1,11 +1,11 @@ { stdenv, buildPackages, fetchurl, pkgconfig, libuuid, gettext, texinfo }: stdenv.mkDerivation rec { - name = "e2fsprogs-1.43.8"; + name = "e2fsprogs-1.43.9"; src = fetchurl { url = "mirror://sourceforge/e2fsprogs/${name}.tar.gz"; - sha256 = "1pn33rap3lcjm3gx07pmgyhx4j634gja63phmi4g5dq8yj0z8ciz"; + sha256 = "15rqvkzylqqckshfy7vmk15k7wds2rh3k1pwrkrs684p3g0gzq2v"; }; outputs = [ "bin" "dev" "out" "man" "info" ]; From 54ac74c5586e6ab75727e8f1415ae232ca96a3fa Mon Sep 17 00:00:00 2001 From: Tuomas Tynkkynen Date: Thu, 22 Feb 2018 08:24:02 +0200 Subject: [PATCH 33/35] gnutls: 3.6.1 -> 3.6.2 --- pkgs/development/libraries/gnutls/3.6.nix | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/pkgs/development/libraries/gnutls/3.6.nix b/pkgs/development/libraries/gnutls/3.6.nix index 35344dfde7d..7fb1af70a28 100644 --- a/pkgs/development/libraries/gnutls/3.6.nix +++ b/pkgs/development/libraries/gnutls/3.6.nix @@ -1,11 +1,11 @@ { callPackage, fetchurl, ... } @ args: callPackage ./generic.nix (args // rec { - version = "3.6.1"; + version = "3.6.2"; src = fetchurl { url = "mirror://gnupg/gnutls/v3.6/gnutls-${version}.tar.xz"; - sha256 = "1vdsir53ddxyapnxh5fpnfyij3scx3818iri4hl07g4lk4n0vc90"; + sha256 = "07wdffklwmxpa9i50sh5nwrc5ajb47skrldm6rzjc0jf4dxxpmdw"; }; # Skip two tests introduced in 3.5.11. Probable reasons of failure: From f67b2512aa8c5e1d338c1a7be4b146996465c659 Mon Sep 17 00:00:00 2001 From: Eelco Dolstra Date: Thu, 22 Feb 2018 15:15:42 +0100 Subject: [PATCH 34/35] libatomic_ops: Use multiple outputs --- pkgs/development/libraries/libatomic_ops/default.nix | 2 ++ 1 file changed, 2 insertions(+) diff --git a/pkgs/development/libraries/libatomic_ops/default.nix b/pkgs/development/libraries/libatomic_ops/default.nix index 714e9361440..fe4cd3ca0a9 100644 --- a/pkgs/development/libraries/libatomic_ops/default.nix +++ b/pkgs/development/libraries/libatomic_ops/default.nix @@ -12,6 +12,8 @@ stdenv.mkDerivation rec { sha256 ="1rif2hjscq5mh639nsnjhb90c01gnmy1sbmj6x6hsn1xmpnj95r1"; }; + outputs = [ "out" "dev" "doc" ]; + # https://github.com/ivmai/libatomic_ops/pull/32 patches = if hostPlatform.isRiscV then [ ./riscv.patch ] else null; From 8d490ca9934d0c01e1e9ade455657e54e2e843c0 Mon Sep 17 00:00:00 2001 From: Eelco Dolstra Date: Thu, 22 Feb 2018 15:15:55 +0100 Subject: [PATCH 35/35] libseccomp: Use multiple outputs --- pkgs/development/libraries/libseccomp/default.nix | 2 ++ 1 file changed, 2 insertions(+) diff --git a/pkgs/development/libraries/libseccomp/default.nix b/pkgs/development/libraries/libseccomp/default.nix index 023c51c2b14..d953fd12e68 100644 --- a/pkgs/development/libraries/libseccomp/default.nix +++ b/pkgs/development/libraries/libseccomp/default.nix @@ -9,6 +9,8 @@ stdenv.mkDerivation rec { sha256 = "0mdiyfljrkfl50q1m3ws8yfcyfjwf1zgkvcva8ffcwncji18zhkz"; }; + outputs = [ "out" "lib" "dev" "man" ]; + buildInputs = [ getopt makeWrapper ]; patchPhase = ''