From 040b941b4c1ef3d4cec1053444c6e0aba3314933 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Vladim=C3=ADr=20=C4=8Cun=C3=A1t?= Date: Fri, 2 Sep 2016 20:15:28 +0200 Subject: [PATCH 01/10] mesa: use llvm-3.9 instead of 3.8 --- pkgs/top-level/all-packages.nix | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/pkgs/top-level/all-packages.nix b/pkgs/top-level/all-packages.nix index 0302fecf32e8..b7f19e363f08 100644 --- a/pkgs/top-level/all-packages.nix +++ b/pkgs/top-level/all-packages.nix @@ -8749,7 +8749,7 @@ in # makes it slower, but during runtime we link against just mesa_drivers # through /run/opengl-driver*, which is overriden according to config.grsecurity grsecEnabled = true; - llvmPackages = llvmPackages_38; # various problems with 3.7; see #11367, #11467 + llvmPackages = llvmPackages_39; }); mesa_glu = mesaDarwinOr (callPackage ../development/libraries/mesa-glu { }); mesa_drivers = mesaDarwinOr ( From 0d0465fe9427c5f2f7f6a7f5b11d239dad75c791 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Vladim=C3=ADr=20=C4=8Cun=C3=A1t?= Date: Fri, 2 Sep 2016 20:52:08 +0200 Subject: [PATCH 02/10] wayland-protocols: 1.4 -> 1.7 /cc #16779; I'm confident this can't affect the problem, but the update shouldn't hurt. --- pkgs/development/libraries/wayland/protocols.nix | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/pkgs/development/libraries/wayland/protocols.nix b/pkgs/development/libraries/wayland/protocols.nix index 57d3664447a6..dda1bd369760 100644 --- a/pkgs/development/libraries/wayland/protocols.nix +++ b/pkgs/development/libraries/wayland/protocols.nix @@ -4,11 +4,11 @@ stdenv.mkDerivation rec { name = "wayland-protocols-${version}"; - version = "1.4"; + version = "1.7"; src = fetchurl { url = "http://wayland.freedesktop.org/releases/${name}.tar.xz"; - sha256 = "0wpm7mz7ww6nn3vrgz7a9iyk7mk6za73wnq0n54lzl8yq8irljh1"; + sha256 = "07qw166s6bm81zfnhf4lmww6wj0il960fm3vp7n1z3rign9jlpv3"; }; nativeBuildInputs = [ pkgconfig ]; From 741527adeff4734a33c8b9a16b1c855fcc207a56 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Vladim=C3=ADr=20=C4=8Cun=C3=A1t?= Date: Sun, 4 Sep 2016 20:42:07 +0200 Subject: [PATCH 03/10] dbus: 1.10.8. -> 1.10.10 NEWS seem safe, and there are only "fixes" in there. --- pkgs/development/libraries/dbus/default.nix | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/pkgs/development/libraries/dbus/default.nix b/pkgs/development/libraries/dbus/default.nix index 4e6fa238bfbb..789aae18aaa3 100644 --- a/pkgs/development/libraries/dbus/default.nix +++ b/pkgs/development/libraries/dbus/default.nix @@ -6,8 +6,8 @@ assert x11Support -> libX11 != null && libSM != null; let - version = "1.10.8"; - sha256 = "0560y3hxpgh346w6avcrcz79c8ansmn771y5xpcvvlr6m8mx5wxs"; + version = "1.10.10"; + sha256 = "0hwsfczhx2djmc9116vj5v230i7gpjihwh3vbljs1ldlk831v3wx"; self = stdenv.mkDerivation { name = "dbus-${version}"; From b87d5abafd8e77669f69470ee17f47e8464d3370 Mon Sep 17 00:00:00 2001 From: Eelco Dolstra Date: Mon, 5 Sep 2016 17:46:25 +0200 Subject: [PATCH 04/10] lz4: Don't install static library --- pkgs/tools/compression/lz4/default.nix | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/pkgs/tools/compression/lz4/default.nix b/pkgs/tools/compression/lz4/default.nix index 8340ea3fe8b0..4b2f0276d78c 100644 --- a/pkgs/tools/compression/lz4/default.nix +++ b/pkgs/tools/compression/lz4/default.nix @@ -11,17 +11,21 @@ stdenv.mkDerivation rec { owner = "Cyan4973"; }; + outputs = [ "out" "dev" ]; + buildInputs = stdenv.lib.optional doCheck valgrind; enableParallelBuilding = true; - makeFlags = [ "PREFIX=$(out)" ]; + makeFlags = [ "PREFIX=$(out)" "INCLUDEDIR=$(dev)/include" ]; doCheck = false; # tests take a very long time checkTarget = "test"; patches = [ ./install-on-freebsd.patch ] ; + postInstall = "rm $out/lib/*.a"; + meta = with stdenv.lib; { description = "Extremely fast compression algorithm"; longDescription = '' From 5d8c54746066eb454bee5c10ba93b3a9e078bf45 Mon Sep 17 00:00:00 2001 From: Eelco Dolstra Date: Mon, 5 Sep 2016 17:59:21 +0200 Subject: [PATCH 05/10] libdrm: Don't depend on udev The configure script checks for it, but the only use (in libkms/Makefile.am) is commented out. --- pkgs/development/libraries/libdrm/default.nix | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/pkgs/development/libraries/libdrm/default.nix b/pkgs/development/libraries/libdrm/default.nix index 3d54a24b9f35..64cfb7d56cac 100644 --- a/pkgs/development/libraries/libdrm/default.nix +++ b/pkgs/development/libraries/libdrm/default.nix @@ -11,8 +11,9 @@ stdenv.mkDerivation rec { outputs = [ "out" "dev" ]; nativeBuildInputs = [ pkgconfig ]; - buildInputs = [ libpthreadstubs libpciaccess ] - ++ stdenv.lib.optional stdenv.isLinux udev; + buildInputs = [ libpthreadstubs libpciaccess ]; + # libdrm as of 2.4.70 does not actually do anything with udev. + #++ stdenv.lib.optional stdenv.isLinux udev; patches = stdenv.lib.optional stdenv.isDarwin ./libdrm-apple.patch; From 78178d5854901e1b17a14bce3fe43515984b7b91 Mon Sep 17 00:00:00 2001 From: Eelco Dolstra Date: Mon, 5 Sep 2016 18:59:00 +0200 Subject: [PATCH 06/10] systemd: Separate lib output This moves libsystemd.so and libudev.so into systemd.lib, and gets rid of libudev (which just contained a copy of libudev.so and the udev headers). It thus reduces the closure size of all packages that (indirectly) depend on libsystemd, of which there are quite a few (for instance, PulseAudio and dbus). For example, it reduces the closure of Blender from 430.8 to 400.8 MiB. --- pkgs/applications/audio/spotify/default.nix | 4 +- .../applications/editors/brackets/default.nix | 6 +-- .../editors/lighttable/default.nix | 6 +-- .../networking/browsers/chromium/common.nix | 6 +-- .../browsers/google-chrome/default.nix | 4 +- .../google-talk-plugin/default.nix | 4 +- .../networking/browsers/vivaldi/default.nix | 6 +-- .../instant-messengers/discord/default.nix | 6 +-- .../instant-messengers/viber/default.nix | 4 +- .../development/libraries/libusb1/default.nix | 6 +-- pkgs/development/libraries/mesa/default.nix | 6 +-- .../qt-5/5.5/qtserialport/default.nix | 4 +- .../libraries/qt-5/5.5/qtwebkit/default.nix | 4 +- .../qt-5/5.6/qtserialport/default.nix | 4 +- .../libraries/qt-5/5.6/qtwebkit/default.nix | 4 +- .../qt-5/5.7/qtserialport/default.nix | 4 +- .../libraries/qt-5/5.7/qtwebkit/default.nix | 4 +- pkgs/development/tools/node-webkit/nw11.nix | 4 +- pkgs/development/tools/node-webkit/nw12.nix | 4 +- pkgs/development/tools/node-webkit/nw9.nix | 4 +- .../linux/multipath-tools/default.nix | 4 +- pkgs/os-specific/linux/systemd/default.nix | 38 ++++--------------- pkgs/os-specific/linux/systemd/libudev.nix | 22 ----------- pkgs/os-specific/linux/util-linux/default.nix | 3 +- pkgs/tools/filesystems/nixpart/0.4/blivet.nix | 10 +++-- .../tools/filesystems/nixpart/0.4/default.nix | 4 +- pkgs/tools/filesystems/nixpart/0.4/lvm2.nix | 6 +-- .../nixpart/0.4/multipath-tools.nix | 10 +++-- pkgs/tools/misc/staruml/default.nix | 4 +- pkgs/top-level/all-packages.nix | 4 +- pkgs/top-level/python-packages.nix | 4 +- 31 files changed, 80 insertions(+), 123 deletions(-) delete mode 100644 pkgs/os-specific/linux/systemd/libudev.nix diff --git a/pkgs/applications/audio/spotify/default.nix b/pkgs/applications/audio/spotify/default.nix index a5f5ac9d93ad..e0d89d809a75 100644 --- a/pkgs/applications/audio/spotify/default.nix +++ b/pkgs/applications/audio/spotify/default.nix @@ -1,6 +1,6 @@ { fetchurl, stdenv, dpkg, xorg, alsaLib, makeWrapper, openssl, freetype , glib, pango, cairo, atk, gdk_pixbuf, gtk, cups, nspr, nss, libpng, GConf -, libgcrypt, libudev, fontconfig, dbus, expat, ffmpeg_0_10, curl, zlib, gnome }: +, libgcrypt, systemd, fontconfig, dbus, expat, ffmpeg_0_10, curl, zlib, gnome }: assert stdenv.system == "x86_64-linux"; @@ -28,7 +28,7 @@ let nss pango stdenv.cc.cc - libudev + systemd xorg.libX11 xorg.libXcomposite xorg.libXcursor diff --git a/pkgs/applications/editors/brackets/default.nix b/pkgs/applications/editors/brackets/default.nix index 127ed981a6c8..a839f5b24e5c 100644 --- a/pkgs/applications/editors/brackets/default.nix +++ b/pkgs/applications/editors/brackets/default.nix @@ -1,11 +1,11 @@ { stdenv, fetchurl, buildEnv, gtk, glib, gdk_pixbuf, alsaLib, nss, nspr, gconf -, cups, libgcrypt_1_5, libudev, makeWrapper, dbus }: +, cups, libgcrypt_1_5, systemd, makeWrapper, dbus }: let bracketsEnv = buildEnv { name = "env-brackets"; paths = [ gtk glib gdk_pixbuf stdenv.cc.cc alsaLib nss nspr gconf cups libgcrypt_1_5 - dbus libudev.out + dbus systemd.lib ]; }; in @@ -31,7 +31,7 @@ stdenv.mkDerivation rec { rmdir $out/usr ln -sf $out/opt/brackets/brackets $out/bin/brackets - ln -s ${libudev.out}/lib/libudev.so.1 $out/opt/brackets/lib/libudev.so.0 + ln -s ${systemd.lib}/lib/libudev.so.1 $out/opt/brackets/lib/libudev.so.0 patchelf --set-interpreter "$(cat $NIX_CC/nix-support/dynamic-linker)" \ --set-rpath "${bracketsEnv}/lib:${bracketsEnv}/lib64" \ diff --git a/pkgs/applications/editors/lighttable/default.nix b/pkgs/applications/editors/lighttable/default.nix index 108b7cceb4e2..9644cb2d5c79 100644 --- a/pkgs/applications/editors/lighttable/default.nix +++ b/pkgs/applications/editors/lighttable/default.nix @@ -1,6 +1,6 @@ { stdenv, fetchurl, buildEnv, zlib, glib, alsaLib, makeDesktopItem , dbus, gtk, atk, pango, freetype, fontconfig, libgnome_keyring3, gdk_pixbuf -, cairo, cups, expat, libgpgerror, nspr, gnome3, nss, xorg, libudev, libnotify +, cairo, cups, expat, libgpgerror, nspr, gnome3, nss, xorg, systemd, libnotify }: let @@ -45,9 +45,9 @@ stdenv.mkDerivation rec { mv $out/share/LightTable/light $out/bin/light - ln -sf ${libudev.out}/lib/libudev.so.1 $out/share/LightTable/libudev.so.0 + ln -sf ${systemd.lib}/lib/libudev.so.1 $out/share/LightTable/libudev.so.0 substituteInPlace $out/bin/light \ - --replace "/usr/lib/x86_64-linux-gnu" "${libudev.out}/lib" \ + --replace "/usr/lib/x86_64-linux-gnu" "${systemd.lib}/lib" \ --replace "/lib/x86_64-linux-gnu" "$out/share/LightTable" \ --replace 'HERE=`dirname $(readlink -f $0)`' "HERE=$out/share/LightTable" diff --git a/pkgs/applications/networking/browsers/chromium/common.nix b/pkgs/applications/networking/browsers/chromium/common.nix index a1110fa07a86..8131ad29060b 100644 --- a/pkgs/applications/networking/browsers/chromium/common.nix +++ b/pkgs/applications/networking/browsers/chromium/common.nix @@ -8,7 +8,7 @@ , libusb1, pciutils, nss , python, pythonPackages, perl, pkgconfig -, nspr, libudev, kerberos +, nspr, systemd, kerberos , utillinux, alsaLib , bison, gperf , glib, gtk, dbus_glib @@ -113,7 +113,7 @@ let buildInputs = defaultDependencies ++ [ which python perl pkgconfig - nspr nss libudev + nspr nss systemd utillinux alsaLib bison gperf kerberos glib gtk dbus_glib @@ -147,7 +147,7 @@ let -e "/python_arch/s/: *'[^']*'/: '""'/" \ build/common.gypi chrome/chrome_tests.gypi - sed -i -e '/lib_loader.*Load/s!"\(libudev\.so\)!"${libudev.out}/lib/\1!' \ + sed -i -e '/lib_loader.*Load/s!"\(libudev\.so\)!"${systemd.lib}/lib/\1!' \ device/udev_linux/udev?_loader.cc sed -i -e '/libpci_loader.*Load/s!"\(libpci\.so\)!"${pciutils}/lib/\1!' \ diff --git a/pkgs/applications/networking/browsers/google-chrome/default.nix b/pkgs/applications/networking/browsers/google-chrome/default.nix index 1550d359b34e..10d50792facf 100644 --- a/pkgs/applications/networking/browsers/google-chrome/default.nix +++ b/pkgs/applications/networking/browsers/google-chrome/default.nix @@ -7,7 +7,7 @@ , dbus_libs, gtk, gdk_pixbuf, gcc # Will crash without. -, libudev +, systemd # Loaded at runtime. , libexif @@ -45,7 +45,7 @@ let libXcursor libXext libXfixes libXrender libXScrnSaver libXcomposite alsaLib libXdamage libXtst libXrandr expat cups dbus_libs gtk gdk_pixbuf gcc - libudev + systemd libexif liberation_ttf curl utillinux xdg_utils wget flac harfbuzz icu libpng opusWithCustomModes snappy speechd diff --git a/pkgs/applications/networking/browsers/mozilla-plugins/google-talk-plugin/default.nix b/pkgs/applications/networking/browsers/mozilla-plugins/google-talk-plugin/default.nix index 88bdd08cbfe8..0f549be9ac46 100644 --- a/pkgs/applications/networking/browsers/mozilla-plugins/google-talk-plugin/default.nix +++ b/pkgs/applications/networking/browsers/mozilla-plugins/google-talk-plugin/default.nix @@ -1,6 +1,6 @@ { stdenv, fetchurl, rpm, cpio, mesa, xorg, cairo , libpng, gtk, glib, gdk_pixbuf, fontconfig, freetype, curl -, dbus_glib, alsaLib, libpulseaudio, libudev, pango +, dbus_glib, alsaLib, libpulseaudio, systemd, pango }: with stdenv.lib; @@ -37,7 +37,7 @@ let alsaLib libpulseaudio dbus_glib - libudev + systemd curl pango cairo diff --git a/pkgs/applications/networking/browsers/vivaldi/default.nix b/pkgs/applications/networking/browsers/vivaldi/default.nix index f511c6e7e9c7..d9f694a7eabf 100644 --- a/pkgs/applications/networking/browsers/vivaldi/default.nix +++ b/pkgs/applications/networking/browsers/vivaldi/default.nix @@ -1,6 +1,6 @@ { stdenv, fetchurl, zlib, libX11, libXext, libSM, libICE , libXfixes, libXt, libXi, libXcursor, libXScrnSaver, libXcomposite, libXdamage, libXtst, libXrandr -, alsaLib, dbus_libs, cups, libexif, ffmpeg, libudev +, alsaLib, dbus_libs, cups, libexif, ffmpeg, systemd , freetype, fontconfig, libXft, libXrender, libxcb, expat, libXau, libXdmcp , libuuid, xz , gstreamer, gst_plugins_base, libxml2 @@ -38,7 +38,7 @@ in stdenv.mkDerivation rec { buildInputs = [ stdenv.cc.cc stdenv.cc.libc zlib libX11 libXt libXext libSM libICE libXi libXft libXcursor libXfixes libXScrnSaver libXcomposite libXdamage libXtst libXrandr - atk alsaLib dbus_libs cups gtk gdk_pixbuf libexif ffmpeg libudev + atk alsaLib dbus_libs cups gtk gdk_pixbuf libexif ffmpeg systemd freetype fontconfig libXrender libuuid expat glib nss nspr gstreamer libxml2 gst_plugins_base pango cairo gnome3.gconf patchelf @@ -53,7 +53,7 @@ in stdenv.mkDerivation rec { patchelf \ --set-interpreter "$(cat $NIX_CC/nix-support/dynamic-linker)" \ --set-rpath "${libPath}" \ - opt/vivaldi/vivaldi-bin + opt/vivaldi/vivaldi-bin echo "Finished patching Vivaldi binaries" ''; diff --git a/pkgs/applications/networking/instant-messengers/discord/default.nix b/pkgs/applications/networking/instant-messengers/discord/default.nix index 71382558d3c2..3096d7dea2bf 100644 --- a/pkgs/applications/networking/instant-messengers/discord/default.nix +++ b/pkgs/applications/networking/instant-messengers/discord/default.nix @@ -2,7 +2,7 @@ , alsaLib, atk, cairo, cups, dbus, expat, fontconfig, freetype, gdk_pixbuf , glib, gnome, gtk, libnotify, libX11, libXcomposite, libXcursor, libXdamage , libXext, libXfixes, libXi, libXrandr, libXrender, libXtst, nspr, nss, pango -, libudev, libXScrnSaver }: +, systemd, libXScrnSaver }: let version = "0.0.8"; in @@ -19,7 +19,7 @@ stdenv.mkDerivation { stdenv.cc.cc alsaLib atk cairo cups dbus expat fontconfig freetype gdk_pixbuf glib gnome.GConf gtk libnotify libX11 libXcomposite libXcursor libXdamage libXext libXfixes libXi libXrandr libXrender - libXtst nspr nss pango libudev.out libXScrnSaver + libXtst nspr nss pango systemd libXScrnSaver ]; installPhase = '' @@ -35,7 +35,7 @@ stdenv.mkDerivation { ln -s $out/DiscordCanary $out/bin/ # Putting udev in the path won't work :( - ln -s ${libudev.out}/lib/libudev.so.1 $out + ln -s ${systemd.lib}/lib/libudev.so.1 $out ''; meta = with stdenv.lib; { diff --git a/pkgs/applications/networking/instant-messengers/viber/default.nix b/pkgs/applications/networking/instant-messengers/viber/default.nix index 9c25c6eaad2e..2e3832b9ee87 100644 --- a/pkgs/applications/networking/instant-messengers/viber/default.nix +++ b/pkgs/applications/networking/instant-messengers/viber/default.nix @@ -1,6 +1,6 @@ {fetchurl, stdenv, dpkg, makeWrapper, alsaLib, cups, curl, dbus, expat, fontconfig, freetype, glib, gst_all_1, harfbuzz, libcap, - libpulseaudio, mesa, nspr, nss, libudev, wayland, xorg, zlib, ... + libpulseaudio, mesa, nspr, nss, systemd, wayland, xorg, zlib, ... }: assert stdenv.system == "x86_64-linux"; @@ -39,7 +39,7 @@ stdenv.mkDerivation rec { nspr nss stdenv.cc.cc - libudev + systemd wayland zlib diff --git a/pkgs/development/libraries/libusb1/default.nix b/pkgs/development/libraries/libusb1/default.nix index 93846c00d074..3f5d1b917239 100644 --- a/pkgs/development/libraries/libusb1/default.nix +++ b/pkgs/development/libraries/libusb1/default.nix @@ -1,4 +1,4 @@ -{ stdenv, fetchurl, pkgconfig, libudev ? null, libobjc, IOKit }: +{ stdenv, fetchurl, pkgconfig, systemd ? null, libobjc, IOKit }: stdenv.mkDerivation rec { name = "libusb-1.0.19"; @@ -12,13 +12,13 @@ stdenv.mkDerivation rec { buildInputs = [ pkgconfig ]; propagatedBuildInputs = - stdenv.lib.optional stdenv.isLinux libudev ++ + stdenv.lib.optional stdenv.isLinux systemd ++ stdenv.lib.optionals stdenv.isDarwin [ libobjc IOKit ]; NIX_LDFLAGS = stdenv.lib.optionalString stdenv.isLinux "-lgcc_s"; preFixup = stdenv.lib.optionalString stdenv.isLinux '' - sed 's,-ludev,-L${libudev.out}/lib -ludev,' -i $out/lib/libusb-1.0.la + sed 's,-ludev,-L${systemd.lib}/lib -ludev,' -i $out/lib/libusb-1.0.la ''; meta = { diff --git a/pkgs/development/libraries/mesa/default.nix b/pkgs/development/libraries/mesa/default.nix index ee6b441d2b06..2f8600d9ca99 100644 --- a/pkgs/development/libraries/mesa/default.nix +++ b/pkgs/development/libraries/mesa/default.nix @@ -1,6 +1,6 @@ { stdenv, fetchurl, fetchpatch , pkgconfig, intltool, autoreconfHook, substituteAll -, file, expat, libdrm, xorg, wayland, libudev +, file, expat, libdrm, xorg, wayland, systemd , llvmPackages, libffi, libomxil-bellagio, libva , libelf, libvdpau, python , grsecEnabled ? false @@ -54,7 +54,7 @@ stdenv.mkDerivation { ] ++ optional stdenv.isLinux (substituteAll { src = ./dlopen-absolute-paths.diff; - libudev = libudev.out; + libudev = systemd.lib; }); postPatch = '' @@ -114,7 +114,7 @@ stdenv.mkDerivation { libffi wayland libvdpau libelf libXvMC libomxil-bellagio libva libpthreadstubs (python.withPackages (ps: [ ps.Mako ])) - ] ++ optional stdenv.isLinux libudev; + ] ++ optional stdenv.isLinux systemd; enableParallelBuilding = true; diff --git a/pkgs/development/libraries/qt-5/5.5/qtserialport/default.nix b/pkgs/development/libraries/qt-5/5.5/qtserialport/default.nix index 32549c95344a..2bffd0a2bd61 100644 --- a/pkgs/development/libraries/qt-5/5.5/qtserialport/default.nix +++ b/pkgs/development/libraries/qt-5/5.5/qtserialport/default.nix @@ -1,4 +1,4 @@ -{ qtSubmodule, qtbase, substituteAll, libudev }: +{ qtSubmodule, qtbase, substituteAll, systemd }: qtSubmodule { name = "qtserialport"; @@ -6,7 +6,7 @@ qtSubmodule { patches = [ (substituteAll { src = ./0001-dlopen-serialport-udev.patch; - libudev = libudev.out; + libudev = systemd.lib; }) ]; } diff --git a/pkgs/development/libraries/qt-5/5.5/qtwebkit/default.nix b/pkgs/development/libraries/qt-5/5.5/qtwebkit/default.nix index 5ccf09515e4a..32b07b6c907d 100644 --- a/pkgs/development/libraries/qt-5/5.5/qtwebkit/default.nix +++ b/pkgs/development/libraries/qt-5/5.5/qtwebkit/default.nix @@ -1,6 +1,6 @@ { qtSubmodule, stdenv, qtdeclarative, qtlocation, qtsensors , fontconfig, gdk_pixbuf, gtk, libwebp, libxml2, libxslt -, sqlite, libudev, glib, gst_all_1 +, sqlite, systemd, glib, gst_all_1 , bison2, flex, gdb, gperf, perl, pkgconfig, python, ruby , substituteAll , flashplayerFix ? false @@ -27,7 +27,7 @@ qtSubmodule { }; dlopen-webkit-udev = substituteAll { src = ./0003-dlopen-webkit-udev.patch; - libudev = libudev.out; + libudev = systemd.lib; }; in optionals flashplayerFix [ dlopen-webkit-nsplugin dlopen-webkit-gtk ] ++ [ dlopen-webkit-udev ]; diff --git a/pkgs/development/libraries/qt-5/5.6/qtserialport/default.nix b/pkgs/development/libraries/qt-5/5.6/qtserialport/default.nix index 32549c95344a..2bffd0a2bd61 100644 --- a/pkgs/development/libraries/qt-5/5.6/qtserialport/default.nix +++ b/pkgs/development/libraries/qt-5/5.6/qtserialport/default.nix @@ -1,4 +1,4 @@ -{ qtSubmodule, qtbase, substituteAll, libudev }: +{ qtSubmodule, qtbase, substituteAll, systemd }: qtSubmodule { name = "qtserialport"; @@ -6,7 +6,7 @@ qtSubmodule { patches = [ (substituteAll { src = ./0001-dlopen-serialport-udev.patch; - libudev = libudev.out; + libudev = systemd.lib; }) ]; } diff --git a/pkgs/development/libraries/qt-5/5.6/qtwebkit/default.nix b/pkgs/development/libraries/qt-5/5.6/qtwebkit/default.nix index a7953eb59011..46f47b41535a 100644 --- a/pkgs/development/libraries/qt-5/5.6/qtwebkit/default.nix +++ b/pkgs/development/libraries/qt-5/5.6/qtwebkit/default.nix @@ -1,6 +1,6 @@ { qtSubmodule, stdenv, qtdeclarative, qtlocation, qtsensors , fontconfig, gdk_pixbuf, gtk, libwebp, libxml2, libxslt -, sqlite, libudev, glib, gst_all_1 +, sqlite, systemd, glib, gst_all_1 , bison2, flex, gdb, gperf, perl, pkgconfig, python, ruby , substituteAll , flashplayerFix ? false @@ -27,7 +27,7 @@ qtSubmodule { }; dlopen-webkit-udev = substituteAll { src = ./0003-dlopen-webkit-udev.patch; - libudev = libudev.out; + libudev = systemd.lib; }; in optionals flashplayerFix [ dlopen-webkit-nsplugin dlopen-webkit-gtk ] ++ [ dlopen-webkit-udev ]; diff --git a/pkgs/development/libraries/qt-5/5.7/qtserialport/default.nix b/pkgs/development/libraries/qt-5/5.7/qtserialport/default.nix index 32549c95344a..2bffd0a2bd61 100644 --- a/pkgs/development/libraries/qt-5/5.7/qtserialport/default.nix +++ b/pkgs/development/libraries/qt-5/5.7/qtserialport/default.nix @@ -1,4 +1,4 @@ -{ qtSubmodule, qtbase, substituteAll, libudev }: +{ qtSubmodule, qtbase, substituteAll, systemd }: qtSubmodule { name = "qtserialport"; @@ -6,7 +6,7 @@ qtSubmodule { patches = [ (substituteAll { src = ./0001-dlopen-serialport-udev.patch; - libudev = libudev.out; + libudev = systemd.lib; }) ]; } diff --git a/pkgs/development/libraries/qt-5/5.7/qtwebkit/default.nix b/pkgs/development/libraries/qt-5/5.7/qtwebkit/default.nix index a7953eb59011..46f47b41535a 100644 --- a/pkgs/development/libraries/qt-5/5.7/qtwebkit/default.nix +++ b/pkgs/development/libraries/qt-5/5.7/qtwebkit/default.nix @@ -1,6 +1,6 @@ { qtSubmodule, stdenv, qtdeclarative, qtlocation, qtsensors , fontconfig, gdk_pixbuf, gtk, libwebp, libxml2, libxslt -, sqlite, libudev, glib, gst_all_1 +, sqlite, systemd, glib, gst_all_1 , bison2, flex, gdb, gperf, perl, pkgconfig, python, ruby , substituteAll , flashplayerFix ? false @@ -27,7 +27,7 @@ qtSubmodule { }; dlopen-webkit-udev = substituteAll { src = ./0003-dlopen-webkit-udev.patch; - libudev = libudev.out; + libudev = systemd.lib; }; in optionals flashplayerFix [ dlopen-webkit-nsplugin dlopen-webkit-gtk ] ++ [ dlopen-webkit-udev ]; diff --git a/pkgs/development/tools/node-webkit/nw11.nix b/pkgs/development/tools/node-webkit/nw11.nix index 925c32bd65d1..1fcda13dab8f 100644 --- a/pkgs/development/tools/node-webkit/nw11.nix +++ b/pkgs/development/tools/node-webkit/nw11.nix @@ -1,6 +1,6 @@ { stdenv, fetchurl, buildEnv, makeWrapper , xorg, alsaLib, dbus, glib, gtk, atk, pango, freetype, fontconfig -, gdk_pixbuf, cairo, zlib, nss, nssTools, nspr, gconf, expat, libudev, libcap +, gdk_pixbuf, cairo, zlib, nss, nssTools, nspr, gconf, expat, systemd, libcap , libnotify}: let bits = if stdenv.system == "x86_64-linux" then "x64" @@ -37,7 +37,7 @@ in stdenv.mkDerivation rec { patchelf --set-interpreter "$(cat $NIX_CC/nix-support/dynamic-linker)" $out/share/node-webkit/nw patchelf --set-interpreter "$(cat $NIX_CC/nix-support/dynamic-linker)" $out/share/node-webkit/nwsnapshot - ln -s ${libudev.out}/lib/libudev.so $out/share/node-webkit/libudev.so.0 + ln -s ${systemd.lib}/lib/libudev.so $out/share/node-webkit/libudev.so.0 patchelf --set-rpath "${nwEnv}/lib:${nwEnv}/lib64:$out/share/node-webkit" $out/share/node-webkit/nw patchelf --set-rpath "${nwEnv}/lib:${nwEnv}/lib64:$out/share/node-webkit" $out/share/node-webkit/nwsnapshot diff --git a/pkgs/development/tools/node-webkit/nw12.nix b/pkgs/development/tools/node-webkit/nw12.nix index f0ede1e52378..18fdf7bca3bc 100644 --- a/pkgs/development/tools/node-webkit/nw12.nix +++ b/pkgs/development/tools/node-webkit/nw12.nix @@ -1,6 +1,6 @@ { stdenv, fetchurl, buildEnv, makeWrapper , xorg, alsaLib, dbus, glib, gtk, atk, pango, freetype, fontconfig -, gdk_pixbuf, cairo, zlib, nss, nssTools, nspr, gconf, expat, libudev, libcap +, gdk_pixbuf, cairo, zlib, nss, nssTools, nspr, gconf, expat, systemd, libcap , libnotify}: let bits = if stdenv.system == "x86_64-linux" then "x64" @@ -39,7 +39,7 @@ in stdenv.mkDerivation rec { patchelf --set-interpreter "$(cat $NIX_CC/nix-support/dynamic-linker)" $out/share/nwjs/nw patchelf --set-interpreter "$(cat $NIX_CC/nix-support/dynamic-linker)" $out/share/nwjs/nwjc - ln -s ${libudev.out}/lib/libudev.so $out/share/nwjs/libudev.so.0 + ln -s ${systemd.lib}/lib/libudev.so $out/share/nwjs/libudev.so.0 patchelf --set-rpath "${nwEnv}/lib:${nwEnv}/lib64:${stdenv.lib.makeLibraryPath [ stdenv.cc.cc ]}:$out/share/nwjs" $out/share/nwjs/nw patchelf --set-rpath "${nwEnv}/lib:${nwEnv}/lib64:$out/share/nwjs" $out/share/nwjs/nwjc diff --git a/pkgs/development/tools/node-webkit/nw9.nix b/pkgs/development/tools/node-webkit/nw9.nix index ad2cda34cd8b..db5d6ee6b6fe 100644 --- a/pkgs/development/tools/node-webkit/nw9.nix +++ b/pkgs/development/tools/node-webkit/nw9.nix @@ -1,6 +1,6 @@ { stdenv, fetchurl, buildEnv, makeWrapper , xorg, alsaLib, dbus, glib, gtk, atk, pango, freetype, fontconfig -, gdk_pixbuf, cairo, zlib, nss, nssTools, nspr, gconf, expat, libudev }: +, gdk_pixbuf, cairo, zlib, nss, nssTools, nspr, gconf, expat, systemd }: let bits = if stdenv.system == "x86_64-linux" then "x64" else "ia32"; @@ -35,7 +35,7 @@ in stdenv.mkDerivation rec { patchelf --set-interpreter "$(cat $NIX_CC/nix-support/dynamic-linker)" $out/share/node-webkit/nw patchelf --set-interpreter "$(cat $NIX_CC/nix-support/dynamic-linker)" $out/share/node-webkit/nwsnapshot - ln -s ${libudev.out}/lib/libudev.so $out/share/node-webkit/libudev.so.0 + ln -s ${systemd.lib}/lib/libudev.so $out/share/node-webkit/libudev.so.0 patchelf --set-rpath "${nwEnv}/lib:${nwEnv}/lib64:$out/share/node-webkit" $out/share/node-webkit/nw patchelf --set-rpath "${nwEnv}/lib:${nwEnv}/lib64:$out/share/node-webkit" $out/share/node-webkit/nwsnapshot diff --git a/pkgs/os-specific/linux/multipath-tools/default.nix b/pkgs/os-specific/linux/multipath-tools/default.nix index 409eb31e14f7..d09c192abfcc 100644 --- a/pkgs/os-specific/linux/multipath-tools/default.nix +++ b/pkgs/os-specific/linux/multipath-tools/default.nix @@ -1,4 +1,4 @@ -{ stdenv, fetchurl, lvm2, libaio, gzip, readline, udev }: +{ stdenv, fetchurl, lvm2, libaio, gzip, readline, systemd }: stdenv.mkDerivation rec { name = "multipath-tools-0.5.0"; @@ -19,7 +19,7 @@ stdenv.mkDerivation rec { ''; nativeBuildInputs = [ gzip ]; - buildInputs = [ udev lvm2 libaio readline ]; + buildInputs = [ systemd lvm2 libaio readline ]; makeFlags = [ "LIB=lib" diff --git a/pkgs/os-specific/linux/systemd/default.nix b/pkgs/os-specific/linux/systemd/default.nix index d02f7291df52..7fdebc5c1e8f 100644 --- a/pkgs/os-specific/linux/systemd/default.nix +++ b/pkgs/os-specific/linux/systemd/default.nix @@ -28,13 +28,7 @@ stdenv.mkDerivation rec { }) ]; - /* gave up for now! - outputs = [ "out" "libudev" "doc" ]; # maybe: "dev" - # note: there are many references to ${systemd}/... - outputDev = "out"; - propagatedBuildOutputs = "libudev"; - */ - outputs = [ "out" "man" ]; + outputs = [ "out" "lib" "man" "dev" ]; buildInputs = [ linuxHeaders pkgconfig intltool gperf libcap kmod xz pam acl @@ -119,16 +113,6 @@ stdenv.mkDerivation rec { #export NIX_CFLAGS_LINK+=" -Wl,-rpath,$libudev/lib" ''; - /* - makeFlags = [ - "udevlibexecdir=$(libudev)/lib/udev" - # udev rules refer to $out, and anything but libs should probably go to $out - "udevrulesdir=$(out)/lib/udev/rules.d" - "udevhwdbdir=$(out)/lib/udev/hwdb.d" - ]; - */ - - PYTHON_BINARY = "${coreutils}/bin/env python"; # don't want a build time dependency on Python NIX_CFLAGS_COMPILE = @@ -180,26 +164,18 @@ stdenv.mkDerivation rec { rm -rf $out/etc/rpm - rm $out/lib/*.la + rm $lib/lib/*.la # "kernel-install" shouldn't be used on NixOS. find $out -name "*kernel-install*" -exec rm {} \; - ''; # */ - /* - # Move lib(g)udev to a separate output. TODO: maybe split them up - # to avoid libudev pulling glib - mkdir -p "$libudev/lib" - mv "$out"/lib/lib{,g}udev* "$libudev/lib/" - for i in "$libudev"/lib/*.la; do - substituteInPlace $i --replace "$out" "$libudev" - done - for i in "$out"/lib/pkgconfig/{libudev,gudev-1.0}.pc; do - substituteInPlace $i --replace "libdir=$out" "libdir=$libudev" - done - */ + # Keep only libudev and libsystemd in the lib output. + mkdir -p $out/lib + mv $lib/lib/security $lib/lib/libnss* $out/lib/ + ''; # */ enableParallelBuilding = true; + /* # some libs fail to link to liblzma and/or libffi postFixup = let extraLibs = stdenv.lib.makeLibraryPath [ xz.out libffi.out zlib.out ]; diff --git a/pkgs/os-specific/linux/systemd/libudev.nix b/pkgs/os-specific/linux/systemd/libudev.nix deleted file mode 100644 index 401e1ba68050..000000000000 --- a/pkgs/os-specific/linux/systemd/libudev.nix +++ /dev/null @@ -1,22 +0,0 @@ -{ stdenv, systemd }: - -stdenv.mkDerivation { - name = "libudev-${systemd.version}"; - - unpackPhase = ":"; - outputs = [ "out" "dev" ]; - installPhase = '' - mkdir -p "$out/lib" "$dev/lib/pkgconfig" "$dev/include" - cp -P "${systemd}"/lib/libudev.* "$out/lib/" - cp -P "${systemd}"/lib/pkgconfig/libudev.pc "$dev/lib/pkgconfig/" - cp -P "${systemd}"/include/libudev.h "$dev/include/" - - substituteInPlace "$dev"/lib/pkgconfig/*.pc \ - --replace "${systemd}" "$out" - sed "/^includedir=/cincludedir=$dev/include" -i "$dev"/lib/pkgconfig/*.pc - ''; - - meta = { - platforms = stdenv.lib.platforms.linux; - }; -} diff --git a/pkgs/os-specific/linux/util-linux/default.nix b/pkgs/os-specific/linux/util-linux/default.nix index 003dd792966a..0cc7a8a45483 100644 --- a/pkgs/os-specific/linux/util-linux/default.nix +++ b/pkgs/os-specific/linux/util-linux/default.nix @@ -20,7 +20,6 @@ stdenv.mkDerivation rec { # due to lots of ${utillinux}/bin occurences and headers being rather small outputDev = "bin"; - #FIXME: make it also work on non-nixos? postPatch = '' # Substituting store paths would create a circular dependency on systemd @@ -57,7 +56,7 @@ stdenv.mkDerivation rec { buildInputs = [ zlib pam ] ++ lib.optional (ncurses != null) ncurses - ++ lib.optional (systemd != null) [ systemd pkgconfig ] + ++ lib.optional (systemd != null) systemd ++ lib.optional (perl != null) perl; postInstall = '' diff --git a/pkgs/tools/filesystems/nixpart/0.4/blivet.nix b/pkgs/tools/filesystems/nixpart/0.4/blivet.nix index 7a8501b7a891..edb2978001b2 100644 --- a/pkgs/tools/filesystems/nixpart/0.4/blivet.nix +++ b/pkgs/tools/filesystems/nixpart/0.4/blivet.nix @@ -1,9 +1,11 @@ +# FIXME: Unify with pkgs/development/python-modules/blivet/default.nix. + { stdenv, fetchurl, buildPythonApplication, pykickstart, pyparted, pyblock , libselinux, cryptsetup, multipath_tools, lsof, utillinux -, useNixUdev ? true, libudev ? null +, useNixUdev ? true, systemd ? null }: -assert useNixUdev -> libudev != null; +assert useNixUdev -> systemd != null; buildPythonApplication rec { name = "blivet-${version}"; @@ -29,13 +31,13 @@ buildPythonApplication rec { sed -i '/pvscan/s/, *"--cache"//' blivet/devicelibs/lvm.py '' + stdenv.lib.optionalString useNixUdev '' sed -i -e '/find_library/,/find_library/ { - c libudev = "${libudev.out}/lib/libudev.so.1" + c libudev = "${systemd.lib}/lib/libudev.so.1" }' blivet/pyudev.py ''; propagatedBuildInputs = [ pykickstart pyparted pyblock libselinux cryptsetup - ] ++ stdenv.lib.optional useNixUdev libudev; + ] ++ stdenv.lib.optional useNixUdev systemd; # tests are currently _heavily_ broken upstream doCheck = false; diff --git a/pkgs/tools/filesystems/nixpart/0.4/default.nix b/pkgs/tools/filesystems/nixpart/0.4/default.nix index bdf0a5c4323d..5ae32093e7f7 100644 --- a/pkgs/tools/filesystems/nixpart/0.4/default.nix +++ b/pkgs/tools/filesystems/nixpart/0.4/default.nix @@ -12,7 +12,7 @@ let inherit stdenv fetchurl buildPythonApplication; inherit pykickstart pyparted pyblock cryptsetup multipath_tools; inherit useNixUdev; - inherit (pkgs) lsof utillinux libudev; + inherit (pkgs) lsof utillinux systemd; libselinux = pkgs.libselinux.override { enablePython = true; }; }; @@ -29,7 +29,7 @@ let lvm2 = import ./lvm2.nix { inherit stdenv fetchurl; - inherit (pkgs) pkgconfig utillinux libudev systemd coreutils; + inherit (pkgs) pkgconfig utillinux systemd coreutils; }; multipath_tools = import ./multipath-tools.nix { diff --git a/pkgs/tools/filesystems/nixpart/0.4/lvm2.nix b/pkgs/tools/filesystems/nixpart/0.4/lvm2.nix index b92c40ba99e6..6301cbb6842a 100644 --- a/pkgs/tools/filesystems/nixpart/0.4/lvm2.nix +++ b/pkgs/tools/filesystems/nixpart/0.4/lvm2.nix @@ -1,4 +1,4 @@ -{ stdenv, fetchurl, pkgconfig, libudev, systemd, utillinux, coreutils }: +{ stdenv, fetchurl, pkgconfig, systemd, utillinux, coreutils }: let v = "2.02.106"; @@ -15,7 +15,7 @@ stdenv.mkDerivation { configureFlags = "--disable-readline --enable-udev_rules --enable-udev_sync --enable-pkgconfig --enable-applib"; - buildInputs = [ pkgconfig libudev ]; + buildInputs = [ pkgconfig systemd ]; preConfigure = '' @@ -23,7 +23,7 @@ stdenv.mkDerivation { --replace /usr/bin/tr ${coreutils}/bin/tr substituteInPlace scripts/lvm2_activation_generator_systemd_red_hat.c \ --replace /usr/sbin/lvm $out/sbin/lvm \ - --replace /usr/bin/udevadm ${systemd.udev.bin}/bin/udevadm + --replace /usr/bin/udevadm ${systemd}/bin/udevadm sed -i /DEFAULT_SYS_DIR/d Makefile.in sed -i /DEFAULT_PROFILE_DIR/d conf/Makefile.in diff --git a/pkgs/tools/filesystems/nixpart/0.4/multipath-tools.nix b/pkgs/tools/filesystems/nixpart/0.4/multipath-tools.nix index 48fa0069d6f0..f30bd958cf3a 100644 --- a/pkgs/tools/filesystems/nixpart/0.4/multipath-tools.nix +++ b/pkgs/tools/filesystems/nixpart/0.4/multipath-tools.nix @@ -1,3 +1,5 @@ +# FIXME: unify with pkgs/os-specific/linux/multipath-tools/default.nix. + { stdenv, fetchurl, lvm2, libaio, gzip, readline, systemd }: stdenv.mkDerivation rec { @@ -15,15 +17,15 @@ stdenv.mkDerivation rec { preBuild = '' makeFlagsArray=(GZIP="-9" prefix=$out mandir=$out/share/man/man8 man5dir=$out/share/man/man5 LIB=lib) - + substituteInPlace multipath/Makefile --replace /etc $out/etc substituteInPlace kpartx/Makefile --replace /etc $out/etc - + substituteInPlace kpartx/kpartx.rules --replace /sbin/kpartx $out/sbin/kpartx substituteInPlace kpartx/kpartx_id --replace /sbin/dmsetup ${lvm2}/sbin/dmsetup - substituteInPlace libmultipath/defaults.h --replace /lib/udev/scsi_id ${systemd.udev.lib}/lib/udev/scsi_id - substituteInPlace libmultipath/hwtable.c --replace /lib/udev/scsi_id ${systemd.udev.lib}/lib/udev/scsi_id + substituteInPlace libmultipath/defaults.h --replace /lib/udev/scsi_id ${systemd.lib}/lib/udev/scsi_id + substituteInPlace libmultipath/hwtable.c --replace /lib/udev/scsi_id ${systemd.lib}/lib/udev/scsi_id ''; meta = { diff --git a/pkgs/tools/misc/staruml/default.nix b/pkgs/tools/misc/staruml/default.nix index 90771b0527c8..e1d6604970e5 100644 --- a/pkgs/tools/misc/staruml/default.nix +++ b/pkgs/tools/misc/staruml/default.nix @@ -1,6 +1,6 @@ { stdenv, fetchurl, makeWrapper , dpkg, patchelf -, gtk2, glib, gdk_pixbuf, alsaLib, nss, nspr, GConf, cups, libgcrypt, dbus, libudev }: +, gtk2, glib, gdk_pixbuf, alsaLib, nss, nspr, GConf, cups, libgcrypt, dbus, systemd }: let inherit (stdenv) lib; @@ -41,7 +41,7 @@ stdenv.mkDerivation rec { mkdir -p $out/lib ln -s ${stdenv.cc.cc.lib}/lib/libstdc++.so.6 $out/lib/ - ln -s ${libudev.out}/lib/libudev.so.1 $out/lib/libudev.so.0 + ln -s ${systemd.lib}/lib/libudev.so.1 $out/lib/libudev.so.0 wrapProgram $out/bin/StarUML \ --prefix LD_LIBRARY_PATH : $out/lib:${LD_LIBRARY_PATH} diff --git a/pkgs/top-level/all-packages.nix b/pkgs/top-level/all-packages.nix index 2900ef863cc5..704c3068d769 100644 --- a/pkgs/top-level/all-packages.nix +++ b/pkgs/top-level/all-packages.nix @@ -11783,8 +11783,8 @@ in # This hacky alias covers most use cases without mass-replace (build inputs) # and causes an *evaluation* error if "${udev}" is attempted. - udev = [ libudev.dev libudev.out ]; - libudev = callPackage ../os-specific/linux/systemd/libudev.nix { }; + udev = [ systemd.dev systemd.out ]; + libudev = udev; eudev = callPackage ../os-specific/linux/eudev {}; diff --git a/pkgs/top-level/python-packages.nix b/pkgs/top-level/python-packages.nix index f4ac1b8afa96..b71efc24de7b 100644 --- a/pkgs/top-level/python-packages.nix +++ b/pkgs/top-level/python-packages.nix @@ -19714,11 +19714,11 @@ in modules // { postPatch = '' sed -i -e '/udev_library_name/,/^ *libudev/ { - s|CDLL([^,]*|CDLL("${pkgs.libudev.out}/lib/libudev.so.1"|p; d + s|CDLL([^,]*|CDLL("${pkgs.systemd.lib}/lib/libudev.so.1"|p; d }' pyudev/_libudev.py ''; - propagatedBuildInputs = with self; [ pkgs.udev ]; + propagatedBuildInputs = with self; [ pkgs.systemd ]; meta = { homepage = "http://pyudev.readthedocs.org/"; From dabf09aa9297496bfd195b048080d3ea7f43d7a0 Mon Sep 17 00:00:00 2001 From: Michael Raskin <7c6f434c@mail.ru> Date: Thu, 8 Sep 2016 09:10:00 +0200 Subject: [PATCH 07/10] cmake: update setup-hook to take -isystem instead of -I into account --- .../tools/build-managers/cmake/setup-hook.sh | 26 +++++++++++++------ 1 file changed, 18 insertions(+), 8 deletions(-) diff --git a/pkgs/development/tools/build-managers/cmake/setup-hook.sh b/pkgs/development/tools/build-managers/cmake/setup-hook.sh index eaabb37f4987..f6dd5460c352 100755 --- a/pkgs/development/tools/build-managers/cmake/setup-hook.sh +++ b/pkgs/development/tools/build-managers/cmake/setup-hook.sh @@ -70,15 +70,25 @@ else fi makeCmakeFindLibs(){ + isystem_seen= for flag in $NIX_CFLAGS_COMPILE $NIX_LDFLAGS; do - case $flag in - -I*) - export CMAKE_INCLUDE_PATH="$CMAKE_INCLUDE_PATH${CMAKE_INCLUDE_PATH:+:}${flag:2}" - ;; - -L*) - export CMAKE_LIBRARY_PATH="$CMAKE_LIBRARY_PATH${CMAKE_LIBRARY_PATH:+:}${flag:2}" - ;; - esac + if test -n "$isystem_seen" && test -d "$flag"; then + isystem_seen= + export CMAKE_INCLUDE_PATH="$CMAKE_INCLUDE_PATH${CMAKE_INCLUDE_PATH:+:}${flag}" + else + isystem_seen= + case $flag in + -I*) + export CMAKE_INCLUDE_PATH="$CMAKE_INCLUDE_PATH${CMAKE_INCLUDE_PATH:+:}${flag:2}" + ;; + -L*) + export CMAKE_LIBRARY_PATH="$CMAKE_LIBRARY_PATH${CMAKE_LIBRARY_PATH:+:}${flag:2}" + ;; + -isystem) + isystem_seen=1 + ;; + esac + fi done } From 8ef6f5a1e079e335ceb76829ead578f6b5cd1552 Mon Sep 17 00:00:00 2001 From: Michael Raskin <7c6f434c@mail.ru> Date: Thu, 8 Sep 2016 09:10:20 +0200 Subject: [PATCH 08/10] torch: remove a hack made obsolete by cmake setup-hook fix --- pkgs/development/libraries/torch/default.nix | 12 ------------ 1 file changed, 12 deletions(-) diff --git a/pkgs/development/libraries/torch/default.nix b/pkgs/development/libraries/torch/default.nix index 254c210a61ed..1b1a100350c7 100644 --- a/pkgs/development/libraries/torch/default.nix +++ b/pkgs/development/libraries/torch/default.nix @@ -15,18 +15,6 @@ stdenv.mkDerivation rec{ cd .. export PREFIX=$out - include= - for i in $NIX_CFLAGS_COMPILE; do - if test -n "$include" && test -d "$i"; then - export CMAKE_INCLUDE_PATH="$CMAKE_INCLUDE_PATH''${CMAKE_INCLUDE_PATH:+:}$i" - fi; - if test "x$i" = "x-isystem"; then - include=1 - else - include= - fi - done - mkdir "$out" sh install.sh -s ''; From 06b2ff50b9a7fb56325fddbd3f55554e4e03aa5a Mon Sep 17 00:00:00 2001 From: Tuomas Tynkkynen Date: Fri, 9 Sep 2016 01:39:44 +0300 Subject: [PATCH 09/10] udev: Remove hacky alias It's not clear to me what this is achieving, plus for some reason this is causing an evaluation error in hyperterm. So let's hope it's not really needed... --- pkgs/top-level/all-packages.nix | 4 +--- 1 file changed, 1 insertion(+), 3 deletions(-) diff --git a/pkgs/top-level/all-packages.nix b/pkgs/top-level/all-packages.nix index a490ccca7149..1512ff413bb8 100644 --- a/pkgs/top-level/all-packages.nix +++ b/pkgs/top-level/all-packages.nix @@ -11806,9 +11806,7 @@ in cross = assert crossSystem != null; crossSystem; }); - # This hacky alias covers most use cases without mass-replace (build inputs) - # and causes an *evaluation* error if "${udev}" is attempted. - udev = [ systemd.dev systemd.out ]; + udev = systemd; libudev = udev; eudev = callPackage ../os-specific/linux/eudev {}; From 65146185d4235fb8f9795c9cb3d3584bdfa9189e Mon Sep 17 00:00:00 2001 From: Tuomas Tynkkynen Date: Fri, 9 Sep 2016 06:19:37 +0300 Subject: [PATCH 10/10] python-systemd: Fix build --- pkgs/top-level/python-packages.nix | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/pkgs/top-level/python-packages.nix b/pkgs/top-level/python-packages.nix index 20af8f6d22c7..94274c5e72da 100644 --- a/pkgs/top-level/python-packages.nix +++ b/pkgs/top-level/python-packages.nix @@ -23555,7 +23555,7 @@ in modules // { patchPhase = '' substituteInPlace setup.py \ - --replace "/usr/include" "${pkgs.systemd}/include" + --replace "/usr/include" "${pkgs.systemd.dev}/include" echo '#include ' >> systemd/pyutil.h '';