From f0974e1e586699365eb4dd44b842f4711b552db7 Mon Sep 17 00:00:00 2001 From: "Alexander V. Nikolaev" Date: Fri, 2 Dec 2016 14:28:59 +0200 Subject: [PATCH 01/16] qt5: more reproducible builds Avoid mktemp -d in sources, where pathnames can affect result. --- pkgs/development/libraries/qt-5/5.5/qtbase/setup-hook.sh | 2 +- pkgs/development/libraries/qt-5/5.6/qtbase/setup-hook.sh | 2 +- pkgs/development/libraries/qt-5/5.7/qtbase/setup-hook.sh | 2 +- 3 files changed, 3 insertions(+), 3 deletions(-) diff --git a/pkgs/development/libraries/qt-5/5.5/qtbase/setup-hook.sh b/pkgs/development/libraries/qt-5/5.5/qtbase/setup-hook.sh index 304919831140..47d196cec26b 100644 --- a/pkgs/development/libraries/qt-5/5.5/qtbase/setup-hook.sh +++ b/pkgs/development/libraries/qt-5/5.5/qtbase/setup-hook.sh @@ -91,7 +91,7 @@ _qtSetQmakePath() { if [ -z "$NIX_QT5_TMP" ]; then if [ -z "$NIX_QT_SUBMODULE" ]; then - NIX_QT5_TMP=$(mktemp -d) + NIX_QT5_TMP=$(pwd)/__nix_qt5__ else NIX_QT5_TMP=$out fi diff --git a/pkgs/development/libraries/qt-5/5.6/qtbase/setup-hook.sh b/pkgs/development/libraries/qt-5/5.6/qtbase/setup-hook.sh index 304919831140..47d196cec26b 100644 --- a/pkgs/development/libraries/qt-5/5.6/qtbase/setup-hook.sh +++ b/pkgs/development/libraries/qt-5/5.6/qtbase/setup-hook.sh @@ -91,7 +91,7 @@ _qtSetQmakePath() { if [ -z "$NIX_QT5_TMP" ]; then if [ -z "$NIX_QT_SUBMODULE" ]; then - NIX_QT5_TMP=$(mktemp -d) + NIX_QT5_TMP=$(pwd)/__nix_qt5__ else NIX_QT5_TMP=$out fi diff --git a/pkgs/development/libraries/qt-5/5.7/qtbase/setup-hook.sh b/pkgs/development/libraries/qt-5/5.7/qtbase/setup-hook.sh index 304919831140..47d196cec26b 100644 --- a/pkgs/development/libraries/qt-5/5.7/qtbase/setup-hook.sh +++ b/pkgs/development/libraries/qt-5/5.7/qtbase/setup-hook.sh @@ -91,7 +91,7 @@ _qtSetQmakePath() { if [ -z "$NIX_QT5_TMP" ]; then if [ -z "$NIX_QT_SUBMODULE" ]; then - NIX_QT5_TMP=$(mktemp -d) + NIX_QT5_TMP=$(pwd)/__nix_qt5__ else NIX_QT5_TMP=$out fi From ae1fa72a48566e086efc6e9c7e565ea4ae647bc1 Mon Sep 17 00:00:00 2001 From: romildo Date: Fri, 2 Dec 2016 20:55:34 -0200 Subject: [PATCH 02/16] mkvtoolnix: 9.5.0 -> 9.6.0 --- pkgs/applications/video/mkvtoolnix/default.nix | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/pkgs/applications/video/mkvtoolnix/default.nix b/pkgs/applications/video/mkvtoolnix/default.nix index 0af19aeca950..9c987534065e 100644 --- a/pkgs/applications/video/mkvtoolnix/default.nix +++ b/pkgs/applications/video/mkvtoolnix/default.nix @@ -10,13 +10,13 @@ with stdenv.lib; stdenv.mkDerivation rec { name = "mkvtoolnix-${version}"; - version = "9.5.0"; + version = "9.6.0"; src = fetchFromGitHub { owner = "mbunkus"; repo = "mkvtoolnix"; rev = "release-${version}"; - sha256 = "1v6rqlb5srhwzad45b50pvfbi1c9n719ihi54hzbkzklj7h4s70h"; + sha256 = "14v6iclzkqxibzcdxr65bb5frmnsjyyly0d3lwv1gg7g1mkcw3jd"; }; nativeBuildInputs = [ pkgconfig autoconf automake gettext ruby ]; From 31702666574390d442a4dc36568208c261678976 Mon Sep 17 00:00:00 2001 From: romildo Date: Fri, 2 Dec 2016 22:26:27 -0200 Subject: [PATCH 03/16] adapta-gtk-theme: 3.21.3.68 -> 3.89.1.66 --- pkgs/misc/themes/adapta/default.nix | 14 ++++++++------ 1 file changed, 8 insertions(+), 6 deletions(-) diff --git a/pkgs/misc/themes/adapta/default.nix b/pkgs/misc/themes/adapta/default.nix index 7fe968a582ba..8dc913601177 100644 --- a/pkgs/misc/themes/adapta/default.nix +++ b/pkgs/misc/themes/adapta/default.nix @@ -1,8 +1,8 @@ -{ stdenv, fetchFromGitHub, autoreconfHook, sass, inkscape, glib, which, gtk-engine-murrine }: +{ stdenv, fetchFromGitHub, autoreconfHook, parallel, sassc, inkscape, libxml2, glib, gdk_pixbuf, librsvg, gtk-engine-murrine }: stdenv.mkDerivation rec { name = "adapta-gtk-theme-${version}"; - version = "3.21.3.68"; + version = "3.89.1.66"; meta = with stdenv.lib; { description = "An adaptive GTK+ theme based on Material Design"; @@ -16,14 +16,16 @@ stdenv.mkDerivation rec { owner = "tista500"; repo = "Adapta"; rev = version; - sha256 = "0wwsmsyxfdgsc7fj1kn4r9zsgs09prizwkjljmirwrfdm6j3387p"; + sha256 = "08g941xgxg7i8g1srn3zdxz1nxm24bkrg5cx9ipjqk5cwsck7470"; }; preferLocalBuild = true; - buildInputs = [ gtk-engine-murrine ]; - nativeBuildInputs = [ autoreconfHook sass inkscape glib.dev which ]; + + nativeBuildInputs = [ autoreconfHook parallel sassc inkscape libxml2 glib.dev ]; + + buildInputs = [ gdk_pixbuf librsvg gtk-engine-murrine ]; postPatch = "patchShebangs ."; - configureFlags = "--enable-chrome --disable-unity"; + configureFlags = "--disable-unity"; } From d5cb4d8734abad70d31e4ccc839d20db7bb362a5 Mon Sep 17 00:00:00 2001 From: Graham Christensen Date: Thu, 1 Dec 2016 09:04:35 -0500 Subject: [PATCH 04/16] ecryptfs test: use TTY output to stabilize test --- nixos/tests/ecryptfs.nix | 21 ++++++++++++--------- 1 file changed, 12 insertions(+), 9 deletions(-) diff --git a/nixos/tests/ecryptfs.nix b/nixos/tests/ecryptfs.nix index db800c7bb2c2..041be0f5a624 100644 --- a/nixos/tests/ecryptfs.nix +++ b/nixos/tests/ecryptfs.nix @@ -21,13 +21,13 @@ import ./make-test.nix ({ pkgs, ... }: $machine->log("ecryptfs-migrate-home said: $out"); # Log alice in (ecryptfs passwhrase is wrapped during first login) - $machine->sleep(2); # urgh: wait for username prompt + $machine->waitUntilTTYMatches(1, "login: "); $machine->sendChars("alice\n"); - $machine->sleep(1); + $machine->waitUntilTTYMatches(1, "Password: "); $machine->sendChars("foobar\n"); - $machine->sleep(2); + $machine->waitUntilTTYMatches(1, "alice\@machine"); $machine->sendChars("logout\n"); - $machine->sleep(2); + $machine->waitUntilTTYMatches(1, "login: "); # Why do I need to do this?? $machine->succeed("su alice -c ecryptfs-umount-private || true"); @@ -39,10 +39,11 @@ import ./make-test.nix ({ pkgs, ... }: $machine->log("keyctl unlink said: " . $out); # Log alice again + $machine->waitUntilTTYMatches(1, "login: "); $machine->sendChars("alice\n"); - $machine->sleep(1); + $machine->waitUntilTTYMatches(1, "Password: "); $machine->sendChars("foobar\n"); - $machine->sleep(2); + $machine->waitUntilTTYMatches(1, "alice\@machine"); # Create some files in encrypted home $machine->succeed("su alice -c 'touch ~alice/a'"); @@ -50,7 +51,7 @@ import ./make-test.nix ({ pkgs, ... }: # Logout $machine->sendChars("logout\n"); - $machine->sleep(2); + $machine->waitUntilTTYMatches(1, "login: "); # Why do I need to do this?? $machine->succeed("su alice -c ecryptfs-umount-private || true"); @@ -62,10 +63,11 @@ import ./make-test.nix ({ pkgs, ... }: $machine->succeed("su alice -c 'test \! -f ~alice/b'"); # Log alice once more + $machine->waitUntilTTYMatches(1, "login: "); $machine->sendChars("alice\n"); - $machine->sleep(1); + $machine->waitUntilTTYMatches(1, "Password: "); $machine->sendChars("foobar\n"); - $machine->sleep(2); + $machine->waitUntilTTYMatches(1, "alice\@machine"); # Check that the files are there $machine->sleep(1); @@ -77,5 +79,6 @@ import ./make-test.nix ({ pkgs, ... }: $machine->succeed("su alice -c 'ls -lh ~alice/'"); $machine->sendChars("logout\n"); + $machine->waitUntilTTYMatches(1, "login: "); ''; }) From 6343fef5469863d99208a336048cc2a8cba9dd52 Mon Sep 17 00:00:00 2001 From: aszlig Date: Sat, 3 Dec 2016 01:09:16 +0100 Subject: [PATCH 05/16] python/pillow: Only disable failing tests There's no reason to disable ALL tests just because only one particular test module is failing. Tested on i686-linux and x86_64-linux against these Python versions: Python 2.6: The interpreter itself doesn't build Python 2.7: Successful for both architectures Python 3.3: Successful for both architectures Python 3.4: Successful for both architectures Python 3.5: Successful for both architectures Python 3.6: One of the dependencies of pillow doesn't build (pytest) Tests for PyPy still fail, which is why the doCheck attribute is only set to false if we're building for PyPy. Signed-off-by: aszlig Cc: @desiderius, @goibhniu, @prikhi --- pkgs/top-level/python-packages.nix | 8 ++++++-- 1 file changed, 6 insertions(+), 2 deletions(-) diff --git a/pkgs/top-level/python-packages.nix b/pkgs/top-level/python-packages.nix index e990295f1e02..31724a1597d4 100644 --- a/pkgs/top-level/python-packages.nix +++ b/pkgs/top-level/python-packages.nix @@ -18689,9 +18689,13 @@ in { sha256 = "0ee9975c05602e755ff5000232e0335ba30d507f6261922a658ee11b1cec36d1"; }; - # Check is disabled because of assertion errors, see + doCheck = !isPyPy; + + # Disable imagefont tests, because they don't work well with infinality: # https://github.com/python-pillow/Pillow/issues/1259 - doCheck = false; + postPatch = '' + rm Tests/test_imagefont.py + ''; buildInputs = with self; [ pkgs.freetype pkgs.libjpeg pkgs.zlib pkgs.libtiff pkgs.libwebp pkgs.tcl nose pkgs.lcms2 ] From a76f5241c565afce7ca7843f5eaee40d87021451 Mon Sep 17 00:00:00 2001 From: aszlig Date: Sat, 3 Dec 2016 02:27:51 +0100 Subject: [PATCH 06/16] vimiv: init at 0.7.2 Packaging itself is pretty much straightforward, the tests however revealed a few issues, which I have fixed with a small patch that has been upstreamed at https://github.com/karlch/vimiv/pull/32. The other sed-based patches in postPatch are mostly NixOS-specific. Signed-off-by: aszlig --- pkgs/applications/graphics/vimiv/default.nix | 74 +++++++++++ pkgs/applications/graphics/vimiv/fixes.patch | 128 +++++++++++++++++++ pkgs/top-level/all-packages.nix | 4 + 3 files changed, 206 insertions(+) create mode 100644 pkgs/applications/graphics/vimiv/default.nix create mode 100644 pkgs/applications/graphics/vimiv/fixes.patch diff --git a/pkgs/applications/graphics/vimiv/default.nix b/pkgs/applications/graphics/vimiv/default.nix new file mode 100644 index 000000000000..bb8437153cad --- /dev/null +++ b/pkgs/applications/graphics/vimiv/default.nix @@ -0,0 +1,74 @@ +{ lib, python3Packages, fetchFromGitHub, imagemagick, librsvg, gtk3, jhead +, hicolor_icon_theme, defaultIconTheme + +# Test requirements +, dbus, xvfb_run, xdotool +}: + +python3Packages.buildPythonApplication rec { + name = "vimiv"; + version = "0.7.2"; + + src = fetchFromGitHub { + owner = "karlch"; + repo = "vimiv"; + rev = "v${version}"; + sha256 = "1g97ms84xk4ci4crq9wdc3744jnrqkq2qz9sg69lhm9sr5f68bw4"; + }; + + testimages = fetchFromGitHub { + owner = "karlch"; + repo = "vimiv"; + rev = "6f4d1372b27f2065c56eafdb521d230d9bb8f4e2"; + sha256 = "0a3aybzpms0381dz9japhm4c7j5klhmw91prcac6zaww6x34nmxb"; + }; + + patches = [ ./fixes.patch ]; + + postPatch = '' + patchShebangs scripts/install_icons.sh + sed -i -e 's,/usr,,g' -e '/setup\.py/d' Makefile scripts/install_icons.sh + + sed -i \ + -e 's,/etc/vimiv/\(vimivrc\|keys\.conf\),'"$out"'&,g' \ + man/* vimiv/parser.py + + sed -i \ + -e 's!"mogrify"!"${imagemagick}/bin/mogrify"!g' \ + -e '/cmd *=/s!"jhead"!"${jhead}/bin/jhead"!g' \ + vimiv/imageactions.py + ''; + + checkInputs = [ python3Packages.nose dbus.daemon xvfb_run xdotool ]; + buildInputs = [ hicolor_icon_theme defaultIconTheme librsvg ]; + propagatedBuildInputs = with python3Packages; [ pillow pygobject3 gtk3 ]; + + makeWrapperArgs = [ + "--prefix GI_TYPELIB_PATH : \"$GI_TYPELIB_PATH\"" + "--suffix XDG_DATA_DIRS : \"$XDG_ICON_DIRS:$out/share\"" + "--set GDK_PIXBUF_MODULE_FILE \"$GDK_PIXBUF_MODULE_FILE\"" + ]; + + postCheck = '' + # Some tests assume that the directory only contains one vimiv directory + rm -rf vimiv.egg-info vimiv.desktop + + # Re-use the wrapper args from the main program + makeWrapper "$SHELL" run-tests $makeWrapperArgs + + cp -Rd --no-preserve=mode "$testimages/testimages" vimiv/testimages + HOME="$(mktemp -d)" PATH="$out/bin:$PATH" \ + xvfb-run -s '-screen 0 800x600x24' dbus-run-session \ + --config-file=${dbus.daemon}/share/dbus-1/session.conf \ + ./run-tests -c 'python tests/main_test.py && nosetests -vx' + ''; + + postInstall = "make DESTDIR=\"$out\" install"; + + meta = { + homepage = "https://github.com/karlch/vimiv"; + description = "An image viewer with Vim-like keybindings"; + license = lib.licenses.mit; + platforms = lib.platforms.linux; + }; +} diff --git a/pkgs/applications/graphics/vimiv/fixes.patch b/pkgs/applications/graphics/vimiv/fixes.patch new file mode 100644 index 000000000000..09c06e43058a --- /dev/null +++ b/pkgs/applications/graphics/vimiv/fixes.patch @@ -0,0 +1,128 @@ +Patch submitted upstream at https://github.com/karlch/vimiv/pull/32 + +diff --git a/tests/main_test.py b/tests/main_test.py +index a1870e7..2edc86d 100644 +--- a/tests/main_test.py ++++ b/tests/main_test.py +@@ -15,7 +15,7 @@ class MainTest(TestCase): + + def test_main_until_quit(self): + """Run through vimiv main once.""" +- v_main.main(True) ++ v_main.main([], True) + + + if __name__ == '__main__': +diff --git a/vimiv/helpers.py b/vimiv/helpers.py +index 22f0115..bfaf016 100644 +--- a/vimiv/helpers.py ++++ b/vimiv/helpers.py +@@ -3,7 +3,6 @@ + """Wrappers around standard library functions used in vimiv.""" + + import os +-from subprocess import Popen, PIPE + from gi import require_version + require_version('Gtk', '3.0') + from gi.repository import Gtk +@@ -20,17 +19,17 @@ scrolltypes["K"] = (Gtk.ScrollType.START, False) + scrolltypes["L"] = (Gtk.ScrollType.END, True) + + # A list of all external commands +-external_commands = [] +-try: +- p = Popen('echo $PATH | tr \':\' \'\n\' | xargs -n 1 ls -1', +- stdout=PIPE, stderr=PIPE, shell=True) +- out, err = p.communicate() +- out = out.decode('utf-8').split() +- for cmd in sorted(list(set(out))): +- external_commands.append("!" + cmd) +-except: +- external_commands = [] +-external_commands = tuple(external_commands) ++pathenv = os.environ.get('PATH') ++if pathenv is not None: ++ executables = set() ++ for path in pathenv.split(':'): ++ try: ++ executables |= set(["!" + e for e in os.listdir(path)]) ++ except OSError: ++ continue ++ external_commands = tuple(sorted(list(executables))) ++else: ++ external_commands = () + + + def listdir_wrapper(path, show_hidden=False): +diff --git a/vimiv/imageactions.py b/vimiv/imageactions.py +index d92eb73..b9bc986 100644 +--- a/vimiv/imageactions.py ++++ b/vimiv/imageactions.py +@@ -157,8 +157,8 @@ class Thumbnails: + # Correct name + thumb_ext = ".thumbnail_%dx%d" % (self.thumbsize[0], + self.thumbsize[1]) +- outfile_ext = infile.split(".")[0] + thumb_ext + ".png" +- outfile_base = os.path.basename(outfile_ext) ++ infile_base = os.path.basename(infile) ++ outfile_base = infile_base.split(".")[0] + thumb_ext + ".png" + outfile = os.path.join(self.directory, outfile_base) + # Only if they aren't cached already + if outfile_base not in self.thumbnails: +diff --git a/vimiv/main.py b/vimiv/main.py +index a0e38cf..39f7407 100644 +--- a/vimiv/main.py ++++ b/vimiv/main.py +@@ -27,7 +27,7 @@ from vimiv.mark import Mark + from vimiv.information import Information + + +-def main(running_tests=False): ++def main(arguments, running_tests=False): + """Starting point for vimiv. + + Args: +@@ -36,7 +36,7 @@ def main(running_tests=False): + parser = get_args() + parse_dirs() + settings = parse_config() +- settings = parse_args(parser, settings) ++ settings = parse_args(parser, settings, arguments) + + args = settings["GENERAL"]["paths"] + +diff --git a/vimiv/parser.py b/vimiv/parser.py +index 874a538..9d5afce 100644 +--- a/vimiv/parser.py ++++ b/vimiv/parser.py +@@ -56,7 +56,7 @@ def get_args(): + return parser + + +-def parse_args(parser, settings, arguments=None): ++def parse_args(parser, settings, arguments): + """Parse the arguments and return the modified settings. + + Args: +@@ -66,10 +66,7 @@ def parse_args(parser, settings, arguments=None): + + Return: Modified settings after parsing the arguments. + """ +- if arguments: +- args = parser.parse_args(arguments) +- else: +- args = parser.parse_args() ++ args = parser.parse_args(arguments) + if args.show_version: + information = Information() + print(information.get_version()) +diff --git a/vimiv/vimiv b/vimiv/vimiv +index 5497e08..57f34f1 100755 +--- a/vimiv/vimiv ++++ b/vimiv/vimiv +@@ -5,4 +5,4 @@ import sys + import vimiv + + if __name__ == '__main__': +- sys.exit(vimiv.main.main()) ++ sys.exit(vimiv.main.main(sys.argv)) diff --git a/pkgs/top-level/all-packages.nix b/pkgs/top-level/all-packages.nix index 01d8593a676d..8fb9771d6fc4 100644 --- a/pkgs/top-level/all-packages.nix +++ b/pkgs/top-level/all-packages.nix @@ -14992,6 +14992,10 @@ in inherit (darwin.apple_sdk.frameworks) Carbon Cocoa; }; + vimiv = callPackage ../applications/graphics/vimiv { + inherit (gnome3) defaultIconTheme; + }; + macvim = callPackage ../applications/editors/vim/macvim.nix { stdenv = clangStdenv; ruby = ruby_2_2; }; vimHugeX = vim_configurable; From 1f9cbcd21de891540139bbb86faa4b14ce23bd15 Mon Sep 17 00:00:00 2001 From: aszlig Date: Sat, 3 Dec 2016 05:21:00 +0100 Subject: [PATCH 07/16] beets: Set Python version via top-level attribute This largely reverts commit 599312739e3a338f923e6c22ab183178ca49c7b6. The main reason is that it breaks the plugins, because the mentioned commit didn't change the attributes for the plugins as well. But instead of just fixing the attributes when we import the plugin packages, let's just override pythonPackages in all-packages.nix. Right now, Beets is in transition to Python 3, so we don't need to wait that long until we can remove the dependency on Python 2: https://github.com/beetbox/beets/releases/tag/v1.4.1 Once Python 3 support is no longer beta, we can just change this by changing one line only instead of several. Tested this by building beets with both external plugins. Signed-off-by: aszlig Cc: @FRidh --- pkgs/tools/audio/beets/default.nix | 54 +++++++++++++++--------------- pkgs/top-level/all-packages.nix | 4 ++- 2 files changed, 30 insertions(+), 28 deletions(-) diff --git a/pkgs/tools/audio/beets/default.nix b/pkgs/tools/audio/beets/default.nix index 8adb68078a21..0c6dc9219c47 100644 --- a/pkgs/tools/audio/beets/default.nix +++ b/pkgs/tools/audio/beets/default.nix @@ -1,5 +1,5 @@ { stdenv, fetchFromGitHub, writeScript, glibcLocales -, python2Packages, imagemagick +, pythonPackages, imagemagick , enableAcousticbrainz ? true , enableAcoustid ? true @@ -22,17 +22,17 @@ , bashInteractive, bash-completion }: -assert enableAcoustid -> python2Packages.pyacoustid != null; +assert enableAcoustid -> pythonPackages.pyacoustid != null; assert enableBadfiles -> flac != null && mp3val != null; assert enableConvert -> ffmpeg != null; -assert enableDiscogs -> python2Packages.discogs_client != null; -assert enableFetchart -> python2Packages.responses != null; +assert enableDiscogs -> pythonPackages.discogs_client != null; +assert enableFetchart -> pythonPackages.responses != null; assert enableKeyfinder -> keyfinder-cli != null; -assert enableLastfm -> python2Packages.pylast != null; -assert enableMpd -> python2Packages.mpd != null; +assert enableLastfm -> pythonPackages.pylast != null; +assert enableMpd -> pythonPackages.mpd != null; assert enableReplaygain -> bs1770gain != null; -assert enableThumbnails -> python2Packages.pyxdg != null; -assert enableWeb -> python2Packages.flask != null; +assert enableThumbnails -> pythonPackages.pyxdg != null; +assert enableWeb -> pythonPackages.flask != null; with stdenv.lib; @@ -72,7 +72,7 @@ let testShell = "${bashInteractive}/bin/bash --norc"; completion = "${bash-completion}/share/bash-completion/bash_completion"; -in python2Packages.buildPythonApplication rec { +in pythonPackages.buildPythonApplication rec { name = "beets-${version}"; version = "1.4.1"; @@ -84,34 +84,34 @@ in python2Packages.buildPythonApplication rec { }; propagatedBuildInputs = [ - python2Packages.enum34 - python2Packages.jellyfish - python2Packages.munkres - python2Packages.musicbrainzngs - python2Packages.mutagen - python2Packages.pathlib - python2Packages.pyyaml - python2Packages.unidecode - ] ++ optional enableAcoustid python2Packages.pyacoustid + pythonPackages.enum34 + pythonPackages.jellyfish + pythonPackages.munkres + pythonPackages.musicbrainzngs + pythonPackages.mutagen + pythonPackages.pathlib + pythonPackages.pyyaml + pythonPackages.unidecode + ] ++ optional enableAcoustid pythonPackages.pyacoustid ++ optional (enableFetchart || enableEmbyupdate || enableAcousticbrainz) - python2Packages.requests2 + pythonPackages.requests2 ++ optional enableConvert ffmpeg - ++ optional enableDiscogs python2Packages.discogs_client + ++ optional enableDiscogs pythonPackages.discogs_client ++ optional enableKeyfinder keyfinder-cli - ++ optional enableLastfm python2Packages.pylast - ++ optional enableMpd python2Packages.mpd - ++ optional enableThumbnails python2Packages.pyxdg - ++ optional enableWeb python2Packages.flask + ++ optional enableLastfm pythonPackages.pylast + ++ optional enableMpd pythonPackages.mpd + ++ optional enableThumbnails pythonPackages.pyxdg + ++ optional enableWeb pythonPackages.flask ++ optional enableAlternatives (import ./alternatives-plugin.nix { - inherit stdenv python2Packages fetchFromGitHub; + inherit stdenv pythonPackages fetchFromGitHub; }) ++ optional enableCopyArtifacts (import ./copyartifacts-plugin.nix { - inherit stdenv python2Packages fetchFromGitHub; + inherit stdenv pythonPackages fetchFromGitHub; }); - buildInputs = with python2Packages; [ + buildInputs = with pythonPackages; [ beautifulsoup4 imagemagick mock diff --git a/pkgs/top-level/all-packages.nix b/pkgs/top-level/all-packages.nix index 8fb9771d6fc4..7588e7ba7e6f 100644 --- a/pkgs/top-level/all-packages.nix +++ b/pkgs/top-level/all-packages.nix @@ -1018,7 +1018,9 @@ in beanstalkd = callPackage ../servers/beanstalkd { }; - beets = callPackage ../tools/audio/beets { }; + beets = callPackage ../tools/audio/beets { + pythonPackages = python2Packages; + }; bgs = callPackage ../tools/X11/bgs { }; From d06bf820ea50c72854395231fa64fab99e91f9c2 Mon Sep 17 00:00:00 2001 From: Joachim Fasting Date: Sat, 3 Dec 2016 03:12:56 +0100 Subject: [PATCH 08/16] tor: 0.2.8.9 -> 0.2.8.10 Per upstream, this contains primarily stability & performance fixes. Notably, the relase fixes a bug that would sometimes make clients unusable after leaving standby mode, as well as plugging a memory leak. --- pkgs/tools/security/tor/default.nix | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/pkgs/tools/security/tor/default.nix b/pkgs/tools/security/tor/default.nix index 8fbf35caf1d2..46b85aefca5f 100644 --- a/pkgs/tools/security/tor/default.nix +++ b/pkgs/tools/security/tor/default.nix @@ -3,11 +3,11 @@ }: stdenv.mkDerivation rec { - name = "tor-0.2.8.9"; + name = "tor-0.2.8.10"; src = fetchurl { url = "https://archive.torproject.org/tor-package-archive/${name}.tar.gz"; - sha256 = "3f5c273bb887be4aff11f4d99b9e2e52d293b81ff4f6302b730161ff16dc5316"; + sha256 = "0kcw9hq4xz8p91xwyhjfry5p1dmn7vvnhpfz66vl9gsfndbqr2y8"; }; nativeBuildInputs = [ pkgconfig ]; From b87cf7539f8b5b5be33a03ae5cdaaf833f516916 Mon Sep 17 00:00:00 2001 From: Lancelot SIX Date: Sat, 3 Dec 2016 11:33:01 +0100 Subject: [PATCH 09/16] libunistring: 0.9.6 -> 0.9.7 See http://lists.gnu.org/archive/html/info-gnu/2016-12/msg00002.html for announcement --- pkgs/development/libraries/libunistring/default.nix | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/pkgs/development/libraries/libunistring/default.nix b/pkgs/development/libraries/libunistring/default.nix index 7f32f37a704d..1318f4a509e5 100644 --- a/pkgs/development/libraries/libunistring/default.nix +++ b/pkgs/development/libraries/libunistring/default.nix @@ -1,11 +1,11 @@ { fetchurl, stdenv, libiconv }: stdenv.mkDerivation rec { - name = "libunistring-0.9.6"; + name = "libunistring-0.9.7"; src = fetchurl { url = "mirror://gnu/libunistring/${name}.tar.gz"; - sha256 = "0ixxmgpgh2v8ifm6hbwsjxl023myk3dfnj7wnvmqjivza31fw9cn"; + sha256 = "1ra1baz2187kbw9im47g6kqb5mx9plq703mkjxaval8rxv5q3q4w"; }; patches = stdenv.lib.optional stdenv.isDarwin [ ./clang.patch ]; From d8e2eba8283edbaa26e464c8ce638f5e058e9830 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Domen=20Ko=C5=BEar?= Date: Sat, 3 Dec 2016 12:31:30 +0100 Subject: [PATCH 10/16] haskellPackages.turtle: enable tests again (they pass) --- pkgs/development/haskell-modules/configuration-common.nix | 3 --- 1 file changed, 3 deletions(-) diff --git a/pkgs/development/haskell-modules/configuration-common.nix b/pkgs/development/haskell-modules/configuration-common.nix index 4f9c32a1414b..af433eb7382f 100644 --- a/pkgs/development/haskell-modules/configuration-common.nix +++ b/pkgs/development/haskell-modules/configuration-common.nix @@ -507,9 +507,6 @@ self: super: { # https://github.com/vincenthz/hs-crypto-pubkey/issues/20 crypto-pubkey = dontCheck super.crypto-pubkey; - # https://github.com/Gabriel439/Haskell-Turtle-Library/issues/1 - turtle = dontCheck super.turtle; - # https://github.com/Philonous/xml-picklers/issues/5 xml-picklers = dontCheck super.xml-picklers; From b5286f3747ad8776b2b3631d091abe0ef0579947 Mon Sep 17 00:00:00 2001 From: Igor Sharonov Date: Sat, 3 Dec 2016 16:16:45 +0300 Subject: [PATCH 11/16] neovim-qt: 0.2.3 -> 0.2.4 --- pkgs/applications/editors/neovim/qt.nix | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/pkgs/applications/editors/neovim/qt.nix b/pkgs/applications/editors/neovim/qt.nix index df98264d9690..07660eaddf6c 100644 --- a/pkgs/applications/editors/neovim/qt.nix +++ b/pkgs/applications/editors/neovim/qt.nix @@ -3,7 +3,7 @@ }: let # not very usable ATM - version = "0.2.3"; + version = "0.2.4"; in stdenv.mkDerivation { name = "neovim-qt-${version}"; @@ -12,7 +12,7 @@ stdenv.mkDerivation { owner = "equalsraf"; repo = "neovim-qt"; rev = "v${version}"; - sha256 = "0ichqph7nfw3934jf0sp81bqd376xna3f899cc2xg88alb4f16dv"; + sha256 = "0yf9wwkl0lbbj3vyf8hxnlsk7jhk5ggivszyqxply69dbar9ww59"; }; # It tries to download libmsgpack; let's use ours. From 41626234606f3e5f65fd5fd6861ee0ba4771e1c9 Mon Sep 17 00:00:00 2001 From: Frederik Rietdijk Date: Sat, 3 Dec 2016 09:59:42 +0100 Subject: [PATCH 12/16] pythonPackages.cython: 0.24.1 -> 0.25.1 --- pkgs/development/python-modules/cython_test.patch | 15 --------------- pkgs/top-level/python-packages.nix | 10 ++++------ 2 files changed, 4 insertions(+), 21 deletions(-) delete mode 100644 pkgs/development/python-modules/cython_test.patch diff --git a/pkgs/development/python-modules/cython_test.patch b/pkgs/development/python-modules/cython_test.patch deleted file mode 100644 index 5b1cece3aa50..000000000000 --- a/pkgs/development/python-modules/cython_test.patch +++ /dev/null @@ -1,15 +0,0 @@ -diff --git a/tests/run/numpy_math.pyx b/tests/run/numpy_math.pyx -index eafd23a..4a15522 100644 ---- a/tests/run/numpy_math.pyx -+++ b/tests/run/numpy_math.pyx -@@ -37,8 +37,8 @@ def test_fp_classif(): - assert not npmath.isnan(d_zero) - assert not npmath.isnan(f_zero) - -- assert npmath.isinf(npmath.INFINITY) == 1 -- assert npmath.isinf(-npmath.INFINITY) == -1 -+ assert npmath.isinf(npmath.INFINITY) != 0 -+ assert npmath.isinf(-npmath.INFINITY) != 0 - assert npmath.isnan(npmath.NAN) - - assert npmath.signbit(npmath.copysign(1., -1.)) diff --git a/pkgs/top-level/python-packages.nix b/pkgs/top-level/python-packages.nix index 31724a1597d4..7e8ce52c66bc 100644 --- a/pkgs/top-level/python-packages.nix +++ b/pkgs/top-level/python-packages.nix @@ -4233,20 +4233,18 @@ in { cython = buildPythonPackage rec { name = "Cython-${version}"; - version = "0.24.1"; + version = "0.25.1"; src = pkgs.fetchurl { url = "mirror://pypi/C/Cython/${name}.tar.gz"; - sha256 = "84808fda00508757928e1feadcf41c9f78e9a9b7167b6649ab0933b76f75e7b9"; + sha256 = "e0941455769335ec5afb17dee36dc3833b7edc2ae20a8ed5806c58215e4b6669"; }; - buildInputs = with self; [ pkgs.pkgconfig pkgs.gdb ]; + buildInputs = with self; [ pkgs.glibcLocales pkgs.pkgconfig pkgs.gdb ]; # For testing nativeBuildInputs = with self; [ numpy pkgs.ncurses ]; - # cython's testsuite requires npy_isinf to return sign of the infinity, but - # a C99 conformant is only required to return a non zero value - patches = [ ../development/python-modules/cython_test.patch ]; + LC_ALL = "en_US.UTF-8"; # cython's testsuite is not working very well with libc++ # We are however optimistic about things outside of testsuite still working From 851b5944bb797394728eb368c3cddf51534c73e4 Mon Sep 17 00:00:00 2001 From: Thomas Tuegel Date: Sat, 3 Dec 2016 09:51:31 -0600 Subject: [PATCH 13/16] qt5: factor out common setup hook for qtbase --- .../libraries/qt-5/5.5/qtbase/default.nix | 2 +- .../libraries/qt-5/5.6/qtbase/default.nix | 2 +- .../libraries/qt-5/5.6/qtbase/setup-hook.sh | 166 ------------------ .../libraries/qt-5/5.7/qtbase/default.nix | 2 +- .../libraries/qt-5/5.7/qtbase/setup-hook.sh | 166 ------------------ .../setup-hook.sh => qtbase-setup-hook.sh} | 0 6 files changed, 3 insertions(+), 335 deletions(-) delete mode 100644 pkgs/development/libraries/qt-5/5.6/qtbase/setup-hook.sh delete mode 100644 pkgs/development/libraries/qt-5/5.7/qtbase/setup-hook.sh rename pkgs/development/libraries/qt-5/{5.5/qtbase/setup-hook.sh => qtbase-setup-hook.sh} (100%) diff --git a/pkgs/development/libraries/qt-5/5.5/qtbase/default.nix b/pkgs/development/libraries/qt-5/5.5/qtbase/default.nix index 04d06b0fcd44..5a44ca89902d 100644 --- a/pkgs/development/libraries/qt-5/5.5/qtbase/default.nix +++ b/pkgs/development/libraries/qt-5/5.5/qtbase/default.nix @@ -272,7 +272,7 @@ stdenv.mkDerivation { ''; inherit lndir; - setupHook = ./setup-hook.sh; + setupHook = ../../qtbase-setup-hook.sh; enableParallelBuilding = true; diff --git a/pkgs/development/libraries/qt-5/5.6/qtbase/default.nix b/pkgs/development/libraries/qt-5/5.6/qtbase/default.nix index cb63f0b50f53..b34540d87a5c 100644 --- a/pkgs/development/libraries/qt-5/5.6/qtbase/default.nix +++ b/pkgs/development/libraries/qt-5/5.6/qtbase/default.nix @@ -228,7 +228,7 @@ stdenv.mkDerivation { ''; inherit lndir; - setupHook = ./setup-hook.sh; + setupHook = ../../qtbase-setup-hook.sh; enableParallelBuilding = true; diff --git a/pkgs/development/libraries/qt-5/5.6/qtbase/setup-hook.sh b/pkgs/development/libraries/qt-5/5.6/qtbase/setup-hook.sh deleted file mode 100644 index 47d196cec26b..000000000000 --- a/pkgs/development/libraries/qt-5/5.6/qtbase/setup-hook.sh +++ /dev/null @@ -1,166 +0,0 @@ -addToSearchPathOnceWithCustomDelimiter() { - local delim="$1" - local search="$2" - local target="$3" - local dirs - local exported - IFS="$delim" read -a dirs <<< "${!search}" - local canonical - if canonical=$(readlink -e "$target"); then - for dir in ${dirs[@]}; do - if [ "z$dir" == "z$canonical" ]; then exported=1; fi - done - if [ -z $exported ]; then - eval "export ${search}=\"${!search}${!search:+$delim}$canonical\"" - fi - fi -} - -addToSearchPathOnce() { - addToSearchPathOnceWithCustomDelimiter ':' "$@" -} - -propagateOnce() { - addToSearchPathOnceWithCustomDelimiter ' ' "$@" -} - -_qtPropagate() { - for dir in "lib/qt5/plugins" "lib/qt5/qml" "lib/qt5/imports"; do - if [ -d "$1/$dir" ]; then - propagateOnce propagatedBuildInputs "$1" - break - fi - done - addToSearchPathOnce QT_PLUGIN_PATH "$1/lib/qt5/plugins" - addToSearchPathOnce QML_IMPORT_PATH "$1/lib/qt5/imports" - addToSearchPathOnce QML2_IMPORT_PATH "$1/lib/qt5/qml" -} - -crossEnvHooks+=(_qtPropagate) - -_qtPropagateNative() { - for dir in "lib/qt5/plugins" "lib/qt5/qml" "lib/qt5/imports"; do - if [ -d "$1/$dir" ]; then - propagateOnce propagatedNativeBuildInputs "$1" - break - fi - done - if [ -z "$crossConfig" ]; then - addToSearchPathOnce QT_PLUGIN_PATH "$1/lib/qt5/plugins" - addToSearchPathOnce QML_IMPORT_PATH "$1/lib/qt5/imports" - addToSearchPathOnce QML2_IMPORT_PATH "$1/lib/qt5/qml" - fi -} - -envHooks+=(_qtPropagateNative) - -_qtMultioutDevs() { - # This is necessary whether the package is a Qt module or not - moveToOutput "mkspecs" "${!outputDev}" -} - -preFixupHooks+=(_qtMultioutDevs) - -_qtSetCMakePrefix() { - export CMAKE_PREFIX_PATH="$NIX_QT5_TMP${CMAKE_PREFIX_PATH:+:}${CMAKE_PREFIX_PATH}" -} - -_qtRmTmp() { - if [ -z "$NIX_QT_SUBMODULE" ]; then - rm -fr "$NIX_QT5_TMP" - else - cat "$NIX_QT5_TMP/nix-support/qt-inputs" | while read file; do - if [ ! -d "$NIX_QT5_TMP/$file" ]; then - rm -f "$NIX_QT5_TMP/$file" - fi - done - - cat "$NIX_QT5_TMP/nix-support/qt-inputs" | while read dir; do - if [ -d "$NIX_QT5_TMP/$dir" ]; then - rmdir --ignore-fail-on-non-empty -p "$NIX_QT5_TMP/$dir" - fi - done - - rm "$NIX_QT5_TMP/nix-support/qt-inputs" - fi -} - -_qtSetQmakePath() { - export PATH="$NIX_QT5_TMP/bin${PATH:+:}$PATH" -} - -if [ -z "$NIX_QT5_TMP" ]; then - if [ -z "$NIX_QT_SUBMODULE" ]; then - NIX_QT5_TMP=$(pwd)/__nix_qt5__ - else - NIX_QT5_TMP=$out - fi - postInstallHooks+=(_qtRmTmp) - - mkdir -p "$NIX_QT5_TMP/nix-support" - for subdir in bin include lib mkspecs share; do - mkdir "$NIX_QT5_TMP/$subdir" - echo "$subdir/" >> "$NIX_QT5_TMP/nix-support/qt-inputs" - done - - postHooks+=(_qtSetCMakePrefix) - - cp "@dev@/bin/qmake" "$NIX_QT5_TMP/bin" - echo "bin/qmake" >> "$NIX_QT5_TMP/nix-support/qt-inputs" - - cat >"$NIX_QT5_TMP/bin/qt.conf" <> "$NIX_QT5_TMP/nix-support/qt-inputs" - - export QMAKE="$NIX_QT5_TMP/bin/qmake" - - # Set PATH to find qmake first in a preConfigure hook - # It must run after all the envHooks! - preConfigureHooks+=(_qtSetQmakePath) -fi - -qt5LinkModuleDir() { - if [ -d "$1/$2" ]; then - @lndir@/bin/lndir -silent "$1/$2" "$NIX_QT5_TMP/$2" - find "$1/$2" -printf "$2/%P\n" >> "$NIX_QT5_TMP/nix-support/qt-inputs" - fi -} - -NIX_QT5_MODULES="${NIX_QT5_MODULES}${NIX_QT5_MODULES:+:}@out@" -NIX_QT5_MODULES_DEV="${NIX_QT5_MODULES_DEV}${NIX_QT5_MODULES_DEV:+:}@dev@" - -_qtLinkAllModules() { - IFS=: read -a modules <<< $NIX_QT5_MODULES - for module in ${modules[@]}; do - qt5LinkModuleDir "$module" "lib" - done - - IFS=: read -a modules <<< $NIX_QT5_MODULES_DEV - for module in ${modules[@]}; do - qt5LinkModuleDir "$module" "bin" - qt5LinkModuleDir "$module" "include" - qt5LinkModuleDir "$module" "lib" - qt5LinkModuleDir "$module" "mkspecs" - qt5LinkModuleDir "$module" "share" - done -} - -preConfigureHooks+=(_qtLinkAllModules) - -_qtFixCMakePaths() { - find "${!outputLib}" -name "*.cmake" | while read file; do - substituteInPlace "$file" \ - --subst-var-by NIX_OUT "${!outputLib}" \ - --subst-var-by NIX_DEV "${!outputDev}" - done -} - -if [ -n "$NIX_QT_SUBMODULE" ]; then - postInstallHooks+=(_qtFixCMakePaths) -fi diff --git a/pkgs/development/libraries/qt-5/5.7/qtbase/default.nix b/pkgs/development/libraries/qt-5/5.7/qtbase/default.nix index 16cc09f9c038..06bec5a0faf1 100644 --- a/pkgs/development/libraries/qt-5/5.7/qtbase/default.nix +++ b/pkgs/development/libraries/qt-5/5.7/qtbase/default.nix @@ -232,7 +232,7 @@ stdenv.mkDerivation { ''; inherit lndir; - setupHook = ./setup-hook.sh; + setupHook = ../../qtbase-setup-hook.sh; enableParallelBuilding = true; diff --git a/pkgs/development/libraries/qt-5/5.7/qtbase/setup-hook.sh b/pkgs/development/libraries/qt-5/5.7/qtbase/setup-hook.sh deleted file mode 100644 index 47d196cec26b..000000000000 --- a/pkgs/development/libraries/qt-5/5.7/qtbase/setup-hook.sh +++ /dev/null @@ -1,166 +0,0 @@ -addToSearchPathOnceWithCustomDelimiter() { - local delim="$1" - local search="$2" - local target="$3" - local dirs - local exported - IFS="$delim" read -a dirs <<< "${!search}" - local canonical - if canonical=$(readlink -e "$target"); then - for dir in ${dirs[@]}; do - if [ "z$dir" == "z$canonical" ]; then exported=1; fi - done - if [ -z $exported ]; then - eval "export ${search}=\"${!search}${!search:+$delim}$canonical\"" - fi - fi -} - -addToSearchPathOnce() { - addToSearchPathOnceWithCustomDelimiter ':' "$@" -} - -propagateOnce() { - addToSearchPathOnceWithCustomDelimiter ' ' "$@" -} - -_qtPropagate() { - for dir in "lib/qt5/plugins" "lib/qt5/qml" "lib/qt5/imports"; do - if [ -d "$1/$dir" ]; then - propagateOnce propagatedBuildInputs "$1" - break - fi - done - addToSearchPathOnce QT_PLUGIN_PATH "$1/lib/qt5/plugins" - addToSearchPathOnce QML_IMPORT_PATH "$1/lib/qt5/imports" - addToSearchPathOnce QML2_IMPORT_PATH "$1/lib/qt5/qml" -} - -crossEnvHooks+=(_qtPropagate) - -_qtPropagateNative() { - for dir in "lib/qt5/plugins" "lib/qt5/qml" "lib/qt5/imports"; do - if [ -d "$1/$dir" ]; then - propagateOnce propagatedNativeBuildInputs "$1" - break - fi - done - if [ -z "$crossConfig" ]; then - addToSearchPathOnce QT_PLUGIN_PATH "$1/lib/qt5/plugins" - addToSearchPathOnce QML_IMPORT_PATH "$1/lib/qt5/imports" - addToSearchPathOnce QML2_IMPORT_PATH "$1/lib/qt5/qml" - fi -} - -envHooks+=(_qtPropagateNative) - -_qtMultioutDevs() { - # This is necessary whether the package is a Qt module or not - moveToOutput "mkspecs" "${!outputDev}" -} - -preFixupHooks+=(_qtMultioutDevs) - -_qtSetCMakePrefix() { - export CMAKE_PREFIX_PATH="$NIX_QT5_TMP${CMAKE_PREFIX_PATH:+:}${CMAKE_PREFIX_PATH}" -} - -_qtRmTmp() { - if [ -z "$NIX_QT_SUBMODULE" ]; then - rm -fr "$NIX_QT5_TMP" - else - cat "$NIX_QT5_TMP/nix-support/qt-inputs" | while read file; do - if [ ! -d "$NIX_QT5_TMP/$file" ]; then - rm -f "$NIX_QT5_TMP/$file" - fi - done - - cat "$NIX_QT5_TMP/nix-support/qt-inputs" | while read dir; do - if [ -d "$NIX_QT5_TMP/$dir" ]; then - rmdir --ignore-fail-on-non-empty -p "$NIX_QT5_TMP/$dir" - fi - done - - rm "$NIX_QT5_TMP/nix-support/qt-inputs" - fi -} - -_qtSetQmakePath() { - export PATH="$NIX_QT5_TMP/bin${PATH:+:}$PATH" -} - -if [ -z "$NIX_QT5_TMP" ]; then - if [ -z "$NIX_QT_SUBMODULE" ]; then - NIX_QT5_TMP=$(pwd)/__nix_qt5__ - else - NIX_QT5_TMP=$out - fi - postInstallHooks+=(_qtRmTmp) - - mkdir -p "$NIX_QT5_TMP/nix-support" - for subdir in bin include lib mkspecs share; do - mkdir "$NIX_QT5_TMP/$subdir" - echo "$subdir/" >> "$NIX_QT5_TMP/nix-support/qt-inputs" - done - - postHooks+=(_qtSetCMakePrefix) - - cp "@dev@/bin/qmake" "$NIX_QT5_TMP/bin" - echo "bin/qmake" >> "$NIX_QT5_TMP/nix-support/qt-inputs" - - cat >"$NIX_QT5_TMP/bin/qt.conf" <> "$NIX_QT5_TMP/nix-support/qt-inputs" - - export QMAKE="$NIX_QT5_TMP/bin/qmake" - - # Set PATH to find qmake first in a preConfigure hook - # It must run after all the envHooks! - preConfigureHooks+=(_qtSetQmakePath) -fi - -qt5LinkModuleDir() { - if [ -d "$1/$2" ]; then - @lndir@/bin/lndir -silent "$1/$2" "$NIX_QT5_TMP/$2" - find "$1/$2" -printf "$2/%P\n" >> "$NIX_QT5_TMP/nix-support/qt-inputs" - fi -} - -NIX_QT5_MODULES="${NIX_QT5_MODULES}${NIX_QT5_MODULES:+:}@out@" -NIX_QT5_MODULES_DEV="${NIX_QT5_MODULES_DEV}${NIX_QT5_MODULES_DEV:+:}@dev@" - -_qtLinkAllModules() { - IFS=: read -a modules <<< $NIX_QT5_MODULES - for module in ${modules[@]}; do - qt5LinkModuleDir "$module" "lib" - done - - IFS=: read -a modules <<< $NIX_QT5_MODULES_DEV - for module in ${modules[@]}; do - qt5LinkModuleDir "$module" "bin" - qt5LinkModuleDir "$module" "include" - qt5LinkModuleDir "$module" "lib" - qt5LinkModuleDir "$module" "mkspecs" - qt5LinkModuleDir "$module" "share" - done -} - -preConfigureHooks+=(_qtLinkAllModules) - -_qtFixCMakePaths() { - find "${!outputLib}" -name "*.cmake" | while read file; do - substituteInPlace "$file" \ - --subst-var-by NIX_OUT "${!outputLib}" \ - --subst-var-by NIX_DEV "${!outputDev}" - done -} - -if [ -n "$NIX_QT_SUBMODULE" ]; then - postInstallHooks+=(_qtFixCMakePaths) -fi diff --git a/pkgs/development/libraries/qt-5/5.5/qtbase/setup-hook.sh b/pkgs/development/libraries/qt-5/qtbase-setup-hook.sh similarity index 100% rename from pkgs/development/libraries/qt-5/5.5/qtbase/setup-hook.sh rename to pkgs/development/libraries/qt-5/qtbase-setup-hook.sh From 53a694e0968430483b27509e7a80aeb8d5b78b87 Mon Sep 17 00:00:00 2001 From: Thomas Tuegel Date: Sat, 3 Dec 2016 09:53:18 -0600 Subject: [PATCH 14/16] qt5: factor out common qtSubmodule setup hook --- pkgs/development/libraries/qt-5/5.5/default.nix | 2 +- pkgs/development/libraries/qt-5/5.6/default.nix | 2 +- pkgs/development/libraries/qt-5/5.6/setup-hook.sh | 2 -- pkgs/development/libraries/qt-5/5.7/default.nix | 2 +- pkgs/development/libraries/qt-5/5.7/setup-hook.sh | 2 -- .../qt-5/{5.5/setup-hook.sh => qtsubmodule-setup-hook.sh} | 0 6 files changed, 3 insertions(+), 7 deletions(-) delete mode 100644 pkgs/development/libraries/qt-5/5.6/setup-hook.sh delete mode 100644 pkgs/development/libraries/qt-5/5.7/setup-hook.sh rename pkgs/development/libraries/qt-5/{5.5/setup-hook.sh => qtsubmodule-setup-hook.sh} (100%) diff --git a/pkgs/development/libraries/qt-5/5.5/default.nix b/pkgs/development/libraries/qt-5/5.5/default.nix index fdeb4f7e6c94..92e71aab0912 100644 --- a/pkgs/development/libraries/qt-5/5.5/default.nix +++ b/pkgs/development/libraries/qt-5/5.5/default.nix @@ -49,7 +49,7 @@ let outputs = args.outputs or [ "out" "dev" ]; setOutputFlags = args.setOutputFlags or false; - setupHook = ./setup-hook.sh; + setupHook = ../qtsubmodule-setup-hook.sh; enableParallelBuilding = args.enableParallelBuilding or true; diff --git a/pkgs/development/libraries/qt-5/5.6/default.nix b/pkgs/development/libraries/qt-5/5.6/default.nix index 8b4e924a7339..68def625cb2e 100644 --- a/pkgs/development/libraries/qt-5/5.6/default.nix +++ b/pkgs/development/libraries/qt-5/5.6/default.nix @@ -50,7 +50,7 @@ let outputs = args.outputs or [ "out" "dev" ]; setOutputFlags = args.setOutputFlags or false; - setupHook = ./setup-hook.sh; + setupHook = ../qtsubmodule-setup-hook.sh; enableParallelBuilding = args.enableParallelBuilding or true; diff --git a/pkgs/development/libraries/qt-5/5.6/setup-hook.sh b/pkgs/development/libraries/qt-5/5.6/setup-hook.sh deleted file mode 100644 index e41433c11386..000000000000 --- a/pkgs/development/libraries/qt-5/5.6/setup-hook.sh +++ /dev/null @@ -1,2 +0,0 @@ -NIX_QT5_MODULES="${NIX_QT5_MODULES}${NIX_QT5_MODULES:+:}@out@" -NIX_QT5_MODULES_DEV="${NIX_QT5_MODULES_DEV}${NIX_QT5_MODULES_DEV:+:}@dev@" diff --git a/pkgs/development/libraries/qt-5/5.7/default.nix b/pkgs/development/libraries/qt-5/5.7/default.nix index c5d32b8ce0a2..93a3fdf72b0f 100644 --- a/pkgs/development/libraries/qt-5/5.7/default.nix +++ b/pkgs/development/libraries/qt-5/5.7/default.nix @@ -50,7 +50,7 @@ let outputs = args.outputs or [ "out" "dev" ]; setOutputFlags = args.setOutputFlags or false; - setupHook = ./setup-hook.sh; + setupHook = ../qtsubmodule-setup-hook.sh; enableParallelBuilding = args.enableParallelBuilding or true; diff --git a/pkgs/development/libraries/qt-5/5.7/setup-hook.sh b/pkgs/development/libraries/qt-5/5.7/setup-hook.sh deleted file mode 100644 index e41433c11386..000000000000 --- a/pkgs/development/libraries/qt-5/5.7/setup-hook.sh +++ /dev/null @@ -1,2 +0,0 @@ -NIX_QT5_MODULES="${NIX_QT5_MODULES}${NIX_QT5_MODULES:+:}@out@" -NIX_QT5_MODULES_DEV="${NIX_QT5_MODULES_DEV}${NIX_QT5_MODULES_DEV:+:}@dev@" diff --git a/pkgs/development/libraries/qt-5/5.5/setup-hook.sh b/pkgs/development/libraries/qt-5/qtsubmodule-setup-hook.sh similarity index 100% rename from pkgs/development/libraries/qt-5/5.5/setup-hook.sh rename to pkgs/development/libraries/qt-5/qtsubmodule-setup-hook.sh From 2c4995c013fa093ccbf469ca279f543739529d8b Mon Sep 17 00:00:00 2001 From: Thomas Tuegel Date: Sat, 3 Dec 2016 09:55:39 -0600 Subject: [PATCH 15/16] qt5: factor out common qmake setup hook --- .../libraries/qt-5/5.5/default.nix | 5 ++- .../libraries/qt-5/5.6/default.nix | 5 ++- .../libraries/qt-5/5.6/qmake-hook.sh | 42 ------------------- .../libraries/qt-5/5.7/default.nix | 2 +- .../libraries/qt-5/5.7/qmake-hook.sh | 42 ------------------- .../libraries/qt-5/{5.5 => }/qmake-hook.sh | 0 6 files changed, 9 insertions(+), 87 deletions(-) delete mode 100644 pkgs/development/libraries/qt-5/5.6/qmake-hook.sh delete mode 100644 pkgs/development/libraries/qt-5/5.7/qmake-hook.sh rename pkgs/development/libraries/qt-5/{5.5 => }/qmake-hook.sh (100%) diff --git a/pkgs/development/libraries/qt-5/5.5/default.nix b/pkgs/development/libraries/qt-5/5.5/default.nix index 92e71aab0912..e7d35dcb84b2 100644 --- a/pkgs/development/libraries/qt-5/5.5/default.nix +++ b/pkgs/development/libraries/qt-5/5.5/default.nix @@ -113,7 +113,10 @@ let ]; makeQtWrapper = makeSetupHook { deps = [ makeWrapper ]; } ./make-qt-wrapper.sh; - qmakeHook = makeSetupHook { substitutions = { qt_dev = qtbase.dev; lndir = pkgs.xorg.lndir; }; } ./qmake-hook.sh; + qmakeHook = + makeSetupHook + { deps = [ self.qtbase.dev ]; } + ../qmake-hook.sh; }; diff --git a/pkgs/development/libraries/qt-5/5.6/default.nix b/pkgs/development/libraries/qt-5/5.6/default.nix index 68def625cb2e..5c58b85639ba 100644 --- a/pkgs/development/libraries/qt-5/5.6/default.nix +++ b/pkgs/development/libraries/qt-5/5.6/default.nix @@ -110,7 +110,10 @@ let ]; makeQtWrapper = makeSetupHook { deps = [ makeWrapper ]; } ./make-qt-wrapper.sh; - qmakeHook = makeSetupHook { deps = [ self.qtbase.dev ]; } ./qmake-hook.sh; + qmakeHook = + makeSetupHook + { deps = [ self.qtbase.dev ]; } + ../qmake-hook.sh; }; diff --git a/pkgs/development/libraries/qt-5/5.6/qmake-hook.sh b/pkgs/development/libraries/qt-5/5.6/qmake-hook.sh deleted file mode 100644 index 696b4ea8dad3..000000000000 --- a/pkgs/development/libraries/qt-5/5.6/qmake-hook.sh +++ /dev/null @@ -1,42 +0,0 @@ -qmakeConfigurePhase() { - runHook preConfigure - - qmake PREFIX=$out $qmakeFlags - - runHook postConfigure -} - -if [ -z "$dontUseQmakeConfigure" -a -z "$configurePhase" ]; then - configurePhase=qmakeConfigurePhase -fi - -_qtModuleMultioutDevsPre() { - # We cannot simply set these paths in configureFlags because libQtCore retains - # references to the paths it was built with. - moveToOutput "bin" "${!outputDev}" - moveToOutput "include" "${!outputDev}" - - # The destination directory must exist or moveToOutput will do nothing - mkdir -p "${!outputDev}/share" - moveToOutput "share/doc" "${!outputDev}" -} - -_qtModuleMultioutDevsPost() { - # Move libtool archives and qmake project files to $dev/lib - if [ "z${!outputLib}" != "z${!outputDev}" ]; then - pushd "${!outputLib}" - if [ -d "lib" ]; then - find lib \( -name '*.a' -o -name '*.la' -o -name '*.prl' \) -print0 | \ - while read -r -d $'\0' file; do - mkdir -p "${!outputDev}/$(dirname "$file")" - mv "${!outputLib}/$file" "${!outputDev}/$file" - done - fi - popd - fi -} - -if [ -n "$NIX_QT_SUBMODULE" ]; then - preFixupHooks+=(_qtModuleMultioutDevsPre) - postFixupHooks+=(_qtModuleMultioutDevsPost) -fi diff --git a/pkgs/development/libraries/qt-5/5.7/default.nix b/pkgs/development/libraries/qt-5/5.7/default.nix index 93a3fdf72b0f..dbb66b6510a1 100644 --- a/pkgs/development/libraries/qt-5/5.7/default.nix +++ b/pkgs/development/libraries/qt-5/5.7/default.nix @@ -112,7 +112,7 @@ let qmakeHook = makeSetupHook { deps = [ self.qtbase.dev ]; } - ./qmake-hook.sh; + ../qmake-hook.sh; }; diff --git a/pkgs/development/libraries/qt-5/5.7/qmake-hook.sh b/pkgs/development/libraries/qt-5/5.7/qmake-hook.sh deleted file mode 100644 index 696b4ea8dad3..000000000000 --- a/pkgs/development/libraries/qt-5/5.7/qmake-hook.sh +++ /dev/null @@ -1,42 +0,0 @@ -qmakeConfigurePhase() { - runHook preConfigure - - qmake PREFIX=$out $qmakeFlags - - runHook postConfigure -} - -if [ -z "$dontUseQmakeConfigure" -a -z "$configurePhase" ]; then - configurePhase=qmakeConfigurePhase -fi - -_qtModuleMultioutDevsPre() { - # We cannot simply set these paths in configureFlags because libQtCore retains - # references to the paths it was built with. - moveToOutput "bin" "${!outputDev}" - moveToOutput "include" "${!outputDev}" - - # The destination directory must exist or moveToOutput will do nothing - mkdir -p "${!outputDev}/share" - moveToOutput "share/doc" "${!outputDev}" -} - -_qtModuleMultioutDevsPost() { - # Move libtool archives and qmake project files to $dev/lib - if [ "z${!outputLib}" != "z${!outputDev}" ]; then - pushd "${!outputLib}" - if [ -d "lib" ]; then - find lib \( -name '*.a' -o -name '*.la' -o -name '*.prl' \) -print0 | \ - while read -r -d $'\0' file; do - mkdir -p "${!outputDev}/$(dirname "$file")" - mv "${!outputLib}/$file" "${!outputDev}/$file" - done - fi - popd - fi -} - -if [ -n "$NIX_QT_SUBMODULE" ]; then - preFixupHooks+=(_qtModuleMultioutDevsPre) - postFixupHooks+=(_qtModuleMultioutDevsPost) -fi diff --git a/pkgs/development/libraries/qt-5/5.5/qmake-hook.sh b/pkgs/development/libraries/qt-5/qmake-hook.sh similarity index 100% rename from pkgs/development/libraries/qt-5/5.5/qmake-hook.sh rename to pkgs/development/libraries/qt-5/qmake-hook.sh From 7b05efb90dc8f12a01dbf2e6adf4f9f59f94d956 Mon Sep 17 00:00:00 2001 From: Thomas Tuegel Date: Sat, 3 Dec 2016 09:57:17 -0600 Subject: [PATCH 16/16] qt5: factor out common makeQtWrapper setup hook --- .../libraries/qt-5/5.5/default.nix | 6 +++- .../libraries/qt-5/5.6/default.nix | 6 +++- .../libraries/qt-5/5.6/make-qt-wrapper.sh | 36 ------------------- .../libraries/qt-5/5.7/default.nix | 2 +- .../libraries/qt-5/5.7/make-qt-wrapper.sh | 36 ------------------- .../qt-5/{5.5 => }/make-qt-wrapper.sh | 0 6 files changed, 11 insertions(+), 75 deletions(-) delete mode 100644 pkgs/development/libraries/qt-5/5.6/make-qt-wrapper.sh delete mode 100644 pkgs/development/libraries/qt-5/5.7/make-qt-wrapper.sh rename pkgs/development/libraries/qt-5/{5.5 => }/make-qt-wrapper.sh (100%) diff --git a/pkgs/development/libraries/qt-5/5.5/default.nix b/pkgs/development/libraries/qt-5/5.5/default.nix index e7d35dcb84b2..6d27ed5a0d32 100644 --- a/pkgs/development/libraries/qt-5/5.5/default.nix +++ b/pkgs/development/libraries/qt-5/5.5/default.nix @@ -112,7 +112,11 @@ let qtxmlpatterns ]; - makeQtWrapper = makeSetupHook { deps = [ makeWrapper ]; } ./make-qt-wrapper.sh; + makeQtWrapper = + makeSetupHook + { deps = [ makeWrapper ]; } + ../make-qt-wrapper.sh; + qmakeHook = makeSetupHook { deps = [ self.qtbase.dev ]; } diff --git a/pkgs/development/libraries/qt-5/5.6/default.nix b/pkgs/development/libraries/qt-5/5.6/default.nix index 5c58b85639ba..560e0ac021d9 100644 --- a/pkgs/development/libraries/qt-5/5.6/default.nix +++ b/pkgs/development/libraries/qt-5/5.6/default.nix @@ -109,7 +109,11 @@ let qtwebchannel qtwebengine qtwebsockets qtx11extras qtxmlpatterns ]; - makeQtWrapper = makeSetupHook { deps = [ makeWrapper ]; } ./make-qt-wrapper.sh; + makeQtWrapper = + makeSetupHook + { deps = [ makeWrapper ]; } + ../make-qt-wrapper.sh; + qmakeHook = makeSetupHook { deps = [ self.qtbase.dev ]; } diff --git a/pkgs/development/libraries/qt-5/5.6/make-qt-wrapper.sh b/pkgs/development/libraries/qt-5/5.6/make-qt-wrapper.sh deleted file mode 100644 index b0d0bec9e3f6..000000000000 --- a/pkgs/development/libraries/qt-5/5.6/make-qt-wrapper.sh +++ /dev/null @@ -1,36 +0,0 @@ -wrapQtProgram() { - local prog="$1" - shift - wrapProgram "$prog" \ - --set QT_PLUGIN_PATH "$QT_PLUGIN_PATH" \ - --set QML_IMPORT_PATH "$QML_IMPORT_PATH" \ - --set QML2_IMPORT_PATH "$QML2_IMPORT_PATH" \ - --prefix XDG_DATA_DIRS : "$RUNTIME_XDG_DATA_DIRS" \ - --prefix XDG_CONFIG_DIRS : "$RUNTIME_XDG_CONFIG_DIRS" \ - "$@" -} - -makeQtWrapper() { - local old="$1" - local new="$2" - shift - shift - makeWrapper "$old" "$new" \ - --set QT_PLUGIN_PATH "$QT_PLUGIN_PATH" \ - --set QML_IMPORT_PATH "$QML_IMPORT_PATH" \ - --set QML2_IMPORT_PATH "$QML2_IMPORT_PATH" \ - --prefix XDG_DATA_DIRS : "$RUNTIME_XDG_DATA_DIRS" \ - --prefix XDG_CONFIG_DIRS : "$RUNTIME_XDG_CONFIG_DIRS" \ - "$@" -} - -_makeQtWrapperSetup() { - # cannot use addToSearchPath because these directories may not exist yet - export QT_PLUGIN_PATH="$QT_PLUGIN_PATH${QT_PLUGIN_PATH:+:}${!outputLib}/lib/qt5/plugins" - export QML_IMPORT_PATH="$QML_IMPORT_PATH${QML_IMPORT_PATH:+:}${!outputLib}/lib/qt5/imports" - export QML2_IMPORT_PATH="$QML2_IMPORT_PATH${QML2_IMPORT_PATH:+:}${!outputLib}/lib/qt5/qml" - export RUNTIME_XDG_DATA_DIRS="$XDG_DATA_DIRS${XDG_DATA_DIRS:+:}${!outputBin}/share" - export RUNTIME_XDG_CONFIG_DIRS="$XDG_CONFIG_DIRS${XDG_CONFIG_DIRS:+:}${!outputBin}/etc/xdg" -} - -prePhases+=(_makeQtWrapperSetup) diff --git a/pkgs/development/libraries/qt-5/5.7/default.nix b/pkgs/development/libraries/qt-5/5.7/default.nix index dbb66b6510a1..b3a8b4d05ebd 100644 --- a/pkgs/development/libraries/qt-5/5.7/default.nix +++ b/pkgs/development/libraries/qt-5/5.7/default.nix @@ -107,7 +107,7 @@ let makeQtWrapper = makeSetupHook { deps = [ makeWrapper ]; } - ./make-qt-wrapper.sh; + ../make-qt-wrapper.sh; qmakeHook = makeSetupHook diff --git a/pkgs/development/libraries/qt-5/5.7/make-qt-wrapper.sh b/pkgs/development/libraries/qt-5/5.7/make-qt-wrapper.sh deleted file mode 100644 index b0d0bec9e3f6..000000000000 --- a/pkgs/development/libraries/qt-5/5.7/make-qt-wrapper.sh +++ /dev/null @@ -1,36 +0,0 @@ -wrapQtProgram() { - local prog="$1" - shift - wrapProgram "$prog" \ - --set QT_PLUGIN_PATH "$QT_PLUGIN_PATH" \ - --set QML_IMPORT_PATH "$QML_IMPORT_PATH" \ - --set QML2_IMPORT_PATH "$QML2_IMPORT_PATH" \ - --prefix XDG_DATA_DIRS : "$RUNTIME_XDG_DATA_DIRS" \ - --prefix XDG_CONFIG_DIRS : "$RUNTIME_XDG_CONFIG_DIRS" \ - "$@" -} - -makeQtWrapper() { - local old="$1" - local new="$2" - shift - shift - makeWrapper "$old" "$new" \ - --set QT_PLUGIN_PATH "$QT_PLUGIN_PATH" \ - --set QML_IMPORT_PATH "$QML_IMPORT_PATH" \ - --set QML2_IMPORT_PATH "$QML2_IMPORT_PATH" \ - --prefix XDG_DATA_DIRS : "$RUNTIME_XDG_DATA_DIRS" \ - --prefix XDG_CONFIG_DIRS : "$RUNTIME_XDG_CONFIG_DIRS" \ - "$@" -} - -_makeQtWrapperSetup() { - # cannot use addToSearchPath because these directories may not exist yet - export QT_PLUGIN_PATH="$QT_PLUGIN_PATH${QT_PLUGIN_PATH:+:}${!outputLib}/lib/qt5/plugins" - export QML_IMPORT_PATH="$QML_IMPORT_PATH${QML_IMPORT_PATH:+:}${!outputLib}/lib/qt5/imports" - export QML2_IMPORT_PATH="$QML2_IMPORT_PATH${QML2_IMPORT_PATH:+:}${!outputLib}/lib/qt5/qml" - export RUNTIME_XDG_DATA_DIRS="$XDG_DATA_DIRS${XDG_DATA_DIRS:+:}${!outputBin}/share" - export RUNTIME_XDG_CONFIG_DIRS="$XDG_CONFIG_DIRS${XDG_CONFIG_DIRS:+:}${!outputBin}/etc/xdg" -} - -prePhases+=(_makeQtWrapperSetup) diff --git a/pkgs/development/libraries/qt-5/5.5/make-qt-wrapper.sh b/pkgs/development/libraries/qt-5/make-qt-wrapper.sh similarity index 100% rename from pkgs/development/libraries/qt-5/5.5/make-qt-wrapper.sh rename to pkgs/development/libraries/qt-5/make-qt-wrapper.sh