Skip to content

Commit

Permalink
Merge staging at '8d490ca9934d0c01e1e9ade455657e54e2e843c0' into master
Browse files Browse the repository at this point in the history
  • Loading branch information
FRidh committed Feb 26, 2018
2 parents 754816b + 8d490ca commit fc23242
Show file tree
Hide file tree
Showing 33 changed files with 389 additions and 267 deletions.
16 changes: 10 additions & 6 deletions 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 {
Expand All @@ -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 ];

Expand All @@ -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";
Expand Down
6 changes: 5 additions & 1 deletion pkgs/build-support/cc-wrapper/utils.sh
Expand Up @@ -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
}
Expand Down
12 changes: 4 additions & 8 deletions 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/;
Expand Down
4 changes: 2 additions & 2 deletions 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:
Expand Down
2 changes: 2 additions & 0 deletions pkgs/development/libraries/libatomic_ops/default.nix
Expand Up @@ -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;

Expand Down
2 changes: 2 additions & 0 deletions pkgs/development/libraries/libseccomp/default.nix
Expand Up @@ -9,6 +9,8 @@ stdenv.mkDerivation rec {
sha256 = "0mdiyfljrkfl50q1m3ws8yfcyfjwf1zgkvcva8ffcwncji18zhkz";
};

outputs = [ "out" "lib" "dev" "man" ];

buildInputs = [ getopt makeWrapper ];

patchPhase = ''
Expand Down
45 changes: 13 additions & 32 deletions 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" ];
Expand All @@ -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/;
Expand Down
44 changes: 44 additions & 0 deletions 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 ];
};
}
22 changes: 15 additions & 7 deletions 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";
version = "2.1.6";
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 = "12p1i2ai03x2hx6b3i7xgicyfi2x11is6pkbdac4jpz7fmbz3zlh";
};

propagatedBuildInputs = [ six ];
propagatedBuildInputs = [ async-timeout ];

checkInputs = [ pytest pytest-asyncio ];

checkPhase = ''
py.test
'';

meta = with stdenv.lib; {
description = "Reference ASGI adapters and channel layers";
Expand Down
25 changes: 18 additions & 7 deletions pkgs/development/python-modules/bibtexparser/default.nix
@@ -1,20 +1,31 @@
{ lib
, buildPythonPackage
, fetchPypi
, fetchFromGitHub
, pyparsing
, future
, nose
, glibcLocales
}:

buildPythonPackage rec {
pname = "bibtexparser";
version = "1.0.1";
name = "${pname}-${version}";

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";
};

# No tests in archive
doCheck = false;
propagatedBuildInputs = [ pyparsing future ];

checkInputs = [ nose glibcLocales ];

checkPhase = ''
LC_ALL="en_US.UTF-8" nosetests
'';

meta = {
description = "Bibtex parser for python 2.7 and 3.3 and newer";
Expand Down
27 changes: 27 additions & 0 deletions 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;
};
}
16 changes: 4 additions & 12 deletions pkgs/development/python-modules/cram/default.nix
@@ -1,32 +1,24 @@
{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;
sha256 = "0bvz6fwdi55rkrz3f50zsy35gvvwhlppki2yml5bj5ffy9d499vx";
};

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 = {
Expand Down
8 changes: 4 additions & 4 deletions 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";
Expand All @@ -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; {
Expand Down

2 comments on commit fc23242

@vcunat
Copy link
Member

@vcunat vcunat commented on fc23242 Feb 26, 2018

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@FRidh: well, this staging evaluation is missing almost half of the binaries. Why did you merge it? I specifically cancel some staging evaluations, because it's just infeasible to fully build each. The main point of staging is reducing the total number of rebuilds.

@vcunat
Copy link
Member

@vcunat vcunat commented on fc23242 Feb 26, 2018

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I can't see any reaction, reverting in 6168c2e.

Please sign in to comment.