diff options
author | Frederik Rietdijk <fridh@fridh.nl> | 2019-06-16 09:04:52 +0200 |
---|---|---|
committer | Frederik Rietdijk <fridh@fridh.nl> | 2019-06-16 09:04:52 +0200 |
commit | 9de9a15b8603ab4bcef83b90ffe4b8841e3440dc (patch) | |
tree | 402af76f83d0e061c6ac75af4585713af472a7d1 /pkgs/development | |
parent | f1bf93eb8e3db9054e40d5b02015bd5e009efdc6 (diff) | |
parent | 7adbdd97588674706cb5a277d5dc63480425bc6b (diff) | |
download | nixpkgs-9de9a15b8603ab4bcef83b90ffe4b8841e3440dc.tar nixpkgs-9de9a15b8603ab4bcef83b90ffe4b8841e3440dc.tar.gz nixpkgs-9de9a15b8603ab4bcef83b90ffe4b8841e3440dc.tar.bz2 nixpkgs-9de9a15b8603ab4bcef83b90ffe4b8841e3440dc.tar.lz nixpkgs-9de9a15b8603ab4bcef83b90ffe4b8841e3440dc.tar.xz nixpkgs-9de9a15b8603ab4bcef83b90ffe4b8841e3440dc.tar.zst nixpkgs-9de9a15b8603ab4bcef83b90ffe4b8841e3440dc.zip |
Merge staging-next into staging
Diffstat (limited to 'pkgs/development')
-rw-r--r-- | pkgs/development/interpreters/picolisp/default.nix | 3 | ||||
-rw-r--r-- | pkgs/development/libraries/flatpak/default.nix | 4 | ||||
-rw-r--r-- | pkgs/development/libraries/flatpak/validate-icon-pixbuf.patch | 13 | ||||
-rw-r--r-- | pkgs/development/libraries/liburing/default.nix | 6 | ||||
-rw-r--r-- | pkgs/development/libraries/opencv/3.x.nix | 12 | ||||
-rw-r--r-- | pkgs/development/libraries/opencv/4.x.nix | 6 | ||||
-rw-r--r-- | pkgs/development/python-modules/matchpy/default.nix | 12 | ||||
-rw-r--r-- | pkgs/development/python-modules/pygraphviz/default.nix | 5 | ||||
-rw-r--r-- | pkgs/development/tools/build-managers/bmake/default.nix | 37 | ||||
-rw-r--r-- | pkgs/development/tools/flatpak-builder/default.nix | 42 | ||||
-rw-r--r-- | pkgs/development/tools/flatpak-builder/fix-test-paths.patch | 111 | ||||
-rw-r--r-- | pkgs/development/tools/misc/reviewdog/default.nix | 26 |
12 files changed, 257 insertions, 20 deletions
diff --git a/pkgs/development/interpreters/picolisp/default.nix b/pkgs/development/interpreters/picolisp/default.nix index 058a83b6b43..a7e6f6e2dc7 100644 --- a/pkgs/development/interpreters/picolisp/default.nix +++ b/pkgs/development/interpreters/picolisp/default.nix @@ -1,4 +1,4 @@ -{ stdenv, fetchurl, jdk, makeWrapper }: +{ stdenv, fetchurl, jdk, w3m, makeWrapper }: with stdenv.lib; stdenv.mkDerivation rec { @@ -33,6 +33,7 @@ stdenv.mkDerivation rec { makeWrapper $out/bin/picolisp $out/bin/pil \ + --prefix PATH : ${w3m}/bin \ --add-flags "$out/lib/picolisp/lib.l" \ --add-flags "@lib/misc.l" \ --add-flags "@lib/btree.l" \ diff --git a/pkgs/development/libraries/flatpak/default.nix b/pkgs/development/libraries/flatpak/default.nix index aff5737432f..4ea17e588a9 100644 --- a/pkgs/development/libraries/flatpak/default.nix +++ b/pkgs/development/libraries/flatpak/default.nix @@ -1,7 +1,7 @@ { stdenv, fetchurl, autoreconfHook, docbook_xml_dtd_412, docbook_xml_dtd_42, docbook_xml_dtd_43, docbook_xsl, which, libxml2 , gobject-introspection, gtk-doc, intltool, libxslt, pkgconfig, xmlto, appstream-glib, substituteAll, glibcLocales, yacc, xdg-dbus-proxy, p11-kit , bubblewrap, bzip2, dbus, glib, gpgme, json-glib, libarchive, libcap, libseccomp, coreutils, gettext, python2, hicolor-icon-theme -, libsoup, lzma, ostree, polkit, python3, systemd, xorg, valgrind, glib-networking, wrapGAppsHook, gnome3, gsettings-desktop-schemas }: +, libsoup, lzma, ostree, polkit, python3, systemd, xorg, valgrind, glib-networking, wrapGAppsHook, gnome3, gsettings-desktop-schemas, librsvg }: stdenv.mkDerivation rec { pname = "flatpak"; @@ -33,6 +33,7 @@ stdenv.mkDerivation rec { ./respect-xml-catalog-files-var.patch ./use-flatpak-from-path.patch ./unset-env-vars.patch + ./validate-icon-pixbuf.patch ]; nativeBuildInputs = [ @@ -44,6 +45,7 @@ stdenv.mkDerivation rec { bubblewrap bzip2 dbus gnome3.dconf glib gpgme json-glib libarchive libcap libseccomp libsoup lzma ostree polkit python3 systemd xorg.libXau gsettings-desktop-schemas glib-networking + librsvg # for flatpak-validate-icon ]; checkInputs = [ valgrind ]; diff --git a/pkgs/development/libraries/flatpak/validate-icon-pixbuf.patch b/pkgs/development/libraries/flatpak/validate-icon-pixbuf.patch new file mode 100644 index 00000000000..5b8cc2d0383 --- /dev/null +++ b/pkgs/development/libraries/flatpak/validate-icon-pixbuf.patch @@ -0,0 +1,13 @@ +diff --git a/icon-validator/validate-icon.c b/icon-validator/validate-icon.c +index 6e23d9f2..f0659a78 100644 +--- a/icon-validator/validate-icon.c ++++ b/icon-validator/validate-icon.c +@@ -193,6 +193,8 @@ rerun_in_sandbox (const char *arg_width, + add_args (args, "--setenv", "G_MESSAGES_DEBUG", g_getenv ("G_MESSAGES_DEBUG"), NULL); + if (g_getenv ("G_MESSAGES_PREFIXED")) + add_args (args, "--setenv", "G_MESSAGES_PREFIXED", g_getenv ("G_MESSAGES_PREFIXED"), NULL); ++ if (g_getenv ("GDK_PIXBUF_MODULE_FILE")) ++ add_args (args, "--setenv", "GDK_PIXBUF_MODULE_FILE", g_getenv ("GDK_PIXBUF_MODULE_FILE"), NULL); + + add_args (args, validate_icon, arg_width, arg_height, filename, NULL); + g_ptr_array_add (args, NULL); diff --git a/pkgs/development/libraries/liburing/default.nix b/pkgs/development/libraries/liburing/default.nix index 4564bab227b..cce10a761d3 100644 --- a/pkgs/development/libraries/liburing/default.nix +++ b/pkgs/development/libraries/liburing/default.nix @@ -3,12 +3,12 @@ stdenv.mkDerivation rec { name = "liburing-${version}"; - version = "1.0.0pre132_${builtins.substring 0 7 src.rev}"; + version = "1.0.0pre137_${builtins.substring 0 7 src.rev}"; src = fetchgit { url = "http://git.kernel.dk/liburing"; - rev = "f8865bc65feced660a3075175200a60968187bba"; - sha256 = "13l6s5iyrhqa0yj272qax0261cfw3nz09hq5hpf0f0kb2952d4rc"; + rev = "91dde5c956b1af491bc6c16ee230daa4b4b66706"; + sha256 = "0rk1ikrn3s6sp3gx7kc4y6msx7yncr3845m67vhk8lxvhd90sgza"; }; separateDebugInfo = true; diff --git a/pkgs/development/libraries/opencv/3.x.nix b/pkgs/development/libraries/opencv/3.x.nix index 676666d7f47..b0652176c94 100644 --- a/pkgs/development/libraries/opencv/3.x.nix +++ b/pkgs/development/libraries/opencv/3.x.nix @@ -35,20 +35,20 @@ }: let - version = "3.4.5"; + version = "3.4.6"; src = fetchFromGitHub { owner = "opencv"; repo = "opencv"; rev = version; - sha256 = "0hz9316ys2qi0lx9dcbsk3mkn8cn08q12hc96p6zz2d4is6d5wsc"; + sha256 = "1gf0rbgd5s13q46bdna0bqn4yz9rxfhvlhbp5ds9hs326q8zprg8"; }; contribSrc = fetchFromGitHub { owner = "opencv"; repo = "opencv_contrib"; rev = version; - sha256 = "1fw7qwgibiznqal2dg4alkw8hrrrpjc0jaicf2406604rjm2lx6h"; + sha256 = "115qcq0k2wmvhxw5lyv14yrd8m6xq3qy0pdby90ml2yl1caymbfy"; }; # Contrib must be built in order to enable Tesseract support: @@ -147,6 +147,12 @@ stdenv.mkDerivation rec { cp --no-preserve=mode -r "${contribSrc}/modules" "$NIX_BUILD_TOP/opencv_contrib" ''; + patches = lib.optional stdenv.isDarwin + (fetchpatch { + url = "https://github.com/opencv/opencv/commit/7621b91769098359e893e68ad474040ca7940fa1.patch"; + sha256 = "12qb14yd5934ig61lzs4pg29gak9wjyhnj7nmfx5r213jj1a4m21"; + }); + # This prevents cmake from using libraries in impure paths (which # causes build failure on non NixOS) # Also, work around https://github.com/NixOS/nixpkgs/issues/26304 with diff --git a/pkgs/development/libraries/opencv/4.x.nix b/pkgs/development/libraries/opencv/4.x.nix index a21cd6d079b..b4ad2bcb867 100644 --- a/pkgs/development/libraries/opencv/4.x.nix +++ b/pkgs/development/libraries/opencv/4.x.nix @@ -35,20 +35,20 @@ }: let - version = "4.0.1"; + version = "4.1.0"; src = fetchFromGitHub { owner = "opencv"; repo = "opencv"; rev = version; - sha256 = "1f0n2a57sn47w55vaxlwhr3g6xgchvr3gxicxbkyzai3pvj55k48"; + sha256 = "0m1f51m11iz4vxfrmnhawksd669ld247rlfdq5fhkvfk3r7aidw6"; }; contribSrc = fetchFromGitHub { owner = "opencv"; repo = "opencv_contrib"; rev = version; - sha256 = "0svw8f6nvnzmrc0baj6priq4hbijla4kl6gzy8yif1jfvcwb1syy"; + sha256 = "1phmmba96m5znjf3wxwhxavgzgp3bs5qqsjk9ay1i63rdacz4vlf"; }; # Contrib must be built in order to enable Tesseract support: diff --git a/pkgs/development/python-modules/matchpy/default.nix b/pkgs/development/python-modules/matchpy/default.nix index dcac40b873c..a9f37b52c1b 100644 --- a/pkgs/development/python-modules/matchpy/default.nix +++ b/pkgs/development/python-modules/matchpy/default.nix @@ -3,7 +3,7 @@ , fetchPypi , hopcroftkarp , multiset -, pytest +, pytest_3 , pytestrunner , hypothesis , setuptools_scm @@ -12,16 +12,20 @@ buildPythonPackage rec { pname = "matchpy"; - version = "0.4.6"; + version = "0.5.1"; disabled = isPy27; src = fetchPypi { inherit pname version; - sha256 = "eefa1e50a10e1255db61bc2522a6768ad0701f8854859f293ebaa442286faadd"; + sha256 = "1vvf1cd9kw5z1mzvypc9f030nd18lgvvjc8j56b1s9b7dyslli2r"; }; + postPatch = '' + substituteInPlace setup.cfg --replace "hypothesis>=3.6,<4.0" "hypothesis" + ''; + buildInputs = [ setuptools_scm pytestrunner ]; - checkInputs = [ pytest hypothesis ]; + checkInputs = [ pytest_3 hypothesis ]; propagatedBuildInputs = [ hopcroftkarp multiset ]; meta = with lib; { diff --git a/pkgs/development/python-modules/pygraphviz/default.nix b/pkgs/development/python-modules/pygraphviz/default.nix index 835cdbaa6be..706284b56db 100644 --- a/pkgs/development/python-modules/pygraphviz/default.nix +++ b/pkgs/development/python-modules/pygraphviz/default.nix @@ -3,11 +3,12 @@ buildPythonPackage rec { pname = "pygraphviz"; - version = "1.3.1"; + version = "1.5"; src = fetchPypi { inherit pname version; - sha256 = "7c294cbc9d88946be671cc0d8602aac176d8c56695c0a7d871eadea75a958408"; + sha256 = "179i3mjprhn200gcj6jq7c4mdrzckyqlh1srz78hynnw0nijka2h"; + extension = "zip"; }; nativeBuildInputs = [ pkgconfig ]; diff --git a/pkgs/development/tools/build-managers/bmake/default.nix b/pkgs/development/tools/build-managers/bmake/default.nix new file mode 100644 index 00000000000..e101eea0cd3 --- /dev/null +++ b/pkgs/development/tools/build-managers/bmake/default.nix @@ -0,0 +1,37 @@ +{ stdenv, fetchurl +, gnugrep, coreutils, getopt +}: + +stdenv.mkDerivation rec { + name = "bmake-${version}"; + version = "20121212"; + + src = fetchurl { + # really wish this URL was versioned. if this changes for some + # update in the future, we'll have to backport those updates to + # any stable branches so builds can continue to work. :( + url = "http://www.crufty.net/ftp/pub/sjg/bmake.tar.gz"; + sha256 = "0zp6yy27z52qb12bgm3hy1dwal2i570615pqqk71zwhcxfs4h2gw"; + }; + + nativeBuildInputs = + [ gnugrep coreutils getopt + ]; + + # unexport-env sets PATH to a bogus value that won't be + # possible to use inside the build sandbox. nuke that test; + # we could also re-construct the PATH variable a bit based on + # nativeBuildInputs, but not for now + patchPhase = '' + substituteInPlace ./unit-tests/Makefile.in \ + --replace "unexport-env" "" + ''; + + meta = with stdenv.lib; { + description = "Portable version of NetBSD 'make'"; + homepage = "http://www.crufty.net/help/sjg/bmake.html"; + license = licenses.bsd3; + platforms = platforms.unix; + maintainers = with maintainers; [ thoughtpolice ]; + }; +} diff --git a/pkgs/development/tools/flatpak-builder/default.nix b/pkgs/development/tools/flatpak-builder/default.nix index 5f8aaf07d73..fa00b8e5f89 100644 --- a/pkgs/development/tools/flatpak-builder/default.nix +++ b/pkgs/development/tools/flatpak-builder/default.nix @@ -24,6 +24,9 @@ , flatpak , gitMinimal , glib +, glibcLocales +, gnumake +, gnupg , gnutar , json-glib , libcap @@ -32,20 +35,23 @@ , libyaml , ostree , patch +, python2 , rpm , unzip }: let - version = "1.0.6"; + installed_testdir = "${placeholder "installedTests"}/libexec/installed-tests/flatpak-builder"; + installed_test_metadir = "${placeholder "installedTests"}/share/installed-tests/flatpak-builder"; + version = "1.0.7"; in stdenv.mkDerivation rec { name = "flatpak-builder-${version}"; - outputs = [ "out" "doc" "man" ]; + outputs = [ "out" "doc" "man" "installedTests" ]; src = fetchurl { url = "https://github.com/flatpak/flatpak-builder/releases/download/${version}/${name}.tar.xz"; - sha256 = "1fw9lzf9cy3fnnvn9q3g0schxcj7kaj6kjijhrmcmsfcnzbjlmrv"; + sha256 = "04z9i2kahj4mffzq8ny0jvc4g3ah8kv8ilqv2rx9r1l8fhbq30jj"; }; nativeBuildInputs = [ @@ -95,8 +101,38 @@ in stdenv.mkDerivation rec { eustrip = "${elfutils}/bin/eu-strip"; euelfcompress = "${elfutils}/bin/eu-elfcompress"; }) + + # The test scripts in Flatpak repo were updated so we are basing + # this on our patch for Flatpak 0.99. + (substituteAll { + src = ./fix-test-paths.patch; + inherit glibcLocales python2; + }) ]; + configureFlags = [ + "--enable-installed-tests" + ]; + + makeFlags = [ + "installed_testdir=${installed_testdir}" + "installed_test_metadir=${installed_test_metadir}" + ]; + + # Some scripts used by tests need to use shebangs that are available in Flatpak runtimes. + dontPatchShebangs = true; + + # Installed tests + postFixup = '' + for file in ${installed_testdir}/{test-builder.sh,test-builder-python.sh}; do + patchShebangs $file + done + ''; + + passthru = { + installedTestsDependencies = [ gnupg ostree python2 gnumake ]; + }; + meta = with stdenv.lib; { description = "Tool to build flatpaks from source"; homepage = https://flatpak.org/; diff --git a/pkgs/development/tools/flatpak-builder/fix-test-paths.patch b/pkgs/development/tools/flatpak-builder/fix-test-paths.patch new file mode 100644 index 00000000000..96212a30fcf --- /dev/null +++ b/pkgs/development/tools/flatpak-builder/fix-test-paths.patch @@ -0,0 +1,111 @@ +--- a/tests/libtest.sh ++++ b/tests/libtest.sh +@@ -301,7 +301,7 @@ + } + + skip_without_python2 () { +- if ! test -f /usr/bin/python2 || ! /usr/bin/python2 -c "import sys; sys.exit(0 if sys.version_info >= (2, 7) else 1)" ; then ++ if ! test -f @python2@/bin/python2 || ! @python2@/bin/python2 -c "import sys; sys.exit(0 if sys.version_info >= (2, 7) else 1)" ; then + echo "1..0 # SKIP this test requires /usr/bin/python2 (2.7) support" + exit 0 + fi +--- a/tests/make-test-runtime.sh ++++ b/tests/make-test-runtime.sh +@@ -26,6 +26,7 @@ + PATH="$PATH:/usr/sbin:/sbin" + + # Add bash and dependencies ++mkdir -p ${DIR}/nix/store + mkdir -p ${DIR}/usr/bin + mkdir -p ${DIR}/usr/lib + ln -s ../lib ${DIR}/usr/lib64 +@@ -35,73 +36,28 @@ + else + cp `which ldconfig` ${DIR}/usr/bin + fi +-LIBS=`mktemp` +-BINS=`mktemp` +- +-add_bin() { +- local f=$1 +- shift +- +- if grep -qFe "${f}" $BINS; then +- # Already handled +- return 0 +- fi +- +- echo $f >> $BINS +- +- # Add library dependencies +- (ldd "${f}" | sed "s/.* => //" | awk '{ print $1}' | grep ^/ | sort -u -o $LIBS $LIBS -) || true +- +- local shebang=$(sed -n '1s/^#!\([^ ]*\).*/\1/p' "${f}") +- if [ x$shebang != x ]; then +- add_bin "$shebang" +- fi +-} + + for i in $@; do +- I=`which $i` +- add_bin $I +- if test $i == python2; then +- mkdir -p ${DIR}/usr/lib/python2.7/lib-dynload +- # This is a hardcoded minimal set of modules we need in the current tests. +- # Pretty hacky stuff. Add modules as needed. +- PYDIR=/usr/lib/python2.7 +- if test -d /usr/lib64/python2.7; then PYDIR=/usr/lib64/python2.7; fi +- for py in site os stat posixpath genericpath warnings \ +- linecache types UserDict abc _abcoll \ +- _weakrefset copy_reg traceback sysconfig \ +- re sre_compile sre_parse sre_constants \ +- _sysconfigdata ; do +- cp ${PYDIR}/$py.py ${DIR}/usr/lib/python2.7 +- done +- # These might not exist, depending how Python was configured; and the +- # part after ${so} might be "module" or ".x86_64-linux-gnu" or +- # something else +- for so in _locale strop ; do +- cp ${PYDIR}/lib-dynload/${so}*.so ${DIR}/usr/lib/python2.7/lib-dynload || : +- done +- for plat in $( cd ${PYDIR} && echo plat-* ); do +- test -e ${PYDIR}/${plat} || continue +- mkdir -p ${DIR}/usr/lib/python2.7/${plat} +- cp ${PYDIR}/${plat}/*.py ${DIR}/usr/lib/python2.7/${plat}/ +- done +- fi +-done +-for i in `cat $BINS`; do +- echo Adding binary $i 1>&2 +- cp "$i" ${DIR}/usr/bin/ +-done +-for i in `cat $LIBS`; do +- echo Adding library $i 1>&2 +- cp "$i" ${DIR}/usr/lib/ ++ I=$(readlink -f $(which $i)) ++ requisites=$(nix-store --query --requisites "$I") ++ for r in $requisites; do ++ # a single store item can be needed by multiple paths, no need to copy it again ++ if [ ! -e ${DIR}/$r ]; then ++ cp -r $r ${DIR}/$r ++ fi ++ done ++ ln -s $I ${DIR}/usr/bin/$i + done + ln -s bash ${DIR}/usr/bin/sh + +-# We copy the C.UTF8 locale and call it en_US. Its a bit of a lie, but +-# the real en_US locale is often not available, because its in the +-# local archive. ++mv ${DIR}/nix/store ${DIR}/usr/store # files outside /usr are not permitted, we will have to replace /nix/store with /usr/store ++chmod -R u+w ${DIR} # nix store has read-only directories which would cause problems during clean-up, files need to be writable for sed ++find ${DIR} -type f -print0 | xargs -0 sed -i 's~/nix/store/~/usr/store/~g' # replace hardcoded paths ++find ${DIR} -type l | xargs -I '{}' sh -c 'tg="$(readlink "$1")"; newtg="${tg#/nix/store/}"; if [ "$tg" != "$newtg" ]; then ln -fs "/usr/store/$newtg" "$1"; fi' -- '{}' # replace symlink targets ++ ++# We copy the whole locale archive because we do not have C.UTF8 locale + mkdir -p ${DIR}/usr/lib/locale/ +-cp -r /usr/lib/locale/C.* ${DIR}/usr/lib/locale/en_US ++cp @glibcLocales@/lib/locale/locale-archive ${DIR}/usr/lib/locale/locale-archive + + if [ x$COLLECTION_ID != x ]; then + collection_args=--collection-id=${COLLECTION_ID} diff --git a/pkgs/development/tools/misc/reviewdog/default.nix b/pkgs/development/tools/misc/reviewdog/default.nix new file mode 100644 index 00000000000..65a7c9eef39 --- /dev/null +++ b/pkgs/development/tools/misc/reviewdog/default.nix @@ -0,0 +1,26 @@ +{ lib, buildGoModule, fetchFromGitHub }: + +buildGoModule rec { + pname = "reviewdog"; + version = "0.9.12"; + + src = fetchFromGitHub { + owner = pname; + repo = pname; + rev = "v${version}"; + sha256 = "0r7y8nbpwfbvinpapv6lgnlc93kwn4b6722cp5ihyf361fklcd02"; + }; + + modSha256 = "1ydfirjhw238zbia5mk90fx9rrg3kvm2h54zjhiimlvnpls5y8c9"; + + subPackages = [ "cmd/reviewdog" ]; + + buildFlagsArray = [ "-ldflags=-X github.com/reviewdog/reviewdog/commands.Version=${version}" ]; + + meta = with lib; { + description = "Automated code review tool integrated with any code analysis tools regardless of programming language"; + homepage = "https://github.com/reviewdog/reviewdog"; + maintainers = [ maintainers.marsam ]; + license = licenses.mit; + }; +} |