diff options
217 files changed, 1802 insertions, 2403 deletions
diff --git a/maintainers/maintainer-list.nix b/maintainers/maintainer-list.nix index 0524b26b8315..8af199eab29d 100644 --- a/maintainers/maintainer-list.nix +++ b/maintainers/maintainer-list.nix @@ -3660,6 +3660,11 @@ github = "twey"; name = "James ‘Twey’ Kay"; }; + typetetris = { + email = "ericwolf42@mail.com"; + github = "typetetris"; + name = "Eric Wolf"; + }; unode = { email = "alves.rjc@gmail.com"; github = "unode"; diff --git a/nixos/modules/hardware/opengl.nix b/nixos/modules/hardware/opengl.nix index d9646704e6f6..b371af353cf9 100644 --- a/nixos/modules/hardware/opengl.nix +++ b/nixos/modules/hardware/opengl.nix @@ -14,7 +14,6 @@ let name = "mesa-drivers+txc-${p.mesa_drivers.version}"; paths = [ p.mesa_drivers - p.mesa_drivers.out # mainly for libGL (if cfg.s3tcSupport then p.libtxc_dxtn else p.libtxc_dxtn_s2tc) ]; }; @@ -33,89 +32,92 @@ in { options = { - hardware.opengl.enable = mkOption { - description = '' - Whether to enable OpenGL drivers. This is needed to enable - OpenGL support in X11 systems, as well as for Wayland compositors - like sway, way-cooler and Weston. It is enabled by default - by the corresponding modules, so you do not usually have to - set it yourself, only if there is no module for your wayland - compositor of choice. See services.xserver.enable, - programs.sway.enable, and programs.way-cooler.enable. - ''; - type = types.bool; - default = false; - }; - - hardware.opengl.driSupport = mkOption { - type = types.bool; - default = true; - description = '' - Whether to enable accelerated OpenGL rendering through the - Direct Rendering Interface (DRI). - ''; - }; - - hardware.opengl.driSupport32Bit = mkOption { - type = types.bool; - default = false; - description = '' - On 64-bit systems, whether to support Direct Rendering for - 32-bit applications (such as Wine). This is currently only - supported for the <literal>nvidia</literal> and - <literal>ati_unfree</literal> drivers, as well as - <literal>Mesa</literal>. - ''; - }; - - hardware.opengl.s3tcSupport = mkOption { - type = types.bool; - default = false; - description = '' - Make S3TC(S3 Texture Compression) via libtxc_dxtn available - to OpenGL drivers instead of the patent-free S2TC replacement. - - Using this library may require a patent license depending on your location. - ''; - }; - - hardware.opengl.package = mkOption { - type = types.package; - internal = true; - description = '' - The package that provides the OpenGL implementation. - ''; - }; - hardware.opengl.package32 = mkOption { - type = types.package; - internal = true; - description = '' - The package that provides the 32-bit OpenGL implementation on - 64-bit systems. Used when <option>driSupport32Bit</option> is - set. - ''; - }; - - hardware.opengl.extraPackages = mkOption { - type = types.listOf types.package; - default = []; - example = literalExample "with pkgs; [ vaapiIntel libvdpau-va-gl vaapiVdpau intel-ocl ]"; - description = '' - Additional packages to add to OpenGL drivers. This can be used - to add OpenCL drivers, VA-API/VDPAU drivers etc. - ''; - }; - - hardware.opengl.extraPackages32 = mkOption { - type = types.listOf types.package; - default = []; - example = literalExample "with pkgs.pkgsi686Linux; [ vaapiIntel libvdpau-va-gl vaapiVdpau ]"; - description = '' - Additional packages to add to 32-bit OpenGL drivers on - 64-bit systems. Used when <option>driSupport32Bit</option> is - set. This can be used to add OpenCL drivers, VA-API/VDPAU drivers etc. - ''; + hardware.opengl = { + enable = mkOption { + description = '' + Whether to enable OpenGL drivers. This is needed to enable + OpenGL support in X11 systems, as well as for Wayland compositors + like sway, way-cooler and Weston. It is enabled by default + by the corresponding modules, so you do not usually have to + set it yourself, only if there is no module for your wayland + compositor of choice. See services.xserver.enable, + programs.sway.enable, and programs.way-cooler.enable. + ''; + type = types.bool; + default = false; + }; + + driSupport = mkOption { + type = types.bool; + default = true; + description = '' + Whether to enable accelerated OpenGL rendering through the + Direct Rendering Interface (DRI). + ''; + }; + + driSupport32Bit = mkOption { + type = types.bool; + default = false; + description = '' + On 64-bit systems, whether to support Direct Rendering for + 32-bit applications (such as Wine). This is currently only + supported for the <literal>nvidia</literal> and + <literal>ati_unfree</literal> drivers, as well as + <literal>Mesa</literal>. + ''; + }; + + s3tcSupport = mkOption { + type = types.bool; + default = false; + description = '' + Make S3TC(S3 Texture Compression) via libtxc_dxtn available + to OpenGL drivers instead of the patent-free S2TC replacement. + + Using this library may require a patent license depending on your location. + ''; + }; + + package = mkOption { + type = types.package; + internal = true; + description = '' + The package that provides the OpenGL implementation. + ''; + }; + + package32 = mkOption { + type = types.package; + internal = true; + description = '' + The package that provides the 32-bit OpenGL implementation on + 64-bit systems. Used when <option>driSupport32Bit</option> is + set. + ''; + }; + + extraPackages = mkOption { + type = types.listOf types.package; + default = []; + example = literalExample "with pkgs; [ vaapiIntel libvdpau-va-gl vaapiVdpau intel-ocl ]"; + description = '' + Additional packages to add to OpenGL drivers. This can be used + to add OpenCL drivers, VA-API/VDPAU drivers etc. + ''; + }; + + extraPackages32 = mkOption { + type = types.listOf types.package; + default = []; + example = literalExample "with pkgs.pkgsi686Linux; [ vaapiIntel libvdpau-va-gl vaapiVdpau ]"; + description = '' + Additional packages to add to 32-bit OpenGL drivers on + 64-bit systems. Used when <option>driSupport32Bit</option> is + set. This can be used to add OpenCL drivers, VA-API/VDPAU drivers etc. + ''; + }; }; }; diff --git a/nixos/modules/hardware/video/nvidia.nix b/nixos/modules/hardware/video/nvidia.nix index eafc9869315a..4a7d6da286ba 100644 --- a/nixos/modules/hardware/video/nvidia.nix +++ b/nixos/modules/hardware/video/nvidia.nix @@ -27,13 +27,6 @@ let nvidia_x11 = nvidiaForKernel config.boot.kernelPackages; nvidia_libs32 = (nvidiaForKernel pkgs_i686.linuxPackages).override { libsOnly = true; kernel = null; }; - nvidiaPackage = nvidia: pkgs: - if !nvidia.useGLVND then nvidia.out - else pkgs.buildEnv { - name = "nvidia-libs"; - paths = [ pkgs.libglvnd nvidia.out ]; - }; - enabled = nvidia_x11 != null; in @@ -59,8 +52,8 @@ in source = "${nvidia_x11.bin}/share/nvidia/nvidia-application-profiles-rc"; }; - hardware.opengl.package = nvidiaPackage nvidia_x11 pkgs; - hardware.opengl.package32 = nvidiaPackage nvidia_libs32 pkgs_i686; + hardware.opengl.package = nvidia_x11.out; + hardware.opengl.package32 = nvidia_libs32.out; environment.systemPackages = [ nvidia_x11.bin nvidia_x11.settings ] ++ lib.filter (p: p != null) [ nvidia_x11.persistenced ]; diff --git a/nixos/modules/security/wrappers/wrapper.c b/nixos/modules/security/wrappers/wrapper.c index 7091e314bb22..494e9e93ac22 100644 --- a/nixos/modules/security/wrappers/wrapper.c +++ b/nixos/modules/security/wrappers/wrapper.c @@ -10,8 +10,8 @@ #include <errno.h> #include <linux/capability.h> #include <sys/capability.h> -#include <linux/prctl.h> #include <sys/prctl.h> +#include <limits.h> #include <cap-ng.h> // Make sure assertions are not compiled out, we use them to codify diff --git a/nixos/modules/services/x11/xserver.nix b/nixos/modules/services/x11/xserver.nix index f96d3c5afbac..a89d446187e0 100644 --- a/nixos/modules/services/x11/xserver.nix +++ b/nixos/modules/services/x11/xserver.nix @@ -640,9 +640,7 @@ in environment = { - XORG_DRI_DRIVER_PATH = "/run/opengl-driver/lib/dri"; # !!! Depends on the driver selected at runtime. - LD_LIBRARY_PATH = concatStringsSep ":" ( - [ "${xorg.libX11.out}/lib" "${xorg.libXext.out}/lib" "/run/opengl-driver/lib" ] + LD_LIBRARY_PATH = concatStringsSep ":" ([ "/run/opengl-driver/lib" ] ++ concatLists (catAttrs "libPath" cfg.drivers)); } // cfg.displayManager.job.environment; diff --git a/nixos/modules/system/boot/systemd.nix b/nixos/modules/system/boot/systemd.nix index 92c9ee0c4691..2391e85f9f74 100644 --- a/nixos/modules/system/boot/systemd.nix +++ b/nixos/modules/system/boot/systemd.nix @@ -137,7 +137,6 @@ let # Slices / containers. "slices.target" - "system.slice" "user.slice" "machine.slice" "machines.target" @@ -821,7 +820,8 @@ in system.requiredKernelConfig = map config.lib.kernelConfig.isEnabled [ "DEVTMPFS" "CGROUPS" "INOTIFY_USER" "SIGNALFD" "TIMERFD" "EPOLL" "NET" - "SYSFS" "PROC_FS" "FHANDLE" "DMIID" "AUTOFS4_FS" "TMPFS_POSIX_ACL" + "SYSFS" "PROC_FS" "FHANDLE" "CRYPTO_USER_API_HASH" "CRYPTO_HMAC" + "CRYPTO_SHA256" "DMIID" "AUTOFS4_FS" "TMPFS_POSIX_ACL" "TMPFS_XATTR" "SECCOMP" ]; diff --git a/nixos/modules/virtualisation/qemu-vm.nix b/nixos/modules/virtualisation/qemu-vm.nix index ee327ed805b2..45325c6b0d8d 100644 --- a/nixos/modules/virtualisation/qemu-vm.nix +++ b/nixos/modules/virtualisation/qemu-vm.nix @@ -98,7 +98,7 @@ let ${qemuGraphics} \ ${toString config.virtualisation.qemu.options} \ $QEMU_OPTS \ - $@ + "$@" ''; diff --git a/pkgs/applications/audio/chuck/clang.patch b/pkgs/applications/audio/chuck/clang.patch new file mode 100644 index 000000000000..77227ef0fd44 --- /dev/null +++ b/pkgs/applications/audio/chuck/clang.patch @@ -0,0 +1,58 @@ +diff --git a/src/ugen_osc.cpp b/src/ugen_osc.cpp +index 6b93c6b..dbefe4f 100644 +--- a/src/ugen_osc.cpp ++++ b/src/ugen_osc.cpp +@@ -1232,7 +1232,7 @@ CK_DLL_CTRL( gen5_coeffs ) + Chuck_Array8 * in_args = (Chuck_Array8 *)GET_CK_OBJECT(ARGS); + + // fprintf(stdout, "calling gen10coeffs, %d\n", weights); +- if(in_args<0) return; ++ if(in_args!=0) return; + size = in_args->size(); + if(size >= genX_MAX_COEFFS) size = genX_MAX_COEFFS - 1; + +@@ -1287,7 +1287,7 @@ CK_DLL_CTRL( gen7_coeffs ) + Chuck_Array8 * in_args = (Chuck_Array8 *)GET_CK_OBJECT(ARGS); + + // fprintf(stdout, "calling gen10coeffs, %d\n", weights); +- if(in_args<0) return; ++ if(in_args!=0) return; + size = in_args->size(); + if(size >= genX_MAX_COEFFS) size = genX_MAX_COEFFS - 1; + +@@ -1340,7 +1340,7 @@ CK_DLL_CTRL( gen9_coeffs ) + Chuck_Array8 * weights = (Chuck_Array8 *)GET_CK_OBJECT(ARGS); + + // fprintf(stdout, "calling gen10coeffs, %d\n", weights); +- if(weights<0) return; ++ if(weights!=0) return; + size = weights->size(); + if(size >= genX_MAX_COEFFS) size = genX_MAX_COEFFS - 1; + +@@ -1390,7 +1390,7 @@ CK_DLL_CTRL( gen10_coeffs ) + Chuck_Array8 * weights = (Chuck_Array8 *)GET_CK_OBJECT(ARGS); + + // fprintf(stdout, "calling gen10coeffs, %d\n", weights); +- if(weights<0) return; ++ if(weights!=0) return; + size = weights->size(); + if(size >= genX_MAX_COEFFS) size = genX_MAX_COEFFS - 1; + +@@ -1441,7 +1441,7 @@ CK_DLL_CTRL( gen17_coeffs ) + Chuck_Array8 * weights = (Chuck_Array8 *)GET_CK_OBJECT(ARGS); + + // fprintf(stdout, "calling gen17coeffs, %d\n", weights); +- if(weights<0) return; ++ if(weights!=0) return; + size = weights->size(); + if(size >= genX_MAX_COEFFS) size = genX_MAX_COEFFS - 1; + +@@ -1502,7 +1502,7 @@ CK_DLL_CTRL( curve_coeffs ) + Chuck_Array8 * weights = (Chuck_Array8 *)GET_CK_OBJECT(ARGS); + + // fprintf(stdout, "calling gen17coeffs, %d\n", weights); +- if(weights<0) goto done; ++ if(weights!=0) goto done; + + nargs = weights->size(); + if (nargs < 5 || (nargs % 3) != 2) { // check number of args diff --git a/pkgs/applications/audio/chuck/default.nix b/pkgs/applications/audio/chuck/default.nix index fd7f0c2b07c2..e94172b0f879 100644 --- a/pkgs/applications/audio/chuck/default.nix +++ b/pkgs/applications/audio/chuck/default.nix @@ -1,4 +1,6 @@ -{ stdenv, fetchurl, alsaLib, bison, flex, libsndfile, which }: +{ stdenv, fetchurl, alsaLib, bison, flex, libsndfile, which +, AppKit, Carbon, CoreAudio, CoreMIDI, CoreServices, Kernel +}: stdenv.mkDerivation rec { version = "1.3.5.2"; @@ -10,19 +12,24 @@ stdenv.mkDerivation rec { }; buildInputs = [ bison flex libsndfile which ] - ++ stdenv.lib.optional (!stdenv.isDarwin) alsaLib; + ++ stdenv.lib.optional (!stdenv.isDarwin) alsaLib + ++ stdenv.lib.optional stdenv.isDarwin [ AppKit Carbon CoreAudio CoreMIDI CoreServices Kernel ]; - patches = [ ./darwin-limits.patch ]; + patches = [ ./clang.patch ./darwin-limits.patch ]; + + NIX_CFLAGS_COMPILE = stdenv.lib.optionalString stdenv.isDarwin "-Wno-missing-sysroot"; + NIX_LDFLAGS = stdenv.lib.optionalString stdenv.isDarwin "-framework MultitouchSupport"; postPatch = '' substituteInPlace src/makefile --replace "/usr/bin" "$out/bin" substituteInPlace src/makefile.osx --replace "xcodebuild" "/usr/bin/xcodebuild" substituteInPlace src/makefile.osx --replace "weak_framework" "framework" + substituteInPlace src/makefile.osx --replace "MACOSX_DEPLOYMENT_TARGET=10.5" "MACOSX_DEPLOYMENT_TARGET=$MACOSX_DEPLOYMENT_TARGET" ''; - buildPhase = - stdenv.lib.optionals stdenv.isLinux ["make -C src linux-alsa"] ++ - stdenv.lib.optionals stdenv.isDarwin ["make -C src osx"]; + buildPhase = '' + make -C src ${if stdenv.isDarwin then "osx" else "linux-alsa"} + ''; installPhase = '' install -Dm755 ./src/chuck $out/bin/chuck diff --git a/pkgs/applications/audio/ncmpc/default.nix b/pkgs/applications/audio/ncmpc/default.nix index 93e909fc604b..1b865642178f 100644 --- a/pkgs/applications/audio/ncmpc/default.nix +++ b/pkgs/applications/audio/ncmpc/default.nix @@ -15,8 +15,6 @@ stdenv.mkDerivation rec { buildInputs = [ glib ncurses mpd_clientlib ]; nativeBuildInputs = [ meson ninja pkgconfig gettext ]; - NIX_LDFLAGS = stdenv.lib.optionalString stdenv.isDarwin "-lintl"; - meta = with stdenv.lib; { description = "Curses-based interface for MPD (music player daemon)"; homepage = https://www.musicpd.org/clients/ncmpc/; diff --git a/pkgs/applications/editors/geany/default.nix b/pkgs/applications/editors/geany/default.nix index 23478758efe5..bedc299ee673 100644 --- a/pkgs/applications/editors/geany/default.nix +++ b/pkgs/applications/editors/geany/default.nix @@ -1,4 +1,4 @@ -{ stdenv, fetchurl, gtk2, which, pkgconfig, intltool, file }: +{ stdenv, fetchurl, gtk2, which, pkgconfig, intltool, file, libintl }: with stdenv.lib; @@ -14,9 +14,7 @@ stdenv.mkDerivation rec { sha256 = "66baaff43f12caebcf0efec9a5533044dc52837f799c73a1fd7312caa86099c2"; }; - NIX_LDFLAGS = if stdenv.isDarwin then "-lintl" else null; - - nativeBuildInputs = [ pkgconfig intltool ]; + nativeBuildInputs = [ pkgconfig intltool libintl ]; buildInputs = [ gtk2 which file ]; doCheck = true; diff --git a/pkgs/applications/gis/grass/default.nix b/pkgs/applications/gis/grass/default.nix index 987b544c5565..8353bce1b847 100644 --- a/pkgs/applications/gis/grass/default.nix +++ b/pkgs/applications/gis/grass/default.nix @@ -15,6 +15,10 @@ stdenv.mkDerivation { readline ffmpeg makeWrapper wxGTK30 netcdf geos postgresql mysql.connector-c blas ] ++ (with python2Packages; [ python dateutil wxPython30 numpy ]); + # On Darwin the installer tries to symlink the help files into a system + # directory + patches = [ ./no_symbolic_links.patch ]; + configureFlags = [ "--with-proj-share=${proj}/share/proj" "--without-opengl" diff --git a/pkgs/applications/gis/grass/no_symbolic_links.patch b/pkgs/applications/gis/grass/no_symbolic_links.patch new file mode 100644 index 000000000000..ef09b97b7037 --- /dev/null +++ b/pkgs/applications/gis/grass/no_symbolic_links.patch @@ -0,0 +1,37 @@ +diff --git a/include/Make/Install.make b/include/Make/Install.make +index 0aba138..8ba74bc 100644 +--- a/include/Make/Install.make ++++ b/include/Make/Install.make +@@ -116,11 +116,6 @@ real-install: | $(INST_DIR) $(UNIX_BIN) + -$(INSTALL) config.status $(INST_DIR)/config.status + -$(CHMOD) -R a+rX $(INST_DIR) 2>/dev/null + +-ifneq ($(findstring darwin,$(ARCH)),) +- @# enable OSX Help Viewer +- @/bin/ln -sfh "$(INST_DIR)/docs/html" /Library/Documentation/Help/GRASS-$(GRASS_VERSION_MAJOR).$(GRASS_VERSION_MINOR) +-endif +- + $(INST_DIR) $(UNIX_BIN): + $(MAKE_DIR_CMD) $@ + +diff --git a/macosx/app/build_html_user_index.sh b/macosx/app/build_html_user_index.sh +index 04e63eb..c9d9c2c 100755 +--- a/macosx/app/build_html_user_index.sh ++++ b/macosx/app/build_html_user_index.sh +@@ -140,7 +140,6 @@ else + # echo "<tr><td valign=\"top\"><a href=\"$HTMLDIRG/$i\">$BASENAME</a></td> <td>$SHORTDESC</td></tr>" >> $FULLINDEX + # make them local to user to simplify page links + echo "<tr><td valign=\"top\"><a href=\"global_$i\">$BASENAME</a></td> <td>$SHORTDESC</td></tr>" >> $FULLINDEX +- ln -sf "$HTMLDIRG/$i" global_$i + done + done + fi +@@ -183,8 +182,3 @@ echo "<!DOCTYPE HTML PUBLIC \"-//W3C//DTD HTML 4.0 Transitional//EN\"> + </html>" > $i.html + done + +-# add Help Viewer links in user docs folder +- +-mkdir -p $HOME/Library/Documentation/Help/ +-ln -sfh ../../GRASS/$GRASS_MMVER/Modules/docs/html $HOME/Library/Documentation/Help/GRASS-$GRASS_MMVER-addon +-ln -sfh $GISBASE/docs/html $HOME/Library/Documentation/Help/GRASS-$GRASS_MMVER diff --git a/pkgs/applications/gis/qgis/default.nix b/pkgs/applications/gis/qgis/default.nix index 21ee4297599a..75f980c6781b 100644 --- a/pkgs/applications/gis/qgis/default.nix +++ b/pkgs/applications/gis/qgis/default.nix @@ -1,23 +1,31 @@ { stdenv, fetchurl, fetchpatch, gdal, cmake, qt4, flex, bison, proj, geos, xlibsWrapper, sqlite, gsl , qwt, fcgi, python2Packages, libspatialindex, libspatialite, qscintilla, postgresql, makeWrapper -, qjson, qca2, txt2tags, openssl -, withGrass ? false, grass +, qjson, qca2, txt2tags, openssl, darwin, pkgconfig +, withGrass ? false, grass, IOKit, ApplicationServices }: stdenv.mkDerivation rec { name = "qgis-2.18.17"; buildInputs = [ gdal qt4 flex openssl bison proj geos xlibsWrapper sqlite gsl qwt qscintilla - fcgi libspatialindex libspatialite postgresql qjson qca2 txt2tags ] ++ + fcgi libspatialindex libspatialite postgresql qjson qca2 txt2tags pkgconfig ] + ++ + (stdenv.lib.optionals stdenv.isDarwin [IOKit ApplicationServices]) + ++ (stdenv.lib.optional withGrass grass) ++ + (stdenv.lib.optional (stdenv.isDarwin && withGrass) darwin.apple_sdk.libs.utmp) ++ (with python2Packages; [ jinja2 numpy psycopg2 pygments requests python2Packages.qscintilla sip ]); - nativeBuildInputs = [ cmake makeWrapper ]; + nativeBuildInputs = [ cmake makeWrapper pkgconfig ]; # `make -f src/providers/wms/CMakeFiles/wmsprovider_a.dir/build.make src/providers/wms/CMakeFiles/wmsprovider_a.dir/qgswmssourceselect.cpp.o`: # fatal error: ui_qgsdelimitedtextsourceselectbase.h: No such file or directory enableParallelBuilding = false; + preConfigure = '' + NIX_CFLAGS_COMPILE="$NIX_CFLAGS_COMPILE $(pkg-config --cflags libspatialindex)" + ''; + # To handle the lack of 'local' RPATH; required, as they call one of # their built binaries requiring their libs, in the build process. preBuild = '' @@ -29,19 +37,44 @@ stdenv.mkDerivation rec { sha256 = "1nxwl5lwibbiz9v3qaw3px7iyxg113zr4j8d99yj07mhk2ap082y"; }; - cmakeFlags = stdenv.lib.optional withGrass "-DGRASS_PREFIX7=${grass}/${grass.name}"; + # CMAKE_FIND_FRAMEWORK=never stops the installer choosing system + # installed frameworks + # QGIS_MACAPP_BUNDLE=0 stops the installer copying the Qt binaries into the + # installation which causes havoc + # Building RelWithDebInfo allows QGIS_DEBUG to print debugging information + cmakeFlags = stdenv.lib.optional withGrass "-DGRASS_PREFIX7=${grass}/${grass.name}" + ++ stdenv.lib.optional stdenv.isDarwin + (["-DCMAKE_FIND_FRAMEWORK=never"] + ++ ["-DQGIS_MACAPP_BUNDLE=0"]); +# ++ ["-DCMAKE_BUILD_TYPE=RelWithDebInfo"]; - postInstall = '' - wrapProgram $out/bin/qgis \ - --prefix PYTHONPATH : $PYTHONPATH \ - --prefix LD_LIBRARY_PATH : ${stdenv.lib.makeLibraryPath [ openssl ]} - ''; + + + postInstall = + (stdenv.lib.optionalString stdenv.isLinux '' + wrapProgram $out/bin/qgis \ + --set PYTHONPATH $PYTHONPATH \ + --prefix LD_LIBRARY_PATH : ${stdenv.lib.makeLibraryPath [ openssl ]} + '') + + (stdenv.lib.optionalString stdenv.isDarwin '' + # Necessary for QGIS to find the correct default GRASS path + ${stdenv.lib.optionalString withGrass "ln -sf ${grass} $out/QGIS.app/Contents/MacOS/grass"} + for file in $(find $out -type f -name "QGIS"); do + wrapProgram "$file" \ + --prefix DYLD_LIBRARY_PATH : "${qwt}/lib" \ + --prefix DYLD_LIBRARY_PATH : "${qscintilla}/lib" \ + ${stdenv.lib.optionalString withGrass "--prefix PATH : ${grass}/bin"} \ + --set PYTHONPATH $PYTHONPATH + done + mkdir -p $out/bin + ln -s $out/QGIS.app/Contents/MacOS/QGIS $out/bin/qgis + ''); meta = { description = "User friendly Open Source Geographic Information System"; homepage = http://www.qgis.org; license = stdenv.lib.licenses.gpl2Plus; - platforms = with stdenv.lib.platforms; linux; + platforms = with stdenv.lib.platforms; unix; maintainers = with stdenv.lib.maintainers; [viric]; }; } diff --git a/pkgs/applications/graphics/fbida/default.nix b/pkgs/applications/graphics/fbida/default.nix index 2943b5ef94c0..2e91f7873501 100644 --- a/pkgs/applications/graphics/fbida/default.nix +++ b/pkgs/applications/graphics/fbida/default.nix @@ -1,6 +1,6 @@ { stdenv, fetchurl, libjpeg, libexif, libungif, libtiff, libpng, libwebp, libdrm , pkgconfig, freetype, fontconfig, which, imagemagick, curl, sane-backends, libXpm -, epoxy, poppler, lirc }: +, epoxy, poppler, mesa_noglu, lirc }: stdenv.mkDerivation rec { name = "fbida-2.13"; @@ -11,8 +11,11 @@ stdenv.mkDerivation rec { }; nativeBuildInputs = [ pkgconfig which ]; - buildInputs = [ libexif libjpeg libpng libungif freetype fontconfig libtiff - libwebp imagemagick curl sane-backends libdrm libXpm epoxy poppler lirc ]; + buildInputs = [ + libexif libjpeg libpng libungif freetype fontconfig libtiff libwebp + imagemagick curl sane-backends libdrm libXpm epoxy poppler lirc + mesa_noglu + ]; makeFlags = [ "prefix=$(out)" "verbose=yes" "STRIP=" ]; diff --git a/pkgs/applications/graphics/gimp/2.8.nix b/pkgs/applications/graphics/gimp/2.8.nix index a2cbffd5d217..3802fff2ad21 100644 --- a/pkgs/applications/graphics/gimp/2.8.nix +++ b/pkgs/applications/graphics/gimp/2.8.nix @@ -46,8 +46,7 @@ in stdenv.mkDerivation rec { enableParallelBuilding = true; # "screenshot" needs this. - NIX_LDFLAGS = "-rpath ${xorg.libX11.out}/lib" - + stdenv.lib.optionalString stdenv.isDarwin " -lintl"; + NIX_LDFLAGS = "-rpath ${xorg.libX11.out}/lib"; meta = { description = "The GNU Image Manipulation Program"; diff --git a/pkgs/applications/misc/djvulibre/default.nix b/pkgs/applications/misc/djvulibre/default.nix index 6e158f5696c1..0b685e04a6fc 100644 --- a/pkgs/applications/misc/djvulibre/default.nix +++ b/pkgs/applications/misc/djvulibre/default.nix @@ -1,4 +1,4 @@ -{ stdenv, fetchurl, libjpeg, libtiff, librsvg, libintlOrEmpty }: +{ stdenv, fetchurl, libjpeg, libtiff, librsvg, libiconv }: stdenv.mkDerivation rec { name = "djvulibre-3.5.27"; @@ -10,9 +10,7 @@ stdenv.mkDerivation rec { outputs = [ "bin" "dev" "out" ]; - buildInputs = [ libjpeg libtiff librsvg ] ++ libintlOrEmpty; - - NIX_LDFLAGS = stdenv.lib.optionalString stdenv.isDarwin "-lintl"; + buildInputs = [ libjpeg libtiff librsvg libiconv ]; meta = with stdenv.lib; { description = "A library and viewer for the DJVU file format for scanned images"; diff --git a/pkgs/applications/misc/girara/default.nix b/pkgs/applications/misc/girara/default.nix index 7fd3db860dfb..184ab818b1c3 100644 --- a/pkgs/applications/misc/girara/default.nix +++ b/pkgs/applications/misc/girara/default.nix @@ -1,4 +1,4 @@ -{ stdenv, fetchurl, pkgconfig, gtk, gettext, ncurses, libiconv, libintlOrEmpty +{ stdenv, fetchurl, pkgconfig, gtk, gettext, ncurses, libiconv, libintl , withBuildColors ? true }: @@ -19,10 +19,7 @@ stdenv.mkDerivation rec { ''; nativeBuildInputs = [ pkgconfig ]; - buildInputs = [ gtk gettext libintlOrEmpty ] - ++ stdenv.lib.optional stdenv.isDarwin libiconv; - - NIX_LDFLAGS = stdenv.lib.optionalString stdenv.isDarwin "-lintl"; + buildInputs = [ gtk gettext libintl libiconv ]; makeFlags = [ "PREFIX=$(out)" diff --git a/pkgs/applications/misc/sdcv/default.nix b/pkgs/applications/misc/sdcv/default.nix index 0a8d20a3958d..cc8c30043b29 100644 --- a/pkgs/applications/misc/sdcv/default.nix +++ b/pkgs/applications/misc/sdcv/default.nix @@ -19,8 +19,7 @@ stdenv.mkDerivation rec { mkdir locale ''; - NIX_CFLAGS_COMPILE = "-D__GNU_LIBRARY__" - + stdenv.lib.optionalString stdenv.isDarwin " -lintl"; + NIX_CFLAGS_COMPILE = "-D__GNU_LIBRARY__"; meta = with stdenv.lib; { homepage = https://dushistov.github.io/sdcv/; diff --git a/pkgs/applications/misc/zathura/core/default.nix b/pkgs/applications/misc/zathura/core/default.nix index afb38ace1d93..78d4d69e1263 100644 --- a/pkgs/applications/misc/zathura/core/default.nix +++ b/pkgs/applications/misc/zathura/core/default.nix @@ -1,6 +1,6 @@ { stdenv, fetchurl, makeWrapper, pkgconfig , gtk, girara, ncurses, gettext, docutils -, file, sqlite, glib, texlive, libintlOrEmpty +, file, sqlite, glib, texlive, libintl , gtk-mac-integration, synctexSupport ? true }: @@ -20,8 +20,8 @@ stdenv.mkDerivation rec { icon = ./icon.xpm; nativeBuildInputs = [ - pkgconfig - ] ++ optional stdenv.isDarwin [ libintlOrEmpty ]; + pkgconfig libintl + ]; buildInputs = [ file gtk girara @@ -29,7 +29,6 @@ stdenv.mkDerivation rec { ] ++ optional synctexSupport texlive.bin.core ++ optional stdenv.isDarwin [ gtk-mac-integration ]; - NIX_LDFLAGS = stdenv.lib.optionalString stdenv.isDarwin "-lintl"; NIX_CFLAGS_COMPILE = "-I${glib.dev}/include/gio-unix-2.0"; makeFlags = [ diff --git a/pkgs/applications/networking/irc/irssi/default.nix b/pkgs/applications/networking/irc/irssi/default.nix index 97838312fd0b..b03673a00b66 100644 --- a/pkgs/applications/networking/irc/irssi/default.nix +++ b/pkgs/applications/networking/irc/irssi/default.nix @@ -1,4 +1,4 @@ -{ stdenv, fetchurl, pkgconfig, ncurses, glib, openssl, perl, libintlOrEmpty }: +{ stdenv, fetchurl, pkgconfig, ncurses, glib, openssl, perl, libintl }: stdenv.mkDerivation rec { version = "1.1.1"; @@ -10,7 +10,7 @@ stdenv.mkDerivation rec { }; nativeBuildInputs = [ pkgconfig ]; - buildInputs = [ ncurses glib openssl perl libintlOrEmpty ]; + buildInputs = [ ncurses glib openssl perl libintl ]; configureFlags = [ "--with-proxy" diff --git a/pkgs/applications/video/kodi/default.nix b/pkgs/applications/video/kodi/default.nix index 8a40912a1d68..64119d2dfc55 100644 --- a/pkgs/applications/video/kodi/default.nix +++ b/pkgs/applications/video/kodi/default.nix @@ -13,7 +13,7 @@ , libmpeg2, libsamplerate, libmad , libogg, libvorbis, flac, libxslt , lzo, libcdio, libmodplug, libass, libbluray -, sqlite, mysql, nasm, gnutls, libva, wayland +, sqlite, mysql, nasm, gnutls, libva, libdrm, wayland , curl, bzip2, zip, unzip, glxinfo, xdpyinfo , libcec, libcec_platform, dcadec, libuuid , libcrossguid, libmicrohttpd @@ -121,7 +121,7 @@ in stdenv.mkDerivation rec { gnutls libidn libtasn1 nasm p11-kit libxml2 yasm python2 boost libmicrohttpd - gettext pcre-cpp yajl fribidi libva + gettext pcre-cpp yajl fribidi libva libdrm openssl gperf tinyxml2 taglib libssh swig jre libX11 xproto inputproto libXt libXmu libXext xextproto libXinerama libXrandr randrproto libXtst libXfixes fixesproto diff --git a/pkgs/applications/virtualization/qemu/default.nix b/pkgs/applications/virtualization/qemu/default.nix index 00303be12da2..055273d0dac6 100644 --- a/pkgs/applications/virtualization/qemu/default.nix +++ b/pkgs/applications/virtualization/qemu/default.nix @@ -7,11 +7,13 @@ , numaSupport ? stdenv.isLinux && !stdenv.isArm, numactl , seccompSupport ? stdenv.isLinux, libseccomp , pulseSupport ? !stdenv.isDarwin, libpulseaudio -, sdlSupport ? !stdenv.isDarwin, SDL +, sdlSupport ? !stdenv.isDarwin, SDL2 , vncSupport ? true, libjpeg, libpng , spiceSupport ? !stdenv.isDarwin, spice, spice-protocol , usbredirSupport ? spiceSupport, usbredir , xenSupport ? false, xen +, openGLSupport ? sdlSupport, mesa_noglu, epoxy, libdrm +, virglSupport ? openGLSupport, virglrenderer , hostCpuOnly ? false , nixosTestRunner ? false }: @@ -52,18 +54,42 @@ stdenv.mkDerivation rec { ++ optionals seccompSupport [ libseccomp ] ++ optionals numaSupport [ numactl ] ++ optionals pulseSupport [ libpulseaudio ] - ++ optionals sdlSupport [ SDL ] + ++ optionals sdlSupport [ SDL2 ] ++ optionals vncSupport [ libjpeg libpng ] ++ optionals spiceSupport [ spice-protocol spice ] ++ optionals usbredirSupport [ usbredir ] ++ optionals stdenv.isLinux [ alsaLib libaio libcap_ng libcap attr ] - ++ optionals xenSupport [ xen ]; + ++ optionals xenSupport [ xen ] + ++ optionals openGLSupport [ mesa_noglu epoxy libdrm ] + ++ optionals virglSupport [ virglrenderer ]; enableParallelBuilding = true; - patches = [ ./no-etc-install.patch ./statfs-flags.patch ] + patches = [ ./no-etc-install.patch ./statfs-flags.patch (fetchpatch { + name = "glibc-2.27-memfd.patch"; + url = "https://git.qemu.org/?p=qemu.git;a=patch;h=75e5b70e6b5dcc4f2219992d7cffa462aa406af0"; + sha256 = "0gaz93kb33qc0jx6iphvny0yrd17i8zhcl3a9ky5ylc2idz0wiwa"; + }) ] ++ optional nixosTestRunner ./force-uid0-on-9p.patch - ++ optional pulseSupport ./fix-hda-recording.patch; + ++ optional pulseSupport ./fix-hda-recording.patch + ++ optionals stdenv.hostPlatform.isMusl [ + (fetchpatch { + url = https://raw.githubusercontent.com/alpinelinux/aports/2bb133986e8fa90e2e76d53369f03861a87a74ef/main/qemu/xattr_size_max.patch; + sha256 = "1xfdjs1jlvs99hpf670yianb8c3qz2ars8syzyz8f2c2cp5y4bxb"; + }) + (fetchpatch { + url = https://raw.githubusercontent.com/alpinelinux/aports/2bb133986e8fa90e2e76d53369f03861a87a74ef/main/qemu/musl-F_SHLCK-and-F_EXLCK.patch; + sha256 = "1gm67v41gw6apzgz7jr3zv9z80wvkv0jaxd2w4d16hmipa8bhs0k"; + }) + (fetchpatch { + url = https://raw.githubusercontent.com/alpinelinux/aports/61a7a1b77a868e3b940c0b25e6c2b2a6c32caf20/main/qemu/0006-linux-user-signal.c-define-__SIGRTMIN-MAX-for-non-GN.patch; + sha256 = "1ar6r1vpmhnbs72v6mhgyahcjcf7b9b4xi7asx17sy68m171d2g6"; + }) + (fetchpatch { + url = https://raw.githubusercontent.com/alpinelinux/aports/2bb133986e8fa90e2e76d53369f03861a87a74ef/main/qemu/fix-sigevent-and-sigval_t.patch; + sha256 = "0wk0rrcqywhrw9hygy6ap0lfg314m9z1wr2hn8338r5gfcw75mav"; + }) + ]; hardeningDisable = [ "stackprotector" ]; @@ -84,7 +110,9 @@ stdenv.mkDerivation rec { ++ optional hostCpuOnly "--target-list=${hostCpuTargets}" ++ optional stdenv.isDarwin "--enable-cocoa" ++ optional stdenv.isLinux "--enable-linux-aio" - ++ optional xenSupport "--enable-xen"; + ++ optional xenSupport "--enable-xen" + ++ optional openGLSupport "--enable-opengl" + ++ optional virglSupport "--enable-virglrenderer"; postFixup = '' diff --git a/pkgs/applications/virtualization/qemu/riscv.nix b/pkgs/applications/virtualization/qemu/riscv.nix index 5e234dcb8935..936aadcf9918 100644 --- a/pkgs/applications/virtualization/qemu/riscv.nix +++ b/pkgs/applications/virtualization/qemu/riscv.nix @@ -16,7 +16,7 @@ in lib.overrideDerivation qemu (orig: { name = "${(builtins.parseDrvName qemu.name).name}-${version}pre${revCount}_${shortRev}"; inherit src; # https://github.com/riscv/riscv-qemu/pull/109 - patches = orig.patches ++ [ ./riscv-initrd.patch ]; + patches = [ ./no-etc-install.patch ./statfs-flags.patch ./riscv-initrd.patch ]; configureFlags = orig.configureFlags ++ [ "--target-list=${lib.concatStringsSep "," targets}" ]; postInstall = null; }) diff --git a/pkgs/desktops/gnome-2/platform/ORBit2/default.nix b/pkgs/desktops/gnome-2/platform/ORBit2/default.nix index b8a41a529b05..ef18f0783ce3 100644 --- a/pkgs/desktops/gnome-2/platform/ORBit2/default.nix +++ b/pkgs/desktops/gnome-2/platform/ORBit2/default.nix @@ -1,4 +1,4 @@ -{ stdenv, fetchurl, pkgconfig, glib, libIDL, libintlOrEmpty }: +{ stdenv, fetchurl, pkgconfig, glib, libIDL, libintl }: stdenv.mkDerivation rec { name = "ORBit2-${minVer}.19"; @@ -9,8 +9,8 @@ stdenv.mkDerivation rec { sha256 = "0l3mhpyym9m5iz09fz0rgiqxl2ym6kpkwpsp1xrr4aa80nlh1jam"; }; - nativeBuildInputs = [ pkgconfig ]; - propagatedBuildInputs = [ glib libIDL ] ++ libintlOrEmpty; + nativeBuildInputs = [ pkgconfig libintl ]; + propagatedBuildInputs = [ glib libIDL ]; outputs = [ "out" "dev" ]; diff --git a/pkgs/desktops/gnome-2/platform/libglade/default.nix b/pkgs/desktops/gnome-2/platform/libglade/default.nix index 5003215529e4..956fec1ddf15 100644 --- a/pkgs/desktops/gnome-2/platform/libglade/default.nix +++ b/pkgs/desktops/gnome-2/platform/libglade/default.nix @@ -14,6 +14,4 @@ stdenv.mkDerivation { buildInputs = [ gtk python gettext ]; propagatedBuildInputs = [ libxml2 ]; - - NIX_LDFLAGS = stdenv.lib.optionalString stdenv.isDarwin "-lintl"; } diff --git a/pkgs/desktops/gnustep/make/default.nix b/pkgs/desktops/gnustep/make/default.nix index 622505864971..6ef87cece4e4 100644 --- a/pkgs/desktops/gnustep/make/default.nix +++ b/pkgs/desktops/gnustep/make/default.nix @@ -1,7 +1,7 @@ { stdenv, fetchurl, clang, which, libobjc }: let - version = "2.6.8"; + version = "2.7.0"; in stdenv.mkDerivation rec { @@ -9,7 +9,7 @@ stdenv.mkDerivation rec { src = fetchurl { url = "ftp://ftp.gnustep.org/pub/gnustep/core/gnustep-make-${version}.tar.gz"; - sha256 = "0r00439f7vrggdwv60n8p626gnyymhq968i5x9ad2i4v6g8x4gk0"; + sha256 = "1khiygfkz0zhh9b5nybn40g0xnnjxchk24n49hff1bwanszir84h"; }; configureFlags = [ diff --git a/pkgs/development/compilers/gcc/7/default.nix b/pkgs/development/compilers/gcc/7/default.nix index 8e7cd3d3fab8..0b19aa95effe 100644 --- a/pkgs/development/compilers/gcc/7/default.nix +++ b/pkgs/development/compilers/gcc/7/default.nix @@ -57,16 +57,18 @@ let version = "7.3.0"; enableParallelBuilding = true; patches = - [ ] + [ # https://gcc.gnu.org/ml/gcc-patches/2018-02/msg00633.html + ./riscv-pthread-reentrant.patch + # https://gcc.gnu.org/ml/gcc-patches/2018-03/msg00297.html + ./riscv-no-relax.patch + ] ++ optional (targetPlatform != hostPlatform) ../libstdc++-target.patch ++ optional noSysDirs ../no-sys-dirs.patch ++ optional (hostPlatform != buildPlatform) (fetchpatch { # XXX: Refine when this should be applied url = "https://git.busybox.net/buildroot/plain/package/gcc/7.1.0/0900-remove-selftests.patch?id=11271540bfe6adafbc133caf6b5b902a816f5f02"; sha256 = "0mrvxsdwip2p3l17dscpc1x8vhdsciqw1z5q9i6p5g9yg1cqnmgs"; }) - ++ optional langFortran ../gfortran-driving.patch - # https://gcc.gnu.org/ml/gcc-patches/2018-02/msg00633.html - ++ optional targetPlatform.isRiscV ./riscv-pthread-reentrant.patch; + ++ optional langFortran ../gfortran-driving.patch; javaEcj = fetchurl { # The `$(top_srcdir)/ecj.jar' file is automatically picked up at @@ -212,7 +214,12 @@ stdenv.mkDerivation ({ --replace "-install_name \\\$rpath/\\\$soname" "-install_name $lib/lib/\\\$soname" ''; - postPatch = + postPatch = '' + configureScripts=$(find . -name configure) + for configureScript in $configureScripts; do + patchShebangs $configureScript + done + '' + ( if (hostPlatform.isHurd || (libcCross != null # e.g., building `gcc.crossDrv' && libcCross ? crossConfig @@ -271,7 +278,7 @@ stdenv.mkDerivation ({ sed -i gcc/config/linux.h -e '1i#undef LOCAL_INCLUDE_DIR' '' ) - else null; + else ""); # TODO(@Ericson2314): Make passthru instead. Weird to avoid mass rebuild, crossStageStatic = targetPlatform == hostPlatform || crossStageStatic; diff --git a/pkgs/development/compilers/gcc/7/riscv-no-relax.patch b/pkgs/development/compilers/gcc/7/riscv-no-relax.patch new file mode 100644 index 000000000000..93d9cd1d60f5 --- /dev/null +++ b/pkgs/development/compilers/gcc/7/riscv-no-relax.patch @@ -0,0 +1,109 @@ +commit e7c570f37384d824cb9725f237920e9691e57269 +gpg: Signature made Tue 06 Mar 2018 04:52:46 PM PST +gpg: using RSA key 00CE76D1834960DFCE886DF8EF4CA1502CCBAB41 +gpg: issuer "palmer@dabbelt.com" +gpg: Good signature from "Palmer Dabbelt <palmer@dabbelt.com>" [ultimate] +gpg: aka "Palmer Dabbelt <palmer@sifive.com>" [ultimate] +Author: Palmer Dabbelt <palmer@sifive.com> +Date: Thu Mar 1 12:01:06 2018 -0800 + + RISC-V: Add and document the "-mno-relax" option + + RISC-V relies on aggressive linker relaxation to get good code size. As + a result no text symbol addresses can be known until link time, which + means that alignment must be handled during the link. This alignment + pass is essentially just another linker relaxation, so this has the + unfortunate side effect that linker relaxation is required for + correctness on many RISC-V targets. + + The RISC-V assembler has supported an ".option norelax" for a long time + because there are situations in which linker relaxation is a bad idea -- + the canonical example is when trying to materialize the initial value of + the global pointer into a register, which would otherwise be relaxed to + a NOP. We've been relying on users who want to disable relaxation for + an entire link to pass "-Wl,--no-relax", but that still relies on the + linker relaxing R_RISCV_ALIGN to handle alignment despite it not being + strictly necessary. + + This patch adds a GCC option, "-mno-relax", that disable linker + relaxation by adding ".option norelax" to the top of every generated + assembly file. The assembler is smart enough to handle alignment at + assemble time for files that have never emitted a relaxable relocation, + so this is sufficient to really disable all relaxations in the linker, + which results in significantly faster link times for large objects. + + This also has the side effect of allowing toolchains that don't support + linker relaxation (LLVM and the Linux module loader) to function + correctly. Toolchains that don't support linker relaxation should + default to "-mno-relax" and error when presented with any R_RISCV_ALIGN + relocation as those need to be handled for correctness. + + gcc/ChangeLog + + 2018-03-01 Palmer Dabbelt <palmer@sifive.com> + + * config/riscv/riscv.opt (mrelax): New option. + * config/riscv/riscv.c (riscv_file_start): Emit ".option + "norelax" when riscv_mrelax is disabled. + * doc/invoke.texi (RISC-V): Document "-mrelax" and "-mno-relax". + +diff --git a/gcc/config/riscv/riscv.c b/gcc/config/riscv/riscv.c +index c38f6c394d54..3e81874de232 100644 +--- a/gcc/config/riscv/riscv.c ++++ b/gcc/config/riscv/riscv.c +@@ -3979,6 +3979,11 @@ riscv_file_start (void) + + /* Instruct GAS to generate position-[in]dependent code. */ + fprintf (asm_out_file, "\t.option %spic\n", (flag_pic ? "" : "no")); ++ ++ /* If the user specifies "-mno-relax" on the command line then disable linker ++ relaxation in the assembler. */ ++ if (! riscv_mrelax) ++ fprintf (asm_out_file, "\t.option norelax\n"); + } + + /* Implement TARGET_ASM_OUTPUT_MI_THUNK. Generate rtl rather than asm text +diff --git a/gcc/config/riscv/riscv.opt b/gcc/config/riscv/riscv.opt +index 581a26bb5c1e..b37ac75d9bb4 100644 +--- a/gcc/config/riscv/riscv.opt ++++ b/gcc/config/riscv/riscv.opt +@@ -106,6 +106,11 @@ mexplicit-relocs + Target Report Mask(EXPLICIT_RELOCS) + Use %reloc() operators, rather than assembly macros, to load addresses. + ++mrelax ++Target Bool Var(riscv_mrelax) Init(1) ++Take advantage of linker relaxations to reduce the number of instructions ++required to materialize symbol addresses. ++ + Mask(64BIT) + + Mask(MUL) +diff --git a/gcc/doc/invoke.texi b/gcc/doc/invoke.texi +index 8d366c626bae..deb48af2ecad 100644 +--- a/gcc/doc/invoke.texi ++++ b/gcc/doc/invoke.texi +@@ -1042,7 +1042,8 @@ See RS/6000 and PowerPC Options. + -msave-restore -mno-save-restore @gol + -mstrict-align -mno-strict-align @gol + -mcmodel=medlow -mcmodel=medany @gol +--mexplicit-relocs -mno-explicit-relocs @gol} ++-mexplicit-relocs -mno-explicit-relocs @gol ++-mrelax -mno-relax @gol} + + @emph{RL78 Options} + @gccoptlist{-msim -mmul=none -mmul=g13 -mmul=g14 -mallregs @gol +@@ -23102,6 +23103,12 @@ Use or do not use assembler relocation operators when dealing with symbolic + addresses. The alternative is to use assembler macros instead, which may + limit optimization. + ++@item -mrelax ++@itemx -mno-relax ++Take advantage of linker relaxations to reduce the number of instructions ++required to materialize symbol addresses. The default is to take advantage of ++linker relaxations. ++ + @end table + + @node RL78 Options + diff --git a/pkgs/development/compilers/ghc/8.2.2.nix b/pkgs/development/compilers/ghc/8.2.2.nix index 1c3f260da1c1..6520daa4d42c 100644 --- a/pkgs/development/compilers/ghc/8.2.2.nix +++ b/pkgs/development/compilers/ghc/8.2.2.nix @@ -4,6 +4,7 @@ # build-tools , bootPkgs, alex, happy, hscolour , autoconf, autoreconfHook, automake, coreutils, fetchurl, fetchpatch, perl, python3, sphinx +, runCommand , libffi, libiconv ? null, ncurses @@ -89,6 +90,7 @@ stdenv.mkDerivation rec { url = "https://git.haskell.org/ghc.git/commitdiff_plain/2fc8ce5f0c8c81771c26266ac0b150ca9b75c5f3"; sha256 = "03253ci40np1v6k0wmi4aypj3nmj3rdyvb1k6rwqipb30nfc719f"; }) + (import ./abi-depends-determinism.nix { inherit fetchpatch runCommand; }) ] ++ stdenv.lib.optional deterministicProfiling (fetchpatch { # Backport of https://phabricator.haskell.org/D4388 for more determinism url = "https://github.com/shlevy/ghc/commit/fec1b8d3555c447c0d8da0e96b659be67c8bb4bc.patch"; diff --git a/pkgs/development/compilers/ghc/8.4.1.nix b/pkgs/development/compilers/ghc/8.4.1.nix index dd0e5e4b0572..df23f660147a 100644 --- a/pkgs/development/compilers/ghc/8.4.1.nix +++ b/pkgs/development/compilers/ghc/8.4.1.nix @@ -4,6 +4,7 @@ # build-tools , bootPkgs, alex, happy , autoconf, automake, coreutils, fetchgit, fetchpatch, perl, python3 +, runCommand , libffi, libiconv ? null, ncurses @@ -85,7 +86,9 @@ stdenv.mkDerivation rec { outputs = [ "out" "doc" ]; - patches = stdenv.lib.optional deterministicProfiling + patches = [ + (import ./abi-depends-determinism.nix { inherit fetchpatch runCommand; }) + ] ++ stdenv.lib.optional deterministicProfiling (fetchpatch { # https://phabricator.haskell.org/D4388 for more determinism url = "https://github.com/shlevy/ghc/commit/8b2dbd869d1a64de3e99fa8b1c9bb1140eee7099.patch"; sha256 = "0hxpiwhbg64rsyjdr4psh6dwyp58b96mad3adccvfr0x8hc6ba2m"; diff --git a/pkgs/development/compilers/ghc/abi-depends-determinism.nix b/pkgs/development/compilers/ghc/abi-depends-determinism.nix new file mode 100644 index 000000000000..afa272d03a8e --- /dev/null +++ b/pkgs/development/compilers/ghc/abi-depends-determinism.nix @@ -0,0 +1,10 @@ +# https://phabricator.haskell.org/D4159 to fix non-determinism in +# cached abi-depends fields in package databases, modified to only +# contain hunks that exist in distribution tarballs. +{ fetchpatch, runCommand }: let + base = fetchpatch { # Non-determinism in cached abi-depends fields + url = https://phabricator-files.haskell.org/file/data/4pqrbo5b62sifktfbrls/PHID-FILE-4g4zjiqlfxmmlaos7lz7/D4159.diff; + sha256 = "0b8a08sisf1swmarm6nh9rgw7cpzi2rwdzvrd6ny49c7wk0f7x4b"; + }; +in runCommand base.name {} + "sed -n '/utils\\/ghc-pkg/,$p' ${base} >$out" diff --git a/pkgs/development/compilers/rust/default.nix b/pkgs/development/compilers/rust/default.nix index dd15580c11b8..fd19a38ead22 100644 --- a/pkgs/development/compilers/rust/default.nix +++ b/pkgs/development/compilers/rust/default.nix @@ -1,4 +1,5 @@ { stdenv, callPackage, recurseIntoAttrs, makeRustPlatform, llvm, fetchurl +, fetchpatch , targets ? [] , targetToolchains ? [] , targetPatches ? [] @@ -6,11 +7,11 @@ let rustPlatform = recurseIntoAttrs (makeRustPlatform (callPackage ./bootstrap.nix {})); - version = "1.24.0"; + version = "1.24.1"; cargoVersion = "0.24.0"; src = fetchurl { url = "https://static.rust-lang.org/dist/rustc-${version}-src.tar.gz"; - sha256 = "17v3jpyky8vkkgai5yd2zr8zl87qpgj6dx99gx27x1sf0kv7d0mv"; + sha256 = "1vv10x2h9kq7fxh2v01damdq8pvlp5acyh1kzcda9sfjx12kv99y"; }; in rec { rustc = callPackage ./rustc.nix { @@ -22,6 +23,11 @@ in rec { patches = [ ./patches/0001-Disable-fragile-tests-libstd-net-tcp-on-Darwin-Linux.patch + # Adapted from https://github.com/rust-lang/rust/pull/47912 + (fetchpatch { + url = "https://src.fedoraproject.org/rpms/rust/raw/1bb4d24c060915c304c9a9f86a438388e599f9c6/f/0002-Use-a-range-to-identify-SIGSEGV-in-stack-guards.patch"; + sha256 = "16hc170qzzcb9lcabk0ln005zji2h1gq0knbr9avbbzlbg9jha2q"; + }) ] ++ stdenv.lib.optional stdenv.needsPax ./patches/grsec.patch # https://github.com/rust-lang/rust/issues/45410 ++ stdenv.lib.optional stdenv.isAarch64 ./patches/aarch64-disable-test_loading_cosine.patch; diff --git a/pkgs/development/compilers/vala/default.nix b/pkgs/development/compilers/vala/default.nix index 6a020e11a4be..f36bea42e2a8 100644 --- a/pkgs/development/compilers/vala/default.nix +++ b/pkgs/development/compilers/vala/default.nix @@ -1,5 +1,5 @@ { stdenv, fetchurl, pkgconfig, flex, bison, libxslt, autoconf, graphviz -, glib, libiconv, libintlOrEmpty, libtool, expat +, glib, libiconv, libintl, libtool, expat }: let @@ -16,7 +16,7 @@ let nativeBuildInputs = [ pkgconfig flex bison libxslt ] ++ extraNativeBuildInputs; - buildInputs = [ glib libiconv ] ++ libintlOrEmpty ++ extraBuildInputs; + buildInputs = [ glib libiconv libintl ] ++ extraBuildInputs; meta = with stdenv.lib; { description = "Compiler for GObject type system"; diff --git a/pkgs/development/compilers/zig/default.nix b/pkgs/development/compilers/zig/default.nix index cffc683f9e7b..44d1f7bfe4a2 100644 --- a/pkgs/development/compilers/zig/default.nix +++ b/pkgs/development/compilers/zig/default.nix @@ -1,17 +1,18 @@ -{ stdenv, fetchFromGitHub, cmake, llvmPackages }: +{ stdenv, fetchFromGitHub, cmake, llvmPackages, libxml2 }: stdenv.mkDerivation rec { - version = "0.1.1"; + version = "0.2.0"; name = "zig-${version}"; src = fetchFromGitHub { owner = "zig-lang"; repo = "zig"; rev = "${version}"; - sha256 = "01yqjyi25f99bfmxxwyh45k7j84z0zg7n9jl8gg0draf96mzdh06"; + sha256 = "0lym28z9mj6hfiq78x1fsd8y89h8xyfc1jgqyazi1g9r72427n07"; }; - buildInputs = [ cmake llvmPackages.clang-unwrapped llvmPackages.llvm ]; + nativeBuildInputs = [ cmake ]; + buildInputs = [ llvmPackages.clang-unwrapped llvmPackages.llvm libxml2 ]; cmakeFlags = [ "-DZIG_LIBC_INCLUDE_DIR=${stdenv.cc.libc_dev}/include" @@ -26,7 +27,7 @@ stdenv.mkDerivation rec { meta = with stdenv.lib; { description = "Programming languaged designed for robustness, optimality, and clarity"; - homepage = http://ziglang.org/; + homepage = https://ziglang.org/; license = licenses.mit; platforms = platforms.unix; maintainers = [ maintainers.andrewrk ]; diff --git a/pkgs/development/interpreters/guile/2.0.nix b/pkgs/development/interpreters/guile/2.0.nix index afd90397e232..2c9aec5b6952 100644 --- a/pkgs/development/interpreters/guile/2.0.nix +++ b/pkgs/development/interpreters/guile/2.0.nix @@ -27,12 +27,15 @@ nativeBuildInputs = [ makeWrapper gawk pkgconfig ]; buildInputs = [ readline libtool libunistring libffi ]; - propagatedBuildInputs = [ gmp boehmgc ] - # XXX: These ones aren't normally needed here, but since - # `libguile-2.0.la' reads `-lltdl -lunistring', adding them here will add + propagatedBuildInputs = [ + gmp boehmgc + + # XXX: These ones aren't normally needed here, but `libguile*.la' has '-l' + # flags for them without corresponding '-L' flags. Adding them here will add # the needed `-L' flags. As for why the `.la' file lacks the `-L' flags, # see below. - ++ [ libtool libunistring ]; + libtool libunistring + ]; enableParallelBuilding = true; @@ -70,11 +73,12 @@ postInstall = '' wrapProgram $out/bin/guile-snarf --prefix PATH : "${gawk}/bin" - + '' # XXX: See http://thread.gmane.org/gmane.comp.lib.gnulib.bugs/18903 for # why `--with-libunistring-prefix' and similar options coming from # `AC_LIB_LINKFLAGS_BODY' don't work on NixOS/x86_64. - sed -i "$out/lib/pkgconfig/guile-2.0.pc" \ + + '' + sed -i "$out/lib/pkgconfig/guile"-*.pc \ -e "s|-lunistring|-L${libunistring}/lib -lunistring|g ; s|^Cflags:\(.*\)$|Cflags: -I${libunistring}/include \1|g ; s|-lltdl|-L${libtool.lib}/lib -lltdl|g ; diff --git a/pkgs/development/interpreters/guile/default.nix b/pkgs/development/interpreters/guile/default.nix index dc6e18ae1afd..3d5c51dc420b 100644 --- a/pkgs/development/interpreters/guile/default.nix +++ b/pkgs/development/interpreters/guile/default.nix @@ -28,12 +28,15 @@ nativeBuildInputs = [ makeWrapper gawk pkgconfig ]; buildInputs = [ readline libtool libunistring libffi ]; - propagatedBuildInputs = [ gmp boehmgc ] - # XXX: These ones aren't normally needed here, but since - # `libguile-2.0.la' reads `-lltdl -lunistring', adding them here will add + propagatedBuildInputs = [ + gmp boehmgc + + # XXX: These ones aren't normally needed here, but `libguile*.la' has '-l' + # flags for them without corresponding '-L' flags. Adding them here will add # the needed `-L' flags. As for why the `.la' file lacks the `-L' flags, # see below. - ++ [ libtool libunistring ]; + libtool libunistring + ]; enableParallelBuilding = true; @@ -66,11 +69,12 @@ postInstall = '' wrapProgram $out/bin/guile-snarf --prefix PATH : "${gawk}/bin" - + '' # XXX: See http://thread.gmane.org/gmane.comp.lib.gnulib.bugs/18903 for # why `--with-libunistring-prefix' and similar options coming from # `AC_LIB_LINKFLAGS_BODY' don't work on NixOS/x86_64. - sed -i "$out/lib/pkgconfig/guile-2.2.pc" \ + + '' + sed -i "$out/lib/pkgconfig/guile"-*.pc \ -e "s|-lunistring|-L${libunistring}/lib -lunistring|g ; s|^Cflags:\(.*\)$|Cflags: -I${libunistring}/include \1|g ; s|-lltdl|-L${libtool.lib}/lib -lltdl|g ; diff --git a/pkgs/development/interpreters/lua-5/5.2.nix b/pkgs/development/interpreters/lua-5/5.2.nix index 0cdc4770a983..acddbcfd303c 100644 --- a/pkgs/development/interpreters/lua-5/5.2.nix +++ b/pkgs/development/interpreters/lua-5/5.2.nix @@ -19,17 +19,17 @@ stdenv.mkDerivation rec { sha256 = "0b8034v1s82n4dg5rzcn12067ha3nxaylp2vdp8gg08kjsbzphhk"; }; - nativeBuildInputs = [ readline ]; + buildInputs = [ readline ]; patches = if stdenv.isDarwin then [ ./5.2.darwin.patch ] else [ dsoPatch ]; configurePhase = if stdenv.isDarwin then '' - makeFlagsArray=( INSTALL_TOP=$out INSTALL_MAN=$out/share/man/man1 PLAT=macosx CFLAGS="-DLUA_USE_LINUX -fno-common -O2 -fPIC${if compat then " -DLUA_COMPAT_ALL" else ""}" LDFLAGS="-fPIC" V=${luaversion} R=${version} ) + makeFlagsArray=( INSTALL_TOP=$out INSTALL_MAN=$out/share/man/man1 PLAT=macosx CFLAGS="-DLUA_USE_LINUX -fno-common -O2 -fPIC${if compat then " -DLUA_COMPAT_ALL" else ""}" LDFLAGS="-fPIC" V=${luaversion} R=${version} CC="$CC" ) installFlagsArray=( TO_BIN="lua luac" TO_LIB="liblua.${version}.dylib" INSTALL_DATA='cp -d' ) '' else '' - makeFlagsArray=( INSTALL_TOP=$out INSTALL_MAN=$out/share/man/man1 PLAT=linux CFLAGS="-DLUA_USE_LINUX -O2 -fPIC${if compat then " -DLUA_COMPAT_ALL" else ""}" LDFLAGS="-fPIC" V=${luaversion} R=${version} ) + makeFlagsArray=( INSTALL_TOP=$out INSTALL_MAN=$out/share/man/man1 PLAT=linux CFLAGS="-DLUA_USE_LINUX -O2 -fPIC${if compat then " -DLUA_COMPAT_ALL" else ""}" LDFLAGS="-fPIC" V=${luaversion} R=${version} CC="$CC" AR="$AR q" RANLIB="$RANLIB" ) installFlagsArray=( TO_BIN="lua luac" TO_LIB="liblua.a liblua.so liblua.so.${luaversion} liblua.so.${version}" INSTALL_DATA='cp -d' ) ''; @@ -56,31 +56,6 @@ stdenv.mkDerivation rec { EOF ''; - crossAttrs = let - inherit (hostPlatform) isDarwin isMinGW; - in { - configurePhase = '' - makeFlagsArray=( - INSTALL_TOP=$out - INSTALL_MAN=$out/share/man/man1 - V=${luaversion} - R=${version} - ${if isMinGW then "mingw" else stdenv.lib.optionalString isDarwin '' - ''} - ) - '' + stdenv.lib.optionalString isMinGW '' - installFlagsArray=( - TO_BIN="lua.exe luac.exe" - TO_LIB="liblua.a lua52.dll" - INSTALL_DATA="cp -d" - ) - ''; - } // stdenv.lib.optionalAttrs isDarwin { - postPatch = '' - sed -i -e 's/-Wl,-soname[^ ]* *//' src/Makefile - ''; - }; - meta = { homepage = http://www.lua.org; description = "Powerful, fast, lightweight, embeddable scripting language"; diff --git a/pkgs/development/interpreters/lua-5/5.3.nix b/pkgs/development/interpreters/lua-5/5.3.nix index ad1dfa8823cb..7f0703c62884 100644 --- a/pkgs/development/interpreters/lua-5/5.3.nix +++ b/pkgs/development/interpreters/lua-5/5.3.nix @@ -12,17 +12,17 @@ stdenv.mkDerivation rec { sha256 = "0320a8dg3aci4hxla380dx1ifkw8gj4gbw5c4dz41g1kh98sm0gn"; }; - nativeBuildInputs = [ readline ]; + buildInputs = [ readline ]; patches = if stdenv.isDarwin then [ ./5.2.darwin.patch ] else []; configurePhase = if stdenv.isDarwin then '' - makeFlagsArray=( INSTALL_TOP=$out INSTALL_MAN=$out/share/man/man1 PLAT=macosx CFLAGS="-DLUA_USE_LINUX -fno-common -O2 -fPIC${if compat then " -DLUA_COMPAT_ALL" else ""}" LDFLAGS="-fPIC" V=${luaversion} R=${version} ) + makeFlagsArray=( INSTALL_TOP=$out INSTALL_MAN=$out/share/man/man1 PLAT=macosx CFLAGS="-DLUA_USE_LINUX -fno-common -O2 -fPIC${if compat then " -DLUA_COMPAT_ALL" else ""}" LDFLAGS="-fPIC" V=${luaversion} R=${version} CC="$CC" ) installFlagsArray=( TO_BIN="lua luac" TO_LIB="liblua.${version}.dylib" INSTALL_DATA='cp -d' ) '' else '' - makeFlagsArray=( INSTALL_TOP=$out INSTALL_MAN=$out/share/man/man1 PLAT=linux CFLAGS="-DLUA_USE_LINUX -O2 -fPIC${if compat then " -DLUA_COMPAT_ALL" else ""}" LDFLAGS="-fPIC" V=${luaversion} R=${version}) + makeFlagsArray=( INSTALL_TOP=$out INSTALL_MAN=$out/share/man/man1 PLAT=linux CFLAGS="-DLUA_USE_LINUX -O2 -fPIC${if compat then " -DLUA_COMPAT_ALL" else ""}" LDFLAGS="-fPIC" V=${luaversion} R=${version} CC="$CC" AR="$AR q" RANLIB="$RANLIB" ) installFlagsArray=( TO_BIN="lua luac" TO_LIB="liblua.a liblua.so liblua.so.${luaversion} liblua.so.${version}" INSTALL_DATA='cp -d' ) cat ${./lua-5.3-dso.make} >> src/Makefile sed -e 's/ALL_T *= */& $(LUA_SO)/' -i src/Makefile @@ -55,31 +55,6 @@ stdenv.mkDerivation rec { EOF ''; - crossAttrs = let - inherit (hostPlatform) isDarwin isMinGW; - in { - configurePhase = '' - makeFlagsArray=( - INSTALL_TOP=$out - INSTALL_MAN=$out/share/man/man1 - V=${luaversion} - R=${version} - ${if isMinGW then "mingw" else stdenv.lib.optionalString isDarwin '' - ''} - ) - '' + stdenv.lib.optionalString isMinGW '' - installFlagsArray=( - TO_BIN="lua.exe luac.exe" - TO_LIB="liblua.a lua52.dll" - INSTALL_DATA="cp -d" - ) - ''; - } // stdenv.lib.optionalAttrs isDarwin { - postPatch = '' - sed -i -e 's/-Wl,-soname[^ ]* *//' src/Makefile - ''; - }; - meta = { homepage = http://www.lua.org; description = "Powerful, fast, lightweight, embeddable scripting language"; diff --git a/pkgs/development/libraries/SDL_gfx/default.nix b/pkgs/development/libraries/SDL_gfx/default.nix index 1d7d96f7536d..83a2ffc077c3 100644 --- a/pkgs/development/libraries/SDL_gfx/default.nix +++ b/pkgs/development/libraries/SDL_gfx/default.nix @@ -2,11 +2,11 @@ stdenv.mkDerivation rec { name = "SDL_gfx-${version}"; - version = "2.0.25"; + version = "2.0.26"; src = fetchurl { url = "http://www.ferzkopp.net/Software/SDL_gfx-2.0/${name}.tar.gz"; - sha256 = "1h2rj34dxi5xlwpvm293v2d91gsirhnpzlmnjns9xwkcdg0fsvjm"; + sha256 = "0ijljhs0v99dj6y27hc10z6qchyp8gdp4199y6jzngy6dzxlzsvw"; }; buildInputs = [ SDL ] ; diff --git a/pkgs/development/libraries/acl/default.nix b/pkgs/development/libraries/acl/default.nix index 3c6f42e5cbf8..f9bb982a7842 100644 --- a/pkgs/development/libraries/acl/default.nix +++ b/pkgs/development/libraries/acl/default.nix @@ -18,6 +18,8 @@ stdenv.mkDerivation rec { patchPhase = '' echo "Removing C++-style comments from include/acl.h" sed -e '/^\/\//d' -i include/acl.h + + patchShebangs . ''; configureFlags = [ "MAKE=make" "MSGFMT=msgfmt" "MSGMERGE=msgmerge" "XGETTEXT=xgettext" "ZIP=gzip" "ECHO=echo" "SED=sed" "AWK=gawk" ]; diff --git a/pkgs/development/libraries/at-spi2-core/default.nix b/pkgs/development/libraries/at-spi2-core/default.nix index b717101b3e13..6715a59579b5 100644 --- a/pkgs/development/libraries/at-spi2-core/default.nix +++ b/pkgs/development/libraries/at-spi2-core/default.nix @@ -23,10 +23,7 @@ stdenv.mkDerivation rec { # ToDo: on non-NixOS we create a symlink from there? configureFlags = "--with-dbus-daemondir=/run/current-system/sw/bin/"; - NIX_LDFLAGS = with stdenv; lib.optionalString isDarwin "-lintl"; - meta = with stdenv.lib; { platforms = platforms.unix; }; } - diff --git a/pkgs/development/libraries/atk/default.nix b/pkgs/development/libraries/atk/default.nix index efbc94457bf5..63fd7a4986f9 100644 --- a/pkgs/development/libraries/atk/default.nix +++ b/pkgs/development/libraries/atk/default.nix @@ -1,5 +1,5 @@ { stdenv, fetchurl, meson, ninja, gettext, pkgconfig, glib -, fixDarwinDylibNames, libintlOrEmpty, gobjectIntrospection, gnome3 +, fixDarwinDylibNames, gobjectIntrospection, gnome3 }: let @@ -25,8 +25,7 @@ stdenv.mkDerivation rec { outputs = [ "out" "dev" ]; - buildInputs = libintlOrEmpty - ++ stdenv.lib.optional stdenv.isDarwin fixDarwinDylibNames; + buildInputs = stdenv.lib.optional stdenv.isDarwin fixDarwinDylibNames; nativeBuildInputs = [ meson ninja pkgconfig gettext gobjectIntrospection ]; diff --git a/pkgs/development/libraries/attr/default.nix b/pkgs/development/libraries/attr/default.nix index 0bfeaf81a81d..96fe5b89a18c 100644 --- a/pkgs/development/libraries/attr/default.nix +++ b/pkgs/development/libraries/attr/default.nix @@ -18,6 +18,12 @@ stdenv.mkDerivation rec { patches = if (hostPlatform.libc == "musl") then [ ./fix-headers-musl.patch ] else null; + postPatch = '' + for script in install-sh include/install-sh; do + patchShebangs $script + done + ''; + meta = with stdenv.lib; { homepage = "http://savannah.nongnu.org/projects/attr/"; description = "Library and tools for manipulating extended attributes"; diff --git a/pkgs/development/libraries/cairo/default.nix b/pkgs/development/libraries/cairo/default.nix index 6aa184e4204e..6a7beb1cc1a8 100644 --- a/pkgs/development/libraries/cairo/default.nix +++ b/pkgs/development/libraries/cairo/default.nix @@ -1,5 +1,5 @@ { stdenv, fetchurl, fetchFromGitHub, fetchpatch, pkgconfig, libiconv -, libintlOrEmpty, expat, zlib, libpng, pixman, fontconfig, freetype, xorg +, libintl, expat, zlib, libpng, pixman, fontconfig, freetype, xorg , gobjectSupport ? true, glib , xcbSupport ? true # no longer experimental since 1.12 , glSupport ? true, libGL ? null # libGLU_combined is no longer a big dependency @@ -34,7 +34,8 @@ stdenv.mkDerivation rec { nativeBuildInputs = [ pkgconfig libiconv - ] ++ libintlOrEmpty ++ optionals stdenv.isDarwin (with darwin.apple_sdk.frameworks; [ + libintl + ] ++ optionals stdenv.isDarwin (with darwin.apple_sdk.frameworks; [ CoreGraphics CoreText ApplicationServices diff --git a/pkgs/development/libraries/celt/0.5.1.nix b/pkgs/development/libraries/celt/0.5.1.nix index 561be1ba2819..e45d74345d44 100644 --- a/pkgs/development/libraries/celt/0.5.1.nix +++ b/pkgs/development/libraries/celt/0.5.1.nix @@ -7,4 +7,11 @@ callPackage ./generic.nix (args // rec{ url = "http://downloads.xiph.org/releases/celt/celt-${version}.tar.gz"; sha256 = "0bkam9z5vnrxpbxkkh9kw6yzjka9di56h11iijikdd1f71l5nbpw"; }; + + # Don't build tests due to badness with ec_ilog + prePatch = '' + substituteInPlace Makefile.in \ + --replace 'SUBDIRS = libcelt tests' \ + 'SUBDIRS = libcelt' + ''; }) diff --git a/pkgs/development/libraries/celt/generic.nix b/pkgs/development/libraries/celt/generic.nix index 4ab554561f73..9d861f2c4328 100644 --- a/pkgs/development/libraries/celt/generic.nix +++ b/pkgs/development/libraries/celt/generic.nix @@ -1,5 +1,6 @@ { stdenv, version, src , liboggSupport ? true, libogg ? null # if disabled only the library will be built +, prePatch ? "" , ... }: @@ -10,6 +11,8 @@ stdenv.mkDerivation rec { inherit src; + inherit prePatch; + buildInputs = [] ++ stdenv.lib.optional liboggSupport libogg; diff --git a/pkgs/development/libraries/cogl/default.nix b/pkgs/development/libraries/cogl/default.nix index 48b38c22af59..e06c71c15db4 100644 --- a/pkgs/development/libraries/cogl/default.nix +++ b/pkgs/development/libraries/cogl/default.nix @@ -1,19 +1,20 @@ -{ stdenv, fetchurl, pkgconfig, libGL, glib, gdk_pixbuf, xorg, libintlOrEmpty +{ stdenv, fetchurl, pkgconfig, libGL, glib, gdk_pixbuf, xorg, libintl , pangoSupport ? true, pango, cairo, gobjectIntrospection, wayland, gnome3 +, mesa_noglu , gstreamerSupport ? true, gst_all_1 }: let pname = "cogl"; - version = "1.22.2"; in stdenv.mkDerivation rec { name = "${pname}-${version}"; + version = "1.22.2"; src = fetchurl { url = "mirror://gnome/sources/${pname}/${gnome3.versionBranch version}/${name}.tar.xz"; sha256 = "03f0ha3qk7ca0nnkkcr1garrm1n1vvfqhkz9lwjm592fnv6ii9rr"; }; - nativeBuildInputs = [ pkgconfig ]; + nativeBuildInputs = [ pkgconfig libintl ]; configureFlags = [ "--enable-introspection" @@ -24,10 +25,9 @@ in stdenv.mkDerivation rec { ++ stdenv.lib.optionals (!stdenv.isDarwin) [ "--enable-gles1" "--enable-gles2" ]; propagatedBuildInputs = with xorg; [ - glib gdk_pixbuf gobjectIntrospection wayland + glib gdk_pixbuf gobjectIntrospection wayland mesa_noglu libGL libXrandr libXfixes libXcomposite libXdamage ] - ++ libintlOrEmpty ++ stdenv.lib.optionals gstreamerSupport [ gst_all_1.gstreamer gst_all_1.gst-plugins-base ]; @@ -37,8 +37,6 @@ in stdenv.mkDerivation rec { = stdenv.lib.optionalString (stdenv.isDarwin && pangoSupport) "-I${pango.dev}/include/pango-1.0 -I${cairo.dev}/include/cairo"; - NIX_LDFLAGS = stdenv.lib.optionalString stdenv.isDarwin "-lintl"; - #doCheck = true; # all tests fail (no idea why) passthru = { diff --git a/pkgs/development/libraries/cracklib/default.nix b/pkgs/development/libraries/cracklib/default.nix index d316b5bf2d1e..aa8b4231a869 100644 --- a/pkgs/development/libraries/cracklib/default.nix +++ b/pkgs/development/libraries/cracklib/default.nix @@ -1,4 +1,4 @@ -{ stdenv, fetchurl, libintlOrEmpty, zlib, gettext }: +{ stdenv, fetchurl, zlib, gettext }: stdenv.mkDerivation rec { name = "cracklib-2.9.6"; @@ -8,7 +8,7 @@ stdenv.mkDerivation rec { sha256 = "0hrkb0prf7n92w6rxgq0ilzkk6rkhpys2cfqkrbzswp27na7dkqp"; }; - buildInputs = [ libintlOrEmpty zlib gettext ]; + buildInputs = [ zlib gettext ]; meta = with stdenv.lib; { homepage = https://github.com/cracklib/cracklib; diff --git a/pkgs/development/libraries/fontconfig/default.nix b/pkgs/development/libraries/fontconfig/default.nix index 1109582ad64f..29838fe1ffa1 100644 --- a/pkgs/development/libraries/fontconfig/default.nix +++ b/pkgs/development/libraries/fontconfig/default.nix @@ -1,5 +1,5 @@ { stdenv, substituteAll, fetchurl, fetchpatch -, pkgconfig, freetype, expat, libxslt, dejavu_fonts +, pkgconfig, freetype, expat, libxslt, gperf, dejavu_fonts , hostPlatform }: @@ -18,11 +18,12 @@ let configVersion = "2.11"; # bump whenever fontconfig breaks compatibility with older configurations in stdenv.mkDerivation rec { - name = "fontconfig-2.12.1"; + name = "fontconfig-${version}"; + version = "2.12.6"; src = fetchurl { url = "http://fontconfig.org/release/${name}.tar.bz2"; - sha256 = "1wy7svvp7df6bjpg1m5vizb3ngd7rhb20vpclv3x3qa71khs6jdl"; + sha256 = "05zh65zni11kgnhg726gjbrd55swspdvhqbcnj5a5xh8gn03036g"; }; patches = [ @@ -30,23 +31,12 @@ stdenv.mkDerivation rec { src = ./config-compat.patch; inherit configVersion; }) - (fetchpatch { - name = "glibc-2.25.diff"; - url = "https://cgit.freedesktop.org/fontconfig/patch/?id=1ab5258f7c"; - sha256 = "0x2a4qx51j3gqcp1kp4lisdzmhrkw1zw0r851d82ksgjlc0vkbaz"; - }) ]; - # additionally required for the glibc-2.25 patch; avoid requiring gperf - postPatch = '' - sed s/CHAR_WIDTH/CHARWIDTH/g -i src/fcobjshash.{h,gperf} - sleep 2 - touch src/fcobjshash.h - ''; outputs = [ "bin" "dev" "lib" "out" ]; # $out contains all the config propagatedBuildInputs = [ freetype ]; - nativeBuildInputs = [ pkgconfig ]; + nativeBuildInputs = [ pkgconfig gperf ]; buildInputs = [ expat ]; configureFlags = [ diff --git a/pkgs/development/libraries/freetype/cve-2017-8105.patch b/pkgs/development/libraries/freetype/cve-2017-8105.patch deleted file mode 100644 index dc4327a52a88..000000000000 --- a/pkgs/development/libraries/freetype/cve-2017-8105.patch +++ /dev/null @@ -1,27 +0,0 @@ -http://git.savannah.gnu.org/cgit/freetype/freetype2.git/commit/?id=f958c48ee43 - -diff --git a/src/psaux/t1decode.c b/src/psaux/t1decode.c -index af7b465..7dd4513 100644 ---- a/src/psaux/t1decode.c -+++ b/src/psaux/t1decode.c -@@ -780,10 +780,19 @@ - /* point without adding any point to the outline */ - idx = decoder->num_flex_vectors++; - if ( idx > 0 && idx < 7 ) -+ { -+ /* in malformed fonts it is possible to have other */ -+ /* opcodes in the middle of a flex (which don't */ -+ /* increase `num_flex_vectors'); we thus have to */ -+ /* check whether we can add a point */ -+ if ( FT_SET_ERROR( t1_builder_check_points( builder, 1 ) ) ) -+ goto Syntax_Error; -+ - t1_builder_add_point( builder, - x, - y, - (FT_Byte)( idx == 3 || idx == 6 ) ); -+ } - } - break; - - diff --git a/pkgs/development/libraries/freetype/cve-2017-8287.patch b/pkgs/development/libraries/freetype/cve-2017-8287.patch deleted file mode 100644 index 7ccf4f3278b7..000000000000 --- a/pkgs/development/libraries/freetype/cve-2017-8287.patch +++ /dev/null @@ -1,22 +0,0 @@ -http://git.savannah.gnu.org/cgit/freetype/freetype2.git/commit/?id=3774fc08b - -diff --git a/src/psaux/psobjs.c b/src/psaux/psobjs.c -index d18e821..0baf836 100644 ---- a/src/psaux/psobjs.c -+++ b/src/psaux/psobjs.c -@@ -1718,6 +1718,14 @@ - first = outline->n_contours <= 1 - ? 0 : outline->contours[outline->n_contours - 2] + 1; - -+ /* in malformed fonts it can happen that a contour was started */ -+ /* but no points were added */ -+ if ( outline->n_contours && first == outline->n_points ) -+ { -+ outline->n_contours--; -+ return; -+ } -+ - /* We must not include the last point in the path if it */ - /* is located on the first point. */ - if ( outline->n_points > 1 ) - diff --git a/pkgs/development/libraries/freetype/default.nix b/pkgs/development/libraries/freetype/default.nix index 8f16f85cabf7..3fccce02def4 100644 --- a/pkgs/development/libraries/freetype/default.nix +++ b/pkgs/development/libraries/freetype/default.nix @@ -1,6 +1,6 @@ { stdenv, lib, fetchurl, copyPathsToStore , hostPlatform -, pkgconfig, which +, pkgconfig, which, makeWrapper , zlib, bzip2, libpng, gnumake, glib , # FreeType supports LCD filtering (colloquially referred to as sub-pixel rendering). @@ -11,10 +11,10 @@ let inherit (stdenv.lib) optional optionals optionalString; - version = "2.7.1"; name = "freetype-" + version; -in stdenv.mkDerivation { - inherit name; +in stdenv.mkDerivation rec { + name = "freetype-${version}"; + version = "2.9"; meta = with stdenv.lib; { description = "A font rendering engine"; @@ -33,24 +33,17 @@ in stdenv.mkDerivation { src = fetchurl { url = "mirror://savannah/freetype/${name}.tar.bz2"; - sha256 = "121gm15ayfg3rglby8ifh8384mcjb9dhmx9j40zl7yszw72b4frs"; + sha256 = "12jcdz1in20yaa55izxalg3hm1pf7nydfrzps5bzb4zgihybmzz6"; }; propagatedBuildInputs = [ zlib bzip2 libpng ]; # needed when linking against freetype # dependence on harfbuzz is looser than the reverse dependence - nativeBuildInputs = [ pkgconfig which ] + nativeBuildInputs = [ pkgconfig which makeWrapper ] # FreeType requires GNU Make, which is not part of stdenv on FreeBSD. ++ optional (!stdenv.isLinux) gnumake; patches = - [ - ./pcf-introduce-driver.patch - ./pcf-config-long-family-names.patch - ./disable-pcf-long-family-names.patch - ./enable-table-validation.patch - # remove the two CVE patches after updating to >= 2.8 - ./cve-2017-8105.patch - ./cve-2017-8287.patch + [ ./enable-table-validation.patch ] ++ optional useEncumberedCode ./enable-subpixel-rendering.patch; @@ -65,7 +58,10 @@ in stdenv.mkDerivation { doCheck = true; - postInstall = glib.flattenInclude; + postInstall = glib.flattenInclude + '' + wrapProgram "$dev/bin/freetype-config" \ + --set PKG_CONFIG_PATH "$PKG_CONFIG_PATH:$dev/lib/pkgconfig" + ''; crossAttrs = stdenv.lib.optionalAttrs (hostPlatform.libc or null != "msvcrt") { # Somehow it calls the unwrapped gcc, "i686-pc-linux-gnu-gcc", instead diff --git a/pkgs/development/libraries/freetype/pcf-config-long-family-names.patch b/pkgs/development/libraries/freetype/pcf-config-long-family-names.patch deleted file mode 100644 index 95ed83c60f8f..000000000000 --- a/pkgs/development/libraries/freetype/pcf-config-long-family-names.patch +++ /dev/null @@ -1,553 +0,0 @@ -diff --git a/devel/ftoption.h b/devel/ftoption.h -index 3b63931..b8b0a8d 100644 ---- a/devel/ftoption.h -+++ b/devel/ftoption.h -@@ -82,8 +82,8 @@ FT_BEGIN_HEADER - /* to control the various font drivers and modules. The controllable */ - /* properties are listed in the section `Controlling FreeType Modules' */ - /* in the reference's table of contents; currently there are properties */ -- /* for the auto-hinter (file `ftautoh.h'), CFF (file `ftcffdrv.h'), and */ -- /* TrueType (file `ftttdrv.h'). */ -+ /* for the auto-hinter (file `ftautoh.h'), CFF (file `ftcffdrv.h'), */ -+ /* TrueType (file `ftttdrv.h'), and PCF (file `ftpcfdrv.h'). */ - /* */ - /* `FREETYPE_PROPERTIES' has the following syntax form (broken here into */ - /* multiple lines for better readability). */ -@@ -835,6 +835,33 @@ FT_BEGIN_HEADER - /*************************************************************************/ - /*************************************************************************/ - /**** ****/ -+ /**** P C F D R I V E R C O N F I G U R A T I O N ****/ -+ /**** ****/ -+ /*************************************************************************/ -+ /*************************************************************************/ -+ -+ -+ /*************************************************************************/ -+ /* */ -+ /* There are many PCF fonts just called `Fixed' which look completely */ -+ /* different, and which have nothing to do with each other. When */ -+ /* selecting `Fixed' in KDE or Gnome one gets results that appear rather */ -+ /* random, the style changes often if one changes the size and one */ -+ /* cannot select some fonts at all. This option makes the PCF module */ -+ /* prepend the foundry name (plus a space) to the family name. */ -+ /* */ -+ /* We also check whether we have `wide' characters; all put together, we */ -+ /* get family names like `Sony Fixed' or `Misc Fixed Wide'. */ -+ /* */ -+ /* If this option is activated, it can be controlled with the */ -+ /* `no-long-family-names' property of the pcf driver module. */ -+ /* */ -+#define PCF_CONFIG_OPTION_LONG_FAMILY_NAMES -+ -+ -+ /*************************************************************************/ -+ /*************************************************************************/ -+ /**** ****/ - /**** A U T O F I T M O D U L E C O N F I G U R A T I O N ****/ - /**** ****/ - /*************************************************************************/ -diff --git a/docs/CHANGES b/docs/CHANGES -index cb3b327..3823395 100644 ---- a/docs/CHANGES -+++ b/docs/CHANGES -@@ -1,4 +1,20 @@ - -+CHANGES BETWEEN 2.7.1 and 2.7.2 -+ -+ I. IMPORTANT CHANGES -+ -+ - The PCF change to show more `colourful' family names (introduced -+ in version 2.7.1) was too radical; it can now be configured with -+ PCF_CONFIG_OPTION_LONG_FAMILY_NAMES at compile time. If -+ activated, it can be switched off at run time with the new pcf -+ property `no-long-family-names'. If the `FREETYPE_PROPERTIES' -+ environment variable is available, you can say -+ -+ FREETYPE_PROPERTIES=pcf:no-long-family-names=1 -+ -+ -+====================================================================== -+ - CHANGES BETWEEN 2.7 and 2.7.1 - - I. IMPORTANT CHANGES -diff --git a/include/freetype/config/ftheader.h b/include/freetype/config/ftheader.h -index 950d36c..d491af5 100644 ---- a/include/freetype/config/ftheader.h -+++ b/include/freetype/config/ftheader.h -@@ -357,6 +357,19 @@ - /************************************************************************* - * - * @macro: -+ * FT_PCF_DRIVER_H -+ * -+ * @description: -+ * A macro used in #include statements to name the file containing -+ * structures and macros related to the PCF driver module. -+ * -+ */ -+#define FT_PCF_DRIVER_H <freetype/ftpcfdrv.h> -+ -+ -+ /************************************************************************* -+ * -+ * @macro: - * FT_TYPE1_TABLES_H - * - * @description: -diff --git a/include/freetype/config/ftoption.h b/include/freetype/config/ftoption.h -index f5bc540..5676074 100644 ---- a/include/freetype/config/ftoption.h -+++ b/include/freetype/config/ftoption.h -@@ -82,8 +82,8 @@ FT_BEGIN_HEADER - /* to control the various font drivers and modules. The controllable */ - /* properties are listed in the section `Controlling FreeType Modules' */ - /* in the reference's table of contents; currently there are properties */ -- /* for the auto-hinter (file `ftautoh.h'), CFF (file `ftcffdrv.h'), and */ -- /* TrueType (file `ftttdrv.h'). */ -+ /* for the auto-hinter (file `ftautoh.h'), CFF (file `ftcffdrv.h'), */ -+ /* TrueType (file `ftttdrv.h'), and PCF (file `ftpcfdrv.h'). */ - /* */ - /* `FREETYPE_PROPERTIES' has the following syntax form (broken here into */ - /* multiple lines for better readability). */ -@@ -835,6 +835,33 @@ FT_BEGIN_HEADER - /*************************************************************************/ - /*************************************************************************/ - /**** ****/ -+ /**** P C F D R I V E R C O N F I G U R A T I O N ****/ -+ /**** ****/ -+ /*************************************************************************/ -+ /*************************************************************************/ -+ -+ -+ /*************************************************************************/ -+ /* */ -+ /* There are many PCF fonts just called `Fixed' which look completely */ -+ /* different, and which have nothing to do with each other. When */ -+ /* selecting `Fixed' in KDE or Gnome one gets results that appear rather */ -+ /* random, the style changes often if one changes the size and one */ -+ /* cannot select some fonts at all. This option makes the PCF module */ -+ /* prepend the foundry name (plus a space) to the family name. */ -+ /* */ -+ /* We also check whether we have `wide' characters; all put together, we */ -+ /* get family names like `Sony Fixed' or `Misc Fixed Wide'. */ -+ /* */ -+ /* If this option is activated, it can be controlled with the */ -+ /* `no-long-family-names' property of the pcf driver module. */ -+ /* */ -+#define PCF_CONFIG_OPTION_LONG_FAMILY_NAMES -+ -+ -+ /*************************************************************************/ -+ /*************************************************************************/ -+ /**** ****/ - /**** A U T O F I T M O D U L E C O N F I G U R A T I O N ****/ - /**** ****/ - /*************************************************************************/ -diff --git a/include/freetype/ftchapters.h b/include/freetype/ftchapters.h -index ab43895..a0a121b 100644 ---- a/include/freetype/ftchapters.h -+++ b/include/freetype/ftchapters.h -@@ -77,6 +77,7 @@ - /* auto_hinter */ - /* cff_driver */ - /* tt_driver */ -+/* pcf_driver */ - /* */ - /***************************************************************************/ - -diff --git a/include/freetype/ftpcfdrv.h b/include/freetype/ftpcfdrv.h -new file mode 100644 -index 0000000..6622c93 ---- /dev/null -+++ b/include/freetype/ftpcfdrv.h -@@ -0,0 +1,105 @@ -+/***************************************************************************/ -+/* */ -+/* ftpcfdrv.h */ -+/* */ -+/* FreeType API for controlling the PCF driver (specification only). */ -+/* */ -+/* Copyright 2017 by */ -+/* David Turner, Robert Wilhelm, and Werner Lemberg. */ -+/* */ -+/* This file is part of the FreeType project, and may only be used, */ -+/* modified, and distributed under the terms of the FreeType project */ -+/* license, LICENSE.TXT. By continuing to use, modify, or distribute */ -+/* this file you indicate that you have read the license and */ -+/* understand and accept it fully. */ -+/* */ -+/***************************************************************************/ -+ -+ -+#ifndef FTPCFDRV_H_ -+#define FTPCFDRV_H_ -+ -+#include <ft2build.h> -+#include FT_FREETYPE_H -+ -+#ifdef FREETYPE_H -+#error "freetype.h of FreeType 1 has been loaded!" -+#error "Please fix the directory search order for header files" -+#error "so that freetype.h of FreeType 2 is found first." -+#endif -+ -+ -+FT_BEGIN_HEADER -+ -+ -+ /************************************************************************** -+ * -+ * @section: -+ * pcf_driver -+ * -+ * @title: -+ * The PCF driver -+ * -+ * @abstract: -+ * Controlling the PCF driver module. -+ * -+ * @description: -+ * While FreeType's PCF driver doesn't expose API functions by itself, -+ * it is possible to control its behaviour with @FT_Property_Set and -+ * @FT_Property_Get. Right now, there is a single property -+ * `no-long-family-names' available if FreeType is compiled with -+ * PCF_CONFIG_OPTION_LONG_FAMILY_NAMES. -+ * -+ * The PCF driver's module name is `pcf'. -+ * -+ */ -+ -+ -+ /************************************************************************** -+ * -+ * @property: -+ * no-long-family-names -+ * -+ * @description: -+ * If PCF_CONFIG_OPTION_LONG_FAMILY_NAMES is active while compiling -+ * FreeType, the PCF driver constructs long family names. -+ * -+ * There are many PCF fonts just called `Fixed' which look completely -+ * different, and which have nothing to do with each other. When -+ * selecting `Fixed' in KDE or Gnome one gets results that appear rather -+ * random, the style changes often if one changes the size and one -+ * cannot select some fonts at all. The improve this situation, the PCF -+ * module prepends the foundry name (plus a space) to the family name. -+ * It also checks whether there are `wide' characters; all put together, -+ * family names like `Sony Fixed' or `Misc Fixed Wide' are constructed. -+ * -+ * If `no-long-family-names' is set, this feature gets switched off. -+ * -+ * { -+ * FT_Library library; -+ * FT_Bool no_long_family_names = TRUE; -+ * -+ * -+ * FT_Init_FreeType( &library ); -+ * -+ * FT_Property_Set( library, "pcf", -+ * "no-long-family-names", -+ * &no_long_family_names ); -+ * } -+ * -+ * @note: -+ * This property can be used with @FT_Property_Get also. -+ * -+ * This property can be set via the `FREETYPE_PROPERTIES' environment -+ * variable (using values 1 and 0 for `on' and `off', respectively). -+ * -+ */ -+ -+ -+FT_END_HEADER -+ -+ -+#endif /* FTPCFDRV_H_ */ -+ -+ -+/* END */ -diff --git a/src/pcf/pcf.h b/src/pcf/pcf.h -index 830cabe..f0390cb 100644 ---- a/src/pcf/pcf.h -+++ b/src/pcf/pcf.h -@@ -167,6 +167,8 @@ FT_BEGIN_HEADER - { - FT_DriverRec root; - -+ FT_Bool no_long_family_names; -+ - } PCF_DriverRec, *PCF_Driver; - - -diff --git a/src/pcf/pcfdrivr.c b/src/pcf/pcfdrivr.c -index 8f4a90d..bc65423 100644 ---- a/src/pcf/pcfdrivr.c -+++ b/src/pcf/pcfdrivr.c -@@ -49,6 +49,8 @@ THE SOFTWARE. - - #include FT_SERVICE_BDF_H - #include FT_SERVICE_FONT_FORMAT_H -+#include FT_SERVICE_PROPERTIES_H -+#include FT_PCF_DRIVER_H - - - /*************************************************************************/ -@@ -667,6 +669,110 @@ THE SOFTWARE. - }; - - -+ /* -+ * PROPERTY SERVICE -+ * -+ */ -+ static FT_Error -+ pcf_property_set( FT_Module module, /* PCF_Driver */ -+ const char* property_name, -+ const void* value, -+ FT_Bool value_is_string ) -+ { -+#ifdef PCF_CONFIG_OPTION_LONG_FAMILY_NAMES -+ -+ FT_Error error = FT_Err_Ok; -+ PCF_Driver driver = (PCF_Driver)module; -+ -+#ifndef FT_CONFIG_OPTION_ENVIRONMENT_PROPERTIES -+ FT_UNUSED( value_is_string ); -+#endif -+ -+ -+ if ( !ft_strcmp( property_name, "no-long-family-names" ) ) -+ { -+#ifdef FT_CONFIG_OPTION_ENVIRONMENT_PROPERTIES -+ if ( value_is_string ) -+ { -+ const char* s = (const char*)value; -+ long lfn = ft_strtol( s, NULL, 10 ); -+ -+ -+ if ( lfn == 0 ) -+ driver->no_long_family_names = 0; -+ else if ( lfn == 1 ) -+ driver->no_long_family_names = 1; -+ else -+ return FT_THROW( Invalid_Argument ); -+ } -+ else -+#endif -+ { -+ FT_Bool* no_long_family_names = (FT_Bool*)value; -+ -+ -+ driver->no_long_family_names = *no_long_family_names; -+ } -+ -+ return error; -+ } -+ -+#else /* !PCF_CONFIG_OPTION_LONG_FAMILY_NAMES */ -+ -+ FT_UNUSED( module ); -+ FT_UNUSED( value ); -+ FT_UNUSED( value_is_string ); -+ -+#endif /* !PCF_CONFIG_OPTION_LONG_FAMILY_NAMES */ -+ -+ FT_TRACE0(( "pcf_property_set: missing property `%s'\n", -+ property_name )); -+ return FT_THROW( Missing_Property ); -+ } -+ -+ -+ static FT_Error -+ pcf_property_get( FT_Module module, /* PCF_Driver */ -+ const char* property_name, -+ const void* value ) -+ { -+#ifdef PCF_CONFIG_OPTION_LONG_FAMILY_NAMES -+ -+ FT_Error error = FT_Err_Ok; -+ PCF_Driver driver = (PCF_Driver)module; -+ -+ -+ if ( !ft_strcmp( property_name, "no-long-family-names" ) ) -+ { -+ FT_Bool no_long_family_names = driver->no_long_family_names; -+ FT_Bool* val = (FT_Bool*)value; -+ -+ -+ *val = no_long_family_names; -+ -+ return error; -+ } -+ -+#else /* !PCF_CONFIG_OPTION_LONG_FAMILY_NAMES */ -+ -+ FT_UNUSED( module ); -+ FT_UNUSED( value ); -+ -+#endif /* !PCF_CONFIG_OPTION_LONG_FAMILY_NAMES */ -+ -+ FT_TRACE0(( "pcf_property_get: missing property `%s'\n", -+ property_name )); -+ return FT_THROW( Missing_Property ); -+ } -+ -+ -+ FT_DEFINE_SERVICE_PROPERTIESREC( -+ pcf_service_properties, -+ -+ (FT_Properties_SetFunc)pcf_property_set, /* set_property */ -+ (FT_Properties_GetFunc)pcf_property_get ) /* get_property */ -+ -+ - /* - * - * SERVICE LIST -@@ -677,6 +783,7 @@ THE SOFTWARE. - { - { FT_SERVICE_ID_BDF, &pcf_service_bdf }, - { FT_SERVICE_ID_FONT_FORMAT, FT_FONT_FORMAT_PCF }, -+ { FT_SERVICE_ID_PROPERTIES, &pcf_service_properties }, - { NULL, NULL } - }; - -@@ -694,7 +801,14 @@ THE SOFTWARE. - FT_CALLBACK_DEF( FT_Error ) - pcf_driver_init( FT_Module module ) /* PCF_Driver */ - { -+#ifdef PCF_CONFIG_OPTION_LONG_FAMILY_NAMES -+ PCF_Driver driver = (PCF_Driver)module; -+ -+ -+ driver->no_long_family_names = 0; -+#else - FT_UNUSED( module ); -+#endif - - return FT_Err_Ok; - } -diff --git a/src/pcf/pcfread.c b/src/pcf/pcfread.c -index 38ba110..3eacf2b 100644 ---- a/src/pcf/pcfread.c -+++ b/src/pcf/pcfread.c -@@ -1393,57 +1393,75 @@ THE SOFTWARE. - prop = pcf_find_property( face, "FAMILY_NAME" ); - if ( prop && prop->isString ) - { -- /* Prepend the foundry name plus a space to the family name. */ -- /* There are many fonts just called `Fixed' which look completely */ -- /* different, and which have nothing to do with each other. When */ -- /* selecting `Fixed' in KDE or Gnome one gets results that appear */ -- /* rather random, the style changes often if one changes the size */ -- /* and one cannot select some fonts at all. */ -- /* */ -- /* We also check whether we have `wide' characters; all put */ -- /* together, we get family names like `Sony Fixed' or `Misc Fixed */ -- /* Wide'. */ -- PCF_Property foundry_prop, point_size_prop, average_width_prop; -- -- int l = ft_strlen( prop->value.atom ) + 1; -- int wide = 0; -- -- -- foundry_prop = pcf_find_property( face, "FOUNDRY" ); -- point_size_prop = pcf_find_property( face, "POINT_SIZE" ); -- average_width_prop = pcf_find_property( face, "AVERAGE_WIDTH" ); -- -- if ( point_size_prop && average_width_prop ) -+ -+#ifdef PCF_CONFIG_OPTION_LONG_FAMILY_NAMES -+ -+ PCF_Driver driver = (PCF_Driver)FT_FACE_DRIVER( face ); -+ -+ -+ if ( !driver->no_long_family_names ) - { -- if ( average_width_prop->value.l >= point_size_prop->value.l ) -+ /* Prepend the foundry name plus a space to the family name. */ -+ /* There are many fonts just called `Fixed' which look */ -+ /* completely different, and which have nothing to do with each */ -+ /* other. When selecting `Fixed' in KDE or Gnome one gets */ -+ /* results that appear rather random, the style changes often if */ -+ /* one changes the size and one cannot select some fonts at all. */ -+ /* */ -+ /* We also check whether we have `wide' characters; all put */ -+ /* together, we get family names like `Sony Fixed' or `Misc */ -+ /* Fixed Wide'. */ -+ -+ PCF_Property foundry_prop, point_size_prop, average_width_prop; -+ -+ int l = ft_strlen( prop->value.atom ) + 1; -+ int wide = 0; -+ -+ -+ foundry_prop = pcf_find_property( face, "FOUNDRY" ); -+ point_size_prop = pcf_find_property( face, "POINT_SIZE" ); -+ average_width_prop = pcf_find_property( face, "AVERAGE_WIDTH" ); -+ -+ if ( point_size_prop && average_width_prop ) - { -- /* This font is at least square shaped or even wider */ -- wide = 1; -- l += ft_strlen( " Wide" ); -+ if ( average_width_prop->value.l >= point_size_prop->value.l ) -+ { -+ /* This font is at least square shaped or even wider */ -+ wide = 1; -+ l += ft_strlen( " Wide" ); -+ } - } -- } - -- if ( foundry_prop && foundry_prop->isString ) -- { -- l += ft_strlen( foundry_prop->value.atom ) + 1; -+ if ( foundry_prop && foundry_prop->isString ) -+ { -+ l += ft_strlen( foundry_prop->value.atom ) + 1; - -- if ( FT_NEW_ARRAY( root->family_name, l ) ) -- goto Exit; -+ if ( FT_NEW_ARRAY( root->family_name, l ) ) -+ goto Exit; -+ -+ ft_strcpy( root->family_name, foundry_prop->value.atom ); -+ ft_strcat( root->family_name, " " ); -+ ft_strcat( root->family_name, prop->value.atom ); -+ } -+ else -+ { -+ if ( FT_NEW_ARRAY( root->family_name, l ) ) -+ goto Exit; - -- ft_strcpy( root->family_name, foundry_prop->value.atom ); -- ft_strcat( root->family_name, " " ); -- ft_strcat( root->family_name, prop->value.atom ); -+ ft_strcpy( root->family_name, prop->value.atom ); -+ } -+ -+ if ( wide ) -+ ft_strcat( root->family_name, " Wide" ); - } - else -+ -+#endif /* PCF_CONFIG_OPTION_LONG_FAMILY_NAMES */ -+ - { -- if ( FT_NEW_ARRAY( root->family_name, l ) ) -+ if ( FT_STRDUP( root->family_name, prop->value.atom ) ) - goto Exit; -- -- ft_strcpy( root->family_name, prop->value.atom ); - } -- -- if ( wide ) -- ft_strcat( root->family_name, " Wide" ); - } - else - root->family_name = NULL; --- -cgit v1.0-41-gc330 - diff --git a/pkgs/development/libraries/freetype/pcf-introduce-driver.patch b/pkgs/development/libraries/freetype/pcf-introduce-driver.patch deleted file mode 100644 index c1685c5116cc..000000000000 --- a/pkgs/development/libraries/freetype/pcf-introduce-driver.patch +++ /dev/null @@ -1,68 +0,0 @@ -diff --git a/src/pcf/pcf.h b/src/pcf/pcf.h -index c726e5e..830cabe 100644 ---- a/src/pcf/pcf.h -+++ b/src/pcf/pcf.h -@@ -163,6 +163,13 @@ FT_BEGIN_HEADER - } PCF_FaceRec, *PCF_Face; - - -+ typedef struct PCF_DriverRec_ -+ { -+ FT_DriverRec root; -+ -+ } PCF_DriverRec, *PCF_Driver; -+ -+ - /* macros for pcf font format */ - - #define LSBFirst 0 -diff --git a/src/pcf/pcfdrivr.c b/src/pcf/pcfdrivr.c -index 10d5c20..8f4a90d 100644 ---- a/src/pcf/pcfdrivr.c -+++ b/src/pcf/pcfdrivr.c -@@ -691,22 +691,38 @@ THE SOFTWARE. - } - - -+ FT_CALLBACK_DEF( FT_Error ) -+ pcf_driver_init( FT_Module module ) /* PCF_Driver */ -+ { -+ FT_UNUSED( module ); -+ -+ return FT_Err_Ok; -+ } -+ -+ -+ FT_CALLBACK_DEF( void ) -+ pcf_driver_done( FT_Module module ) /* PCF_Driver */ -+ { -+ FT_UNUSED( module ); -+ } -+ -+ - FT_CALLBACK_TABLE_DEF - const FT_Driver_ClassRec pcf_driver_class = - { - { - FT_MODULE_FONT_DRIVER | - FT_MODULE_DRIVER_NO_OUTLINES, -- sizeof ( FT_DriverRec ), - -+ sizeof ( PCF_DriverRec ), - "pcf", - 0x10000L, - 0x20000L, - -- NULL, /* module-specific interface */ -+ NULL, /* module-specific interface */ - -- NULL, /* FT_Module_Constructor module_init */ -- NULL, /* FT_Module_Destructor module_done */ -+ pcf_driver_init, /* FT_Module_Constructor module_init */ -+ pcf_driver_done, /* FT_Module_Destructor module_done */ - pcf_driver_requester /* FT_Module_Requester get_interface */ - }, - --- -cgit v1.0-41-gc330 - diff --git a/pkgs/development/libraries/gdk-pixbuf/default.nix b/pkgs/development/libraries/gdk-pixbuf/default.nix index a1a9b10fca63..6bfa6bdc2fb9 100644 --- a/pkgs/development/libraries/gdk-pixbuf/default.nix +++ b/pkgs/development/libraries/gdk-pixbuf/default.nix @@ -1,5 +1,5 @@ { stdenv, fetchurl, pkgconfig, glib, libtiff, libjpeg, libpng, libX11, gnome3 -, jasper, libintlOrEmpty, gobjectIntrospection, doCheck ? false }: +, jasper, gobjectIntrospection, doCheck ? false }: let pname = "gdk-pixbuf"; @@ -22,7 +22,7 @@ stdenv.mkDerivation rec { enableParallelBuilding = true; # !!! We might want to factor out the gdk-pixbuf-xlib subpackage. - buildInputs = [ libX11 gobjectIntrospection ] ++ libintlOrEmpty; + buildInputs = [ libX11 gobjectIntrospection ]; nativeBuildInputs = [ pkgconfig ]; @@ -61,4 +61,3 @@ stdenv.mkDerivation rec { platforms = platforms.unix; }; } - diff --git a/pkgs/development/libraries/gegl/3.0.nix b/pkgs/development/libraries/gegl/3.0.nix index 03f6054791e4..bc708cf03d2a 100644 --- a/pkgs/development/libraries/gegl/3.0.nix +++ b/pkgs/development/libraries/gegl/3.0.nix @@ -1,6 +1,6 @@ { stdenv, fetchurl, pkgconfig, glib, babl, libpng, cairo, libjpeg, which , librsvg, pango, gtk, bzip2, json-glib, intltool, autoreconfHook, libraw -, libwebp, gnome3 }: +, libwebp, gnome3, libintl }: stdenv.mkDerivation rec { name = "gegl-0.3.28"; @@ -10,8 +10,6 @@ stdenv.mkDerivation rec { sha256 = "1zr3gmmzjhp2d3d3h51x80r5q7gs9rv67ywx69sif6as99h8fbqm"; }; - NIX_LDFLAGS = stdenv.lib.optionalString stdenv.isDarwin "-lintl"; - hardeningDisable = [ "format" ]; # needs fonts otherwise don't know how to pass them @@ -28,7 +26,7 @@ stdenv.mkDerivation rec { propagatedBuildInputs = [ glib json-glib babl ]; # for gegl-3.0.pc - nativeBuildInputs = [ pkgconfig intltool which autoreconfHook ]; + nativeBuildInputs = [ pkgconfig intltool which autoreconfHook libintl ]; meta = with stdenv.lib; { description = "Graph-based image processing framework"; diff --git a/pkgs/development/libraries/gegl/default.nix b/pkgs/development/libraries/gegl/default.nix index 304d8110ad46..8c93428a0780 100644 --- a/pkgs/development/libraries/gegl/default.nix +++ b/pkgs/development/libraries/gegl/default.nix @@ -1,5 +1,5 @@ { stdenv, fetchurl, pkgconfig, glib, babl, libpng, cairo, libjpeg -, librsvg, pango, gtk2, bzip2, intltool +, librsvg, pango, gtk2, bzip2, intltool, libintl , OpenGL ? null }: stdenv.mkDerivation rec { @@ -20,14 +20,12 @@ stdenv.mkDerivation rec { # needs fonts otherwise don't know how to pass them configureFlags = "--disable-docs"; - NIX_LDFLAGS = if stdenv.isDarwin then "-lintl" else null; - - buildInputs = [ babl libpng cairo libjpeg librsvg pango gtk2 bzip2 intltool ] + buildInputs = [ babl libpng cairo libjpeg librsvg pango gtk2 bzip2 intltool libintl ] ++ stdenv.lib.optional stdenv.isDarwin OpenGL; nativeBuildInputs = [ pkgconfig ]; - meta = { + meta = { description = "Graph-based image processing framework"; homepage = http://www.gegl.org; license = stdenv.lib.licenses.gpl3; diff --git a/pkgs/development/libraries/geoclue/2.0.nix b/pkgs/development/libraries/geoclue/2.0.nix index b70163789dec..495a113391e3 100644 --- a/pkgs/development/libraries/geoclue/2.0.nix +++ b/pkgs/development/libraries/geoclue/2.0.nix @@ -1,4 +1,4 @@ -{ fetchurl, stdenv, intltool, libintlOrEmpty, pkgconfig, glib, json-glib, libsoup, geoip +{ fetchurl, stdenv, intltool, pkgconfig, glib, json-glib, libsoup, geoip , dbus, dbus-glib, modemmanager, avahi, glib-networking, wrapGAppsHook, gobjectIntrospection }: @@ -18,8 +18,7 @@ stdenv.mkDerivation rec { pkgconfig intltool wrapGAppsHook gobjectIntrospection ]; - buildInputs = libintlOrEmpty ++ - [ glib json-glib libsoup geoip + buildInputs = [ glib json-glib libsoup geoip dbus dbus-glib avahi ] ++ optionals (!stdenv.isDarwin) [ modemmanager ]; @@ -37,8 +36,6 @@ stdenv.mkDerivation rec { "--disable-modem-gps-source" "--disable-nmea-source" ]; - NIX_CFLAGS_COMPILE = optionalString stdenv.isDarwin " -lintl"; - postInstall = '' sed -i $dev/lib/pkgconfig/libgeoclue-2.0.pc -e "s|includedir=.*|includedir=$dev/include|" ''; diff --git a/pkgs/development/libraries/gettext/default.nix b/pkgs/development/libraries/gettext/default.nix index 9c3024ce25fb..6dec7747c7e8 100644 --- a/pkgs/development/libraries/gettext/default.nix +++ b/pkgs/development/libraries/gettext/default.nix @@ -49,6 +49,7 @@ stdenv.mkDerivation rec { buildInputs = stdenv.lib.optional (!stdenv.isLinux && !hostPlatform.isCygwin) libiconv; setupHook = ./gettext-setup-hook.sh; + gettextNeedsLdflags = hostPlatform.libc != "glibc" && !hostPlatform.isMusl; enableParallelBuilding = true; diff --git a/pkgs/development/libraries/gettext/gettext-setup-hook.sh b/pkgs/development/libraries/gettext/gettext-setup-hook.sh index 5932ef6a44f9..074d313e48aa 100644 --- a/pkgs/development/libraries/gettext/gettext-setup-hook.sh +++ b/pkgs/development/libraries/gettext/gettext-setup-hook.sh @@ -5,3 +5,24 @@ gettextDataDirsHook() { } addEnvHooks "$hostOffset" gettextDataDirsHook + +# libintl must be listed in load flags on non-Glibc +# it doesn't hurt to have it in Glibc either though +gettextLdflags() { + # The `depHostOffset` describes how the host platform of the dependencies + # are slid relative to the depending package. It is brought into scope of + # the environment hook defined as the role of the dependency being applied. + case $depHostOffset in + -1) local role='BUILD_' ;; + 0) local role='' ;; + 1) local role='TARGET_' ;; + *) echo "cc-wrapper: Error: Cannot be used with $depHostOffset-offset deps" >2; + return 1 ;; + esac + + export NIX_${role}LDFLAGS+=" -lintl" +} + +if [ ! -z "@gettextNeedsLdflags@" ]; then + addEnvHooks "$hostOffset" gettextLdflags +fi diff --git a/pkgs/development/libraries/glib-networking/default.nix b/pkgs/development/libraries/glib-networking/default.nix index 2e0e8cbb910e..ec3e9077e934 100644 --- a/pkgs/development/libraries/glib-networking/default.nix +++ b/pkgs/development/libraries/glib-networking/default.nix @@ -47,4 +47,3 @@ stdenv.mkDerivation rec { platforms = platforms.unix; }; } - diff --git a/pkgs/development/libraries/glib/default.nix b/pkgs/development/libraries/glib/default.nix index 2c070ff3fa8c..d2dc9a8c637b 100644 --- a/pkgs/development/libraries/glib/default.nix +++ b/pkgs/development/libraries/glib/default.nix @@ -1,5 +1,5 @@ -{ stdenv, hostPlatform, fetchurl, pkgconfig, gettext, perl, python -, libiconv, libintlOrEmpty, zlib, libffi, pcre, libelf, gnome3 +{ stdenv, hostPlatform, fetchurl, gettext, pkgconfig, perl, python +, libiconv, zlib, libffi, pcre, libelf, gnome3 # use utillinuxMinimal to avoid circular dependency (utillinux, systemd, glib) , utillinuxMinimal ? null @@ -66,17 +66,13 @@ stdenv.mkDerivation rec { ++ optionals stdenv.isLinux [ utillinuxMinimal ] # for libmount ++ optionals doCheck [ tzdata libxml2 desktop-file-utils shared-mime-info ]; - nativeBuildInputs = [ pkgconfig gettext perl python ]; + nativeBuildInputs = [ pkgconfig perl python ]; - propagatedBuildInputs = [ zlib libffi libiconv ] - ++ libintlOrEmpty; + propagatedBuildInputs = [ zlib libffi gettext libiconv ]; # internal pcre would only add <200kB, but it's relatively common configureFlags = [ "--with-pcre=system" ] ++ optional stdenv.isDarwin "--disable-compile-warnings" - # glibc inclues GNU libiconv, but Darwin's iconv function is good enonugh. - ++ optional (stdenv.hostPlatform.libc != "glibc" && !stdenv.hostPlatform.isDarwin) - "--with-libiconv=gnu" ++ optional stdenv.isSunOS "--disable-dtrace" # Can't run this test when cross-compiling ++ optionals (stdenv.hostPlatform != stdenv.buildPlatform) @@ -84,8 +80,7 @@ stdenv.mkDerivation rec { # GElf only supports elf64 hosts ++ optional (!stdenv.hostPlatform.is64bit) "--disable-libelf"; - NIX_CFLAGS_COMPILE = optional stdenv.isDarwin "-lintl" - ++ optional stdenv.isSunOS "-DBSD_COMP"; + NIX_CFLAGS_COMPILE = optional stdenv.isSunOS "-DBSD_COMP"; preConfigure = optionalString stdenv.isSunOS '' sed -i -e 's|inotify.h|foobar-inotify.h|g' configure diff --git a/pkgs/development/libraries/glibc/2.27.nix b/pkgs/development/libraries/glibc/2.27.nix deleted file mode 100644 index bb057ae899e7..000000000000 --- a/pkgs/development/libraries/glibc/2.27.nix +++ /dev/null @@ -1,101 +0,0 @@ -{ stdenv, callPackage -, withLinuxHeaders ? true -, installLocales ? true -, profilingLibraries ? false -, withGd ? false -}: - -assert stdenv.cc.isGNU; - -callPackage ./common-2.27.nix { inherit stdenv; } { - name = "glibc" + stdenv.lib.optionalString withGd "-gd"; - - inherit withLinuxHeaders profilingLibraries installLocales withGd; - - NIX_NO_SELF_RPATH = true; - - postConfigure = '' - # Hack: get rid of the `-static' flag set by the bootstrap stdenv. - # This has to be done *after* `configure' because it builds some - # test binaries. - export NIX_CFLAGS_LINK= - export NIX_LDFLAGS_BEFORE= - - export NIX_DONT_SET_RPATH=1 - unset CFLAGS - - # Apparently --bindir is not respected. - makeFlagsArray+=("bindir=$bin/bin" "sbindir=$bin/sbin" "rootsbindir=$bin/sbin") - ''; - - # The stackprotector and fortify hardening flags are autodetected by glibc - # and enabled by default if supported. Setting it for every gcc invocation - # does not work. - hardeningDisable = [ "stackprotector" "fortify" ]; - - # When building glibc from bootstrap-tools, we need libgcc_s at RPATH for - # any program we run, because the gcc will have been placed at a new - # store path than that determined when built (as a source for the - # bootstrap-tools tarball) - # Building from a proper gcc staying in the path where it was installed, - # libgcc_s will not be at {gcc}/lib, and gcc's libgcc will be found without - # any special hack. - preInstall = '' - if [ -f ${stdenv.cc.cc}/lib/libgcc_s.so.1 ]; then - mkdir -p $out/lib - cp ${stdenv.cc.cc}/lib/libgcc_s.so.1 $out/lib/libgcc_s.so.1 - # the .so It used to be a symlink, but now it is a script - cp -a ${stdenv.cc.cc}/lib/libgcc_s.so $out/lib/libgcc_s.so - fi - ''; - - postInstall = '' - if test -n "$installLocales"; then - make -j''${NIX_BUILD_CORES:-1} -l''${NIX_BUILD_CORES:-1} localedata/install-locales - fi - - test -f $out/etc/ld.so.cache && rm $out/etc/ld.so.cache - - if test -n "$linuxHeaders"; then - # Include the Linux kernel headers in Glibc, except the `scsi' - # subdirectory, which Glibc provides itself. - (cd $dev/include && \ - ln -sv $(ls -d $linuxHeaders/include/* | grep -v scsi\$) .) - fi - - # Fix for NIXOS-54 (ldd not working on x86_64). Make a symlink - # "lib64" to "lib". - if test -n "$is64bit"; then - ln -s lib $out/lib64 - fi - - # Get rid of more unnecessary stuff. - rm -rf $out/var $bin/bin/sln - - # For some reason these aren't stripped otherwise and retain reference - # to bootstrap-tools; on cross-arm this stripping would break objects. - if [ -z "$crossConfig" ]; then - for i in "$out"/lib/*.a; do - [ "$i" = "$out/lib/libm.a" ] || strip -S "$i" - done - fi - - # Put libraries for static linking in a separate output. Note - # that libc_nonshared.a and libpthread_nonshared.a are required - # for dynamically-linked applications. - mkdir -p $static/lib - mv $out/lib/*.a $static/lib - mv $static/lib/lib*_nonshared.a $out/lib - # Some of *.a files are linker scripts where moving broke the paths. - sed "/^GROUP/s|$out/lib/lib|$static/lib/lib|g" \ - -i "$static"/lib/*.a - - # Work around a Nix bug: hard links across outputs cause a build failure. - cp $bin/bin/getconf $bin/bin/getconf_ - mv $bin/bin/getconf_ $bin/bin/getconf - ''; - - separateDebugInfo = true; - - meta.description = "The GNU C Library"; - } diff --git a/pkgs/development/libraries/glibc/common-2.27.nix b/pkgs/development/libraries/glibc/common-2.27.nix deleted file mode 100644 index 4a5b31245c1c..000000000000 --- a/pkgs/development/libraries/glibc/common-2.27.nix +++ /dev/null @@ -1,216 +0,0 @@ -/* Build configuration used to build glibc, Info files, and locale - information. */ - -{ stdenv, lib -, buildPlatform, hostPlatform -, buildPackages -, fetchurl, fetchpatch ? null -, linuxHeaders ? null -, gd ? null, libpng ? null -, bison -}: - -{ name -, withLinuxHeaders ? false -, profilingLibraries ? false -, installLocales ? false -, withGd ? false -, meta -, ... -} @ args: - -let - version = "2.27"; - patchSuffix = ""; - sha256 = "0wpwq7gsm7sd6ysidv0z575ckqdg13cr2njyfgrbgh4f65adwwji"; - cross = if buildPlatform != hostPlatform then hostPlatform else null; -in - -assert withLinuxHeaders -> linuxHeaders != null; -assert withGd -> gd != null && libpng != null; - -stdenv.mkDerivation ({ - inherit installLocales; - linuxHeaders = if withLinuxHeaders then linuxHeaders else null; - - # The host/target system. - crossConfig = if cross != null then cross.config else null; - - inherit (stdenv) is64bit; - - enableParallelBuilding = true; - - patches = - [ - /* Have rpcgen(1) look for cpp(1) in $PATH. */ - ./rpcgen-path.patch - - /* Allow NixOS and Nix to handle the locale-archive. */ - ./nix-locale-archive-2.27.patch - - /* Don't use /etc/ld.so.cache, for non-NixOS systems. */ - ./dont-use-system-ld-so-cache-2.27.patch - - /* Don't use /etc/ld.so.preload, but /etc/ld-nix.so.preload. */ - ./dont-use-system-ld-so-preload.patch - - /* The command "getconf CS_PATH" returns the default search path - "/bin:/usr/bin", which is inappropriate on NixOS machines. This - patch extends the search path by "/run/current-system/sw/bin". */ - ./fix_path_attribute_in_getconf.patch - - /* Allow running with RHEL 6 -like kernels. The patch adds an exception - for glibc to accept 2.6.32 and to tag the ELFs as 2.6.32-compatible - (otherwise the loader would refuse libc). - Note that glibc will fully work only on their heavily patched kernels - and we lose early mismatch detection on 2.6.32. - - On major glibc updates we should check that the patched kernel supports - all the required features. ATM it's verified up to glibc-2.26-131. - # HOWTO: check glibc sources for changes in kernel requirements - git log -p glibc-2.25.. sysdeps/unix/sysv/linux/x86_64/kernel-features.h sysdeps/unix/sysv/linux/kernel-features.h - # get kernel sources (update the URL) - mkdir tmp && cd tmp - curl http://vault.centos.org/6.9/os/Source/SPackages/kernel-2.6.32-696.el6.src.rpm | rpm2cpio - | cpio -idmv - tar xf linux-*.bz2 - # check syscall presence, for example - less linux-*?/arch/x86/kernel/syscall_table_32.S - */ - ./allow-kernel-2.6.32.patch - ] - ++ lib.optional stdenv.isx86_64 ./fix-x64-abi.patch - ++ lib.optional stdenv.hostPlatform.isMusl - (fetchpatch { - name = "fix-with-musl.patch"; - url = "https://sourceware.org/bugzilla/attachment.cgi?id=10151&action=diff&collapsed=&headers=1&format=raw"; - sha256 = "18kk534k6da5bkbsy1ivbi77iin76lsna168mfcbwv4ik5vpziq2"; - }); - - postPatch = - '' - # Needed for glibc to build with the gnumake 3.82 - # http://comments.gmane.org/gmane.linux.lfs.support/31227 - sed -i 's/ot \$/ot:\n\ttouch $@\n$/' manual/Makefile - - # nscd needs libgcc, and we don't want it dynamically linked - # because we don't want it to depend on bootstrap-tools libs. - echo "LDFLAGS-nscd += -static-libgcc" >> nscd/Makefile - ''; - - configureFlags = - [ "-C" - "--enable-add-ons" - "--enable-obsolete-nsl" - "--enable-obsolete-rpc" - "--sysconfdir=/etc" - "--enable-stackguard-randomization" - (if withLinuxHeaders - then "--with-headers=${linuxHeaders}/include" - else "--without-headers") - (if profilingLibraries - then "--enable-profile" - else "--disable-profile") - ] ++ lib.optionals withLinuxHeaders [ - "--enable-kernel=3.2.0" # can't get below with glibc >= 2.26 - ] ++ lib.optionals (cross != null) [ - (if cross ? float && cross.float == "soft" then "--without-fp" else "--with-fp") - ] ++ lib.optionals (cross != null) [ - "--with-__thread" - ] ++ lib.optionals (cross == null && stdenv.isArm) [ - "--host=arm-linux-gnueabi" - "--build=arm-linux-gnueabi" - - # To avoid linking with -lgcc_s (dynamic link) - # so the glibc does not depend on its compiler store path - "libc_cv_as_needed=no" - ] ++ lib.optional withGd "--with-gd"; - - installFlags = [ "sysconfdir=$(out)/etc" ]; - - outputs = [ "out" "bin" "dev" "static" ]; - - depsBuildBuild = [ buildPackages.stdenv.cc ]; - nativeBuildInputs = [ bison ]; - buildInputs = lib.optionals withGd [ gd libpng ]; - - # Needed to install share/zoneinfo/zone.tab. Set to impure /bin/sh to - # prevent a retained dependency on the bootstrap tools in the stdenv-linux - # bootstrap. - BASH_SHELL = "/bin/sh"; -} - -// (removeAttrs args [ "withLinuxHeaders" "withGd" ]) // - -{ - name = name + "-${version}${patchSuffix}"; - - src = fetchurl { - url = "mirror://gnu/glibc/glibc-${version}.tar.xz"; - inherit sha256; - }; - - # Remove absolute paths from `configure' & co.; build out-of-tree. - preConfigure = '' - export PWD_P=$(type -tP pwd) - for i in configure io/ftwtest-sh; do - # Can't use substituteInPlace here because replace hasn't been - # built yet in the bootstrap. - sed -i "$i" -e "s^/bin/pwd^$PWD_P^g" - done - - mkdir ../build - cd ../build - - configureScript="`pwd`/../$sourceRoot/configure" - - ${lib.optionalString (stdenv.cc.libc != null) - ''makeFlags="$makeFlags BUILD_LDFLAGS=-Wl,-rpath,${stdenv.cc.libc}/lib"'' - } - - - '' + lib.optionalString (cross != null) '' - sed -i s/-lgcc_eh//g "../$sourceRoot/Makeconfig" - - cat > config.cache << "EOF" - libc_cv_forced_unwind=yes - libc_cv_c_cleanup=yes - libc_cv_gnu89_inline=yes - EOF - ''; - - preBuild = lib.optionalString withGd "unset NIX_DONT_SET_RPATH"; - - meta = { - homepage = http://www.gnu.org/software/libc/; - description = "The GNU C Library"; - - longDescription = - '' Any Unix-like operating system needs a C library: the library which - defines the "system calls" and other basic facilities such as - open, malloc, printf, exit... - - The GNU C library is used as the C library in the GNU system and - most systems with the Linux kernel. - ''; - - license = lib.licenses.lgpl2Plus; - - maintainers = [ lib.maintainers.eelco ]; - platforms = lib.platforms.linux; - } // meta; - - passthru = { inherit version; }; -} - -// lib.optionalAttrs (cross != null) { - preInstall = null; # clobber the native hook - - dontStrip = true; - - separateDebugInfo = false; # this is currently broken for crossDrv - - # To avoid a dependency on the build system 'bash'. - preFixup = '' - rm -f $bin/bin/{ldd,tzselect,catchsegv,xtrace} - ''; -}) diff --git a/pkgs/development/libraries/glibc/common.nix b/pkgs/development/libraries/glibc/common.nix index c8e5b4562856..517c98e9f644 100644 --- a/pkgs/development/libraries/glibc/common.nix +++ b/pkgs/development/libraries/glibc/common.nix @@ -7,6 +7,7 @@ , fetchurl, fetchpatch ? null , linuxHeaders ? null , gd ? null, libpng ? null +, bison }: { name @@ -19,9 +20,9 @@ } @ args: let - version = "2.26"; - patchSuffix = "-131"; - sha256 = "1ggnj1hzjym7sn93rbwydcqd562q73lsb7g7kd199g6j9j9hlkp5"; + version = "2.27"; + patchSuffix = ""; + sha256 = "0wpwq7gsm7sd6ysidv0z575ckqdg13cr2njyfgrbgh4f65adwwji"; cross = if buildPlatform != hostPlatform then hostPlatform else null; in @@ -29,7 +30,7 @@ assert withLinuxHeaders -> linuxHeaders != null; assert withGd -> gd != null && libpng != null; stdenv.mkDerivation ({ - inherit installLocales; + inherit version installLocales; linuxHeaders = if withLinuxHeaders then linuxHeaders else null; # The host/target system. @@ -41,17 +42,6 @@ stdenv.mkDerivation ({ patches = [ - /* No tarballs for stable upstream branch, only https://sourceware.org/git/?p=glibc.git - $ git co release/2.25/master; git describe - glibc-2.25-49-gbc5ace67fe - $ git show --reverse glibc-2.25..release/2.25/master | gzip -n -9 --rsyncable - > 2.25-49.patch.gz - */ - ./2.26-75.patch.gz - ./2.26-75to115.diff.gz - # contains fix for CVE-2018-1000001 as the last commit: - # https://sourceware.org/git/?p=glibc.git;a=commit;h=fabef2edbc - ./2.26-115to131.diff.gz - /* Have rpcgen(1) look for cpp(1) in $PATH. */ ./rpcgen-path.patch @@ -97,24 +87,14 @@ stdenv.mkDerivation ({ }); postPatch = - # Needed for glibc to build with the gnumake 3.82 - # http://comments.gmane.org/gmane.linux.lfs.support/31227 '' + # Needed for glibc to build with the gnumake 3.82 + # http://comments.gmane.org/gmane.linux.lfs.support/31227 sed -i 's/ot \$/ot:\n\ttouch $@\n$/' manual/Makefile - '' - # nscd needs libgcc, and we don't want it dynamically linked - # because we don't want it to depend on bootstrap-tools libs. - + '' + + # nscd needs libgcc, and we don't want it dynamically linked + # because we don't want it to depend on bootstrap-tools libs. echo "LDFLAGS-nscd += -static-libgcc" >> nscd/Makefile - '' - # Replace the date and time in nscd by a prefix of $out. - # It is used as a protocol compatibility check. - # Note: the size of the struct changes, but using only a part - # would break hash-rewriting. When receiving stats it does check - # that the struct sizes match and can't cause overflow or something. - + '' - cat ${./glibc-remove-datetime-from-nscd.patch} \ - | sed "s,@out@,$out," | patch -p1 ''; configureFlags = @@ -150,6 +130,7 @@ stdenv.mkDerivation ({ outputs = [ "out" "bin" "dev" "static" ]; depsBuildBuild = [ buildPackages.stdenv.cc ]; + nativeBuildInputs = [ bison ]; buildInputs = lib.optionals withGd [ gd libpng ]; # Needed to install share/zoneinfo/zone.tab. Set to impure /bin/sh to diff --git a/pkgs/development/libraries/glibc/dont-use-system-ld-so-cache-2.27.patch b/pkgs/development/libraries/glibc/dont-use-system-ld-so-cache-2.27.patch deleted file mode 100644 index f84b1049adf8..000000000000 --- a/pkgs/development/libraries/glibc/dont-use-system-ld-so-cache-2.27.patch +++ /dev/null @@ -1,46 +0,0 @@ -diff -Naur glibc-2.27-orig/elf/ldconfig.c glibc-2.27/elf/ldconfig.c ---- glibc-2.27-orig/elf/ldconfig.c 2018-02-01 11:17:18.000000000 -0500 -+++ glibc-2.27/elf/ldconfig.c 2018-02-17 22:43:17.232175182 -0500 -@@ -51,7 +51,7 @@ - #endif - - #ifndef LD_SO_CONF --# define LD_SO_CONF SYSCONFDIR "/ld.so.conf" -+# define LD_SO_CONF PREFIX "/etc/ld.so.conf" - #endif - - /* Get libc version number. */ -diff -Naur glibc-2.27-orig/elf/Makefile glibc-2.27/elf/Makefile ---- glibc-2.27-orig/elf/Makefile 2018-02-01 11:17:18.000000000 -0500 -+++ glibc-2.27/elf/Makefile 2018-02-17 22:44:50.334006750 -0500 -@@ -559,13 +559,13 @@ - - $(objpfx)ldconfig: $(ldconfig-modules:%=$(objpfx)%.o) - --SYSCONF-FLAGS := -D'SYSCONFDIR="$(sysconfdir)"' --CFLAGS-ldconfig.c += $(SYSCONF-FLAGS) -D'LIBDIR="$(libdir)"' \ -+PREFIX-FLAGS := -D'PREFIX="$(prefix)"' -+CFLAGS-ldconfig.c += $(PREFIX-FLAGS) -D'LIBDIR="$(libdir)"' \ - -D'SLIBDIR="$(slibdir)"' - libof-ldconfig = ldconfig --CFLAGS-dl-cache.c += $(SYSCONF-FLAGS) --CFLAGS-cache.c += $(SYSCONF-FLAGS) --CFLAGS-rtld.c += $(SYSCONF-FLAGS) -+CFLAGS-dl-cache.c += $(PREFIX-FLAGS) -+CFLAGS-cache.c += $(PREFIX-FLAGS) -+CFLAGS-rtld.c += $(PREFIX-FLAGS) - - cpp-srcs-left := $(all-rtld-routines:=.os) - lib := rtld -diff -Naur glibc-2.27-orig/sysdeps/generic/dl-cache.h glibc-2.27/sysdeps/generic/dl-cache.h ---- glibc-2.27-orig/sysdeps/generic/dl-cache.h 2018-02-01 11:17:18.000000000 -0500 -+++ glibc-2.27/sysdeps/generic/dl-cache.h 2018-02-17 22:45:20.471598816 -0500 -@@ -28,7 +28,7 @@ - #endif - - #ifndef LD_SO_CACHE --# define LD_SO_CACHE SYSCONFDIR "/ld.so.cache" -+# define LD_SO_CACHE PREFIX "/etc/ld.so.cache" - #endif - - #ifndef add_system_dir diff --git a/pkgs/development/libraries/glibc/dont-use-system-ld-so-cache.patch b/pkgs/development/libraries/glibc/dont-use-system-ld-so-cache.patch index fc14553c3ee0..f84b1049adf8 100644 --- a/pkgs/development/libraries/glibc/dont-use-system-ld-so-cache.patch +++ b/pkgs/development/libraries/glibc/dont-use-system-ld-so-cache.patch @@ -1,7 +1,7 @@ -diff -ru glibc-2.16.0-orig/elf/ldconfig.c glibc-2.16.0/elf/ldconfig.c ---- glibc-2.16.0-orig/elf/ldconfig.c 2012-06-30 15:12:34.000000000 -0400 -+++ glibc-2.16.0/elf/ldconfig.c 2012-09-18 11:59:27.463284814 -0400 -@@ -50,7 +50,7 @@ +diff -Naur glibc-2.27-orig/elf/ldconfig.c glibc-2.27/elf/ldconfig.c +--- glibc-2.27-orig/elf/ldconfig.c 2018-02-01 11:17:18.000000000 -0500 ++++ glibc-2.27/elf/ldconfig.c 2018-02-17 22:43:17.232175182 -0500 +@@ -51,7 +51,7 @@ #endif #ifndef LD_SO_CONF @@ -10,31 +10,31 @@ diff -ru glibc-2.16.0-orig/elf/ldconfig.c glibc-2.16.0/elf/ldconfig.c #endif /* Get libc version number. */ -diff -ru glibc-2.16.0-orig/elf/Makefile glibc-2.16.0/elf/Makefile ---- glibc-2.16.0-orig/elf/Makefile 2012-06-30 15:12:34.000000000 -0400 -+++ glibc-2.16.0/elf/Makefile 2012-09-18 12:03:30.031955196 -0400 -@@ -415,12 +415,12 @@ +diff -Naur glibc-2.27-orig/elf/Makefile glibc-2.27/elf/Makefile +--- glibc-2.27-orig/elf/Makefile 2018-02-01 11:17:18.000000000 -0500 ++++ glibc-2.27/elf/Makefile 2018-02-17 22:44:50.334006750 -0500 +@@ -559,13 +559,13 @@ $(objpfx)ldconfig: $(ldconfig-modules:%=$(objpfx)%.o) -SYSCONF-FLAGS := -D'SYSCONFDIR="$(sysconfdir)"' --CFLAGS-ldconfig.c = $(SYSCONF-FLAGS) -D'LIBDIR="$(libdir)"' \ +-CFLAGS-ldconfig.c += $(SYSCONF-FLAGS) -D'LIBDIR="$(libdir)"' \ +PREFIX-FLAGS := -D'PREFIX="$(prefix)"' -+CFLAGS-ldconfig.c = $(PREFIX-FLAGS) -D'LIBDIR="$(libdir)"' \ ++CFLAGS-ldconfig.c += $(PREFIX-FLAGS) -D'LIBDIR="$(libdir)"' \ -D'SLIBDIR="$(slibdir)"' libof-ldconfig = ldconfig --CFLAGS-dl-cache.c = $(SYSCONF-FLAGS) --CFLAGS-cache.c = $(SYSCONF-FLAGS) --CFLAGS-rtld.c = $(SYSCONF-FLAGS) -+CFLAGS-dl-cache.c = $(PREFIX-FLAGS) -+CFLAGS-cache.c = $(PREFIX-FLAGS) -+CFLAGS-rtld.c = $(PREFIX-FLAGS) +-CFLAGS-dl-cache.c += $(SYSCONF-FLAGS) +-CFLAGS-cache.c += $(SYSCONF-FLAGS) +-CFLAGS-rtld.c += $(SYSCONF-FLAGS) ++CFLAGS-dl-cache.c += $(PREFIX-FLAGS) ++CFLAGS-cache.c += $(PREFIX-FLAGS) ++CFLAGS-rtld.c += $(PREFIX-FLAGS) cpp-srcs-left := $(all-rtld-routines:=.os) lib := rtld -diff -ru glibc-2.16.0-orig/sysdeps/generic/dl-cache.h glibc-2.16.0/sysdeps/generic/dl-cache.h ---- glibc-2.16.0-orig/sysdeps/generic/dl-cache.h 2012-06-30 15:12:34.000000000 -0400 -+++ glibc-2.16.0/sysdeps/generic/dl-cache.h 2012-09-18 11:59:27.465284809 -0400 +diff -Naur glibc-2.27-orig/sysdeps/generic/dl-cache.h glibc-2.27/sysdeps/generic/dl-cache.h +--- glibc-2.27-orig/sysdeps/generic/dl-cache.h 2018-02-01 11:17:18.000000000 -0500 ++++ glibc-2.27/sysdeps/generic/dl-cache.h 2018-02-17 22:45:20.471598816 -0500 @@ -28,7 +28,7 @@ #endif diff --git a/pkgs/development/libraries/glibc/nix-locale-archive-2.27.patch b/pkgs/development/libraries/glibc/nix-locale-archive-2.27.patch deleted file mode 100644 index 39312951fcf9..000000000000 --- a/pkgs/development/libraries/glibc/nix-locale-archive-2.27.patch +++ /dev/null @@ -1,118 +0,0 @@ -diff -Naur glibc-2.27-orig/locale/loadarchive.c glibc-2.27/locale/loadarchive.c ---- glibc-2.27-orig/locale/loadarchive.c 2018-02-01 11:17:18.000000000 -0500 -+++ glibc-2.27/locale/loadarchive.c 2018-02-17 22:32:25.680169462 -0500 -@@ -123,6 +123,23 @@ - return MAX (namehash_end, MAX (string_end, locrectab_end)); - } - -+static int -+open_locale_archive (void) -+{ -+ int fd = -1; -+ char *versioned_path = getenv ("LOCALE_ARCHIVE_2_27"); -+ char *path = getenv ("LOCALE_ARCHIVE"); -+ if (versioned_path) -+ fd = __open_nocancel (versioned_path, O_RDONLY|O_LARGEFILE|O_CLOEXEC); -+ if (path && fd < 0) -+ fd = __open_nocancel (path, O_RDONLY|O_LARGEFILE|O_CLOEXEC); -+ if (fd < 0) -+ fd = __open_nocancel (archfname, O_RDONLY|O_LARGEFILE|O_CLOEXEC); -+ if (fd < 0) -+ fd = __open_nocancel ("/usr/lib/locale/locale-archive", O_RDONLY|O_LARGEFILE|O_CLOEXEC); -+ return fd; -+} -+ - - /* Find the locale *NAMEP in the locale archive, and return the - internalized data structure for its CATEGORY data. If this locale has -@@ -202,7 +219,7 @@ - archmapped = &headmap; - - /* The archive has never been opened. */ -- fd = __open_nocancel (archfname, O_RDONLY|O_LARGEFILE|O_CLOEXEC); -+ fd = open_locale_archive (); - if (fd < 0) - /* Cannot open the archive, for whatever reason. */ - return NULL; -@@ -397,8 +414,7 @@ - if (fd == -1) - { - struct stat64 st; -- fd = __open_nocancel (archfname, -- O_RDONLY|O_LARGEFILE|O_CLOEXEC); -+ fd = open_locale_archive (); - if (fd == -1) - /* Cannot open the archive, for whatever reason. */ - return NULL; -diff -Naur glibc-2.27-orig/locale/programs/locale.c glibc-2.27/locale/programs/locale.c ---- glibc-2.27-orig/locale/programs/locale.c 2018-02-01 11:17:18.000000000 -0500 -+++ glibc-2.27/locale/programs/locale.c 2018-02-17 22:36:39.726293213 -0500 -@@ -633,6 +633,24 @@ - - - static int -+open_locale_archive (void) -+{ -+ int fd = -1; -+ char *versioned_path = getenv ("LOCALE_ARCHIVE_2_27"); -+ char *path = getenv ("LOCALE_ARCHIVE"); -+ if (versioned_path) -+ fd = open64 (versioned_path, O_RDONLY); -+ if (path && fd < 0) -+ fd = open64 (path, O_RDONLY); -+ if (fd < 0) -+ fd = open64 (ARCHIVE_NAME, O_RDONLY); -+ if (fd < 0) -+ fd = open64 ("/usr/lib/locale/locale-archive", O_RDONLY); -+ return fd; -+} -+ -+ -+static int - write_archive_locales (void **all_datap, char *linebuf) - { - struct stat64 st; -@@ -644,7 +662,7 @@ - int fd, ret = 0; - uint32_t cnt; - -- fd = open64 (ARCHIVE_NAME, O_RDONLY); -+ fd = open_locale_archive (); - if (fd < 0) - return 0; - -diff -Naur glibc-2.27-orig/locale/programs/locarchive.c glibc-2.27/locale/programs/locarchive.c ---- glibc-2.27-orig/locale/programs/locarchive.c 2018-02-01 11:17:18.000000000 -0500 -+++ glibc-2.27/locale/programs/locarchive.c 2018-02-17 22:40:51.245293975 -0500 -@@ -117,6 +117,22 @@ - } - - -+static int -+open_locale_archive (const char * archivefname, int flags) -+{ -+ int fd = -1; -+ char *versioned_path = getenv ("LOCALE_ARCHIVE_2_27"); -+ char *path = getenv ("LOCALE_ARCHIVE"); -+ if (versioned_path) -+ fd = open64 (versioned_path, flags); -+ if (path && fd < 0) -+ fd = open64 (path, flags); -+ if (fd < 0) -+ fd = open64 (archivefname, flags); -+ return fd; -+} -+ -+ - static void - create_archive (const char *archivefname, struct locarhandle *ah) - { -@@ -578,7 +594,7 @@ - while (1) - { - /* Open the archive. We must have exclusive write access. */ -- fd = open64 (archivefname, readonly ? O_RDONLY : O_RDWR); -+ fd = open_locale_archive (archivefname, readonly ? O_RDONLY : O_RDWR); - if (fd == -1) - { - /* Maybe the file does not yet exist? If we are opening diff --git a/pkgs/development/libraries/glibc/nix-locale-archive.patch b/pkgs/development/libraries/glibc/nix-locale-archive.patch index eeaf21901a39..39312951fcf9 100644 --- a/pkgs/development/libraries/glibc/nix-locale-archive.patch +++ b/pkgs/development/libraries/glibc/nix-locale-archive.patch @@ -1,114 +1,118 @@ -diff -ru glibc-2.16.0-orig/locale/loadarchive.c glibc-2.16.0/locale/loadarchive.c ---- glibc-2.16.0-orig/locale/loadarchive.c 2012-06-30 15:12:34.000000000 -0400 -+++ glibc-2.16.0/locale/loadarchive.c 2012-09-18 11:57:57.277515212 -0400 -@@ -123,6 +123,25 @@ +diff -Naur glibc-2.27-orig/locale/loadarchive.c glibc-2.27/locale/loadarchive.c +--- glibc-2.27-orig/locale/loadarchive.c 2018-02-01 11:17:18.000000000 -0500 ++++ glibc-2.27/locale/loadarchive.c 2018-02-17 22:32:25.680169462 -0500 +@@ -123,6 +123,23 @@ + return MAX (namehash_end, MAX (string_end, locrectab_end)); } - +static int +open_locale_archive (void) +{ + int fd = -1; -+ char *path = getenv ("LOCALE_ARCHIVE_2_11"); -+ char *path2 = getenv ("LOCALE_ARCHIVE"); -+ const char *usualpath = "/usr/lib/locale/locale-archive"; -+ if (path) -+ fd = open_not_cancel_2 (path, O_RDONLY|O_LARGEFILE|O_CLOEXEC); -+ if (path2 && fd < 0) -+ fd = open_not_cancel_2 (path2, O_RDONLY|O_LARGEFILE|O_CLOEXEC); ++ char *versioned_path = getenv ("LOCALE_ARCHIVE_2_27"); ++ char *path = getenv ("LOCALE_ARCHIVE"); ++ if (versioned_path) ++ fd = __open_nocancel (versioned_path, O_RDONLY|O_LARGEFILE|O_CLOEXEC); ++ if (path && fd < 0) ++ fd = __open_nocancel (path, O_RDONLY|O_LARGEFILE|O_CLOEXEC); + if (fd < 0) -+ fd = open_not_cancel_2 (archfname, O_RDONLY|O_LARGEFILE|O_CLOEXEC); ++ fd = __open_nocancel (archfname, O_RDONLY|O_LARGEFILE|O_CLOEXEC); + if (fd < 0) -+ fd = open_not_cancel_2 (usualpath, O_RDONLY|O_LARGEFILE|O_CLOEXEC); ++ fd = __open_nocancel ("/usr/lib/locale/locale-archive", O_RDONLY|O_LARGEFILE|O_CLOEXEC); + return fd; +} + -+ + /* Find the locale *NAMEP in the locale archive, and return the internalized data structure for its CATEGORY data. If this locale has - already been loaded from the archive, just returns the existing data -@@ -202,7 +221,7 @@ +@@ -202,7 +219,7 @@ archmapped = &headmap; /* The archive has never been opened. */ -- fd = open_not_cancel_2 (archfname, O_RDONLY|O_LARGEFILE|O_CLOEXEC); +- fd = __open_nocancel (archfname, O_RDONLY|O_LARGEFILE|O_CLOEXEC); + fd = open_locale_archive (); if (fd < 0) /* Cannot open the archive, for whatever reason. */ return NULL; -@@ -393,8 +412,7 @@ +@@ -397,8 +414,7 @@ if (fd == -1) { struct stat64 st; -- fd = open_not_cancel_2 (archfname, -- O_RDONLY|O_LARGEFILE|O_CLOEXEC); +- fd = __open_nocancel (archfname, +- O_RDONLY|O_LARGEFILE|O_CLOEXEC); + fd = open_locale_archive (); if (fd == -1) /* Cannot open the archive, for whatever reason. */ return NULL; -diff -ru glibc-2.16.0-orig/locale/programs/locale.c glibc-2.16.0/locale/programs/locale.c ---- glibc-2.16.0-orig/locale/programs/locale.c 2012-06-30 15:12:34.000000000 -0400 -+++ glibc-2.16.0/locale/programs/locale.c 2012-09-18 11:53:03.719920947 -0400 -@@ -628,6 +628,20 @@ - ((const struct nameent *) b)->name); - } +diff -Naur glibc-2.27-orig/locale/programs/locale.c glibc-2.27/locale/programs/locale.c +--- glibc-2.27-orig/locale/programs/locale.c 2018-02-01 11:17:18.000000000 -0500 ++++ glibc-2.27/locale/programs/locale.c 2018-02-17 22:36:39.726293213 -0500 +@@ -633,6 +633,24 @@ -+static int -+open_nix_locale_archive (const char * fname, int access) + + static int ++open_locale_archive (void) +{ + int fd = -1; -+ char *path = getenv ("LOCALE_ARCHIVE_2_11"); -+ char *path2 = getenv ("LOCALE_ARCHIVE"); -+ if (path) -+ fd = open64 (path, access); -+ if (path2 && fd < 0) -+ fd = open64 (path2, access); ++ char *versioned_path = getenv ("LOCALE_ARCHIVE_2_27"); ++ char *path = getenv ("LOCALE_ARCHIVE"); ++ if (versioned_path) ++ fd = open64 (versioned_path, O_RDONLY); ++ if (path && fd < 0) ++ fd = open64 (path, O_RDONLY); ++ if (fd < 0) ++ fd = open64 (ARCHIVE_NAME, O_RDONLY); + if (fd < 0) -+ fd = open64 (fname, access); ++ fd = open64 ("/usr/lib/locale/locale-archive", O_RDONLY); + return fd; +} - - static int ++ ++ ++static int write_archive_locales (void **all_datap, char *linebuf) -@@ -641,7 +655,7 @@ + { + struct stat64 st; +@@ -644,7 +662,7 @@ int fd, ret = 0; uint32_t cnt; - fd = open64 (ARCHIVE_NAME, O_RDONLY); -+ fd = open_nix_locale_archive (ARCHIVE_NAME, O_RDONLY); ++ fd = open_locale_archive (); if (fd < 0) return 0; -diff -ru glibc-2.16.0-orig/locale/programs/locarchive.c glibc-2.16.0/locale/programs/locarchive.c ---- glibc-2.16.0-orig/locale/programs/locarchive.c 2012-06-30 15:12:34.000000000 -0400 -+++ glibc-2.16.0/locale/programs/locarchive.c 2012-09-18 11:53:03.720920942 -0400 -@@ -509,6 +509,20 @@ - *ah = new_ah; +diff -Naur glibc-2.27-orig/locale/programs/locarchive.c glibc-2.27/locale/programs/locarchive.c +--- glibc-2.27-orig/locale/programs/locarchive.c 2018-02-01 11:17:18.000000000 -0500 ++++ glibc-2.27/locale/programs/locarchive.c 2018-02-17 22:40:51.245293975 -0500 +@@ -117,6 +117,22 @@ } + +static int -+open_nix_locale_archive (const char * fname, int access) ++open_locale_archive (const char * archivefname, int flags) +{ + int fd = -1; -+ char *path = getenv ("LOCALE_ARCHIVE_2_11"); -+ char *path2 = getenv ("LOCALE_ARCHIVE"); -+ if (path) -+ fd = open64 (path, access); -+ if (path2 && fd < 0) -+ fd = open64 (path2, access); ++ char *versioned_path = getenv ("LOCALE_ARCHIVE_2_27"); ++ char *path = getenv ("LOCALE_ARCHIVE"); ++ if (versioned_path) ++ fd = open64 (versioned_path, flags); ++ if (path && fd < 0) ++ fd = open64 (path, flags); + if (fd < 0) -+ fd = open64 (fname, access); ++ fd = open64 (archivefname, flags); + return fd; +} - - void - open_archive (struct locarhandle *ah, bool readonly) -@@ -528,7 +542,7 @@ ++ ++ + static void + create_archive (const char *archivefname, struct locarhandle *ah) + { +@@ -578,7 +594,7 @@ while (1) { /* Open the archive. We must have exclusive write access. */ - fd = open64 (archivefname, readonly ? O_RDONLY : O_RDWR); -+ fd = open_nix_locale_archive (archivefname, readonly ? O_RDONLY : O_RDWR); ++ fd = open_locale_archive (archivefname, readonly ? O_RDONLY : O_RDWR); if (fd == -1) { - /* Maybe the file does not yet exist. */ + /* Maybe the file does not yet exist? If we are opening diff --git a/pkgs/development/libraries/gnu-efi/default.nix b/pkgs/development/libraries/gnu-efi/default.nix index a46abe3b4f7c..940b4e2aee4e 100644 --- a/pkgs/development/libraries/gnu-efi/default.nix +++ b/pkgs/development/libraries/gnu-efi/default.nix @@ -2,11 +2,11 @@ stdenv.mkDerivation rec { name = "gnu-efi-${version}"; - version = "3.0.6"; + version = "3.0.8"; src = fetchurl { url = "mirror://sourceforge/gnu-efi/${name}.tar.bz2"; - sha256 = "149cyadpn2jm4zxfn1qmpm520iqssp9p07d650rs5ghgv015jl91"; + sha256 = "08mpw8s79azip9jbzm6msq0999pnkqzd82axydrcyyynm276s03n"; }; buildInputs = [ pciutils ]; diff --git a/pkgs/development/libraries/gnutls/generic.nix b/pkgs/development/libraries/gnutls/generic.nix index 8769584a9f21..984603827c8d 100644 --- a/pkgs/development/libraries/gnutls/generic.nix +++ b/pkgs/development/libraries/gnutls/generic.nix @@ -40,9 +40,7 @@ stdenv.mkDerivation { enableParallelBuilding = true; - buildInputs = [ lzo lzip libtasn1 libidn p11-kit zlib gmp autogen libunistring unbound ] - ++ lib.optional (stdenv.isFreeBSD || stdenv.isDarwin) libiconv - ++ lib.optional stdenv.isDarwin gettext + buildInputs = [ lzo lzip libtasn1 libidn p11-kit zlib gmp autogen libunistring unbound gettext libiconv ] ++ lib.optional (tpmSupport && stdenv.isLinux) trousers ++ lib.optional guileBindings guile ++ buildInputs; diff --git a/pkgs/development/libraries/gobject-introspection/default.nix b/pkgs/development/libraries/gobject-introspection/default.nix index 3c884bb1224a..f79511897fbe 100644 --- a/pkgs/development/libraries/gobject-introspection/default.nix +++ b/pkgs/development/libraries/gobject-introspection/default.nix @@ -1,5 +1,5 @@ { stdenv, fetchurl, glib, flex, bison, pkgconfig, libffi, python -, libintlOrEmpty, cctools, cairo, gnome3 +, libintl, cctools, cairo, gnome3 , substituteAll, nixStoreDir ? builtins.storeDir , x11Support ? true }: @@ -24,9 +24,8 @@ stdenv.mkDerivation rec { outputBin = "dev"; outputMan = "dev"; # tiny pages - nativeBuildInputs = [ pkgconfig ]; + nativeBuildInputs = [ pkgconfig libintl ]; buildInputs = [ flex bison python setupHook/*move .gir*/ ] - ++ libintlOrEmpty ++ stdenv.lib.optional stdenv.isDarwin cctools; propagatedBuildInputs = [ libffi glib ]; diff --git a/pkgs/development/libraries/gstreamer/bad/default.nix b/pkgs/development/libraries/gstreamer/bad/default.nix index d4cc2f43aaa6..72fead258f5d 100644 --- a/pkgs/development/libraries/gstreamer/bad/default.nix +++ b/pkgs/development/libraries/gstreamer/bad/default.nix @@ -6,7 +6,7 @@ , openjpeg, libopus, librsvg , wildmidi, fluidsynth, libvdpau, wayland , libwebp, xvidcore, gnutls, mjpegtools -, libGLU_combined, libintlOrEmpty, libgme +, libGLU_combined, libintl, libgme , openssl, x265, libxml2 }: @@ -63,8 +63,8 @@ stdenv.mkDerivation rec { fluidsynth libvdpau libwebp xvidcore gnutls libGLU_combined libgme openssl x265 libxml2 + libintl ] - ++ libintlOrEmpty ++ optional faacSupport faac # for gtksink ++ optional gtkSupport gtk3 @@ -75,7 +75,5 @@ stdenv.mkDerivation rec { # TODO: mjpegtools uint64_t is not compatible with guint64 on Darwin ++ optional (!stdenv.isDarwin) mjpegtools; - LDFLAGS = optionalString stdenv.isDarwin "-lintl"; - enableParallelBuilding = true; } diff --git a/pkgs/development/libraries/gstreamer/base/default.nix b/pkgs/development/libraries/gstreamer/base/default.nix index 2cd0c14c1f34..c0c03dc15661 100644 --- a/pkgs/development/libraries/gstreamer/base/default.nix +++ b/pkgs/development/libraries/gstreamer/base/default.nix @@ -1,6 +1,6 @@ { stdenv, fetchurl, pkgconfig, python, gstreamer, gobjectIntrospection , orc, alsaLib, libXv, pango, libtheora -, cdparanoia, libvisual, libintlOrEmpty +, cdparanoia, libvisual, libintl }: stdenv.mkDerivation rec { @@ -25,9 +25,8 @@ stdenv.mkDerivation rec { ]; buildInputs = [ - orc libXv pango libtheora cdparanoia + orc libXv pango libtheora cdparanoia libintl ] - ++ libintlOrEmpty ++ stdenv.lib.optional stdenv.isLinux alsaLib ++ stdenv.lib.optional (!stdenv.isDarwin) libvisual; @@ -40,7 +39,5 @@ stdenv.mkDerivation rec { "--disable-cdparanoia" ] else null; - NIX_LDFLAGS = if stdenv.isDarwin then "-lintl" else null; - enableParallelBuilding = true; } diff --git a/pkgs/development/libraries/gstreamer/default.nix b/pkgs/development/libraries/gstreamer/default.nix index 76cffa89dbc5..97f775e8e584 100644 --- a/pkgs/development/libraries/gstreamer/default.nix +++ b/pkgs/development/libraries/gstreamer/default.nix @@ -1,4 +1,4 @@ -{ callPackage, libva-full }: +{ callPackage }: rec { gstreamer = callPackage ./core { }; @@ -23,7 +23,6 @@ rec { gst-vaapi = callPackage ./vaapi { inherit gst-plugins-base gstreamer gst-plugins-bad; - libva = libva-full; # looks also for libva-{x11,wayland} }; gst-validate = callPackage ./validate { inherit gst-plugins-base; }; diff --git a/pkgs/development/libraries/gstreamer/good/default.nix b/pkgs/development/libraries/gstreamer/good/default.nix index e4e4f3b394db..daca02c408ba 100644 --- a/pkgs/development/libraries/gstreamer/good/default.nix +++ b/pkgs/development/libraries/gstreamer/good/default.nix @@ -3,7 +3,7 @@ , libv4l, libdv, libavc1394, libiec61883 , libvpx, speex, flac, taglib, libshout , cairo, gdk_pixbuf, aalib, libcaca -, libsoup, libpulseaudio, libintlOrEmpty +, libsoup, libpulseaudio, libintl , darwin }: @@ -38,9 +38,8 @@ stdenv.mkDerivation rec { gst-plugins-base orc bzip2 libdv libvpx speex flac taglib cairo gdk_pixbuf aalib libcaca - libsoup libshout + libsoup libshout libintl ] - ++ libintlOrEmpty ++ optionals stdenv.isDarwin [ darwin.apple_sdk.frameworks.Cocoa ] ++ optionals stdenv.isLinux [ libv4l libpulseaudio libavc1394 libiec61883 ]; @@ -48,6 +47,4 @@ stdenv.mkDerivation rec { mkdir -p "$dev/lib/gstreamer-1.0" mv "$out/lib/gstreamer-1.0/"*.la "$dev/lib/gstreamer-1.0" ''; - - LDFLAGS = optionalString stdenv.isDarwin "-lintl"; } diff --git a/pkgs/development/libraries/gstreamer/legacy/gst-plugins-base/default.nix b/pkgs/development/libraries/gstreamer/legacy/gst-plugins-base/default.nix index 2c2e1b0da122..8371b2780409 100644 --- a/pkgs/development/libraries/gstreamer/legacy/gst-plugins-base/default.nix +++ b/pkgs/development/libraries/gstreamer/legacy/gst-plugins-base/default.nix @@ -1,6 +1,6 @@ { fetchurl, stdenv, pkgconfig, python, gstreamer, xorg, alsaLib, cdparanoia , libogg, libtheora, libvorbis, freetype, pango, liboil, glib, cairo, orc -, libintlOrEmpty +, libintl , ApplicationServices , # Whether to build no plugins that have external dependencies # (except the ALSA plugin). @@ -29,7 +29,7 @@ stdenv.mkDerivation rec { # TODO : v4l, libvisual buildInputs = - [ pkgconfig glib cairo orc ] + [ pkgconfig glib cairo orc libintl ] # can't build alsaLib on darwin ++ stdenv.lib.optional (!stdenv.isDarwin) alsaLib ++ stdenv.lib.optionals (!minimalDeps) @@ -37,11 +37,8 @@ stdenv.mkDerivation rec { liboil ] # can't build cdparanoia on darwin ++ stdenv.lib.optional (!minimalDeps && !stdenv.isDarwin) cdparanoia - ++ libintlOrEmpty ++ stdenv.lib.optional stdenv.isDarwin ApplicationServices; - NIX_CFLAGS_COMPILE = stdenv.lib.optionalString stdenv.isDarwin "-lintl"; - propagatedBuildInputs = [ gstreamer ]; postInstall = "rm -rf $out/share/gtk-doc"; diff --git a/pkgs/development/libraries/gstreamer/legacy/gst-plugins-good/default.nix b/pkgs/development/libraries/gstreamer/legacy/gst-plugins-good/default.nix index d533f798d999..75583624f545 100644 --- a/pkgs/development/libraries/gstreamer/legacy/gst-plugins-good/default.nix +++ b/pkgs/development/libraries/gstreamer/legacy/gst-plugins-good/default.nix @@ -1,7 +1,7 @@ { fetchurl, stdenv, lib, pkgconfig, gst-plugins-base, aalib, cairo , flac, libjpeg, zlib, speex, libpng, libdv, libcaca, libvpx , libiec61883, libavc1394, taglib, libpulseaudio, gdk_pixbuf, orc -, glib, gstreamer, bzip2, libsoup, libshout, ncurses, libintlOrEmpty +, glib, gstreamer, bzip2, libsoup, libshout, ncurses, libintl , # Whether to build no plugins that have external dependencies # (except the PulseAudio plugin). minimalDeps ? false @@ -23,15 +23,12 @@ stdenv.mkDerivation rec { configureFlags = [ "--enable-experimental" "--disable-oss" ]; buildInputs = - [ pkgconfig glib gstreamer gst-plugins-base ] + [ pkgconfig glib gstreamer gst-plugins-base libintl ] ++ lib.optional stdenv.isLinux libpulseaudio - ++ libintlOrEmpty ++ lib.optionals (!minimalDeps) [ aalib libcaca cairo libdv flac libjpeg libpng speex taglib bzip2 libvpx gdk_pixbuf orc libsoup libshout ]; - NIX_LDFLAGS = if stdenv.isDarwin then "-lintl" else null; - enableParallelBuilding = true; postInstall = lib.optionalString (!minimalDeps) '' diff --git a/pkgs/development/libraries/gstreamer/legacy/gst-plugins-ugly/default.nix b/pkgs/development/libraries/gstreamer/legacy/gst-plugins-ugly/default.nix index 5c289fb39114..ac680f8432ab 100644 --- a/pkgs/development/libraries/gstreamer/legacy/gst-plugins-ugly/default.nix +++ b/pkgs/development/libraries/gstreamer/legacy/gst-plugins-ugly/default.nix @@ -1,5 +1,5 @@ { fetchurl, stdenv, pkgconfig, glib, gstreamer, gst-plugins-base -, libmad, libdvdread, libmpeg2, libcdio, a52dec, x264, orc, lame, libintlOrEmpty }: +, libmad, libdvdread, libmpeg2, libcdio, a52dec, x264, orc, lame, libintl }: stdenv.mkDerivation rec { name = "gst-plugins-ugly-0.10.19"; @@ -13,9 +13,7 @@ stdenv.mkDerivation rec { }; buildInputs = - [ pkgconfig glib gstreamer gst-plugins-base libmad libdvdread a52dec x264 orc lame ] ++ libintlOrEmpty; - - NIX_LDFLAGS = if stdenv.isDarwin then "-lintl" else null; + [ pkgconfig glib gstreamer gst-plugins-base libmad libdvdread a52dec x264 orc lame libintl ]; enableParallelBuilding = true; diff --git a/pkgs/development/libraries/gstreamer/legacy/gstreamer/default.nix b/pkgs/development/libraries/gstreamer/legacy/gstreamer/default.nix index 55d34a3fada3..e46ecfb76127 100644 --- a/pkgs/development/libraries/gstreamer/legacy/gstreamer/default.nix +++ b/pkgs/development/libraries/gstreamer/legacy/gstreamer/default.nix @@ -1,4 +1,4 @@ -{ fetchurl, stdenv, perl, bison, flex, pkgconfig, glib, libxml2, libintlOrEmpty }: +{ fetchurl, stdenv, perl, bison, flex, pkgconfig, glib, libxml2, libintl }: stdenv.mkDerivation rec { name = "gstreamer-0.10.36"; @@ -13,9 +13,9 @@ stdenv.mkDerivation rec { outputs = [ "out" "dev" ]; - nativeBuildInputs = [ pkgconfig ]; + nativeBuildInputs = [ pkgconfig libintl ]; buildInputs = [ perl bison flex ]; - propagatedBuildInputs = [ glib libxml2 ] ++ libintlOrEmpty; + propagatedBuildInputs = [ glib libxml2 ]; patchPhase = '' sed -i -e 's/^ /\t/' docs/gst/Makefile.in docs/libs/Makefile.in docs/plugins/Makefile.in diff --git a/pkgs/development/libraries/gstreamer/ugly/default.nix b/pkgs/development/libraries/gstreamer/ugly/default.nix index cdaa88ce350f..a4083b3e84b2 100644 --- a/pkgs/development/libraries/gstreamer/ugly/default.nix +++ b/pkgs/development/libraries/gstreamer/ugly/default.nix @@ -1,7 +1,7 @@ { stdenv, fetchurl, pkgconfig, python , gst-plugins-base, orc , a52dec, libcdio, libdvdread -, lame, libmad, libmpeg2, x264, libintlOrEmpty, mpg123 +, lame, libmad, libmpeg2, x264, libintl, mpg123 }: stdenv.mkDerivation rec { @@ -33,7 +33,6 @@ stdenv.mkDerivation rec { gst-plugins-base orc a52dec libcdio libdvdread lame libmad libmpeg2 x264 mpg123 - ] ++ libintlOrEmpty; - - NIX_LDFLAGS = if stdenv.isDarwin then "-lintl" else null; + libintl + ]; } diff --git a/pkgs/development/libraries/gtk+/2.x.nix b/pkgs/development/libraries/gtk+/2.x.nix index 8a3ce884dfd7..d35e47f312f9 100644 --- a/pkgs/development/libraries/gtk+/2.x.nix +++ b/pkgs/development/libraries/gtk+/2.x.nix @@ -1,5 +1,5 @@ { stdenv, fetchurl, pkgconfig, gettext, glib, atk, pango, cairo, perl, xorg -, gdk_pixbuf, libintlOrEmpty, xlibsWrapper, gobjectIntrospection +, gdk_pixbuf, xlibsWrapper, gobjectIntrospection , xineramaSupport ? stdenv.isLinux , cupsSupport ? true, cups ? null , gdktarget ? "x11" @@ -24,8 +24,6 @@ stdenv.mkDerivation rec { enableParallelBuilding = true; - NIX_CFLAGS_COMPILE = optionalString (libintlOrEmpty != []) "-lintl"; - setupHook = ./setup-hook.sh; nativeBuildInputs = [ setupHook perl pkgconfig gettext gobjectIntrospection ]; @@ -38,7 +36,6 @@ stdenv.mkDerivation rec { libXrandr libXrender libXcomposite libXi libXcursor ] ++ optionals stdenv.isDarwin [ xlibsWrapper libXdamage ] - ++ libintlOrEmpty ++ optional xineramaSupport libXinerama ++ optionals cupsSupport [ cups ] ++ optionals stdenv.isDarwin [ AppKit Cocoa ]; diff --git a/pkgs/development/libraries/gtk+/3.x.nix b/pkgs/development/libraries/gtk+/3.x.nix index c96139ddb576..dc6a519dfade 100644 --- a/pkgs/development/libraries/gtk+/3.x.nix +++ b/pkgs/development/libraries/gtk+/3.x.nix @@ -1,7 +1,7 @@ { stdenv, fetchurl, fetchpatch, pkgconfig, gettext, perl, makeWrapper, shared-mime-info , expat, glib, cairo, pango, gdk_pixbuf, atk, at-spi2-atk, gobjectIntrospection , xorg, epoxy, json-glib, libxkbcommon, gmp -, waylandSupport ? stdenv.isLinux, wayland, wayland-protocols +, waylandSupport ? stdenv.isLinux, mesa_noglu, wayland, wayland-protocols , xineramaSupport ? stdenv.isLinux , cupsSupport ? stdenv.isLinux, cups ? null , darwin, gnome3 @@ -40,14 +40,12 @@ stdenv.mkDerivation rec { propagatedBuildInputs = with xorg; with stdenv.lib; [ expat glib cairo pango gdk_pixbuf atk at-spi2-atk gnome3.gsettings-desktop-schemas libXrandr libXrender libXcomposite libXi libXcursor libSM libICE ] - ++ optionals waylandSupport [ wayland wayland-protocols ] + ++ optionals waylandSupport [ mesa_noglu wayland wayland-protocols ] ++ optionals stdenv.isDarwin (with darwin.apple_sdk.frameworks; [ AppKit Cocoa ]) ++ optional xineramaSupport libXinerama ++ optional cupsSupport cups; #TODO: colord? - NIX_LDFLAGS = optionalString stdenv.isDarwin "-lintl"; - # demos fail to install, no idea where's the problem preConfigure = "sed '/^SRC_SUBDIRS /s/demos//' -i Makefile.in"; diff --git a/pkgs/development/libraries/gts/default.nix b/pkgs/development/libraries/gts/default.nix index 59b3a34f7bdd..770f743fd260 100644 --- a/pkgs/development/libraries/gts/default.nix +++ b/pkgs/development/libraries/gts/default.nix @@ -11,7 +11,7 @@ stdenv.mkDerivation rec { }; nativeBuildInputs = [ pkgconfig ]; - buildInputs = [ glib ] ++ stdenv.lib.optional (stdenv.system == "x86_64-darwin") gettext; + buildInputs = [ glib gettext ]; meta = { homepage = http://gts.sourceforge.net/; diff --git a/pkgs/development/libraries/harfbuzz/default.nix b/pkgs/development/libraries/harfbuzz/default.nix index bb68ae94a7f0..9b2e2e27f42e 100644 --- a/pkgs/development/libraries/harfbuzz/default.nix +++ b/pkgs/development/libraries/harfbuzz/default.nix @@ -1,4 +1,4 @@ -{ stdenv, fetchurl, pkgconfig, glib, freetype, cairo, libintlOrEmpty +{ stdenv, fetchurl, pkgconfig, glib, freetype, cairo, libintl , icu, graphite2, harfbuzz # The icu variant uses and propagates the non-icu one. , withIcu ? false # recommended by upstream as default, but most don't needed and it's big , withGraphite2 ? true # it is small and major distros do include it @@ -25,9 +25,8 @@ stdenv.mkDerivation { ( "--with-icu=" + (if withIcu then "yes" else "no") ) ]; - nativeBuildInputs = [ pkgconfig ]; - buildInputs = [ glib freetype cairo ] # recommended by upstream - ++ libintlOrEmpty; + nativeBuildInputs = [ pkgconfig libintl ]; + buildInputs = [ glib freetype cairo ]; # recommended by upstream propagatedBuildInputs = [] ++ optional withGraphite2 graphite2 ++ optionals withIcu [ icu harfbuzz ] diff --git a/pkgs/development/libraries/json-glib/default.nix b/pkgs/development/libraries/json-glib/default.nix index bf32f4f8e8bc..21bddf8f6bb5 100644 --- a/pkgs/development/libraries/json-glib/default.nix +++ b/pkgs/development/libraries/json-glib/default.nix @@ -1,5 +1,5 @@ { stdenv, fetchurl, fetchpatch, glib, meson, ninja, pkgconfig, gettext -, gobjectIntrospection, dbus, libintlOrEmpty +, gobjectIntrospection, dbus , fixDarwinDylibNames }: @@ -14,10 +14,7 @@ stdenv.mkDerivation rec { propagatedBuildInputs = [ glib ]; nativeBuildInputs = [ meson ninja pkgconfig gettext gobjectIntrospection ]; - buildInputs = libintlOrEmpty - ++ stdenv.lib.optional stdenv.isDarwin fixDarwinDylibNames; - - NIX_LDFLAGS = stdenv.lib.optionalString stdenv.isDarwin "-lintl"; + buildInputs = stdenv.lib.optional stdenv.isDarwin fixDarwinDylibNames; patches = [ # https://gitlab.gnome.org/GNOME/json-glib/issues/27 diff --git a/pkgs/development/libraries/libassuan/default.nix b/pkgs/development/libraries/libassuan/default.nix index 827d3de79ea8..91ceb959779e 100644 --- a/pkgs/development/libraries/libassuan/default.nix +++ b/pkgs/development/libraries/libassuan/default.nix @@ -11,8 +11,7 @@ stdenv.mkDerivation rec { outputs = [ "out" "dev" "info" ]; outputBin = "dev"; # libassuan-config - buildInputs = [ libgpgerror pth ] - ++ stdenv.lib.optional stdenv.isDarwin gettext; + buildInputs = [ libgpgerror pth gettext]; doCheck = true; diff --git a/pkgs/development/libraries/libbsd/cdefs.patch b/pkgs/development/libraries/libbsd/cdefs.patch new file mode 100644 index 000000000000..81822654aeb4 --- /dev/null +++ b/pkgs/development/libraries/libbsd/cdefs.patch @@ -0,0 +1,222 @@ +From 11ec8f1e5dfa1c10e0c9fb94879b6f5b96ba52dd Mon Sep 17 00:00:00 2001 +From: Guillem Jover <guillem@hadrons.org> +Date: Tue, 6 Mar 2018 01:41:35 +0100 +Subject: Handle systems missing <sys/cdefs.h> + +This is a non-portable header, and we cannot expect it to be provided by +the system libc (e.g. musl). We just need and rely on declaration that +we have defined ourselves in our own <bsd/sys/cdefs.h>. So we switch to +only ever assume that. + +Fixes: https://bugs.freedesktop.org/105281 +--- + include/bsd/libutil.h | 4 ++++ + include/bsd/md5.h | 4 ++++ + include/bsd/nlist.h | 4 ++++ + include/bsd/readpassphrase.h | 4 ++++ + include/bsd/stdlib.h | 4 ++++ + include/bsd/string.h | 4 ++++ + include/bsd/stringlist.h | 5 +++++ + include/bsd/sys/queue.h | 4 ++++ + include/bsd/sys/tree.h | 4 ++++ + include/bsd/timeconv.h | 4 ++++ + include/bsd/vis.h | 4 ++++ + include/bsd/wchar.h | 4 ++++ + 12 files changed, 49 insertions(+) + +diff --git a/include/bsd/libutil.h b/include/bsd/libutil.h +index 45b3b15..ccca29a 100644 +--- a/include/bsd/libutil.h ++++ b/include/bsd/libutil.h +@@ -40,7 +40,11 @@ + #define LIBBSD_LIBUTIL_H + + #include <features.h> ++#ifdef LIBBSD_OVERLAY + #include <sys/cdefs.h> ++#else ++#include <bsd/sys/cdefs.h> ++#endif + #include <sys/types.h> + #include <stdint.h> + #include <stdio.h> +diff --git a/include/bsd/md5.h b/include/bsd/md5.h +index 5f3ae46..bf36a30 100644 +--- a/include/bsd/md5.h ++++ b/include/bsd/md5.h +@@ -27,7 +27,11 @@ typedef struct MD5Context { + uint8_t buffer[MD5_BLOCK_LENGTH]; /* input buffer */ + } MD5_CTX; + ++#ifdef LIBBSD_OVERLAY + #include <sys/cdefs.h> ++#else ++#include <bsd/sys/cdefs.h> ++#endif + #include <sys/types.h> + + __BEGIN_DECLS +diff --git a/include/bsd/nlist.h b/include/bsd/nlist.h +index cb297e8..8767117 100644 +--- a/include/bsd/nlist.h ++++ b/include/bsd/nlist.h +@@ -27,7 +27,11 @@ + #ifndef LIBBSD_NLIST_H + #define LIBBSD_NLIST_H + ++#ifdef LIBBSD_OVERLAY + #include <sys/cdefs.h> ++#else ++#include <bsd/sys/cdefs.h> ++#endif + + struct nlist { + union { +diff --git a/include/bsd/readpassphrase.h b/include/bsd/readpassphrase.h +index 14744b8..5eb8021 100644 +--- a/include/bsd/readpassphrase.h ++++ b/include/bsd/readpassphrase.h +@@ -31,7 +31,11 @@ + #define RPP_SEVENBIT 0x10 /* Strip the high bit from input. */ + #define RPP_STDIN 0x20 /* Read from stdin, not /dev/tty */ + ++#ifdef LIBBSD_OVERLAY + #include <sys/cdefs.h> ++#else ++#include <bsd/sys/cdefs.h> ++#endif + #include <sys/types.h> + + __BEGIN_DECLS +diff --git a/include/bsd/stdlib.h b/include/bsd/stdlib.h +index ebc9638..8d33d1f 100644 +--- a/include/bsd/stdlib.h ++++ b/include/bsd/stdlib.h +@@ -42,7 +42,11 @@ + #ifndef LIBBSD_STDLIB_H + #define LIBBSD_STDLIB_H + ++#ifdef LIBBSD_OVERLAY + #include <sys/cdefs.h> ++#else ++#include <bsd/sys/cdefs.h> ++#endif + #include <sys/stat.h> + #include <stdint.h> + +diff --git a/include/bsd/string.h b/include/bsd/string.h +index 6798bf6..29097f6 100644 +--- a/include/bsd/string.h ++++ b/include/bsd/string.h +@@ -33,7 +33,11 @@ + #ifndef LIBBSD_STRING_H + #define LIBBSD_STRING_H + ++#ifdef LIBBSD_OVERLAY + #include <sys/cdefs.h> ++#else ++#include <bsd/sys/cdefs.h> ++#endif + #include <sys/types.h> + + __BEGIN_DECLS +diff --git a/include/bsd/stringlist.h b/include/bsd/stringlist.h +index ff30cac..dd71496 100644 +--- a/include/bsd/stringlist.h ++++ b/include/bsd/stringlist.h +@@ -31,7 +31,12 @@ + + #ifndef LIBBSD_STRINGLIST_H + #define LIBBSD_STRINGLIST_H ++ ++#ifdef LIBBSD_OVERLAY + #include <sys/cdefs.h> ++#else ++#include <bsd/sys/cdefs.h> ++#endif + #include <sys/types.h> + + /* +diff --git a/include/bsd/sys/queue.h b/include/bsd/sys/queue.h +index 4a94ea7..ac00026 100644 +--- a/include/bsd/sys/queue.h ++++ b/include/bsd/sys/queue.h +@@ -33,7 +33,11 @@ + #ifndef LIBBSD_SYS_QUEUE_H + #define LIBBSD_SYS_QUEUE_H + ++#ifdef LIBBSD_OVERLAY + #include <sys/cdefs.h> ++#else ++#include <bsd/sys/cdefs.h> ++#endif + + /* + * This file defines four types of data structures: singly-linked lists, +diff --git a/include/bsd/sys/tree.h b/include/bsd/sys/tree.h +index 628bec0..325b382 100644 +--- a/include/bsd/sys/tree.h ++++ b/include/bsd/sys/tree.h +@@ -30,7 +30,11 @@ + #ifndef LIBBSD_SYS_TREE_H + #define LIBBSD_SYS_TREE_H + ++#ifdef LIBBSD_OVERLAY + #include <sys/cdefs.h> ++#else ++#include <bsd/sys/cdefs.h> ++#endif + + /* + * This file defines data structures for different types of trees: +diff --git a/include/bsd/timeconv.h b/include/bsd/timeconv.h +index e2a2c55..a426bd3 100644 +--- a/include/bsd/timeconv.h ++++ b/include/bsd/timeconv.h +@@ -41,7 +41,11 @@ + #ifndef LIBBSD_TIMECONV_H + #define LIBBSD_TIMECONV_H + ++#ifdef LIBBSD_OVERLAY + #include <sys/cdefs.h> ++#else ++#include <bsd/sys/cdefs.h> ++#endif + #include <stdint.h> + #include <time.h> + +diff --git a/include/bsd/vis.h b/include/bsd/vis.h +index 970dfdd..ab5430c 100644 +--- a/include/bsd/vis.h ++++ b/include/bsd/vis.h +@@ -72,7 +72,11 @@ + */ + #define UNVIS_END 1 /* no more characters */ + ++#ifdef LIBBSD_OVERLAY + #include <sys/cdefs.h> ++#else ++#include <bsd/sys/cdefs.h> ++#endif + + __BEGIN_DECLS + char *vis(char *, int, int, int); +diff --git a/include/bsd/wchar.h b/include/bsd/wchar.h +index 33a500e..7216503 100644 +--- a/include/bsd/wchar.h ++++ b/include/bsd/wchar.h +@@ -40,7 +40,11 @@ + #define LIBBSD_WCHAR_H + + #include <stddef.h> ++#ifdef LIBBSD_OVERLAY + #include <sys/cdefs.h> ++#else ++#include <bsd/sys/cdefs.h> ++#endif + #include <sys/types.h> + + __BEGIN_DECLS +-- +cgit v1.1 + diff --git a/pkgs/development/libraries/libbsd/default.nix b/pkgs/development/libraries/libbsd/default.nix index 0e232a50e943..ff9412ceb580 100644 --- a/pkgs/development/libraries/libbsd/default.nix +++ b/pkgs/development/libraries/libbsd/default.nix @@ -13,7 +13,16 @@ stdenv.mkDerivation rec { # the configure scripts nativeBuildInputs = [ autoreconfHook ]; - patches = stdenv.lib.optionals stdenv.isDarwin [ ./darwin.patch ]; + patches = stdenv.lib.optional stdenv.isDarwin ./darwin.patch + # Suitable for all, but limited to musl to avoid rebuilds + ++ stdenv.lib.optionals stdenv.hostPlatform.isMusl [ + # https://cgit.freedesktop.org/libbsd/commit/?id=1f8a3f7bccfc84b195218ad0086ebd57049c3490 + ./non-glibc.patch + # https://cgit.freedesktop.org/libbsd/commit/?id=11ec8f1e5dfa1c10e0c9fb94879b6f5b96ba52dd + ./cdefs.patch + # https://cgit.freedesktop.org/libbsd/commit/?id=b20272f5a966333b49fdf2bda797e2a9f0227404 + ./features.patch + ]; meta = with stdenv.lib; { description = "Common functions found on BSD systems"; diff --git a/pkgs/development/libraries/libbsd/features.patch b/pkgs/development/libraries/libbsd/features.patch new file mode 100644 index 000000000000..66bd1e9232ba --- /dev/null +++ b/pkgs/development/libraries/libbsd/features.patch @@ -0,0 +1,26 @@ +From b20272f5a966333b49fdf2bda797e2a9f0227404 Mon Sep 17 00:00:00 2001 +From: Guillem Jover <guillem@hadrons.org> +Date: Tue, 6 Mar 2018 01:42:52 +0100 +Subject: Remove <features.h> inclusion from <bsd/libutil.h> + +This is a non-portable header, and we should not assume it is present. +Let the first system header pull it in if needed. +--- + include/bsd/libutil.h | 1 - + 1 file changed, 1 deletion(-) + +diff --git a/include/bsd/libutil.h b/include/bsd/libutil.h +index ccca29a..e5f148a 100644 +--- a/include/bsd/libutil.h ++++ b/include/bsd/libutil.h +@@ -39,7 +39,6 @@ + #ifndef LIBBSD_LIBUTIL_H + #define LIBBSD_LIBUTIL_H + +-#include <features.h> + #ifdef LIBBSD_OVERLAY + #include <sys/cdefs.h> + #else +-- +cgit v1.1 + diff --git a/pkgs/development/libraries/libbsd/non-glibc.patch b/pkgs/development/libraries/libbsd/non-glibc.patch new file mode 100644 index 000000000000..f61e0d242943 --- /dev/null +++ b/pkgs/development/libraries/libbsd/non-glibc.patch @@ -0,0 +1,74 @@ +From 1f8a3f7bccfc84b195218ad0086ebd57049c3490 Mon Sep 17 00:00:00 2001 +From: Guillem Jover <guillem@hadrons.org> +Date: Tue, 6 Mar 2018 01:39:45 +0100 +Subject: Fix function declaration protection for glibc already providing them +MIME-Version: 1.0 +Content-Type: text/plain; charset=UTF-8 +Content-Transfer-Encoding: 8bit + +On non-glibc based systems we cannot unconditionally use the +__GLIBC_PREREQ macro as it gets expanded before evaluation. Instead, +if it is undefined, define it to 0. + +We should also always declare these functions on non-glibc based +systems. And on systems with a new enough glibc, which provides these +functions, we should still provide the declarations if _GNU_SOURCE +is *not* defined. + +Reported-by: Jörg Krause <joerg.krause@embedded.rocks> +--- + include/bsd/stdlib.h | 3 ++- + include/bsd/string.h | 3 ++- + include/bsd/sys/cdefs.h | 8 ++++++++ + 3 files changed, 12 insertions(+), 2 deletions(-) + +diff --git a/include/bsd/stdlib.h b/include/bsd/stdlib.h +index 8d33d1f..a5b063c 100644 +--- a/include/bsd/stdlib.h ++++ b/include/bsd/stdlib.h +@@ -71,7 +71,8 @@ int sradixsort(const unsigned char **base, int nmemb, + const unsigned char *table, unsigned endbyte); + + void *reallocf(void *ptr, size_t size); +-#if defined(_GNU_SOURCE) && defined(__GLIBC__) && !__GLIBC_PREREQ(2, 26) ++#if !defined(__GLIBC__) || \ ++ (defined(__GLIBC__) && (!__GLIBC_PREREQ(2, 26) || !defined(_GNU_SOURCE))) + void *reallocarray(void *ptr, size_t nmemb, size_t size); + #endif + +diff --git a/include/bsd/string.h b/include/bsd/string.h +index 29097f6..f987fee 100644 +--- a/include/bsd/string.h ++++ b/include/bsd/string.h +@@ -46,7 +46,8 @@ size_t strlcat(char *dst, const char *src, size_t siz); + char *strnstr(const char *str, const char *find, size_t str_len); + void strmode(mode_t mode, char *str); + +-#if defined(_GNU_SOURCE) && defined(__GLIBC__) && !__GLIBC_PREREQ(2, 25) ++#if !defined(__GLIBC__) || \ ++ (defined(__GLIBC__) && (!__GLIBC_PREREQ(2, 25) || !defined(_GNU_SOURCE))) + void explicit_bzero(void *buf, size_t len); + #endif + __END_DECLS +diff --git a/include/bsd/sys/cdefs.h b/include/bsd/sys/cdefs.h +index b4c8f30..d1cc419 100644 +--- a/include/bsd/sys/cdefs.h ++++ b/include/bsd/sys/cdefs.h +@@ -59,6 +59,14 @@ + #endif + + /* ++ * On non-glibc based systems, we cannot unconditionally use the ++ * __GLIBC_PREREQ macro as it gets expanded before evaluation. ++ */ ++#ifndef __GLIBC_PREREQ ++#define __GLIBC_PREREQ(maj, min) 0 ++#endif ++ ++/* + * Some kFreeBSD headers expect those macros to be set for sanity checks. + */ + #ifndef _SYS_CDEFS_H_ +-- +cgit v1.1 + diff --git a/pkgs/development/libraries/libglvnd/default.nix b/pkgs/development/libraries/libglvnd/default.nix index 7ea1ecdd0522..3740fd5569ad 100644 --- a/pkgs/development/libraries/libglvnd/default.nix +++ b/pkgs/development/libraries/libglvnd/default.nix @@ -1,15 +1,16 @@ -{stdenv, fetchFromGitHub, autoreconfHook, python2, pkgconfig, libGL_driver, libX11, libXext, glproto }: +{ stdenv, lib, fetchFromGitHub, autoreconfHook, python2, pkgconfig, libX11, libXext, glproto }: -# Git version is needed for EGL and GLES handling. - -stdenv.mkDerivation rec { - name = "libglvnd-2016-12-22"; +let + driverLink = "/run/opengl-driver" + lib.optionalString stdenv.isi686 "-32"; +in stdenv.mkDerivation rec { + name = "libglvnd-${version}"; + version = "1.0.0"; src = fetchFromGitHub { owner = "NVIDIA"; repo = "libglvnd"; - rev = "dc16f8c337703ad141f83583a4004fcf42e07766"; - sha256 = "1dbwf1216np77xf1kx3ci3y7hfa1p4vgrrzg71gw36hqxf36vg5f"; + rev = "v${version}"; + sha256 = "1a126lzhd2f04zr3rvdl6814lfl0j077spi5dsf2alghgykn5iif"; }; nativeBuildInputs = [ autoreconfHook pkgconfig python2 ]; @@ -17,11 +18,14 @@ stdenv.mkDerivation rec { NIX_CFLAGS_COMPILE = [ "-UDEFAULT_EGL_VENDOR_CONFIG_DIRS" - "-DDEFAULT_EGL_VENDOR_CONFIG_DIRS=\"${libGL_driver.driverLink}/share/glvnd/egl_vendor.d\"" + # FHS paths are added so that non-NixOS applications can find vendor files. + "-DDEFAULT_EGL_VENDOR_CONFIG_DIRS=\"${driverLink}/share/glvnd/egl_vendor.d:/etc/glvnd/egl_vendor.d:/usr/share/glvnd/egl_vendor.d\"" ]; outputs = [ "out" "dev" ]; + passthru = { inherit driverLink; }; + meta = with stdenv.lib; { description = "The GL Vendor-Neutral Dispatch library"; homepage = https://github.com/NVIDIA/libglvnd; diff --git a/pkgs/development/libraries/libgpg-error/default.nix b/pkgs/development/libraries/libgpg-error/default.nix index 5c5824a9930c..2fcf6701ab8f 100644 --- a/pkgs/development/libraries/libgpg-error/default.nix +++ b/pkgs/development/libraries/libgpg-error/default.nix @@ -1,7 +1,7 @@ -{ stdenv, buildPackages, fetchurl, gettext -, hostPlatform, genPosixLockObjOnly ? false +{ stdenv, lib, fetchpatch, buildPackages, fetchurl, gettext +, genPosixLockObjOnly ? false }: let - genPosixLockObjOnlyAttrs = stdenv.lib.optionalAttrs genPosixLockObjOnly { + genPosixLockObjOnlyAttrs = lib.optionalAttrs genPosixLockObjOnly { buildPhase = '' cd src make gen-posix-lock-obj @@ -17,18 +17,24 @@ }; in stdenv.mkDerivation (rec { name = "libgpg-error-${version}"; - version = "1.27"; + version = "1.28"; src = fetchurl { url = "mirror://gnupg/libgpg-error/${name}.tar.bz2"; - sha256 = "1li95ni122fzinzlmxbln63nmgij63irxfvi52ws4zfbzv3am4sg"; + sha256 = "0jfsfnh9bxlxiwxws60yah4ybjw2hshmvqp31pri4m4h8ivrbnry"; }; - patches = if hostPlatform.isRiscV then ./riscv.patch else null; + patches = [ + # Fix builds on ARM, AArch64 + (fetchpatch { + url = "https://github.com/gpg/libgpg-error/commit/791177de023574223eddf7288eb7c5a0721ac623.patch"; + sha256 = "0vqfw0ak1j37wf6sk9y9vmdyk3kxdxkldhs0bv2waa76s11cmdx0"; + }) + ]; postPatch = '' sed '/BUILD_TIMESTAMP=/s/=.*/=1970-01-01T00:01+0000/' -i ./configure - '' + stdenv.lib.optionalString stdenv.hostPlatform.isMusl '' + '' + lib.optionalString stdenv.hostPlatform.isMusl '' ln -s lock-obj-pub.x86_64-pc-linux-musl.h src/syscfg/lock-obj-pub.linux-musl.h ''; @@ -41,7 +47,7 @@ in stdenv.mkDerivation (rec { nativeBuildInputs = [ gettext ]; postConfigure = - stdenv.lib.optionalString stdenv.isSunOS + lib.optionalString stdenv.isSunOS # For some reason, /bin/sh on OpenIndiana leads to this at the end of the # `config.status' run: # ./config.status[1401]: shift: (null): bad number diff --git a/pkgs/development/libraries/libgpg-error/riscv.patch b/pkgs/development/libraries/libgpg-error/riscv.patch deleted file mode 100644 index afc3b9993a43..000000000000 --- a/pkgs/development/libraries/libgpg-error/riscv.patch +++ /dev/null @@ -1,54 +0,0 @@ -commit b3e9ec5626d474c58e683a41d09576297d4acd3d -Author: Shea Levy <shea@shealevy.com> -Date: Sat Feb 24 21:12:44 2018 -0500 - - syscfg: Add lock-obj-pub file for riscv64-unknown-linux-gnu. - - * src/syscfg/lock-obj-pub.riscv64-unknown-linux-gnu.h: new. - * src/Makefile.am (lock_obj_pub): Add it. - - Signed-off-by: Shea Levy <shea@shealevy.com> - -diff --git a/src/Makefile.am b/src/Makefile.am -index 4446612..5a8cc43 100644 ---- a/src/Makefile.in -+++ b/src/Makefile.in -@@ -65,6 +65,7 @@ lock_obj_pub = \ - syscfg/lock-obj-pub.powerpc64-unknown-linux-gnu.h \ - syscfg/lock-obj-pub.powerpc64le-unknown-linux-gnu.h \ - syscfg/lock-obj-pub.powerpc-unknown-linux-gnuspe.h \ -+ syscfg/lock-obj-pub.riscv64-unknown-linux-gnu.h \ - syscfg/lock-obj-pub.s390x-ibm-linux-gnu.h \ - syscfg/lock-obj-pub.sh3-unknown-linux-gnu.h \ - syscfg/lock-obj-pub.sh4-unknown-linux-gnu.h \ -diff --git a/src/syscfg/lock-obj-pub.riscv64-unknown-linux-gnu.h b/src/syscfg/lock-obj-pub.riscv64-unknown-linux-gnu.h -new file mode 100644 -index 0000000..8aab9d6 ---- /dev/null -+++ b/src/syscfg/lock-obj-pub.riscv64-unknown-linux-gnu.h -@@ -0,0 +1,25 @@ -+## lock-obj-pub.riscv64-unknown-linux-gnu.h -+## File created by gen-posix-lock-obj - DO NOT EDIT -+## To be included by mkheader into gpg-error.h -+ -+typedef struct -+{ -+ long _vers; -+ union { -+ volatile char _priv[40]; -+ long _x_align; -+ long *_xp_align; -+ } u; -+} gpgrt_lock_t; -+ -+#define GPGRT_LOCK_INITIALIZER {1,{{0,0,0,0,0,0,0,0, \ -+ 0,0,0,0,0,0,0,0, \ -+ 0,0,0,0,0,0,0,0, \ -+ 0,0,0,0,0,0,0,0, \ -+ 0,0,0,0,0,0,0,0}}} -+## -+## Local Variables: -+## mode: c -+## buffer-read-only: t -+## End: -+## diff --git a/pkgs/development/libraries/libgsf/default.nix b/pkgs/development/libraries/libgsf/default.nix index 54a17d94a598..b0013d0f9491 100644 --- a/pkgs/development/libraries/libgsf/default.nix +++ b/pkgs/development/libraries/libgsf/default.nix @@ -1,5 +1,5 @@ { fetchurl, stdenv, pkgconfig, intltool, gettext, glib, libxml2, zlib, bzip2 -, python, perl, gdk_pixbuf, libiconv, libintlOrEmpty }: +, python, perl, gdk_pixbuf, libiconv, libintl }: let inherit (stdenv.lib) optionals; in @@ -11,21 +11,18 @@ stdenv.mkDerivation rec { sha256 = "1hhdz0ymda26q6bl5ygickkgrh998lxqq4z9i8dzpcvqna3zpzr9"; }; - nativeBuildInputs = [ pkgconfig intltool ]; + nativeBuildInputs = [ pkgconfig intltool libintl ]; buildInputs = [ gettext bzip2 zlib python ] ++ stdenv.lib.optional doCheck perl; - propagatedBuildInputs = [ libxml2 glib gdk_pixbuf libiconv ] - ++ libintlOrEmpty; + propagatedBuildInputs = [ libxml2 glib gdk_pixbuf libiconv ]; outputs = [ "out" "dev" ]; doCheck = true; preCheck = "patchShebangs ./tests/"; - NIX_LDFLAGS = stdenv.lib.optionalString stdenv.isDarwin "-lintl"; - meta = with stdenv.lib; { description = "GNOME's Structured File Library"; homepage = https://www.gnome.org/projects/libgsf; diff --git a/pkgs/development/libraries/libgtop/default.nix b/pkgs/development/libraries/libgtop/default.nix index 0a44eee90aa0..656395b8867d 100644 --- a/pkgs/development/libraries/libgtop/default.nix +++ b/pkgs/development/libraries/libgtop/default.nix @@ -1,4 +1,4 @@ -{ stdenv, fetchurl, glib, pkgconfig, perl, gettext, gobjectIntrospection, libintlOrEmpty, gnome3 }: +{ stdenv, fetchurl, glib, pkgconfig, perl, gettext, gobjectIntrospection, libintl, gnome3 }: let pname = "libgtop"; version = "2.38.0"; @@ -12,11 +12,8 @@ stdenv.mkDerivation rec { }; propagatedBuildInputs = [ glib ]; - buildInputs = libintlOrEmpty; nativeBuildInputs = [ pkgconfig perl gettext gobjectIntrospection ]; - NIX_LDFLAGS = stdenv.lib.optionalString stdenv.isDarwin "-lintl"; - passthru = { updateScript = gnome3.updateScript { packageName = pname; diff --git a/pkgs/development/libraries/libiconv/default.nix b/pkgs/development/libraries/libiconv/default.nix index b55fc18cb69b..a4e6fed88e1c 100644 --- a/pkgs/development/libraries/libiconv/default.nix +++ b/pkgs/development/libraries/libiconv/default.nix @@ -14,6 +14,8 @@ stdenv.mkDerivation rec { sha256 = "0y1ij745r4p48mxq84rax40p10ln7fc7m243p8k8sia519i3dxfc"; }; + setupHook = ./setup-hook.sh; + postPatch = lib.optionalString ((hostPlatform != buildPlatform && hostPlatform.libc == "msvcrt") || stdenv.cc.nativeLibc) '' diff --git a/pkgs/development/libraries/libiconv/setup-hook.sh b/pkgs/development/libraries/libiconv/setup-hook.sh new file mode 100644 index 000000000000..78222dddbf1d --- /dev/null +++ b/pkgs/development/libraries/libiconv/setup-hook.sh @@ -0,0 +1,18 @@ +# libiconv must be listed in load flags on non-Glibc +# it doesn't hurt to have it in Glibc either though +iconvLdflags() { + # The `depHostOffset` describes how the host platform of the dependencies + # are slid relative to the depending package. It is brought into scope of + # the environment hook defined as the role of the dependency being applied. + case $depHostOffset in + -1) local role='BUILD_' ;; + 0) local role='' ;; + 1) local role='TARGET_' ;; + *) echo "cc-wrapper: Error: Cannot be used with $depHostOffset-offset deps" >2; + return 1 ;; + esac + + export NIX_${role}LDFLAGS+=" -liconv" +} + +addEnvHooks "$hostOffset" iconvLdflags diff --git a/pkgs/development/libraries/libinfinity/default.nix b/pkgs/development/libraries/libinfinity/default.nix index 9bbb8f0e129d..944cf7a6f5e2 100644 --- a/pkgs/development/libraries/libinfinity/default.nix +++ b/pkgs/development/libraries/libinfinity/default.nix @@ -4,7 +4,7 @@ , avahiSupport ? false # build support for Avahi in libinfinity , stdenv, fetchurl, pkgconfig, glib, libxml2, gnutls, gsasl , gtk2 ? null, gtkdoc ? null, avahi ? null, libdaemon ? null, libidn, gss -, libintlOrEmpty }: +, libintl }: let edf = flag: feature: (if flag then "--with-" else "--without-") + feature; @@ -19,14 +19,14 @@ in stdenv.mkDerivation rec { }; nativeBuildInputs = [ pkgconfig ]; - buildInputs = [ glib libxml2 gsasl libidn gss libintlOrEmpty ] + buildInputs = [ glib libxml2 gsasl libidn gss libintl ] ++ optional gtkWidgets gtk2 ++ optional documentation gtkdoc ++ optional avahiSupport avahi ++ optional daemon libdaemon; propagatedBuildInputs = [ gnutls ]; - + configureFlags = '' ${if documentation then "--enable-gtk-doc" else "--disable-gtk-doc"} ${edf gtkWidgets "inftextgtk"} @@ -36,8 +36,6 @@ in stdenv.mkDerivation rec { ${edf avahiSupport "avahi"} ''; - NIX_LDFLAGS = stdenv.lib.optionalString stdenv.isDarwin "-lintl"; - meta = { homepage = http://gobby.0x539.de/; description = "An implementation of the Infinote protocol written in GObject-based C"; diff --git a/pkgs/development/libraries/libksba/default.nix b/pkgs/development/libraries/libksba/default.nix index 3f7a4bed9cc9..0611e0e57e7b 100644 --- a/pkgs/development/libraries/libksba/default.nix +++ b/pkgs/development/libraries/libksba/default.nix @@ -10,7 +10,7 @@ stdenv.mkDerivation rec { outputs = [ "out" "dev" "info" ]; - buildInputs = stdenv.lib.optional stdenv.isDarwin gettext; + buildInputs = [ gettext ]; propagatedBuildInputs = [ libgpgerror ]; postInstall = '' diff --git a/pkgs/development/libraries/libmicrohttpd/default.nix b/pkgs/development/libraries/libmicrohttpd/default.nix index 2e7c913e6a8d..041e0d98d654 100644 --- a/pkgs/development/libraries/libmicrohttpd/default.nix +++ b/pkgs/development/libraries/libmicrohttpd/default.nix @@ -1,4 +1,4 @@ -{ stdenv, fetchurl, libgcrypt, curl, gnutls, pkgconfig, libiconv, libintlOrEmpty }: +{ stdenv, fetchurl, libgcrypt, curl, gnutls, pkgconfig, libiconv, libintl }: stdenv.mkDerivation rec { name = "libmicrohttpd-${version}"; @@ -11,8 +11,7 @@ stdenv.mkDerivation rec { outputs = [ "out" "dev" "devdoc" "info" ]; nativeBuildInputs = [ pkgconfig ]; - buildInputs = [ libgcrypt curl gnutls ] - ++ stdenv.lib.optionals stdenv.isDarwin [ libiconv libintlOrEmpty ]; + buildInputs = [ libgcrypt curl gnutls libiconv libintl ]; preCheck = '' # Since `localhost' can't be resolved in a chroot, work around it. @@ -38,4 +37,3 @@ stdenv.mkDerivation rec { platforms = platforms.unix; }; } - diff --git a/pkgs/development/libraries/libnatspec/default.nix b/pkgs/development/libraries/libnatspec/default.nix index fe38755f10c5..9b692e9e3b2e 100644 --- a/pkgs/development/libraries/libnatspec/default.nix +++ b/pkgs/development/libraries/libnatspec/default.nix @@ -19,6 +19,5 @@ stdenv.mkDerivation (rec { maintainers = [ ]; }; } // stdenv.lib.optionalAttrs (!stdenv.isLinux) { - NIX_LDFLAGS = "-liconv"; propagatedBuildInputs = [ libiconv ]; }) diff --git a/pkgs/development/libraries/libpipeline/default.nix b/pkgs/development/libraries/libpipeline/default.nix index 4da6a0b3cbc7..e11527ca10c9 100644 --- a/pkgs/development/libraries/libpipeline/default.nix +++ b/pkgs/development/libraries/libpipeline/default.nix @@ -1,11 +1,11 @@ { stdenv, fetchurl }: - + stdenv.mkDerivation rec { - name = "libpipeline-1.4.1"; - + name = "libpipeline-1.5.0"; + src = fetchurl { url = "mirror://savannah/libpipeline/${name}.tar.gz"; - sha256 = "1vmrs4nvdsmb550bk10cankrd42ffczlibpsnafxpak306rdfins"; + sha256 = "0avg525wvifcvjrwa6i1r6kvahmsswj0mpxrsxzzdzra9wpf2whd"; }; patches = stdenv.lib.optionals stdenv.isDarwin [ ./fix-on-osx.patch ]; diff --git a/pkgs/development/libraries/librsvg/default.nix b/pkgs/development/libraries/librsvg/default.nix index 4bb4db104382..c2e1739117b5 100644 --- a/pkgs/development/libraries/librsvg/default.nix +++ b/pkgs/development/libraries/librsvg/default.nix @@ -1,5 +1,5 @@ { lib, stdenv, fetchurl, pkgconfig, glib, gdk_pixbuf, pango, cairo, libxml2, libgsf -, bzip2, libcroco, libintlOrEmpty, darwin, rust, gnome3 +, bzip2, libcroco, libintl, darwin, rust, gnome3 , withGTK ? false, gtk3 ? null , vala, gobjectIntrospection }: @@ -15,11 +15,9 @@ stdenv.mkDerivation rec { sha256 = "0c550a0bffef768a436286116c03d9f6cd3f97f5021c13e7f093b550fac12562"; }; - NIX_LDFLAGS = if stdenv.isDarwin then "-lintl" else null; - outputs = [ "out" "dev" ]; - buildInputs = [ libxml2 libgsf bzip2 libcroco pango libintlOrEmpty ]; + buildInputs = [ libxml2 libgsf bzip2 libcroco pango libintl ]; propagatedBuildInputs = [ glib gdk_pixbuf cairo ] ++ lib.optional withGTK gtk3; diff --git a/pkgs/development/libraries/libsecret/default.nix b/pkgs/development/libraries/libsecret/default.nix index 4ff00d777691..b77ba49822fd 100644 --- a/pkgs/development/libraries/libsecret/default.nix +++ b/pkgs/development/libraries/libsecret/default.nix @@ -1,5 +1,5 @@ { stdenv, fetchurl, glib, pkgconfig, intltool, libxslt, docbook_xsl, gtk-doc -, libgcrypt, gobjectIntrospection, vala_0_38, gnome3 }: +, libgcrypt, gobjectIntrospection, vala_0_38, gnome3, libintl }: let pname = "libsecret"; version = "0.18.5"; @@ -14,10 +14,8 @@ stdenv.mkDerivation rec { outputs = [ "out" "dev" ]; - NIX_LDFLAGS = stdenv.lib.optionalString stdenv.isDarwin "-lintl"; - propagatedBuildInputs = [ glib ]; - nativeBuildInputs = [ pkgconfig intltool libxslt docbook_xsl ]; + nativeBuildInputs = [ pkgconfig intltool libxslt docbook_xsl libintl ]; buildInputs = [ libgcrypt gobjectIntrospection vala_0_38 ]; # optional: build docs with gtk-doc? (probably needs a flag as well) diff --git a/pkgs/development/libraries/libsoup/default.nix b/pkgs/development/libraries/libsoup/default.nix index dad245d0791e..92e9c3662c9f 100644 --- a/pkgs/development/libraries/libsoup/default.nix +++ b/pkgs/development/libraries/libsoup/default.nix @@ -1,8 +1,8 @@ { stdenv, fetchurl, glib, libxml2, pkgconfig, gnome3 , gnomeSupport ? true, sqlite, glib-networking, gobjectIntrospection , valaSupport ? true, vala_0_40 -, libintlOrEmpty , intltool, python3 }: + let pname = "libsoup"; version = "2.62.0"; @@ -24,7 +24,7 @@ stdenv.mkDerivation rec { outputs = [ "out" "dev" ]; - buildInputs = libintlOrEmpty ++ [ python3 sqlite ]; + buildInputs = [ python3 sqlite ]; nativeBuildInputs = [ pkgconfig intltool gobjectIntrospection ] ++ stdenv.lib.optionals valaSupport [ vala_0_40 ]; propagatedBuildInputs = [ glib libxml2 ]; @@ -36,8 +36,6 @@ stdenv.mkDerivation rec { "--with-gnome=${if gnomeSupport then "yes" else "no"}" ]; - NIX_CFLAGS_COMPILE = stdenv.lib.optionalString stdenv.isDarwin "-lintl"; - passthru = { propagatedUserEnvPackages = [ glib-networking.out ]; updateScript = gnome3.updateScript { diff --git a/pkgs/development/libraries/libspatialindex/default.nix b/pkgs/development/libraries/libspatialindex/default.nix index fe0acbfc538d..aa3aaa1c59bc 100644 --- a/pkgs/development/libraries/libspatialindex/default.nix +++ b/pkgs/development/libraries/libspatialindex/default.nix @@ -16,6 +16,6 @@ stdenv.mkDerivation rec { description = "Extensible spatial index library in C++"; homepage = http://libspatialindex.github.io/; license = stdenv.lib.licenses.mit; - platforms = stdenv.lib.platforms.linux; + platforms = stdenv.lib.platforms.unix; }; } diff --git a/pkgs/development/libraries/libui/default.nix b/pkgs/development/libraries/libui/default.nix index 2f8963db0cd8..b1e6938a1494 100644 --- a/pkgs/development/libraries/libui/default.nix +++ b/pkgs/development/libraries/libui/default.nix @@ -15,7 +15,9 @@ in nativeBuildInputs = [ pkgconfig ]; buildInputs = [ cmake ] ++ - (if stdenv.isDarwin then [darwin.apple_sdk.frameworks.Cocoa] else [gtk3]); + (if backend == "darwin" then [darwin.apple_sdk.frameworks.Cocoa] + else if backend == "unix" then [gtk3] + else null); preConfigure = stdenv.lib.optionalString stdenv.isDarwin '' sed -i 's/set(CMAKE_OSX_DEPLOYMENT_TARGET "10.8")//' ./CMakeLists.txt diff --git a/pkgs/development/libraries/libusb1/default.nix b/pkgs/development/libraries/libusb1/default.nix index 44638b4dfd59..69afd9d4c691 100644 --- a/pkgs/development/libraries/libusb1/default.nix +++ b/pkgs/development/libraries/libusb1/default.nix @@ -1,11 +1,11 @@ { stdenv, fetchurl, pkgconfig, systemd ? null, libobjc, IOKit }: stdenv.mkDerivation rec { - name = "libusb-1.0.21"; + name = "libusb-1.0.22"; src = fetchurl { url = "mirror://sourceforge/libusb/${name}.tar.bz2"; - sha256 = "0jw2n5kdnrqvp7zh792fd6mypzzfap6jp4gfcmq4n6c1kb79rkkx"; + sha256 = "0mw1a5ss4alg37m6bd4k44v35xwrcwp5qm4s686q1nsgkbavkbkm"; }; outputs = [ "out" "dev" ]; # get rid of propagating systemd closure diff --git a/pkgs/development/libraries/libva/1.0.0.nix b/pkgs/development/libraries/libva/1.0.0.nix index 031ac781651c..04d621e29c84 100644 --- a/pkgs/development/libraries/libva/1.0.0.nix +++ b/pkgs/development/libraries/libva/1.0.0.nix @@ -1,6 +1,6 @@ { stdenv, lib, fetchurl, libX11, pkgconfig, libXext, libdrm, libXfixes, wayland, libffi -, mesa_noglu -, minimal ? true, libva +, libGL, libGL_driver +, minimal ? false, libva1-minimal }: stdenv.mkDerivation rec { @@ -17,11 +17,12 @@ stdenv.mkDerivation rec { nativeBuildInputs = [ pkgconfig ]; buildInputs = [ libdrm ] - ++ lib.optionals (!minimal) [ libva libX11 libXext libXfixes wayland libffi mesa_noglu ]; + ++ lib.optionals (!minimal) [ libva1-minimal libX11 libXext libXfixes wayland libffi libGL ]; # TODO: share libs between minimal and !minimal - perhaps just symlink them configureFlags = - [ "--with-drivers-path=${mesa_noglu.driverLink}/lib/dri" ] ++ + # Add FHS paths for non-NixOS applications. + [ "--with-drivers-path=${libGL_driver.driverLink}/lib/dri:/usr/lib/dri:/usr/lib32/dri" ] ++ lib.optionals (!minimal) [ "--enable-glx" ]; installFlags = [ "dummy_drv_video_ladir=$(out)/lib/dri" ]; diff --git a/pkgs/development/libraries/libva/default.nix b/pkgs/development/libraries/libva/default.nix index 6b8c3631fb37..0ba49da06cfe 100644 --- a/pkgs/development/libraries/libva/default.nix +++ b/pkgs/development/libraries/libva/default.nix @@ -1,11 +1,11 @@ { stdenv, lib, fetchFromGitHub, autoreconfHook, pkgconfig , libXext, libdrm, libXfixes, wayland, libffi, libX11 -, libGL -, minimal ? true, libva +, libGL, libGL_driver +, minimal ? false, libva-minimal }: stdenv.mkDerivation rec { - name = "libva-${lib.optionalString (!minimal) "full-"}${version}"; + name = "libva-${lib.optionalString minimal "minimal-"}${version}"; version = "2.1.0"; # update libva-utils and vaapiIntel as well @@ -21,13 +21,14 @@ stdenv.mkDerivation rec { nativeBuildInputs = [ autoreconfHook pkgconfig ]; buildInputs = [ libdrm ] - ++ lib.optionals (!minimal) [ libva libX11 libXext libXfixes wayland libffi libGL ]; + ++ lib.optionals (!minimal) [ libva-minimal libX11 libXext libXfixes wayland libffi libGL ]; # TODO: share libs between minimal and !minimal - perhaps just symlink them enableParallelBuilding = true; configureFlags = [ - "--with-drivers-path=${libGL.driverLink}/lib/dri" + # Add FHS paths for non-NixOS applications. + "--with-drivers-path=${libGL_driver.driverLink}/lib/dri:/usr/lib/dri:/usr/lib32/dri" ] ++ lib.optionals (!minimal) [ "--enable-glx" ]; installFlags = [ diff --git a/pkgs/development/libraries/libvdpau/default.nix b/pkgs/development/libraries/libvdpau/default.nix index eebdc2941974..35c339b45d09 100644 --- a/pkgs/development/libraries/libvdpau/default.nix +++ b/pkgs/development/libraries/libvdpau/default.nix @@ -1,7 +1,8 @@ -{ stdenv, fetchurl, pkgconfig, xorg, libGL }: +{ stdenv, fetchurl, pkgconfig, xorg, libGL_driver }: stdenv.mkDerivation rec { - name = "libvdpau-1.1.1"; + name = "libvdpau-${version}"; + version = "1.1.1"; src = fetchurl { url = "https://people.freedesktop.org/~aplattner/vdpau/${name}.tar.bz2"; @@ -16,7 +17,7 @@ stdenv.mkDerivation rec { propagatedBuildInputs = [ xorg.libX11 ]; configureFlags = stdenv.lib.optional stdenv.isLinux - "--with-module-dir=${libGL.driverLink}/lib/vdpau"; + "--with-module-dir=${libGL_driver.driverLink}/lib/vdpau"; installFlags = [ "moduledir=$(out)/lib/vdpau" ]; diff --git a/pkgs/development/libraries/mesa-glu/default.nix b/pkgs/development/libraries/mesa-glu/default.nix index 9a6441956db3..4e35d6ed24d1 100644 --- a/pkgs/development/libraries/mesa-glu/default.nix +++ b/pkgs/development/libraries/mesa-glu/default.nix @@ -1,7 +1,8 @@ -{ stdenv, fetchurl, pkgconfig, mesa_noglu }: +{ stdenv, fetchurl, pkgconfig, libGL }: stdenv.mkDerivation rec { - name = "glu-9.0.0"; + name = "glu-${version}"; + version = "9.0.0"; src = fetchurl { url = "ftp://ftp.freedesktop.org/pub/mesa/glu/${name}.tar.bz2"; @@ -12,7 +13,7 @@ stdenv.mkDerivation rec { ''; nativeBuildInputs = [ pkgconfig ]; - propagatedBuildInputs = [ mesa_noglu ]; + propagatedBuildInputs = [ libGL ]; outputs = [ "out" "dev" ]; diff --git a/pkgs/development/libraries/mesa/default.nix b/pkgs/development/libraries/mesa/default.nix index fbbfe44e27e8..984c11d55b9b 100644 --- a/pkgs/development/libraries/mesa/default.nix +++ b/pkgs/development/libraries/mesa/default.nix @@ -1,8 +1,9 @@ { stdenv, fetchurl, fetchpatch, lib , pkgconfig, intltool, autoreconfHook, substituteAll , file, expat, libdrm, xorg, wayland, wayland-protocols, openssl -, llvmPackages, libffi, libomxil-bellagio, libva +, llvmPackages, libffi, libomxil-bellagio, libva-minimal , libelf, libvdpau, valgrind-light, python2 +, libglvnd , grsecEnabled ? false , enableRadv ? true # Texture floats are patented, see docs/patents.txt, so we don't enable them for full Mesa. @@ -54,7 +55,7 @@ let (if gallium_ == null then defaultGalliumDrivers else gallium_) - ++ ["swrast"]; + ++ ["swrast" "virgl"]; driDrivers = (if dri_ == null then defaultDriDrivers @@ -68,10 +69,9 @@ in let version = "17.3.6"; branch = head (splitString "." version); - driverLink = "/run/opengl-driver" + optionalString stdenv.isi686 "-32"; in -stdenv.mkDerivation { +let self = stdenv.mkDerivation { name = "mesa-noglu-${version}"; src = fetchurl { @@ -98,10 +98,10 @@ stdenv.mkDerivation { # TODO: Figure out how to enable opencl without having a runtime dependency on clang configureFlags = [ - "--sysconfdir=${driverLink}/etc" + "--sysconfdir=${libglvnd.driverLink}/etc" "--localstatedir=/var" "--with-dri-driverdir=$(drivers)/lib/dri" - "--with-dri-searchpath=${driverLink}/lib/dri" + "--with-dri-searchpath=${libglvnd.driverLink}/lib/dri" "--with-platforms=x11,wayland,drm" ] ++ (optional (galliumDrivers != []) @@ -118,6 +118,7 @@ stdenv.mkDerivation { (enableFeature grsecEnabled "glx-rts") (enableFeature stdenv.isLinux "dri3") (enableFeature stdenv.isLinux "nine") # Direct3D in Wine + "--enable-libglvnd" "--enable-dri" "--enable-driglx-direct" "--enable-gles1" @@ -146,21 +147,21 @@ stdenv.mkDerivation { ++ optional stdenv.isLinux libdrm; buildInputs = with xorg; [ - expat llvmPackages.llvm + expat llvmPackages.llvm libglvnd glproto dri2proto dri3proto presentproto libX11 libXext libxcb libXt libXfixes libxshmfence libffi wayland wayland-protocols libvdpau libelf libXvMC - libomxil-bellagio libva libpthreadstubs openssl/*or another sha1 provider*/ + libomxil-bellagio libva-minimal libpthreadstubs openssl/*or another sha1 provider*/ valgrind-light python2 ]; - enableParallelBuilding = true; doCheck = false; installFlags = [ "sysconfdir=\${out}/etc" "localstatedir=\${TMPDIR}" + "vendorjsondir=\${out}/share/glvnd/egl_vendor.d" ]; # TODO: probably not all .la files are completely fixed, but it shouldn't matter; @@ -174,8 +175,10 @@ stdenv.mkDerivation { $out/lib/libxatracker* \ $out/lib/libvulkan_* + # Move other drivers to a separate output mv $out/lib/dri/* $drivers/lib/dri # */ rmdir "$out/lib/dri" + mv $out/lib/lib*_mesa* $drivers/lib # move libOSMesa to $osmesa, as it's relatively big mkdir -p {$osmesa,$drivers}/lib/ @@ -185,10 +188,22 @@ stdenv.mkDerivation { sed "/^libdir=/s,$out,$osmesa," -i $osmesa/lib/libOSMesa*.la # set the default search path for DRI drivers; used e.g. by X server - substituteInPlace "$dev/lib/pkgconfig/dri.pc" --replace '$(drivers)' "${driverLink}" - '' + optionalString (vulkanDrivers != []) '' - # move share/vulkan/icd.d/ + substituteInPlace "$dev/lib/pkgconfig/dri.pc" --replace '$(drivers)' "${libglvnd.driverLink}" + + # remove GLES libraries; they are provided by libglvnd + rm $out/lib/lib{GLESv1_CM,GLESv2}.* + + # remove pkgconfig files for GL/GLES/EGL; they are provided by libGL. + rm $dev/lib/pkgconfig/{gl,egl,glesv1_cm,glesv2}.pc + + # move vendor files mv $out/share/ $drivers/ + + # Update search path used by glvnd + for js in $drivers/share/glvnd/egl_vendor.d/*.json; do + substituteInPlace "$js" --replace '"libEGL_' '"'"$drivers/lib/libEGL_" + done + '' + optionalString (vulkanDrivers != []) '' # Update search path used by Vulkan (it's pointing to $out but # drivers are in $drivers) for js in $drivers/share/vulkan/icd.d/*.json; do @@ -209,13 +224,48 @@ stdenv.mkDerivation { done ''; - passthru = { inherit libdrm version driverLink; }; + passthru = { + inherit libdrm version; + inherit (libglvnd) driverLink; + + stubs = stdenv.mkDerivation { + name = "libGL-${libglvnd.version}"; + outputs = [ "out" "dev" ]; + + # Use stub libraries from libglvnd and headers from Mesa. + buildCommand = '' + ln -s ${libglvnd.out} $out + mkdir -p $dev/{,lib/pkgconfig,nix-support} + echo "$out" > $dev/nix-support/propagated-build-inputs + ln -s ${self.dev}/include $dev/include + + genPkgConfig() { + local name="$1" + local lib="$2" + + cat <<EOF >$dev/lib/pkgconfig/$name.pc + Name: $name + Description: $lib library + Version: ${self.version} + Libs: -L${libglvnd.out}/lib -l$lib + Cflags: -I${self.dev}/include + EOF + } + + genPkgConfig gl GL + genPkgConfig egl EGL + genPkgConfig glesv1_cm GLESv1_CM + genPkgConfig glesv2 GLESv2 + ''; + }; + }; meta = with stdenv.lib; { description = "An open source implementation of OpenGL"; homepage = https://www.mesa3d.org/; license = licenses.mit; # X11 variant, in most files - platforms = platforms.mesaPlatforms; + platforms = platforms.linux; maintainers = with maintainers; [ eduarrrd vcunat ]; }; -} +}; +in self diff --git a/pkgs/development/libraries/ocl-icd/default.nix b/pkgs/development/libraries/ocl-icd/default.nix index afd2a7b12dfa..ec6dc5f90528 100644 --- a/pkgs/development/libraries/ocl-icd/default.nix +++ b/pkgs/development/libraries/ocl-icd/default.nix @@ -1,4 +1,4 @@ -{stdenv, fetchurl, ruby, opencl-headers, libGL }: +{stdenv, fetchurl, ruby, opencl-headers, libGL_driver }: stdenv.mkDerivation rec { name = "ocl-icd-${version}"; @@ -14,7 +14,7 @@ stdenv.mkDerivation rec { buildInputs = [ opencl-headers ]; postPatch = '' - sed -i 's,"/etc/OpenCL/vendors","${libGL.driverLink}/etc/OpenCL/vendors",g' ocl_icd_loader.c + sed -i 's,"/etc/OpenCL/vendors","${libGL_driver.driverLink}/etc/OpenCL/vendors",g' ocl_icd_loader.c ''; meta = with stdenv.lib; { diff --git a/pkgs/development/libraries/pango/default.nix b/pkgs/development/libraries/pango/default.nix index 3806926fa244..d880d41c7084 100644 --- a/pkgs/development/libraries/pango/default.nix +++ b/pkgs/development/libraries/pango/default.nix @@ -1,5 +1,5 @@ { stdenv, fetchurl, fetchpatch, pkgconfig, libXft, cairo, harfbuzz -, libintlOrEmpty, gobjectIntrospection, darwin +, libintl, gobjectIntrospection, darwin }: with stdenv.lib; @@ -25,7 +25,7 @@ stdenv.mkDerivation rec { CoreGraphics CoreText ]); - propagatedBuildInputs = [ cairo harfbuzz libXft ] ++ libintlOrEmpty; + propagatedBuildInputs = [ cairo harfbuzz libXft libintl ]; enableParallelBuilding = true; diff --git a/pkgs/development/libraries/pcre/default.nix b/pkgs/development/libraries/pcre/default.nix index 2ea5e923bad0..973798b849bc 100644 --- a/pkgs/development/libraries/pcre/default.nix +++ b/pkgs/development/libraries/pcre/default.nix @@ -35,6 +35,10 @@ in stdenv.mkDerivation rec { # https://bugs.exim.org/show_bug.cgi?id=2173 patches = [ ./stacksize-detection.patch ]; + preCheck = '' + patchShebangs RunGrepTest + ''; + doCheck = !(with hostPlatform; isCygwin || isFreeBSD) && hostPlatform == buildPlatform; # XXX: test failure on Cygwin # we are running out of stack on both freeBSDs on Hydra diff --git a/pkgs/development/libraries/poppler/default.nix b/pkgs/development/libraries/poppler/default.nix index 1f360f075886..11dd8ec32910 100644 --- a/pkgs/development/libraries/poppler/default.nix +++ b/pkgs/development/libraries/poppler/default.nix @@ -1,4 +1,4 @@ -{ stdenv, lib, fetchurl, cmake, ninja, pkgconfig, libiconv, libintlOrEmpty +{ stdenv, lib, fetchurl, cmake, ninja, pkgconfig, libiconv, libintl , zlib, curl, cairo, freetype, fontconfig, lcms, libjpeg, openjpeg , withData ? true, poppler_data , qt5Support ? false, qtbase ? null @@ -8,7 +8,7 @@ }: let # beware: updates often break cups-filters build - version = "0.62.0"; + version = "0.63.0"; mkFlag = optset: flag: "-DENABLE_${flag}=${if optset then "on" else "off"}"; in stdenv.mkDerivation rec { @@ -16,12 +16,12 @@ stdenv.mkDerivation rec { src = fetchurl { url = "${meta.homepage}/poppler-${version}.tar.xz"; - sha256 = "1ii9ly1pngyvs0aiq2wxpya08hidpl54y7nsb8b1vxnnskgp76jv"; + sha256 = "04d1z1ygyb3llzc6s6c99wxafvljj2sc5b76djif34f7mzfqmk17"; }; outputs = [ "out" "dev" ]; - buildInputs = [ libiconv ] ++ libintlOrEmpty ++ lib.optional withData poppler_data; + buildInputs = [ libiconv libintl ] ++ lib.optional withData poppler_data; # TODO: reduce propagation to necessary libs propagatedBuildInputs = with lib; @@ -32,6 +32,7 @@ stdenv.mkDerivation rec { nativeBuildInputs = [ cmake ninja pkgconfig ]; + # Not sure when and how to pass it. It seems an upstream bug anyway. CXXFLAGS = stdenv.lib.optionalString stdenv.cc.isClang "-std=c++11"; cmakeFlags = [ diff --git a/pkgs/development/libraries/qca2/default.nix b/pkgs/development/libraries/qca2/default.nix index 4976399a66a6..568e7ce07b3b 100644 --- a/pkgs/development/libraries/qca2/default.nix +++ b/pkgs/development/libraries/qca2/default.nix @@ -1,4 +1,4 @@ -{ stdenv, fetchurl, cmake, pkgconfig, qt }: +{ stdenv, fetchurl, cmake, pkgconfig, qt, darwin }: stdenv.mkDerivation rec { name = "qca-${version}"; @@ -10,7 +10,7 @@ stdenv.mkDerivation rec { }; nativeBuildInputs = [ cmake pkgconfig ]; - buildInputs = [ qt ]; + buildInputs = [ (stdenv.lib.optional stdenv.isDarwin darwin.apple_sdk.frameworks.Security) qt ]; enableParallelBuilding = true; @@ -25,6 +25,6 @@ stdenv.mkDerivation rec { license = "LGPL"; homepage = http://delta.affinix.com/qca; maintainers = [ maintainers.sander ]; - platforms = platforms.linux; + platforms = platforms.unix; }; } diff --git a/pkgs/development/libraries/qscintilla/default.nix b/pkgs/development/libraries/qscintilla/default.nix index d6bd90fa47d8..f442e1bf908e 100644 --- a/pkgs/development/libraries/qscintilla/default.nix +++ b/pkgs/development/libraries/qscintilla/default.nix @@ -3,6 +3,11 @@ , withQt5 ? false, qtbase ? null, qtmacextras ? null, qmake ? null }: +# Fix Xcode 8 compilation problem +let xcodePatch = + fetchurl { url = "https://raw.githubusercontent.com/Homebrew/formula-patches/a651d71/qscintilla2/xcode-8.patch"; + sha256 = "1a88309fdfd421f4458550b710a562c622d72d6e6fdd697107e4a43161d69bc9"; }; +in stdenv.mkDerivation rec { pname = "qscintilla"; version = "2.9.4"; @@ -19,6 +24,9 @@ stdenv.mkDerivation rec { nativeBuildInputs = [ unzip ] ++ (if withQt5 then [ qmake ] else [ qmake4Hook ]); + + patches = [] ++ lib.optional withQt5 [ xcodePatch ]; + enableParallelBuilding = true; preConfigure = '' diff --git a/pkgs/development/libraries/qt-4.x/4.8/default.nix b/pkgs/development/libraries/qt-4.x/4.8/default.nix index bafe36647359..10f892bc4d00 100644 --- a/pkgs/development/libraries/qt-4.x/4.8/default.nix +++ b/pkgs/development/libraries/qt-4.x/4.8/default.nix @@ -76,7 +76,6 @@ stdenv.mkDerivation rec { icu = icu.out; libXfixes = libXfixes.out; glibc = stdenv.cc.libc.out; - openglDriver = if libGLSupported then libGL.driverLink else "/no-such-path"; }) (fetchpatch { name = "fix-medium-font.patch"; diff --git a/pkgs/development/libraries/qt-4.x/4.8/dlopen-absolute-paths.diff b/pkgs/development/libraries/qt-4.x/4.8/dlopen-absolute-paths.diff index 0f5cf2b79c96..4c64e9e26e30 100644 --- a/pkgs/development/libraries/qt-4.x/4.8/dlopen-absolute-paths.diff +++ b/pkgs/development/libraries/qt-4.x/4.8/dlopen-absolute-paths.diff @@ -59,32 +59,6 @@ index 6b42d1e..f88b628 100644 lib.setLoadHints(QLibrary::ImprovedSearchHeuristics); if (!lib.load()) return; -diff --git a/src/plugins/platforms/xcb/qglxintegration.cpp b/src/plugins/platforms/xcb/qglxintegration.cpp -index 229d6f9..c122bf3 100644 ---- a/src/plugins/platforms/xcb/qglxintegration.cpp -+++ b/src/plugins/platforms/xcb/qglxintegration.cpp -@@ -136,7 +136,7 @@ void* QGLXContext::getProcAddress(const QString& procName) - { - extern const QString qt_gl_library_name(); - // QLibrary lib(qt_gl_library_name()); -- QLibrary lib(QLatin1String("GL")); -+ QLibrary lib(QLatin1String("@openglDriver@/lib/libGL")); - glXGetProcAddressARB = (qt_glXGetProcAddressARB) lib.resolve("glXGetProcAddressARB"); - } - } -diff --git a/src/plugins/platforms/xlib/qglxintegration.cpp b/src/plugins/platforms/xlib/qglxintegration.cpp -index 2467247..a2441d4 100644 ---- a/src/plugins/platforms/xlib/qglxintegration.cpp -+++ b/src/plugins/platforms/xlib/qglxintegration.cpp -@@ -137,7 +137,7 @@ void* QGLXContext::getProcAddress(const QString& procName) - { - extern const QString qt_gl_library_name(); - // QLibrary lib(qt_gl_library_name()); -- QLibrary lib(QLatin1String("GL")); -+ QLibrary lib(QLatin1String("@openglDriver@/lib/libGL")); - glXGetProcAddressARB = (qt_glXGetProcAddressARB) lib.resolve("glXGetProcAddressARB"); - } - } diff --git a/src/plugins/platforms/xlib/qxlibstatic.cpp b/src/plugins/platforms/xlib/qxlibstatic.cpp index f8f3d69..d63c5bc 100644 --- a/src/plugins/platforms/xlib/qxlibstatic.cpp diff --git a/pkgs/development/libraries/qt-5/modules/qtwebengine.nix b/pkgs/development/libraries/qt-5/modules/qtwebengine.nix index df9995bc3b9f..4825c1b167cd 100644 --- a/pkgs/development/libraries/qt-5/modules/qtwebengine.nix +++ b/pkgs/development/libraries/qt-5/modules/qtwebengine.nix @@ -4,7 +4,7 @@ , bison, coreutils, flex, git, gperf, ninja, pkgconfig, python2, which , xorg, libXcursor, libXScrnSaver, libXrandr, libXtst -, fontconfig, freetype, harfbuzz, icu, dbus +, fontconfig, freetype, harfbuzz, icu, dbus, libdrm , zlib, minizip, libjpeg, libpng, libtiff, libwebp, libopus , jsoncpp, protobuf, libvpx, srtp, snappy, nss, libevent , alsaLib @@ -104,7 +104,7 @@ qtModule { # X11 libs xorg.xrandr libXScrnSaver libXcursor libXrandr xorg.libpciaccess libXtst - xorg.libXcomposite + xorg.libXcomposite xorg.libXdamage libdrm ]; dontUseNinjaBuild = true; diff --git a/pkgs/development/libraries/qwt/6.nix b/pkgs/development/libraries/qwt/6.nix index 314ab0f9e611..6e0fa53aa828 100644 --- a/pkgs/development/libraries/qwt/6.nix +++ b/pkgs/development/libraries/qwt/6.nix @@ -22,7 +22,7 @@ stdenv.mkDerivation rec { homepage = http://qwt.sourceforge.net/; # LGPL 2.1 plus a few exceptions (more liberal) license = stdenv.lib.licenses.qwt; - platforms = platforms.linux; + platforms = platforms.unix; maintainers = [ maintainers.bjornfor ]; branch = "6"; }; diff --git a/pkgs/development/libraries/qwt/default.nix b/pkgs/development/libraries/qwt/default.nix index da5769e92cd1..f900de5e578b 100644 --- a/pkgs/development/libraries/qwt/default.nix +++ b/pkgs/development/libraries/qwt/default.nix @@ -25,7 +25,7 @@ stdenv.mkDerivation rec { homepage = http://qwt.sourceforge.net/; # LGPL 2.1 plus a few exceptions (more liberal) license = stdenv.lib.licenses.qwt; - platforms = platforms.linux; + platforms = platforms.unix; maintainers = [ maintainers.bjornfor ]; }; } diff --git a/pkgs/development/libraries/science/math/atlas/default.nix b/pkgs/development/libraries/science/math/atlas/default.nix index d971f1a2e0b2..8cca5565bf6f 100644 --- a/pkgs/development/libraries/science/math/atlas/default.nix +++ b/pkgs/development/libraries/science/math/atlas/default.nix @@ -45,7 +45,9 @@ let inherit (stdenv.lib) optional optionalString; - version = "3.10.3"; + # Don't upgrade until https://github.com/math-atlas/math-atlas/issues/44 + # is resolved. + version = "3.10.2"; in stdenv.mkDerivation { @@ -53,7 +55,7 @@ stdenv.mkDerivation { src = fetchurl { url = "mirror://sourceforge/math-atlas/atlas${version}.tar.bz2"; - sha256 = "1dyjlq3fiparvm8ypwk6rsmjzmnwk81l88gkishphpvc79ryp216"; + sha256 = "0bqh4bdnjdyww4mcpg6kn0x7338mfqbdgysn97dzrwwb26di7ars"; }; buildInputs = [ gfortran ]; diff --git a/pkgs/development/libraries/science/math/openblas/default.nix b/pkgs/development/libraries/science/math/openblas/default.nix index 07d2a04c5e20..5ac0bcd1d7d7 100644 --- a/pkgs/development/libraries/science/math/openblas/default.nix +++ b/pkgs/development/libraries/science/math/openblas/default.nix @@ -60,7 +60,7 @@ let TARGET = "ATHLON"; DYNAMIC_ARCH = "1"; CC = "gcc"; - USE_OPENMP = "1"; + USE_OPENMP = if stdenv.hostPlatform.isMusl then "0" else "1"; }; }; in diff --git a/pkgs/development/libraries/spice-gtk/default.nix b/pkgs/development/libraries/spice-gtk/default.nix index f9b3de36b2c4..8d826f01360f 100644 --- a/pkgs/development/libraries/spice-gtk/default.nix +++ b/pkgs/development/libraries/spice-gtk/default.nix @@ -2,7 +2,7 @@ , openssl, libpulseaudio, pixman, gobjectIntrospection, libjpeg_turbo, zlib , cyrus_sasl, python2Packages, autoreconfHook, usbredir, libsoup , polkit, acl, usbutils, vala -, gtk3, epoxy }: +, gtk3, epoxy, libdrm }: with stdenv.lib; @@ -20,7 +20,7 @@ in stdenv.mkDerivation rec { buildInputs = [ spice-protocol celt_0_5_1 openssl libpulseaudio pixman - libjpeg_turbo zlib cyrus_sasl python pygtk usbredir gtk3 epoxy + libjpeg_turbo zlib cyrus_sasl python pygtk usbredir gtk3 epoxy libdrm polkit acl usbutils ]; diff --git a/pkgs/development/libraries/srtp/default.nix b/pkgs/development/libraries/srtp/default.nix index d4ea531f886e..29ad55eb9d92 100644 --- a/pkgs/development/libraries/srtp/default.nix +++ b/pkgs/development/libraries/srtp/default.nix @@ -5,13 +5,13 @@ with stdenv.lib; stdenv.mkDerivation rec { name = "libsrtp-${version}"; - version = "1.5.4"; + version = "2.1.0"; src = fetchFromGitHub { owner = "cisco"; repo = "libsrtp"; rev = "v${version}"; - sha256 = "0s029m4iw0nsvnsm2hlz8yajrasdvf315iv2dw8mfm7nhbshwsqa"; + sha256 = "1q2rf1d2bsypdnw9k8ag6hrh9vbinfa504d1f42fdgdqw31d6lib"; }; nativeBuildInputs = [ pkgconfig ]; diff --git a/pkgs/development/libraries/stfl/default.nix b/pkgs/development/libraries/stfl/default.nix index fd9ab5a2036d..89261b665f50 100644 --- a/pkgs/development/libraries/stfl/default.nix +++ b/pkgs/development/libraries/stfl/default.nix @@ -13,8 +13,6 @@ stdenv.mkDerivation rec { buildPhase = '' sed -i s/gcc/cc/g Makefile sed -i s%ncursesw/ncurses.h%ncurses.h% stfl_internals.h - '' + stdenv.lib.optionalString (stdenv.hostPlatform.libc != "glibc") '' - sed -i 's/LDLIBS += -lncursesw/LDLIBS += -lncursesw -liconv/' Makefile '' + ( stdenv.lib.optionalString stdenv.isDarwin '' sed -i s/-soname/-install_name/ Makefile '' ) + '' @@ -36,4 +34,3 @@ stdenv.mkDerivation rec { platforms = stdenv.lib.platforms.unix; }; } - diff --git a/pkgs/development/libraries/ti-rpc/default.nix b/pkgs/development/libraries/ti-rpc/default.nix index aa134d351044..99f0bb65441c 100644 --- a/pkgs/development/libraries/ti-rpc/default.nix +++ b/pkgs/development/libraries/ti-rpc/default.nix @@ -8,14 +8,12 @@ stdenv.mkDerivation rec { sha256 = "0ppxl3k3nsz0qdakq844i2kj4fvh9h937lhx26bgmpmxq67sghw6"; }; - patches = stdenv.lib.optional stdenv.hostPlatform.isMusl - (fetchpatch { - url = "https://raw.githubusercontent.com/openembedded/openembedded-core/2be873301420ec6ca2c70d899b7c49a7e2b0954d/meta/recipes-extended/libtirpc/libtirpc/0001-replace-__bzero-with-memset-API.patch"; - sha256 = "1jmbn0j2bnjp0j9z5vzz5xiwyv3kd28w5pixbqsy2lz6q8nii7cf"; - }); - postPatch = '' sed '1i#include <stdint.h>' -i src/xdr_sizeof.c + '' + stdenv.lib.optionalString stdenv.hostPlatform.isMusl '' + substituteInPlace tirpc/rpc/types.h \ + --replace '#if defined __APPLE_CC__ || defined __FreeBSD__' \ + '#if defined __APPLE_CC__ || defined __FreeBSD__ || !defined __GLIBC__' ''; nativeBuildInputs = [ autoreconfHook ]; diff --git a/pkgs/development/libraries/usbredir/default.nix b/pkgs/development/libraries/usbredir/default.nix index 507c494ea27d..515c3b2ca3b9 100644 --- a/pkgs/development/libraries/usbredir/default.nix +++ b/pkgs/development/libraries/usbredir/default.nix @@ -9,9 +9,7 @@ stdenv.mkDerivation rec { sha256 = "1wsnmk4wjpdhbn1zaxg6bmyxspcki2zgy0am9lk037rnl4krwzj0"; }; - # Works around bunch of "format '%lu' expects argument of type 'long unsigned int', but argument 4 has type 'uint64_t {aka long long unsigned int}'" warnings - NIX_CFLAGS_COMPILE = stdenv.lib.optional (!stdenv.is64bit) "-Wno-error=format" - ++ [ "-Wno-error=format-truncation" ]; # newly detected with gcc-7 + NIX_CFLAGS_COMPILE = [ "-Wno-error" ]; nativeBuildInputs = [ pkgconfig ]; buildInputs = [ libusb ]; diff --git a/pkgs/development/libraries/virglrenderer/default.nix b/pkgs/development/libraries/virglrenderer/default.nix index 0d9abc0247e2..2cd3b5a20c0c 100644 --- a/pkgs/development/libraries/virglrenderer/default.nix +++ b/pkgs/development/libraries/virglrenderer/default.nix @@ -1,4 +1,4 @@ -{ stdenv, fetchurl, pkgconfig, libGLU, epoxy, libX11 }: +{ stdenv, fetchurl, pkgconfig, libGLU, epoxy, libX11, libdrm, mesa_noglu }: stdenv.mkDerivation rec { @@ -11,10 +11,15 @@ stdenv.mkDerivation rec { sha256 = "a549e351e0eb2ad1df471386ddcf85f522e7202808d1616ee9ff894209066e1a"; }; - buildInputs = [ libGLU epoxy libX11 ]; + buildInputs = [ libGLU epoxy libX11 libdrm mesa_noglu ]; nativeBuildInputs = [ pkgconfig ]; + # Fix use of fd_set without proper include + prePatch = '' + sed -e '1i#include <sys/select.h>' -i vtest/util.c + ''; + meta = with stdenv.lib; { description = "A virtual 3D GPU library that allows a qemu guest to use the host GPU for accelerated 3D rendering"; homepage = https://virgil3d.github.io/; diff --git a/pkgs/development/libraries/vulkan-loader/default.nix b/pkgs/development/libraries/vulkan-loader/default.nix index 4bc642030517..9b73b9e1e416 100644 --- a/pkgs/development/libraries/vulkan-loader/default.nix +++ b/pkgs/development/libraries/vulkan-loader/default.nix @@ -1,6 +1,6 @@ { stdenv, fetchgit, fetchFromGitHub, cmake, pkgconfig, git, python3, python3Packages, glslang, spirv-tools, x11, libxcb, libXrandr, - libXext, wayland, libGL, makeWrapper }: + libXext, wayland, libGL_driver, makeWrapper }: let version = "1.0.61.1"; @@ -24,7 +24,7 @@ stdenv.mkDerivation rec { cmakeFlags = [ "-DBUILD_WSI_MIR_SUPPORT=OFF" - "-DFALLBACK_DATA_DIRS=${libGL.driverLink}/share:/usr/local/share:/usr/share" + "-DFALLBACK_DATA_DIRS=${libGL_driver.driverLink}/share:/usr/local/share:/usr/share" ]; outputs = [ "out" "dev" "demos" ]; diff --git a/pkgs/development/libraries/webkitgtk/2.20.nix b/pkgs/development/libraries/webkitgtk/2.20.nix index 8b44f11ee930..47144bee83ac 100644 --- a/pkgs/development/libraries/webkitgtk/2.20.nix +++ b/pkgs/development/libraries/webkitgtk/2.20.nix @@ -2,7 +2,7 @@ , pkgconfig, gettext, gobjectIntrospection, libnotify, gnutls, libgcrypt , gtk3, wayland, libwebp, enchant2, xorg, libxkbcommon, epoxy, at-spi2-core , libxml2, libsoup, libsecret, libxslt, harfbuzz, libpthreadstubs, pcre, nettle, libtasn1, p11-kit -, libidn, libedit, readline, libGLU_combined, libintlOrEmpty +, libidn, libedit, readline, libGLU_combined, libintl , enableGeoLocation ? true, geoclue2, sqlite , enableGtk2Plugins ? false, gtk2 ? null , gst-plugins-base, gst-plugins-bad, woff2 @@ -60,20 +60,18 @@ stdenv.mkDerivation rec { "-DENABLE_GTKDOC=OFF" ]; - NIX_CFLAGS_COMPILE = optionalString stdenv.isDarwin " -lintl"; - nativeBuildInputs = [ cmake ninja perl python2 ruby bison gperf pkgconfig gettext gobjectIntrospection ]; - buildInputs = libintlOrEmpty ++ [ - libwebp enchant2 libnotify gnutls pcre nettle libidn libgcrypt woff2 + buildInputs = [ + libintl libwebp enchant2 libnotify gnutls pcre nettle libidn libgcrypt woff2 libxml2 libsecret libxslt harfbuzz libpthreadstubs libtasn1 p11-kit sqlite gst-plugins-base gst-plugins-bad libxkbcommon epoxy at-spi2-core ] ++ optional enableGeoLocation geoclue2 ++ optional enableGtk2Plugins gtk2 - ++ (with xorg; [ libXdmcp libXt libXtst ]) + ++ (with xorg; [ libXdmcp libXt libXtst libXdamage ]) ++ optionals stdenv.isDarwin [ libedit readline libGLU_combined ] ++ optional stdenv.isLinux wayland; diff --git a/pkgs/development/mobile/genymotion/default.nix b/pkgs/development/mobile/genymotion/default.nix index db3cb07765b9..37834eff9473 100644 --- a/pkgs/development/mobile/genymotion/default.nix +++ b/pkgs/development/mobile/genymotion/default.nix @@ -5,9 +5,9 @@ let packages = [ - stdenv.cc.cc zlib glib xorg.libX11 libxkbcommon libXmu libXi libXext + stdenv.cc.cc zlib glib xorg.libX11 libxkbcommon libXmu libXi libXext libGL ]; - libPath = "${stdenv.lib.makeLibraryPath packages}:${libGL.driverLink}/lib"; + libPath = "${stdenv.lib.makeLibraryPath packages}"; in stdenv.mkDerivation rec { name = "genymotion-${version}"; diff --git a/pkgs/development/perl-modules/generic/builder.sh b/pkgs/development/perl-modules/generic/builder.sh index 937dad971b87..b833ceb3cab0 100644 --- a/pkgs/development/perl-modules/generic/builder.sh +++ b/pkgs/development/perl-modules/generic/builder.sh @@ -22,7 +22,7 @@ preConfigure() { fi done - perl Makefile.PL PREFIX=$out INSTALLDIRS=site $makeMakerFlags PERL=$(type -P perl) FULLPERL=$perl/bin/perl + perl Makefile.PL PREFIX=$out INSTALLDIRS=site $makeMakerFlags PERL=$(type -P perl) FULLPERL=\"$perl/bin/perl\" } diff --git a/pkgs/development/python-modules/numpy/default.nix b/pkgs/development/python-modules/numpy/default.nix index 3fce29cd8cda..b561149b2abd 100644 --- a/pkgs/development/python-modules/numpy/default.nix +++ b/pkgs/development/python-modules/numpy/default.nix @@ -1,14 +1,14 @@ -{lib, fetchPypi, python, buildPythonPackage, isPy27, isPyPy, gfortran, nose, blas}: +{lib, fetchPypi, python, buildPythonPackage, isPy27, isPyPy, gfortran, nose, blas, hostPlatform }: buildPythonPackage rec { pname = "numpy"; - version = "1.14.1"; + version = "1.14.2"; name = "${pname}-${version}"; src = fetchPypi { inherit pname version; extension = "zip"; - sha256 = "fa0944650d5d3fb95869eaacd8eedbd2d83610c85e271bd9d3495ffa9bc4dc9c"; + sha256 = "facc6f925c3099ac01a1f03758100772560a0b020fb9d70f210404be08006bcb"; }; disabled = isPyPy; @@ -20,6 +20,18 @@ buildPythonPackage rec { ./numpy-distutils-C++.patch ]; + postPatch = lib.optionalString hostPlatform.isMusl '' + # Use fenv.h + sed -i \ + numpy/core/src/npymath/ieee754.c.src \ + numpy/core/include/numpy/ufuncobject.h \ + -e 's/__GLIBC__/__linux__/' + # Don't use various complex trig functions + substituteInPlace numpy/core/src/private/npy_config.h \ + --replace '#if defined(__GLIBC__)' "#if 1" \ + --replace '#if !__GLIBC_PREREQ(2, 18)' "#if 1" + ''; + preConfigure = '' sed -i 's/-faltivec//' numpy/distutils/system_info.py export NPY_NUM_BUILD_JOBS=$NIX_BUILD_CORES diff --git a/pkgs/development/r-modules/generic-builder.nix b/pkgs/development/r-modules/generic-builder.nix index ff6c3ad1b903..0d731de33f84 100644 --- a/pkgs/development/r-modules/generic-builder.nix +++ b/pkgs/development/r-modules/generic-builder.nix @@ -3,9 +3,9 @@ { name, buildInputs ? [], ... } @ attrs: stdenv.mkDerivation ({ - buildInputs = buildInputs ++ [R] ++ + buildInputs = buildInputs ++ [R gettext] ++ stdenv.lib.optionals attrs.requireX [utillinux xvfb_run] ++ - stdenv.lib.optionals stdenv.isDarwin [Cocoa Foundation gettext gfortran]; + stdenv.lib.optionals stdenv.isDarwin [Cocoa Foundation gfortran]; NIX_CFLAGS_COMPILE = stdenv.lib.optionalString stdenv.isDarwin "-I${libcxx}/include/c++/v1"; diff --git a/pkgs/development/tools/build-managers/cmake/setup-hook.sh b/pkgs/development/tools/build-managers/cmake/setup-hook.sh index c796c31cb70a..5053559bcca3 100755 --- a/pkgs/development/tools/build-managers/cmake/setup-hook.sh +++ b/pkgs/development/tools/build-managers/cmake/setup-hook.sh @@ -44,6 +44,20 @@ cmakeConfigurePhase() { cmakeFlags="-DCMAKE_STRIP=$(command -v $crossConfig-strip) $cmakeFlags" fi + # on macOS we want to prefer Unix-style headers to Frameworks + # because we usually do not package the framework + cmakeFlags="-DCMAKE_FIND_FRAMEWORK=last $cmakeFlags" + + # we never want to use the global macOS SDK + cmakeFlags="-DCMAKE_OSX_SYSROOT= $cmakeFlags" + + # disable OSX deployment target + # we don't want our binaries to have a "minimum" OSX version + cmakeFlags="-DCMAKE_OSX_DEPLOYMENT_TARGET= $cmakeFlags" + + # correctly detect our clang compiler + cmakeFlags="-DCMAKE_POLICY_DEFAULT_CMP0025=NEW $cmakeFlags" + # This installs shared libraries with a fully-specified install # name. By default, cmake installs shared libraries with just the # basename as the install name, which means that, on Darwin, they diff --git a/pkgs/development/tools/build-managers/gnumake/4.2/default.nix b/pkgs/development/tools/build-managers/gnumake/4.2/default.nix index e175205143fc..95466d843d69 100644 --- a/pkgs/development/tools/build-managers/gnumake/4.2/default.nix +++ b/pkgs/development/tools/build-managers/gnumake/4.2/default.nix @@ -20,6 +20,8 @@ stdenv.mkDerivation { # included Makefiles, don't look in /usr/include and friends. ./impure-dirs.patch ./pselect.patch + # Fix support for glibc 2.27's glob, inspired by http://www.linuxfromscratch.org/lfs/view/8.2/chapter05/make.html + ./glibc-2.27-glob.patch ]; nativeBuildInputs = stdenv.lib.optionals guileSupport [ pkgconfig ]; diff --git a/pkgs/development/tools/build-managers/gnumake/4.2/glibc-2.27-glob.patch b/pkgs/development/tools/build-managers/gnumake/4.2/glibc-2.27-glob.patch new file mode 100644 index 000000000000..186212d0d298 --- /dev/null +++ b/pkgs/development/tools/build-managers/gnumake/4.2/glibc-2.27-glob.patch @@ -0,0 +1,32 @@ +diff -Naur glob/glob.c glob/glob.c +--- glob/glob.c 2013-10-20 13:14:38.000000000 -0400 ++++ glob/glob.c 2018-03-16 14:32:38.483496170 -0400 +@@ -208,28 +208,9 @@ + #endif /* __GNU_LIBRARY__ || __DJGPP__ */ + + +-#if !defined __alloca && !defined __GNU_LIBRARY__ +- +-# ifdef __GNUC__ +-# undef alloca +-# define alloca(n) __builtin_alloca (n) +-# else /* Not GCC. */ +-# ifdef HAVE_ALLOCA_H + # include <alloca.h> +-# else /* Not HAVE_ALLOCA_H. */ +-# ifndef _AIX +-# ifdef WINDOWS32 +-# include <malloc.h> +-# else +-extern char *alloca (); +-# endif /* WINDOWS32 */ +-# endif /* Not _AIX. */ +-# endif /* sparc or HAVE_ALLOCA_H. */ +-# endif /* GCC. */ +- + # define __alloca alloca + +-#endif + + #ifndef __GNU_LIBRARY__ + # define __stat stat diff --git a/pkgs/development/tools/build-managers/gnumake/4.2/glibc-2.27.patch b/pkgs/development/tools/build-managers/gnumake/4.2/glibc-2.27.patch deleted file mode 100644 index c2639c6cc927..000000000000 --- a/pkgs/development/tools/build-managers/gnumake/4.2/glibc-2.27.patch +++ /dev/null @@ -1,24 +0,0 @@ -From 48c8a116a914a325a0497721f5d8b58d5bba34d4 Mon Sep 17 00:00:00 2001 -From: Paul Smith <psmith@gnu.org> -Date: Sun, 19 Nov 2017 15:09:16 -0500 -Subject: * configure.ac: Support GLIBC glob interface version 2 - ---- - configure.ac | 3 +-- - 1 file changed, 1 insertion(+), 2 deletions(-) - -diff -Naur a/configure b/configure ---- configure 2016-06-10 19:03:21.000000000 -0400 -+++ configure 2018-02-18 04:40:32.971371555 -0500 -@@ -11481,10 +11481,9 @@ - #include <glob.h> - #include <fnmatch.h> - --#define GLOB_INTERFACE_VERSION 1 - #if !defined _LIBC && defined __GNU_LIBRARY__ && __GNU_LIBRARY__ > 1 - # include <gnu-versions.h> --# if _GNU_GLOB_INTERFACE_VERSION == GLOB_INTERFACE_VERSION -+# if _GNU_GLOB_INTERFACE_VERSION == 1 || _GNU_GLOB_INTERFACE_VERSION == 2 - gnu glob - # endif - #endif diff --git a/pkgs/development/tools/build-managers/gnumake/4.2/head.nix b/pkgs/development/tools/build-managers/gnumake/4.2/head.nix deleted file mode 100644 index 5f3ae10c3e5b..000000000000 --- a/pkgs/development/tools/build-managers/gnumake/4.2/head.nix +++ /dev/null @@ -1,69 +0,0 @@ -{ stdenv, fetchurl, texinfo, guileSupport ? false, pkgconfig , guile ? null, autoreconfHook }: - -assert guileSupport -> ( guile != null ); - -let - version = "4.2.90"; - revision = "48c8a116a914a325a0497721f5d8b58d5bba34d4"; - revCount = "2491"; - shortRev = "48c8a11"; - - baseVersion = "4.2.1"; - baseTarball = fetchurl { - url = "mirror://gnu/make/make-${baseVersion}.tar.bz2"; - sha256 = "12f5zzyq2w56g95nni65hc0g5p7154033y2f3qmjvd016szn5qnn"; - }; -in -stdenv.mkDerivation { - name = "gnumake-${version}pre${revCount}_${shortRev}"; - - src = fetchurl { - url = "http://git.savannah.gnu.org/cgit/make.git/snapshot/make-${revision}.tar.gz"; - sha256 = "0k6yvhr2a5lh1qhflv02dyvq5p20ikgaakm8w6gr4xmkspljwpwx"; - }; - - postUnpack = '' - unpackFile ${baseTarball} - cp make-${baseVersion}/po/*.po $sourceRoot/po - cp make-${baseVersion}/doc/{fdl,make-stds}.texi $sourceRoot/doc - ''; - - patches = [ - # Purity: don't look for library dependencies (of the form `-lfoo') in /lib - # and /usr/lib. It's a stupid feature anyway. Likewise, when searching for - # included Makefiles, don't look in /usr/include and friends. - ./impure-dirs-head.patch - ]; - - postPatch = '' - # These aren't in the 4.2.1 tarball yet. - sed -i -e 's/sr//' -e 's/zh_TW//' po/LINGUAS - ''; - - nativeBuildInputs = [ autoreconfHook pkgconfig texinfo ]; - buildInputs = stdenv.lib.optional guileSupport guile; - - configureFlags = stdenv.lib.optional guileSupport "--with-guile"; - - outputs = [ "out" "man" "info" ]; - - meta = with stdenv.lib; { - homepage = http://www.gnu.org/software/make/; - description = "A tool to control the generation of non-source files from sources"; - license = licenses.gpl3Plus; - - longDescription = '' - Make is a tool which controls the generation of executables and - other non-source files of a program from the program's source files. - - Make gets its knowledge of how to build your program from a file - called the makefile, which lists each of the non-source files and - how to compute it from other files. When you write a program, you - should write a makefile for it, so that it is possible to use Make - to build and install the program. - ''; - - platforms = platforms.all; - maintainers = [ maintainers.vrthra ]; - }; -} diff --git a/pkgs/development/tools/build-managers/gnumake/4.2/impure-dirs-head.patch b/pkgs/development/tools/build-managers/gnumake/4.2/impure-dirs-head.patch deleted file mode 100644 index 06d39e13ce39..000000000000 --- a/pkgs/development/tools/build-managers/gnumake/4.2/impure-dirs-head.patch +++ /dev/null @@ -1,31 +0,0 @@ -diff -Naur a/src/read.c b/src/read.c ---- a/src/read.c 2017-11-19 15:17:47.000000000 -0500 -+++ b/src/read.c 2018-02-19 08:53:51.548755213 -0500 -@@ -109,10 +109,12 @@ - #endif - INCLUDEDIR, - #ifndef _AMIGA -+#if 0 - "/usr/gnu/include", - "/usr/local/include", - "/usr/include", - #endif -+#endif - 0 - }; - -diff -Naur a/src/remake.c b/src/remake.c ---- a/src/remake.c 2017-11-19 15:17:47.000000000 -0500 -+++ b/src/remake.c 2018-02-19 08:54:08.304101943 -0500 -@@ -1601,9 +1601,11 @@ - static const char *dirs[] = - { - #ifndef _AMIGA -+#if 0 - "/lib", - "/usr/lib", - #endif -+#endif - #if defined(WINDOWS32) && !defined(LIBDIR) - /* - * This is completely up to the user at product install time. Just define diff --git a/pkgs/development/tools/build-managers/meson/default.nix b/pkgs/development/tools/build-managers/meson/default.nix index 47e574236329..aa642ffa727f 100644 --- a/pkgs/development/tools/build-managers/meson/default.nix +++ b/pkgs/development/tools/build-managers/meson/default.nix @@ -43,6 +43,10 @@ in python3Packages.buildPythonApplication rec { src = ./fix-rpath.patch; inherit (builtins) storeDir; }) + + # No one will ever need more than 128 bytes of data structure + # https://github.com/mesonbuild/meson/issues/3113 + ./overly-strict-size-check.patch ]; setupHook = ./setup-hook.sh; diff --git a/pkgs/development/tools/build-managers/meson/overly-strict-size-check.patch b/pkgs/development/tools/build-managers/meson/overly-strict-size-check.patch new file mode 100644 index 000000000000..ea0e9bcd7eac --- /dev/null +++ b/pkgs/development/tools/build-managers/meson/overly-strict-size-check.patch @@ -0,0 +1,12 @@ +diff -Naur a/mesonbuild/compilers/c.py b/mesonbuild/compilers/c.py +--- a/mesonbuild/compilers/c.py 2017-12-10 08:37:19.000000000 -0500 ++++ b/mesonbuild/compilers/c.py 2018-03-24 07:46:04.739929307 -0400 +@@ -406,7 +406,7 @@ + }}''' + if not self.compiles(t.format(**fargs), env, extra_args, dependencies): + return -1 +- return self.cross_compute_int('sizeof(%s)' % typename, 1, 128, None, prefix, env, extra_args, dependencies) ++ return self.cross_compute_int('sizeof(%s)' % typename, 1, 1024, None, prefix, env, extra_args, dependencies) + + def sizeof(self, typename, prefix, env, extra_args=None, dependencies=None): + if extra_args is None: diff --git a/pkgs/development/tools/misc/automake/automake-1.16.x.nix b/pkgs/development/tools/misc/automake/automake-1.16.x.nix index 43efcf462800..affc400a9ed0 100644 --- a/pkgs/development/tools/misc/automake/automake-1.16.x.nix +++ b/pkgs/development/tools/misc/automake/automake-1.16.x.nix @@ -1,11 +1,11 @@ { stdenv, fetchurl, perl, autoconf, makeWrapper, doCheck ? false }: stdenv.mkDerivation rec { - name = "automake-1.16"; + name = "automake-1.16.1"; src = fetchurl { url = "mirror://gnu/automake/${name}.tar.xz"; - sha256 = "12jvcmkcmd5p14b41w9f7ixd3sca97pymd6lqbkwnl8qn6bjv3zr"; + sha256 = "08g979ficj18i1w6w5219bgmns7czr03iadf20mk3lrzl8wbn1ax"; }; nativeBuildInputs = [ autoconf perl ]; diff --git a/pkgs/development/tools/misc/binutils/2.30.nix b/pkgs/development/tools/misc/binutils/2.30.nix deleted file mode 100644 index 830c07330524..000000000000 --- a/pkgs/development/tools/misc/binutils/2.30.nix +++ /dev/null @@ -1,131 +0,0 @@ -{ stdenv, buildPackages -, fetchurl, zlib -, buildPlatform, hostPlatform, targetPlatform -, noSysDirs, gold ? true, bison ? null -}: - -let - version = "2.30"; - basename = "binutils-${version}"; - inherit (stdenv.lib) optional optionals optionalString; - # The targetPrefix prepended to binary names to allow multiple binuntils on the - # PATH to both be usable. - targetPrefix = optionalString (targetPlatform != hostPlatform) "${targetPlatform.config}-"; -in - -stdenv.mkDerivation rec { - name = targetPrefix + basename; - - src = fetchurl { - url = "mirror://gnu/binutils/${basename}.tar.bz2"; - sha256 = "028cklfqaab24glva1ks2aqa1zxa6w6xmc8q34zs1sb7h22dxspg"; - }; - - patches = [ - # Turn on --enable-new-dtags by default to make the linker set - # RUNPATH instead of RPATH on binaries. This is important because - # RUNPATH can be overriden using LD_LIBRARY_PATH at runtime. - ./new-dtags.patch - - # Since binutils 2.22, DT_NEEDED flags aren't copied for dynamic outputs. - # That requires upstream changes for things to work. So we can patch it to - # get the old behaviour by now. - ./dtneeded.patch - - # Make binutils output deterministic by default. - ./deterministic.patch - - # Always add PaX flags section to ELF files. - # This is needed, for instance, so that running "ldd" on a binary that is - # PaX-marked to disable mprotect doesn't fail with permission denied. - ./pt-pax-flags.patch - - # Bfd looks in BINDIR/../lib for some plugins that don't - # exist. This is pointless (since users can't install plugins - # there) and causes a cycle between the lib and bin outputs, so - # get rid of it. - ./no-plugins.patch - - # Help bfd choose between elf32-littlearm, elf32-littlearm-symbian, and - # elf32-littlearm-vxworks in favor of the first. - # https://github.com/NixOS/nixpkgs/pull/30484#issuecomment-345472766 - ./disambiguate-arm-targets.patch - - # For some reason bfd ld doesn't search DT_RPATH when cross-compiling. It's - # not clear why this behavior was decided upon but it has the unfortunate - # consequence that the linker will fail to find transitive dependencies of - # shared objects when cross-compiling. Consequently, we are forced to - # override this behavior, forcing ld to search DT_RPATH even when - # cross-compiling. - ./always-search-rpath.patch - ]; - - outputs = [ "out" "info" "man" ]; - - depsBuildBuild = [ buildPackages.stdenv.cc ]; - nativeBuildInputs = [ bison ]; - buildInputs = [ zlib ]; - - inherit noSysDirs; - - preConfigure = '' - # Clear the default library search path. - if test "$noSysDirs" = "1"; then - echo 'NATIVE_LIB_DIRS=' >> ld/configure.tgt - fi - - # Use symlinks instead of hard links to save space ("strip" in the - # fixup phase strips each hard link separately). - for i in binutils/Makefile.in gas/Makefile.in ld/Makefile.in gold/Makefile.in; do - sed -i "$i" -e 's|ln |ln -s |' - done - ''; - - # As binutils takes part in the stdenv building, we don't want references - # to the bootstrap-tools libgcc (as uses to happen on arm/mips) - NIX_CFLAGS_COMPILE = if hostPlatform.isDarwin - then "-Wno-string-plus-int -Wno-deprecated-declarations" - else "-static-libgcc"; - - # TODO(@Ericson2314): Always pass "--target" and always targetPrefix. - configurePlatforms = - # TODO(@Ericson2314): Figure out what's going wrong with Arm - if buildPlatform == hostPlatform && hostPlatform == targetPlatform && targetPlatform.isArm - then [] - else [ "build" "host" ] ++ stdenv.lib.optional (targetPlatform != hostPlatform) "target"; - - configureFlags = [ - "--enable-targets=all" "--enable-64-bit-bfd" - "--disable-install-libbfd" - "--disable-shared" "--enable-static" - "--with-system-zlib" - - "--enable-deterministic-archives" - "--disable-werror" - "--enable-fix-loongson2f-nop" - ] ++ optionals gold [ "--enable-gold" "--enable-plugins" ]; - - enableParallelBuilding = true; - - passthru = { - inherit targetPrefix version; - }; - - meta = with stdenv.lib; { - description = "Tools for manipulating binaries (linker, assembler, etc.)"; - longDescription = '' - The GNU Binutils are a collection of binary tools. The main - ones are `ld' (the GNU linker) and `as' (the GNU assembler). - They also include the BFD (Binary File Descriptor) library, - `gprof', `nm', `strip', etc. - ''; - homepage = http://www.gnu.org/software/binutils/; - license = licenses.gpl3Plus; - maintainers = with maintainers; [ ericson2314 ]; - platforms = platforms.unix; - - /* Give binutils a lower priority than gcc-wrapper to prevent a - collision due to the ld/as wrappers/symlinks in the latter. */ - priority = 10; - }; -} diff --git a/pkgs/development/tools/misc/binutils/default.nix b/pkgs/development/tools/misc/binutils/default.nix index 05d0d21a179b..ec0a5b4e9eb1 100644 --- a/pkgs/development/tools/misc/binutils/default.nix +++ b/pkgs/development/tools/misc/binutils/default.nix @@ -5,10 +5,7 @@ }: let - # Note to whoever is upgrading this: 2.29 is broken. - # ('nix-build pkgs/stdenv/linux/make-bootstrap-tools.nix -A test' segfaults on aarch64) - # Also glibc might need patching, see commit 733e20fee4a6700510f71fbe1a58ac23ea202f6a. - version = "2.28.1"; + version = "2.30"; basename = "binutils-${version}"; inherit (stdenv.lib) optional optionals optionalString; # The targetPrefix prepended to binary names to allow multiple binuntils on the @@ -21,7 +18,7 @@ stdenv.mkDerivation rec { src = fetchurl { url = "mirror://gnu/binutils/${basename}.tar.bz2"; - sha256 = "1sj234nd05cdgga1r36zalvvdkvpfbr12g5mir2n8i1dwsdrj939"; + sha256 = "028cklfqaab24glva1ks2aqa1zxa6w6xmc8q34zs1sb7h22dxspg"; }; patches = [ @@ -61,6 +58,9 @@ stdenv.mkDerivation rec { # override this behavior, forcing ld to search DT_RPATH even when # cross-compiling. ./always-search-rpath.patch + + # https://sourceware.org/bugzilla/show_bug.cgi?id=22868 + ./gold-symbol-visibility.patch ]; outputs = [ "out" "info" "man" ]; diff --git a/pkgs/development/tools/misc/binutils/gold-symbol-visibility.patch b/pkgs/development/tools/misc/binutils/gold-symbol-visibility.patch new file mode 100644 index 000000000000..0fb05a482d1c --- /dev/null +++ b/pkgs/development/tools/misc/binutils/gold-symbol-visibility.patch @@ -0,0 +1,79 @@ +commit 8564af037f5c4c6d2744a89497691359205b2bbc +Author: Shea Levy <shea@shealevy.com> +Date: Mon Mar 19 10:52:40 2018 -0400 + + Revert "Allow multiply-defined absolute symbols when they have the same value." + + This reverts commit 5dc824ed42cd173c1525f5abc76f4091f11a4dbc. + +diff --git a/gold/ChangeLog-2017 b/gold/ChangeLog-2017 +index b2a47710b5..d7ca1b48c0 100644 +--- a/gold/ChangeLog-2017 ++++ b/gold/ChangeLog-2017 +@@ -114,11 +114,6 @@ + (localedir): Define as @localedir@. + (gnulocaledir, gettextsrcdir): Use @datarootdir@. + +-2017-11-28 Cary Coutant <ccoutant@gmail.com> +- +- * resolve.cc (Symbol_table::resolve): Allow multiply-defined absolute +- symbols when they have the same value. +- + 2017-11-28 Cary Coutant <ccoutant@gmail.com> + + * object.h (class Sized_relobj_file): Remove discarded_eh_frame_shndx_. +diff --git a/gold/resolve.cc b/gold/resolve.cc +index 4a5784cf8b..803576bfed 100644 +--- a/gold/resolve.cc ++++ b/gold/resolve.cc +@@ -247,28 +247,18 @@ Symbol_table::resolve(Sized_symbol<size>* to, + Object* object, const char* version, + bool is_default_version) + { +- bool to_is_ordinary; +- const unsigned int to_shndx = to->shndx(&to_is_ordinary); +- + // It's possible for a symbol to be defined in an object file + // using .symver to give it a version, and for there to also be + // a linker script giving that symbol the same version. We + // don't want to give a multiple-definition error for this + // harmless redefinition. ++ bool to_is_ordinary; + if (to->source() == Symbol::FROM_OBJECT + && to->object() == object +- && to->is_defined() + && is_ordinary ++ && to->is_defined() ++ && to->shndx(&to_is_ordinary) == st_shndx + && to_is_ordinary +- && to_shndx == st_shndx +- && to->value() == sym.get_st_value()) +- return; +- +- // Likewise for an absolute symbol defined twice with the same value. +- if (!is_ordinary +- && st_shndx == elfcpp::SHN_ABS +- && !to_is_ordinary +- && to_shndx == elfcpp::SHN_ABS + && to->value() == sym.get_st_value()) + return; + +@@ -360,8 +350,8 @@ Symbol_table::resolve(Sized_symbol<size>* to, + && (sym.get_st_bind() == elfcpp::STB_WEAK + || to->binding() == elfcpp::STB_WEAK) + && orig_st_shndx != elfcpp::SHN_UNDEF ++ && to->shndx(&to_is_ordinary) != elfcpp::SHN_UNDEF + && to_is_ordinary +- && to_shndx != elfcpp::SHN_UNDEF + && sym.get_st_size() != 0 // Ignore weird 0-sized symbols. + && to->symsize() != 0 + && (sym.get_st_type() != to->type() +@@ -372,7 +362,7 @@ Symbol_table::resolve(Sized_symbol<size>* to, + { + Symbol_location fromloc + = { object, orig_st_shndx, static_cast<off_t>(sym.get_st_value()) }; +- Symbol_location toloc = { to->object(), to_shndx, ++ Symbol_location toloc = { to->object(), to->shndx(&to_is_ordinary), + static_cast<off_t>(to->value()) }; + this->candidate_odr_violations_[to->name()].insert(fromloc); + this->candidate_odr_violations_[to->name()].insert(toloc); diff --git a/pkgs/development/tools/misc/help2man/default.nix b/pkgs/development/tools/misc/help2man/default.nix index 6e341b577cfb..b786aa2123f6 100644 --- a/pkgs/development/tools/misc/help2man/default.nix +++ b/pkgs/development/tools/misc/help2man/default.nix @@ -1,26 +1,34 @@ -{ stdenv, hostPlatform, fetchurl, perl, gettext, LocaleGettext, makeWrapper }: +{ stdenv, hostPlatform, fetchurl, perl, gettext, LocaleGettext }: stdenv.mkDerivation rec { - name = "help2man-1.47.5"; + name = "help2man-1.47.6"; src = fetchurl { url = "mirror://gnu/help2man/${name}.tar.xz"; - sha256 = "1cb14kp380jzk1yi4i7x9d8qplc8c5mgcbgycgs9ggpx34jhp9kw"; + sha256 = "0vz4dlrvy4vc6l7w0a7n668pfa0rdm73wr2gar58wqranyah46yr"; }; - nativeBuildInputs = [ makeWrapper gettext LocaleGettext ]; + nativeBuildInputs = [ gettext LocaleGettext ]; buildInputs = [ perl LocaleGettext ]; doCheck = false; # target `check' is missing patches = if hostPlatform.isCygwin then [ ./1.40.4-cygwin-nls.patch ] else null; - postInstall = - '' wrapProgram "$out/bin/help2man" \ - --prefix PERL5LIB : "$(echo ${LocaleGettext}/lib/perl*/site_perl)" \ - ${stdenv.lib.optionalString hostPlatform.isCygwin "--prefix PATH : ${gettext}/bin"} - ''; - + # We don't use makeWrapper here because it uses substitutions our + # bootstrap shell can't handle. + postInstall = '' + gettext_perl="$(echo ${LocaleGettext}/lib/perl*/site_perl)" + mv $out/bin/help2man $out/bin/.help2man-wrapped + cat > $out/bin/help2man <<EOF + #! $SHELL -e + export PERL5LIB=\''${PERL5LIB:+:}$gettext_perl + ${stdenv.lib.optionalString hostPlatform.isCygwin + "export PATH=\''${PATH:+:}${gettext}/bin"} + exec -a \$0 $out/bin/.help2man-wrapped "\$@" + EOF + chmod +x $out/bin/help2man + ''; meta = with stdenv.lib; { description = "Generate man pages from `--help' output"; diff --git a/pkgs/development/tools/misc/intel-gpu-tools/default.nix b/pkgs/development/tools/misc/intel-gpu-tools/default.nix index 775a31df2b17..5176be123018 100644 --- a/pkgs/development/tools/misc/intel-gpu-tools/default.nix +++ b/pkgs/development/tools/misc/intel-gpu-tools/default.nix @@ -25,6 +25,8 @@ stdenv.mkDerivation rec { substituteInPlace tests/Makefile.am --replace '$(CAIRO_CFLAGS)' '$(CAIRO_CFLAGS) $(GLIB_CFLAGS)' ''; + enableParallelBuilding = true; + meta = with stdenv.lib; { homepage = https://01.org/linuxgraphics/; description = "Tools for development and testing of the Intel DRM driver"; diff --git a/pkgs/development/tools/misc/lsof/default.nix b/pkgs/development/tools/misc/lsof/default.nix index 224e0aba6ef7..53b960a7c031 100644 --- a/pkgs/development/tools/misc/lsof/default.nix +++ b/pkgs/development/tools/misc/lsof/default.nix @@ -4,13 +4,13 @@ let dialect = with stdenv.lib; last (splitString "-" stdenv.system); in stdenv.mkDerivation rec { name = "lsof-${version}"; - version = "4.89"; + version = "4.90"; depsBuildBuild = [ buildPackages.stdenv.cc ]; buildInputs = [ ncurses ]; src = fetchurl { - urls = + urls = ["https://fossies.org/linux/misc/lsof_4.90.tar.bz2"] ++ # Mirrors seem to be down... ["ftp://lsof.itap.purdue.edu/pub/tools/unix/lsof/lsof_${version}.tar.bz2"] ++ map ( # the tarball is moved after new version is released @@ -23,22 +23,19 @@ stdenv.mkDerivation rec { + "${stdenv.lib.optionalString isOld "OLD/"}lsof_${version}.tar.bz2" ) [ false true ] ; - sha256 = "061p18v0mhzq517791xkjs8a5dfynq1418a1mwxpji69zp2jzb41"; + sha256 = "1xhn3amvl5mmwji5g90nkw7lfmh2494v18qbv1f729hrg468853g"; }; unpackPhase = "tar xvjf $src; cd lsof_*; tar xvf lsof_*.tar; sourceRoot=$( echo lsof_*/); "; - patches = [ ./dfile.patch ]; - postPatch = stdenv.lib.optionalString stdenv.hostPlatform.isMusl '' substituteInPlace dialects/linux/dlsof.h --replace "defined(__UCLIBC__)" 1 ''; # Stop build scripts from searching global include paths - LSOF_INCLUDE = "${stdenv.cc.libc}/include"; + LSOF_INCLUDE = "${stdenv.lib.getDev stdenv.cc.libc}/include"; configurePhase = "LINUX_CONF_CC=$CC_FOR_BUILD LSOF_CC=$CC LSOF_AR=\"$AR cr\" LSOF_RANLIB=$RANLIB ./Configure -n ${dialect}"; preBuild = '' - sed -i Makefile -e 's/^CFGF=/& -DHASIPv6=1/;' -e 's/-lcurses/-lncurses/' for filepath in $(find dialects/${dialect} -type f); do sed -i "s,/usr/include,$LSOF_INCLUDE,g" $filepath done @@ -58,7 +55,7 @@ stdenv.mkDerivation rec { socket (IPv6/IPv4/UNIX local), or partition (by opening a file from it). ''; - maintainers = [ ]; + maintainers = [ stdenv.lib.maintainers.dezgeg ]; platforms = stdenv.lib.platforms.unix; }; } diff --git a/pkgs/development/tools/misc/lsof/dfile.patch b/pkgs/development/tools/misc/lsof/dfile.patch deleted file mode 100644 index 47202d5ebeab..000000000000 --- a/pkgs/development/tools/misc/lsof/dfile.patch +++ /dev/null @@ -1,18 +0,0 @@ ---- lsof_4.89_src/dialects/darwin/libproc/dfile.c 2014-10-30 12:39:46.000000000 +0100 -+++ lsof_4.89_src/dialects/darwin/libproc/dfile_new.c 2016-10-04 13:44:58.000000000 +0200 -@@ -286,13 +286,13 @@ - - #if defined(PROC_FP_GUARDED) - if (extra > 1) -- putchar(`,'); -+ putchar(','); - if (lf->guardflags) { - struct pff_tab *tp; - long gf; - - (void) printf("guard="); -- tp = Pgf_tab; -+ tp = Pff_tab; - gf = lf->guardflags; - while (gf && !FsvFlagX) { - while (tp->nm) { diff --git a/pkgs/games/lbreakout2/default.nix b/pkgs/games/lbreakout2/default.nix index eb9bed9e1d95..5ab9954739b2 100644 --- a/pkgs/games/lbreakout2/default.nix +++ b/pkgs/games/lbreakout2/default.nix @@ -1,17 +1,15 @@ -{ stdenv, fetchurl, SDL, SDL_mixer, zlib, libpng, libintlOrEmpty }: +{ stdenv, fetchurl, SDL, SDL_mixer, zlib, libpng, libintl }: stdenv.mkDerivation rec { name = "lbreakout2-${version}"; version = "2.6.5"; - buildInputs = [ SDL SDL_mixer zlib libpng ] ++ libintlOrEmpty; + buildInputs = [ SDL SDL_mixer zlib libpng libintl ]; src = fetchurl { url = "mirror://sourceforge/lgames/${name}.tar.gz"; sha256 = "0vwdlyvh7c4y80q5vp7fyfpzbqk9lq3w8pvavi139njkalbxc14i"; }; - NIX_LDFLAGS = stdenv.lib.optionalString stdenv.isDarwin "-lintl"; - meta = with stdenv.lib; { description = "Breakout clone from the LGames series"; homepage = http://lgames.sourceforge.net/LBreakout2/; diff --git a/pkgs/games/steam/chrootenv.nix b/pkgs/games/steam/chrootenv.nix index e896c74ca357..c44a166268cc 100644 --- a/pkgs/games/steam/chrootenv.nix +++ b/pkgs/games/steam/chrootenv.nix @@ -57,6 +57,7 @@ in buildFHSUserEnv rec { xorg.libXext xorg.libX11 xorg.libXfixes + libGL # Not formally in runtime but needed by some games gst_all_1.gstreamer @@ -144,7 +145,6 @@ in buildFHSUserEnv rec { SDL2_mixer gstreamer gst-plugins-base - libGLU libappindicator-gtk2 libcaca libcanberra diff --git a/pkgs/misc/emulators/caprice32/default.nix b/pkgs/misc/emulators/caprice32/default.nix index 5928d53d5422..c0c3b40f6b65 100644 --- a/pkgs/misc/emulators/caprice32/default.nix +++ b/pkgs/misc/emulators/caprice32/default.nix @@ -1,4 +1,4 @@ -{ stdenv, fetchFromGitHub, libpng, pkgconfig, SDL, freetype, zlib, mesa }: +{ stdenv, fetchFromGitHub, libpng, pkgconfig, SDL, freetype, zlib }: stdenv.mkDerivation rec { diff --git a/pkgs/misc/emulators/wine/base.nix b/pkgs/misc/emulators/wine/base.nix index 9af5c889c42f..db58c398526a 100644 --- a/pkgs/misc/emulators/wine/base.nix +++ b/pkgs/misc/emulators/wine/base.nix @@ -36,7 +36,7 @@ stdenv.mkDerivation ((lib.optionalAttrs (! isNull buildScript) { ++ lib.optional odbcSupport pkgs.unixODBC ++ lib.optional netapiSupport pkgs.samba4 ++ lib.optional cursesSupport pkgs.ncurses - ++ lib.optional vaSupport pkgs.libva-full + ++ lib.optional vaSupport pkgs.libva ++ lib.optional pcapSupport pkgs.libpcap ++ lib.optional v4lSupport pkgs.libv4l ++ lib.optional saneSupport pkgs.sane-backends @@ -53,7 +53,7 @@ stdenv.mkDerivation ((lib.optionalAttrs (! isNull buildScript) { ++ lib.optionals openclSupport [ pkgs.opencl-headers pkgs.ocl-icd ] ++ lib.optionals xmlSupport [ pkgs.libxml2 pkgs.libxslt ] ++ lib.optionals tlsSupport [ pkgs.openssl pkgs.gnutls ] - ++ lib.optionals openglSupport [ pkgs.libGLU_combined pkgs.libGL.osmesa pkgs.libdrm ] + ++ lib.optionals openglSupport [ pkgs.libGLU_combined pkgs.mesa_noglu.osmesa pkgs.libdrm ] ++ (with pkgs.xorg; [ libX11 libXi libXcursor libXrandr libXrender libXxf86vm libXcomposite libXext ]))); diff --git a/pkgs/os-specific/darwin/apple-sdk/default.nix b/pkgs/os-specific/darwin/apple-sdk/default.nix index 5a58410ae926..7f6f0cdd0c48 100644 --- a/pkgs/os-specific/darwin/apple-sdk/default.nix +++ b/pkgs/os-specific/darwin/apple-sdk/default.nix @@ -210,6 +210,13 @@ in rec { ]; }); + CoreMIDI = stdenv.lib.overrideDerivation super.CoreMIDI (drv: { + __propagatedImpureHostDeps = drv.__propagatedImpureHostDeps ++ [ + "/System/Library/PrivateFrameworks/" + ]; + setupHook = ./private-frameworks-setup-hook.sh; + }); + Security = stdenv.lib.overrideDerivation super.Security (drv: { setupHook = ./security-setup-hook.sh; }); diff --git a/pkgs/os-specific/darwin/apple-sdk/private-frameworks-setup-hook.sh b/pkgs/os-specific/darwin/apple-sdk/private-frameworks-setup-hook.sh new file mode 100644 index 000000000000..fbd977f8552d --- /dev/null +++ b/pkgs/os-specific/darwin/apple-sdk/private-frameworks-setup-hook.sh @@ -0,0 +1,8 @@ +addPrivateFrameworks() { + flag="-F/System/Library/PrivateFrameworks" + if [[ "$NIX_CFLAGS_COMPILE" != *$flag* ]]; then + NIX_CFLAGS_COMPILE+=" $flag" + fi +} + +addEnvHooks "$hostOffset" addPrivateFrameworks diff --git a/pkgs/os-specific/darwin/apple-source-releases/libiconv/default.nix b/pkgs/os-specific/darwin/apple-source-releases/libiconv/default.nix index 13b6156492bb..d9b3dfb74049 100644 --- a/pkgs/os-specific/darwin/apple-source-releases/libiconv/default.nix +++ b/pkgs/os-specific/darwin/apple-source-releases/libiconv/default.nix @@ -14,6 +14,8 @@ appleDerivation { -Wl,-reexport_library -Wl,$out/lib/libcharset.dylib ''; + setup-hook = ../../../../development/libraries/libiconv/setup-hook.sh; + meta = { platforms = stdenv.lib.platforms.darwin; }; diff --git a/pkgs/os-specific/linux/amdgpu-pro/default.nix b/pkgs/os-specific/linux/amdgpu-pro/default.nix index a3c09c3de994..6828fbf6b1c9 100644 --- a/pkgs/os-specific/linux/amdgpu-pro/default.nix +++ b/pkgs/os-specific/linux/amdgpu-pro/default.nix @@ -1,4 +1,4 @@ -{ stdenv, fetchurl, elfutils, libGL +{ stdenv, fetchurl, elfutils , xorg, patchelf, openssl, libdrm, libudev , libxcb, libxshmfence, epoxy, perl, zlib , fetchFromGitHub, ncurses @@ -13,8 +13,6 @@ let kernelDir = if libsOnly then null else kernel.dev; - inherit (libGL) driverLink; - bitness = if stdenv.is64bit then "64" else "32"; libArch = diff --git a/pkgs/os-specific/linux/audit/default.nix b/pkgs/os-specific/linux/audit/default.nix index 390bab849c28..7e14983a6d2b 100644 --- a/pkgs/os-specific/linux/audit/default.nix +++ b/pkgs/os-specific/linux/audit/default.nix @@ -6,11 +6,11 @@ assert enablePython -> python != null; stdenv.mkDerivation rec { - name = "audit-2.8.2"; + name = "audit-2.8.3"; src = fetchurl { url = "http://people.redhat.com/sgrubb/audit/${name}.tar.gz"; - sha256 = "1fmw8whraz1q3y3z5mgdpgsa3wz6r3zq0kgsgbc9xvmgfwmrpdb7"; + sha256 = "06lacv9zjn0sf076dydwmvjhdmik3xzhdjvyrkq75917xv54ajbl"; }; outputs = [ "bin" "dev" "out" "man" ]; diff --git a/pkgs/os-specific/linux/kernel/common-config.nix b/pkgs/os-specific/linux/kernel/common-config.nix index 5fbd9955c2a3..4eaa7bcf666e 100644 --- a/pkgs/os-specific/linux/kernel/common-config.nix +++ b/pkgs/os-specific/linux/kernel/common-config.nix @@ -135,6 +135,7 @@ with stdenv.lib; NETFILTER y NETFILTER_ADVANCED y CGROUP_BPF? y # Required by systemd per-cgroup firewalling + CGROUP_NET_PRIO y # Required by systemd IP_ROUTE_VERBOSE y IP_MROUTE_MULTIPLE_TABLES y IP_VS_PROTO_TCP y diff --git a/pkgs/os-specific/linux/libselinux/default.nix b/pkgs/os-specific/linux/libselinux/default.nix index 541ead7258f6..c276f56dd8b2 100644 --- a/pkgs/os-specific/linux/libselinux/default.nix +++ b/pkgs/os-specific/linux/libselinux/default.nix @@ -1,5 +1,6 @@ { stdenv, fetchurl, fetchpatch, pkgconfig, libsepol, pcre , enablePython ? true, swig ? null, python ? null +, musl-fts }: assert enablePython -> swig != null && python != null; @@ -18,7 +19,8 @@ stdenv.mkDerivation rec { nativeBuildInputs = [ pkgconfig ]; buildInputs = [ libsepol pcre ] - ++ optionals enablePython [ swig python ]; + ++ optionals enablePython [ swig python ] + ++ optional stdenv.hostPlatform.isMusl musl-fts; # Avoid this false warning: # avc_internal.c: In function 'avc_netlink_receive': diff --git a/pkgs/os-specific/linux/musl/fts-setup-hook.sh b/pkgs/os-specific/linux/musl/fts-setup-hook.sh new file mode 100644 index 000000000000..3962dcb19a20 --- /dev/null +++ b/pkgs/os-specific/linux/musl/fts-setup-hook.sh @@ -0,0 +1,17 @@ +ftsLdflags() { + # The `depHostOffset` describes how the host platform of the dependencies + # are slid relative to the depending package. It is brought into scope of + # the environment hook defined as the role of the dependency being applied. + case $depHostOffset in + -1) local role='BUILD_' ;; + 0) local role='' ;; + 1) local role='TARGET_' ;; + *) echo "cc-wrapper: Error: Cannot be used with $depHostOffset-offset deps" >2; + return 1 ;; + esac + + export NIX_${role}LDFLAGS+=" -lfts" +} + +addEnvHooks "$hostOffset" ftsLdflags + diff --git a/pkgs/os-specific/linux/musl/fts.nix b/pkgs/os-specific/linux/musl/fts.nix index 083541e5e935..0f16e8cc79bf 100644 --- a/pkgs/os-specific/linux/musl/fts.nix +++ b/pkgs/os-specific/linux/musl/fts.nix @@ -11,4 +11,6 @@ stdenv.mkDerivation rec { }; nativeBuildInputs = [ autoreconfHook pkgconfig ]; + + setupHook = ./fts-setup-hook.sh; } diff --git a/pkgs/os-specific/linux/nvidia-x11/settings.nix b/pkgs/os-specific/linux/nvidia-x11/settings.nix index bbe3af5d0169..92577d03a512 100644 --- a/pkgs/os-specific/linux/nvidia-x11/settings.nix +++ b/pkgs/os-specific/linux/nvidia-x11/settings.nix @@ -1,6 +1,6 @@ nvidia_x11: sha256: -{ stdenv, lib, fetchurl, pkgconfig, m4, jansson, gtk2, dbus, gtk3, libXv, libXrandr, libvdpau, libXext +{ stdenv, lib, fetchurl, pkgconfig, m4, jansson, gtk2, dbus, gtk3, libXv, libXrandr, libXext, libXxf86vm, libvdpau , librsvg, wrapGAppsHook , withGtk2 ? false, withGtk3 ? true }: @@ -41,7 +41,7 @@ stdenv.mkDerivation rec { nativeBuildInputs = [ pkgconfig m4 ]; - buildInputs = [ jansson libXv libXrandr libvdpau nvidia_x11 gtk2 dbus libXv ] + buildInputs = [ jansson libXv libXrandr libXext libXxf86vm libvdpau nvidia_x11 gtk2 dbus ] ++ lib.optionals withGtk3 [ gtk3 librsvg wrapGAppsHook ]; makeFlags = [ "NV_USE_BUNDLED_LIBJANSSON=0" ]; diff --git a/pkgs/os-specific/linux/policycoreutils/default.nix b/pkgs/os-specific/linux/policycoreutils/default.nix index 536c69ff5573..980b77f8df24 100644 --- a/pkgs/os-specific/linux/policycoreutils/default.nix +++ b/pkgs/os-specific/linux/policycoreutils/default.nix @@ -65,4 +65,3 @@ stdenv.mkDerivation rec { inherit (libsepol.meta) homepage platforms maintainers; }; } - diff --git a/pkgs/os-specific/linux/procps-ng/default.nix b/pkgs/os-specific/linux/procps-ng/default.nix index cc5e3dd5190c..dd09a9c52999 100644 --- a/pkgs/os-specific/linux/procps-ng/default.nix +++ b/pkgs/os-specific/linux/procps-ng/default.nix @@ -1,15 +1,24 @@ -{ lib, stdenv, fetchurl, ncurses }: +{ lib, stdenv, fetchFromGitLab, ncurses, libtool, gettext, autoconf, automake, pkgconfig }: stdenv.mkDerivation rec { name = "procps-${version}"; version = "3.3.12"; - src = fetchurl { - url = "mirror://sourceforge/procps-ng/procps-ng-${version}.tar.xz"; - sha256 = "1m57w6jmry84njd5sgk5afycbglql0al80grx027kwqqcfw5mmkf"; + src = fetchFromGitLab { + owner ="procps-ng"; + repo = "procps"; + rev = "v${version}"; + sha256 = "0k5vvvjn954xqnhk97j62ilwmipbi4gqjcznllmk6ilfmszqczzz"; }; buildInputs = [ ncurses ]; + nativeBuildInputs = [ libtool gettext autoconf automake pkgconfig ]; + + # autoreconfHook doesn't quite get, what procps-ng buildprocss does + # with po/Makefile.in.in and stuff. + preConfigure = '' + ./autogen.sh + ''; makeFlags = "usrbin_execdir=$(out)/bin"; @@ -22,10 +31,11 @@ stdenv.mkDerivation rec { "ac_cv_func_realloc_0_nonnull=yes" ]; meta = { - homepage = https://sourceforge.net/projects/procps-ng/; + homepage = https://gitlab.com/procps-ng/procps; description = "Utilities that give information about processes using the /proc filesystem"; priority = 10; # less than coreutils, which also provides "kill" and "uptime" license = lib.licenses.gpl2; platforms = lib.platforms.linux ++ lib.platforms.cygwin; + maintainers = [ lib.maintainers.typetetris ]; }; } diff --git a/pkgs/os-specific/linux/systemd/default.nix b/pkgs/os-specific/linux/systemd/default.nix index a792283e70e1..0bb9f509b38a 100644 --- a/pkgs/os-specific/linux/systemd/default.nix +++ b/pkgs/os-specific/linux/systemd/default.nix @@ -18,14 +18,16 @@ let pythonLxmlEnv = buildPackages.python3Packages.python.withPackages ( ps: with ps; [ python3Packages.lxml ]); in stdenv.mkDerivation rec { - version = "237"; + version = "238"; name = "systemd-${version}"; + # When updating, use https://github.com/systemd/systemd-stable tree, not the development one! + # Also fresh patches should be cherry-picked from that tree to our current one. src = fetchFromGitHub { owner = "NixOS"; repo = "systemd"; - rev = "98067cc806ae0d2759cdd2334f230cd8548e5317"; - sha256 = "077svfs2xy3g30s62q69wcv5pb9vfhzh8i7lhfri73vvhwbpzd5q"; + rev = "3a439bcdb5706dbb44215ef4e70f07b09aaac040"; + sha256 = "0qkk5891068pkxmxqvm07bwl597i8lfp89c23yxp11m21cjq0f4b"; }; outputs = [ "out" "lib" "man" "dev" ]; @@ -177,13 +179,6 @@ in stdenv.mkDerivation rec { rm -rf $out/etc/systemd/system - # Install SysV compatibility commands. - mkdir -p $out/sbin - ln -s $out/lib/systemd/systemd $out/sbin/telinit - for i in init halt poweroff runlevel reboot shutdown; do - ln -s $out/bin/systemctl $out/sbin/$i - done - # Fix reference to /bin/false in the D-Bus services. for i in $out/share/dbus-1/system-services/*.service; do substituteInPlace $i --replace /bin/false ${coreutils}/bin/false diff --git a/pkgs/os-specific/linux/tmon/default.nix b/pkgs/os-specific/linux/tmon/default.nix new file mode 100644 index 000000000000..01c84a1d1faa --- /dev/null +++ b/pkgs/os-specific/linux/tmon/default.nix @@ -0,0 +1,24 @@ +{ stdenv, kernel, ncurses }: + +stdenv.mkDerivation { + name = "tmon-${kernel.version}"; + + inherit (kernel) src; + + buildInputs = [ ncurses ]; + + configurePhase = '' + cd tools/thermal/tmon + ''; + + makeFlags = kernel.makeFlags ++ [ "INSTALL_ROOT=\"$(out)\"" "BINDIR=bin" ]; + + enableParallelBuilding = true; + + meta = with stdenv.lib; { + description = "Monitoring and Testing Tool for Linux kernel thermal subsystem"; + homepage = https://www.kernel.org/; + license = licenses.gpl2; + platforms = platforms.linux; + }; +} diff --git a/pkgs/os-specific/linux/xf86-input-wacom/default.nix b/pkgs/os-specific/linux/xf86-input-wacom/default.nix index 2ebb2b1890d5..b5937dff3752 100644 --- a/pkgs/os-specific/linux/xf86-input-wacom/default.nix +++ b/pkgs/os-specific/linux/xf86-input-wacom/default.nix @@ -3,11 +3,11 @@ , ncurses, pkgconfig, randrproto, xorgserver, xproto, udev, libXinerama, pixman }: stdenv.mkDerivation rec { - name = "xf86-input-wacom-0.35.0"; + name = "xf86-input-wacom-0.36.0"; src = fetchurl { url = "mirror://sourceforge/linuxwacom/${name}.tar.bz2"; - sha256 = "0za44snc0zirq65a4lxsmg7blp1bynj6j835hm459x8yx1qhmxjm"; + sha256 = "1xi39hl8ddgj9m7m2k2ll2r3wh0k0aq45fvrsv43651bhz9cbrza"; }; buildInputs = [ inputproto libX11 libXext libXi libXrandr libXrender diff --git a/pkgs/os-specific/linux/zfs/default.nix b/pkgs/os-specific/linux/zfs/default.nix index aac1576261d4..2535745e3595 100644 --- a/pkgs/os-specific/linux/zfs/default.nix +++ b/pkgs/os-specific/linux/zfs/default.nix @@ -4,6 +4,7 @@ # Userspace dependencies , zlib, libuuid, python, attr, openssl +, libtirpc # Kernel dependencies , kernel ? null, spl ? null, splUnstable ? null, splLegacyCrypto ? null @@ -42,6 +43,9 @@ let postPatch = optionalString buildKernel '' patchShebangs scripts + '' + optionalString stdenv.hostPlatform.isMusl '' + substituteInPlace config/user-libtirpc.m4 \ + --replace /usr/include/tirpc ${libtirpc}/include/tirpc ''; nativeBuildInputs = [ autoreconfHook nukeReferences ] @@ -49,7 +53,8 @@ let buildInputs = optionals buildKernel [ spl ] ++ optionals buildUser [ zlib libuuid python attr ] - ++ optionals (buildUser && (isUnstable || isLegacyCrypto)) [ openssl ]; + ++ optionals (buildUser && (isUnstable || isLegacyCrypto)) [ openssl ] + ++ optional stdenv.hostPlatform.isMusl [ libtirpc ]; # for zdb to get the rpath to libgcc_s, needed for pthread_cancel to work NIX_CFLAGS_LINK = "-lgcc_s"; diff --git a/pkgs/servers/dns/knot-dns/default.nix b/pkgs/servers/dns/knot-dns/default.nix index a47d3106443f..0af077c455c9 100644 --- a/pkgs/servers/dns/knot-dns/default.nix +++ b/pkgs/servers/dns/knot-dns/default.nix @@ -1,5 +1,5 @@ { stdenv, fetchurl, pkgconfig, gnutls, liburcu, lmdb, libcap_ng, libidn -, systemd, nettle, libedit, zlib, libiconv, libintlOrEmpty +, systemd, nettle, libedit, zlib, libiconv, libintl }: let inherit (stdenv.lib) optional optionals; in @@ -20,11 +20,10 @@ stdenv.mkDerivation rec { buildInputs = [ gnutls liburcu libidn nettle libedit - libiconv lmdb + libiconv lmdb libintl # without sphinx &al. for developer documentation ] ++ optionals stdenv.isLinux [ libcap_ng systemd ] - ++ libintlOrEmpty ++ optional stdenv.isDarwin zlib; # perhaps due to gnutls enableParallelBuilding = true; @@ -43,4 +42,3 @@ stdenv.mkDerivation rec { maintainers = [ maintainers.vcunat ]; }; } - diff --git a/pkgs/servers/http/apache-httpd/2.4.nix b/pkgs/servers/http/apache-httpd/2.4.nix index 41e65b588e16..5c396a4a5036 100644 --- a/pkgs/servers/http/apache-httpd/2.4.nix +++ b/pkgs/servers/http/apache-httpd/2.4.nix @@ -16,12 +16,12 @@ assert ldapSupport -> aprutil.ldapSupport && openldap != null; assert http2Support -> nghttp2 != null; stdenv.mkDerivation rec { - version = "2.4.29"; + version = "2.4.32"; name = "apache-httpd-${version}"; src = fetchurl { url = "mirror://apache/httpd/httpd-${version}.tar.bz2"; - sha256 = "777753a5a25568a2a27428b2214980564bc1c38c1abf9ccc7630b639991f7f00"; + sha256 = "0adrca77awvf6vbq8943b1z25abqz6g8rk6zc8wm7y6w2mfd2lv3"; }; # FIXME: -dev depends on -doc diff --git a/pkgs/servers/pulseaudio/default.nix b/pkgs/servers/pulseaudio/default.nix index 6a65e8d03201..ed4a8889c67d 100644 --- a/pkgs/servers/pulseaudio/default.nix +++ b/pkgs/servers/pulseaudio/default.nix @@ -43,7 +43,11 @@ stdenv.mkDerivation rec { sha256 = "17ndr6kc7hpv4ih4gygwlcpviqifbkvnk4fbwf4n25kpb991qlpj"; }; - patches = [ ./caps-fix.patch ] + patches = [ ./caps-fix.patch (fetchpatch { + name = "glibc-2.27.patch"; + url = "https://cgit.freedesktop.org/pulseaudio/pulseaudio/patch/?id=dfb0460fb4743aec047cdf755a660a9ac2d0f3fb"; + sha256 = "1bi6rbfdjyl6wn0jql4k18xa4hm5l2lpf1sc5j77f8l6jw956afv"; + }) ] ++ stdenv.lib.optional stdenv.hostPlatform.isMusl (fetchpatch { name = "padsp-fix.patch"; url = "https://git.alpinelinux.org/cgit/aports/plain/testing/pulseaudio/0001-padsp-Make-it-compile-on-musl.patch?id=167be02bf4618a90328e2b234f6a63a5dc05f244"; diff --git a/pkgs/servers/x11/xorg/default.nix b/pkgs/servers/x11/xorg/default.nix index 0d09d523b524..f5d7f54eb5ca 100644 --- a/pkgs/servers/x11/xorg/default.nix +++ b/pkgs/servers/x11/xorg/default.nix @@ -1,6 +1,6 @@ # THIS IS A GENERATED FILE. DO NOT EDIT! args @ { clangStdenv, fetchurl, fetchgit, fetchpatch, stdenv, pkgconfig, intltool, freetype, fontconfig -, libxslt, expat, libpng, zlib, perl, mesa_drivers, spice-protocol +, libxslt, expat, libpng, zlib, perl, mesa_noglu, mesa_drivers, spice-protocol , dbus, libuuid, openssl, gperf, m4, libevdev, tradcpp, libinput, mcpp, makeWrapper, autoreconfHook , autoconf, automake, libtool, xmlto, asciidoc, flex, bison, python, mtdev, pixman, ... }: with args; @@ -848,11 +848,11 @@ let }) // {inherit libX11 xextproto xproto ;}; libXfixes = (mkDerivation "libXfixes" { - name = "libXfixes-5.0.2"; + name = "libXfixes-5.0.3"; builder = ./builder.sh; src = fetchurl { - url = mirror://xorg/individual/lib/libXfixes-5.0.2.tar.bz2; - sha256 = "1slsk898386xii0r3l7szwwq3s6y2m4dsj0x93ninjh8xkghxllv"; + url = mirror://xorg/individual/lib/libXfixes-5.0.3.tar.bz2; + sha256 = "1miana3y4hwdqdparsccmygqr3ic3hs5jrqfzp70hvi2zwxd676y"; }; nativeBuildInputs = [ pkgconfig ]; buildInputs = [ fixesproto libX11 xextproto xproto ]; @@ -1364,11 +1364,11 @@ let }) // {inherit libICE libSM libX11 libXext libXmu xproto libXt ;}; utilmacros = (mkDerivation "utilmacros" { - name = "util-macros-1.19.1"; + name = "util-macros-1.19.2"; builder = ./builder.sh; src = fetchurl { - url = mirror://xorg/individual/util/util-macros-1.19.1.tar.bz2; - sha256 = "19h6wflpmh7xxqr6lk5z8pds6r9r0dn7ijbvaacymx2q0m05km0q"; + url = mirror://xorg/individual/util/util-macros-1.19.2.tar.bz2; + sha256 = "04p7ydqxgq37jklnfj18b70zsifiz4h50wvrk94i2112mmv37r6p"; }; nativeBuildInputs = [ pkgconfig ]; buildInputs = [ ]; @@ -1839,9 +1839,9 @@ let sha256 = "0z56ifw3xiq9dychv8chg1cny0hq4v3c1r9pqcybk5fp7nzw9jpq"; }; nativeBuildInputs = [ pkgconfig ]; - buildInputs = [ fontsproto mesa libdrm udev randrproto renderproto videoproto xextproto xf86driproto xorgserver xproto ]; + buildInputs = [ fontsproto libGL libdrm udev randrproto renderproto videoproto xextproto xf86driproto xorgserver xproto ]; meta.platforms = stdenv.lib.platforms.unix; - }) // {inherit fontsproto mesa libdrm udev randrproto renderproto videoproto xextproto xf86driproto xorgserver xproto ;}; + }) // {inherit fontsproto libGL libdrm udev randrproto renderproto videoproto xextproto xf86driproto xorgserver xproto ;}; xf86videoark = (mkDerivation "xf86videoark" { name = "xf86-video-ark-0.7.5"; diff --git a/pkgs/servers/x11/xorg/generate-expr-from-tarballs.pl b/pkgs/servers/x11/xorg/generate-expr-from-tarballs.pl index acf234a1683e..9f21d3c2024b 100755 --- a/pkgs/servers/x11/xorg/generate-expr-from-tarballs.pl +++ b/pkgs/servers/x11/xorg/generate-expr-from-tarballs.pl @@ -1,4 +1,4 @@ -#! /usr/bin/perl -w +#! /usr/bin/env perl # Typical command to generate the list of tarballs: @@ -11,6 +11,7 @@ use strict; +use warnings; my $tmpDir = "/tmp/xorg-unpack"; @@ -25,7 +26,7 @@ my %pcMap; my %extraAttrs; -my @missingPCs = ("fontconfig", "libdrm", "libXaw", "zlib", "perl", "python", "mesa", "mkfontscale", "mkfontdir", "bdftopcf", "libxslt", "openssl", "gperf", "m4"); +my @missingPCs = ("fontconfig", "libdrm", "libXaw", "zlib", "perl", "python", "mkfontscale", "mkfontdir", "bdftopcf", "libxslt", "openssl", "gperf", "m4"); $pcMap{$_} = $_ foreach @missingPCs; $pcMap{"freetype2"} = "freetype"; $pcMap{"libpng12"} = "libpng"; @@ -33,7 +34,7 @@ $pcMap{"libpng"} = "libpng"; $pcMap{"dbus-1"} = "dbus"; $pcMap{"uuid"} = "libuuid"; $pcMap{"libudev"} = "udev"; -$pcMap{"gl"} = "mesa"; +$pcMap{"gl"} = "libGL"; $pcMap{"\$PIXMAN"} = "pixman"; $pcMap{"\$RENDERPROTO"} = "renderproto"; $pcMap{"\$DRI3PROTO"} = "dri3proto"; @@ -230,7 +231,7 @@ print OUT ""; print OUT <<EOF; # THIS IS A GENERATED FILE. DO NOT EDIT! args @ { clangStdenv, fetchurl, fetchgit, fetchpatch, stdenv, pkgconfig, intltool, freetype, fontconfig -, libxslt, expat, libpng, zlib, perl, mesa_drivers, spice-protocol +, libxslt, expat, libpng, zlib, perl, mesa_noglu, mesa_drivers, spice-protocol , dbus, libuuid, openssl, gperf, m4, libevdev, tradcpp, libinput, mcpp, makeWrapper, autoreconfHook , autoconf, automake, libtool, xmlto, asciidoc, flex, bison, python, mtdev, pixman, ... }: with args; diff --git a/pkgs/servers/x11/xorg/overrides.nix b/pkgs/servers/x11/xorg/overrides.nix index 13fbf7b6791f..55eb54622d51 100644 --- a/pkgs/servers/x11/xorg/overrides.nix +++ b/pkgs/servers/x11/xorg/overrides.nix @@ -271,6 +271,11 @@ in }; libxshmfence = attrs: attrs // { + name = "libxshmfence-1.3"; + src = args.fetchurl { + url = mirror://xorg/individual/lib/libxshmfence-1.3.tar.bz2; + sha256 = "1ir0j92mnd1nk37mrv9bz5swnccqldicgszvfsh62jd14q6k115q"; + }; outputs = [ "out" "dev" ]; # mainly to avoid propagation }; @@ -400,7 +405,7 @@ in }; xdriinfo = attrs: attrs // { - buildInputs = attrs.buildInputs ++ [args.mesa]; + buildInputs = attrs.buildInputs ++ [args.libGL]; }; xvinfo = attrs: attrs // { @@ -460,7 +465,7 @@ in version = (builtins.parseDrvName attrs.name).version; commonBuildInputs = attrs.buildInputs ++ [ xtrans ]; commonPropagatedBuildInputs = [ - args.zlib args.mesa args.dbus + args.zlib args.libGL args.mesa_noglu args.dbus xf86bigfontproto glproto xf86driproto compositeproto scrnsaverproto resourceproto xf86dgaproto @@ -489,7 +494,7 @@ in if (!isDarwin) then { outputs = [ "out" "dev" ]; - buildInputs = [ makeWrapper ] ++ commonBuildInputs; + buildInputs = [ makeWrapper args.libdrm ] ++ commonBuildInputs; propagatedBuildInputs = [ libpciaccess args.epoxy ] ++ commonPropagatedBuildInputs ++ lib.optionals stdenv.isLinux [ args.udev ]; @@ -510,8 +515,6 @@ in ]; postInstall = '' rm -fr $out/share/X11/xkb/compiled # otherwise X will try to write in it - wrapProgram $out/bin/Xvfb \ - --set XORG_DRI_DRIVER_PATH ${args.mesa}/lib/dri ( # assert() keeps runtime reference xorgserver-dev in xf86-video-intel and others cd "$dev" for f in include/xorg/*.h; do diff --git a/pkgs/tools/X11/bumblebee/default.nix b/pkgs/tools/X11/bumblebee/default.nix index 7868c2726ece..8ad1b6f6455e 100644 --- a/pkgs/tools/X11/bumblebee/default.nix +++ b/pkgs/tools/X11/bumblebee/default.nix @@ -39,7 +39,7 @@ let primus = if useNvidia then primusLib else primusLib.override { nvidia_x11 = null; }; primus_i686 = if useNvidia then primusLib_i686 else primusLib_i686.override { nvidia_x11 = null; }; - primusLibs = lib.makeLibraryPath ([primus] ++ lib.optional (primusLib_i686 != null) primus_i686); + primusLibs = lib.makeLibraryPath ([ primus ] ++ lib.optional (primusLib_i686 != null) primus_i686); nvidia_x11s = [ nvidia_x11 ] ++ lib.optional nvidia_x11.useGLVND libglvnd @@ -49,7 +49,6 @@ let nvidiaLibs = lib.makeLibraryPath nvidia_x11s; bbdPath = lib.makeBinPath [ kmod xorgserver ]; - bbdLibs = lib.makeLibraryPath [ libX11 libXext ]; xmodules = lib.concatStringsSep "," (map (x: "${x.out or x}/lib/xorg/modules") ([ xorgserver ] ++ lib.optional (!useNvidia) xf86videonouveau)); @@ -133,8 +132,7 @@ in stdenv.mkDerivation rec { postInstall = '' wrapProgram "$out/sbin/bumblebeed" \ - --prefix PATH : "${bbdPath}" \ - --prefix LD_LIBRARY_PATH : "${bbdLibs}" + --prefix PATH : "${bbdPath}" wrapProgram "$out/bin/optirun" \ --prefix PATH : "${virtualgl}/bin" diff --git a/pkgs/tools/X11/primus/lib.nix b/pkgs/tools/X11/primus/lib.nix index dcd50ee9158c..5c4c65bc17a2 100644 --- a/pkgs/tools/X11/primus/lib.nix +++ b/pkgs/tools/X11/primus/lib.nix @@ -1,5 +1,5 @@ { stdenv, fetchFromGitHub, fetchpatch -, libX11, libGL +, libX11, libGL, mesa_noglu , nvidia_x11 ? null , libglvnd }: @@ -33,7 +33,7 @@ in stdenv.mkDerivation { makeFlags = [ "LIBDIR=$(out)/lib" "PRIMUS_libGLa=${aPackage}/lib/libGL.so" "PRIMUS_libGLd=${libGL}/lib/libGL.so" - "PRIMUS_LOAD_GLOBAL=${libGL}/lib/libglapi.so" + "PRIMUS_LOAD_GLOBAL=${mesa_noglu}/lib/libglapi.so" ]; installPhase = '' diff --git a/pkgs/tools/compression/xar/default.nix b/pkgs/tools/compression/xar/default.nix index c62eead3cb73..01d18fe6ad7d 100644 --- a/pkgs/tools/compression/xar/default.nix +++ b/pkgs/tools/compression/xar/default.nix @@ -1,4 +1,4 @@ -{ stdenv, fetchurl, libxml2, openssl, zlib, bzip2 }: +{ stdenv, fetchurl, libxml2, openssl, zlib, bzip2, musl-fts }: stdenv.mkDerivation rec { version = "1.6.1"; @@ -9,7 +9,8 @@ stdenv.mkDerivation rec { sha256 = "0ghmsbs6xwg1092v7pjcibmk5wkyifwxw6ygp08gfz25d2chhipf"; }; - buildInputs = [ libxml2 openssl zlib bzip2 ]; + buildInputs = [ libxml2 openssl zlib bzip2 ] + ++ stdenv.lib.optional stdenv.hostPlatform.isMusl musl-fts; meta = { homepage = https://mackyle.github.io/xar/; diff --git a/pkgs/tools/compression/xz/default.nix b/pkgs/tools/compression/xz/default.nix index 8d02e926e57f..da3a537da283 100644 --- a/pkgs/tools/compression/xz/default.nix +++ b/pkgs/tools/compression/xz/default.nix @@ -12,6 +12,11 @@ stdenv.mkDerivation rec { doCheck = true; + preCheck = '' + # Tests have a /bin/sh dependency... + patchShebangs tests + ''; + # In stdenv-linux, prevent a dependency on bootstrap-tools. preConfigure = "CONFIG_SHELL=/bin/sh"; diff --git a/pkgs/tools/filesystems/btrfs-progs/default.nix b/pkgs/tools/filesystems/btrfs-progs/default.nix index 09f004f28440..e84260052a41 100644 --- a/pkgs/tools/filesystems/btrfs-progs/default.nix +++ b/pkgs/tools/filesystems/btrfs-progs/default.nix @@ -1,17 +1,24 @@ -{ stdenv, fetchurl, pkgconfig, attr, acl, zlib, libuuid, e2fsprogs, lzo +{ stdenv, fetchurl, fetchpatch, pkgconfig, attr, acl, zlib, libuuid, e2fsprogs, lzo , asciidoc, xmlto, docbook_xml_dtd_45, docbook_xsl, libxslt, zstd }: -let version = "4.15.1"; in - stdenv.mkDerivation rec { name = "btrfs-progs-${version}"; + version = "4.15.1"; src = fetchurl { url = "mirror://kernel/linux/kernel/people/kdave/btrfs-progs/btrfs-progs-v${version}.tar.xz"; sha256 = "15izak6jg6pqr6ha9447cdrdj9k6kfiarvwlrj53cpvrsv02l437"; }; + patches = [ + # Fix build with e2fsprogs 1.44.0 + (fetchpatch { + url = "https://patchwork.kernel.org/patch/10281327/raw/"; + sha256 = "016124hjms220809zjvvr7l1gq23j419d3piaijsaw8n7yd3kksf"; + }) + ]; + nativeBuildInputs = [ pkgconfig asciidoc xmlto docbook_xml_dtd_45 docbook_xsl libxslt ]; @@ -20,12 +27,14 @@ stdenv.mkDerivation rec { # gcc bug with -O1 on ARM with gcc 4.8 # This should be fine on all platforms so apply universally - patchPhase = "sed -i s/-O1/-O2/ configure"; + postPatch = "sed -i s/-O1/-O2/ configure"; postInstall = '' install -v -m 444 -D btrfs-completion $out/etc/bash_completion.d/btrfs ''; + configureFlags = stdenv.lib.optional stdenv.hostPlatform.isMusl "--disable-backtrace"; + meta = with stdenv.lib; { description = "Utilities for the btrfs filesystem"; homepage = https://btrfs.wiki.kernel.org/; diff --git a/pkgs/tools/filesystems/e2fsprogs/default.nix b/pkgs/tools/filesystems/e2fsprogs/default.nix index 62eab06c387c..a97e024c0aa9 100644 --- a/pkgs/tools/filesystems/e2fsprogs/default.nix +++ b/pkgs/tools/filesystems/e2fsprogs/default.nix @@ -1,18 +1,18 @@ { stdenv, buildPackages, fetchurl, pkgconfig, libuuid, gettext, texinfo }: stdenv.mkDerivation rec { - name = "e2fsprogs-1.43.9"; + name = "e2fsprogs-1.44.0"; src = fetchurl { url = "mirror://sourceforge/e2fsprogs/${name}.tar.gz"; - sha256 = "15rqvkzylqqckshfy7vmk15k7wds2rh3k1pwrkrs684p3g0gzq2v"; + sha256 = "1l8z17zfzhi00f56xl6c4f2g3fi9m4ixlmwpmaihm9y9qz1giaq4"; }; outputs = [ "bin" "dev" "out" "man" "info" ]; depsBuildBuild = [ buildPackages.stdenv.cc ]; nativeBuildInputs = [ pkgconfig texinfo ]; - buildInputs = [ libuuid ] ++ stdenv.lib.optional (!stdenv.isLinux) gettext; + buildInputs = [ libuuid gettext ]; configureFlags = if stdenv.isLinux then [ diff --git a/pkgs/tools/filesystems/nilfs-utils/default.nix b/pkgs/tools/filesystems/nilfs-utils/default.nix index 977add39b94b..5bce33065192 100644 --- a/pkgs/tools/filesystems/nilfs-utils/default.nix +++ b/pkgs/tools/filesystems/nilfs-utils/default.nix @@ -1,4 +1,4 @@ -{ stdenv, fetchurl, libuuid, libselinux }: +{ stdenv, fetchurl, fetchpatch, libuuid, libselinux }: let sourceInfo = rec { version = "2.2.7"; @@ -23,6 +23,18 @@ stdenv.mkDerivation rec { sed -e 's@/sbin/@'"$out"'/sbin/@' -i ./lib/cleaner*.c ''; + patches = [ + # Fix w/musl + (fetchpatch { + url = "https://github.com/nilfs-dev/nilfs-utils/commit/115fe4b976858c487cf83065f513d8626089579a.patch"; + sha256 = "0h89jz9l5d4rqj647ljbnv451l4ncqpsvzj0v70mn5391hfwsjlv"; + }) + (fetchpatch { + url = "https://github.com/nilfs-dev/nilfs-utils/commit/51b32c614be9e98c32de7f531ee600ca0740946f.patch"; + sha256 = "1ycq83c6jjy74aif47v075k5y2szzwhq6mbcrpd1z4b4i1x6yhpn"; + }) + ]; + # FIXME: https://github.com/NixOS/patchelf/pull/98 is in, but stdenv # still doesn't use it # diff --git a/pkgs/tools/filesystems/xfsprogs/default.nix b/pkgs/tools/filesystems/xfsprogs/default.nix index 5321fd8a830f..cc2bbad1680a 100644 --- a/pkgs/tools/filesystems/xfsprogs/default.nix +++ b/pkgs/tools/filesystems/xfsprogs/default.nix @@ -30,6 +30,7 @@ stdenv.mkDerivation rec { (gentooPatch "xfsprogs-4.12.0-sharedlibs.patch" "1i081749x91jvlrw84l4a3r081vqcvn6myqhnqbnfcfhd64h12bq") (gentooPatch "xfsprogs-4.7.0-libxcmd-link.patch" "1lvy1ajzml39a631a7jqficnzsd40bzkca7hkxv1ybiqyp8sf55s") (gentooPatch "xfsprogs-4.9.0-underlinking.patch" "1r7l8jphspy14i43zbfnjrnyrdm4cpgyfchblascxylmans0gci7") + ./glibc-2.27.patch ]; preConfigure = '' diff --git a/pkgs/tools/filesystems/xfsprogs/glibc-2.27.patch b/pkgs/tools/filesystems/xfsprogs/glibc-2.27.patch new file mode 100644 index 000000000000..1f398b1daa85 --- /dev/null +++ b/pkgs/tools/filesystems/xfsprogs/glibc-2.27.patch @@ -0,0 +1,53 @@ +From 8041435de7ed028a27ecca64302945ad455c69a6 Mon Sep 17 00:00:00 2001 +From: "Darrick J. Wong" <darrick.wong@oracle.com> +Date: Mon, 5 Feb 2018 14:38:02 -0600 +Subject: xfs_io: fix copy_file_range symbol name collision + +glibc 2.27 has a copy_file_range wrapper, so we need to change our +internal function out of the way to avoid compiler warnings. + +Reported-by: fredrik@crux.nu +Signed-off-by: Darrick J. Wong <darrick.wong@oracle.com> +Reviewed-by: Eric Sandeen <sandeen@redhat.com> +Signed-off-by: Eric Sandeen <sandeen@sandeen.net> +--- + io/copy_file_range.c | 11 ++++++++--- + 1 file changed, 8 insertions(+), 3 deletions(-) + +diff --git a/io/copy_file_range.c b/io/copy_file_range.c +index d1dfc5a..99fba20 100644 +--- a/io/copy_file_range.c ++++ b/io/copy_file_range.c +@@ -42,13 +42,18 @@ copy_range_help(void) + ")); + } + ++/* ++ * Issue a raw copy_file_range syscall; for our test program we don't want the ++ * glibc buffered copy fallback. ++ */ + static loff_t +-copy_file_range(int fd, loff_t *src, loff_t *dst, size_t len) ++copy_file_range_cmd(int fd, loff_t *src, loff_t *dst, size_t len) + { + loff_t ret; + + do { +- ret = syscall(__NR_copy_file_range, fd, src, file->fd, dst, len, 0); ++ ret = syscall(__NR_copy_file_range, fd, src, file->fd, dst, ++ len, 0); + if (ret == -1) { + perror("copy_range"); + return errno; +@@ -130,7 +135,7 @@ copy_range_f(int argc, char **argv) + copy_dst_truncate(); + } + +- ret = copy_file_range(fd, &src, &dst, len); ++ ret = copy_file_range_cmd(fd, &src, &dst, len); + close(fd); + return ret; + } +-- +cgit v1.1 + diff --git a/pkgs/tools/graphics/exif/default.nix b/pkgs/tools/graphics/exif/default.nix index 537d1a8c7db9..d6ec68ba3cc5 100644 --- a/pkgs/tools/graphics/exif/default.nix +++ b/pkgs/tools/graphics/exif/default.nix @@ -1,4 +1,4 @@ -{ stdenv, fetchurl, pkgconfig, libexif, popt, libintlOrEmpty }: +{ stdenv, fetchurl, pkgconfig, libexif, popt, libintl }: stdenv.mkDerivation rec { name = "exif-0.6.21"; @@ -9,7 +9,7 @@ stdenv.mkDerivation rec { }; nativeBuildInputs = [ pkgconfig ]; - buildInputs = [ libexif popt ] ++ libintlOrEmpty; + buildInputs = [ libexif popt libintl ]; meta = { homepage = http://libexif.sourceforge.net/; diff --git a/pkgs/tools/graphics/glxinfo/default.nix b/pkgs/tools/graphics/glxinfo/default.nix index b4b881e6c500..a3a9a4d8eda4 100644 --- a/pkgs/tools/graphics/glxinfo/default.nix +++ b/pkgs/tools/graphics/glxinfo/default.nix @@ -1,23 +1,22 @@ -{ stdenv, fetchurl, xlibsWrapper, libGL }: +{ stdenv, fetchurl, libGL, libX11 }: -let version = "8.3.0"; in - -stdenv.mkDerivation { +stdenv.mkDerivation rec { name = "glxinfo-${version}"; + version = "8.3.0"; src = fetchurl { - url = "ftp://ftp.freedesktop.org/pub/libGLU_combined/demos/${version}/mesa-demos-${version}.tar.bz2"; + url = "ftp://ftp.freedesktop.org/pub/mesa/demos/${version}/mesa-demos-${version}.tar.bz2"; sha256 = "1vqb7s5m3fcg2csbiz45mha1pys2xx6rhw94fcyvapqdpm5iawy1"; }; - buildInputs = [ xlibsWrapper libGL ]; + buildInputs = [ libX11 libGL ]; configurePhase = "true"; buildPhase = " cd src/xdemos - gcc glxinfo.c glinfo_common.c -o glxinfo -lGL -lX11 - gcc glxgears.c -o glxgears -lGL -lX11 + $CC glxinfo.c glinfo_common.c -o glxinfo -lGL -lX11 + $CC glxgears.c -o glxgears -lGL -lX11 -lm "; installPhase = " @@ -25,7 +24,11 @@ stdenv.mkDerivation { cp glxinfo glxgears $out/bin/ "; - meta = { - platforms = stdenv.lib.platforms.linux; + meta = with stdenv.lib; { + description = "Test utilities for OpenGL"; + homepage = https://www.mesa3d.org/; + license = licenses.mit; + platforms = platforms.linux; + maintainers = with maintainers; [ abbradar ]; }; } diff --git a/pkgs/tools/graphics/graphviz/base.nix b/pkgs/tools/graphics/graphviz/base.nix index f61c7923d794..b360f9a34503 100644 --- a/pkgs/tools/graphics/graphviz/base.nix +++ b/pkgs/tools/graphics/graphviz/base.nix @@ -23,8 +23,9 @@ stdenv.mkDerivation rec { buildInputs = [ libpng libjpeg expat yacc libtool fontconfig gd gts libdevil flex pango + gettext ] ++ optionals (xorg != null) (with xorg; [ libXrender libXaw libXpm ]) - ++ optionals (stdenv.isDarwin) [ ApplicationServices gettext ]; + ++ optionals (stdenv.isDarwin) [ ApplicationServices ]; hardeningDisable = [ "fortify" ]; diff --git a/pkgs/tools/misc/aescrypt/default.nix b/pkgs/tools/misc/aescrypt/default.nix index d11392599220..d1125d572ee9 100644 --- a/pkgs/tools/misc/aescrypt/default.nix +++ b/pkgs/tools/misc/aescrypt/default.nix @@ -21,8 +21,6 @@ stdenv.mkDerivation rec { buildInputs = [ libiconv ]; - NIX_LDFLAGS = stdenv.lib.optionalString stdenv.isDarwin "-liconv"; - meta = with stdenv.lib; { description = "Encrypt files with Advanced Encryption Standard (AES)"; homepage = https://www.aescrypt.com/; diff --git a/pkgs/tools/misc/desktop-file-utils/default.nix b/pkgs/tools/misc/desktop-file-utils/default.nix index 6e2f6548722e..e89222af74b4 100644 --- a/pkgs/tools/misc/desktop-file-utils/default.nix +++ b/pkgs/tools/misc/desktop-file-utils/default.nix @@ -1,4 +1,4 @@ -{ stdenv, fetchurl, pkgconfig, glib, libintlOrEmpty }: +{ stdenv, fetchurl, pkgconfig, glib, libintl }: with stdenv.lib; @@ -11,9 +11,7 @@ stdenv.mkDerivation rec { }; nativeBuildInputs = [ pkgconfig ]; - buildInputs = [ glib libintlOrEmpty ]; - - NIX_LDFLAGS = optionalString stdenv.isDarwin "-lintl"; + buildInputs = [ glib libintl ]; meta = { homepage = http://www.freedesktop.org/wiki/Software/desktop-file-utils; diff --git a/pkgs/tools/misc/fwup/default.nix b/pkgs/tools/misc/fwup/default.nix index e7e40bc851e2..e334a2a8813e 100644 --- a/pkgs/tools/misc/fwup/default.nix +++ b/pkgs/tools/misc/fwup/default.nix @@ -23,9 +23,6 @@ stdenv.mkDerivation rec { ]; propagatedBuildInputs = [ zip unzip mtools dosfstools coreutils ]; - # segfaults on darwin without - NIX_LDFLAGS = lib.optional stdenv.isDarwin "-F/System/Library/Frameworks"; - meta = with stdenv.lib; { description = "Configurable embedded Linux firmware update creator and runner"; homepage = https://github.com/fhunleth/fwup; diff --git a/pkgs/tools/misc/grub/2.0x.nix b/pkgs/tools/misc/grub/2.0x.nix index 5b9130bbe0e8..96ce38ea9e85 100644 --- a/pkgs/tools/misc/grub/2.0x.nix +++ b/pkgs/tools/misc/grub/2.0x.nix @@ -1,5 +1,5 @@ { stdenv, fetchurl, fetchFromSavannah, autogen, flex, bison, python, autoconf, automake -, gettext, ncurses, libusb, freetype, qemu, devicemapper, unifont +, gettext, ncurses, libusb, freetype, qemu, devicemapper, unifont, pkgconfig , zfs ? null , efiSupport ? false , zfsSupport ? true @@ -46,7 +46,7 @@ stdenv.mkDerivation rec { sha256 = "03vvdfhdmf16121v7xs8is2krwnv15wpkhkf16a4yf8nsfc3f2w1"; }; - nativeBuildInputs = [ bison flex python ]; + nativeBuildInputs = [ bison flex python pkgconfig ]; buildInputs = [ ncurses libusb freetype gettext devicemapper ] ++ optional doCheck qemu ++ optional zfsSupport zfs; @@ -123,6 +123,6 @@ stdenv.mkDerivation rec { license = licenses.gpl3Plus; - platforms = platforms.gnu; + platforms = platforms.gnu ++ platforms.linux; }; }) diff --git a/pkgs/tools/misc/man-db/default.nix b/pkgs/tools/misc/man-db/default.nix index eadb736aeeb2..8d0728b7556e 100644 --- a/pkgs/tools/misc/man-db/default.nix +++ b/pkgs/tools/misc/man-db/default.nix @@ -57,7 +57,7 @@ stdenv.mkDerivation rec { enableParallelBuilding = true; - doCheck = true; + doCheck = !stdenv.hostPlatform.isMusl; /* iconv binary */ meta = with stdenv.lib; { homepage = http://man-db.nongnu.org; diff --git a/pkgs/tools/misc/parted/default.nix b/pkgs/tools/misc/parted/default.nix index 68240210e746..3a05a1927dbc 100644 --- a/pkgs/tools/misc/parted/default.nix +++ b/pkgs/tools/misc/parted/default.nix @@ -1,4 +1,4 @@ -{ stdenv, fetchurl, devicemapper, libuuid, gettext, readline, perl, python2 +{ stdenv, fetchurl, fetchpatch, devicemapper, libuuid, gettext, readline, perl, python2 , utillinux, check, enableStatic ? false, hurd ? null }: stdenv.mkDerivation rec { @@ -9,7 +9,12 @@ stdenv.mkDerivation rec { sha256 = "1r3qpg3bhz37mgvp9chsaa3k0csby3vayfvz8ggsqz194af5i2w5"; }; - patches = stdenv.lib.optional doCheck ./gpt-unicode-test-fix.patch; + patches = stdenv.lib.optional doCheck ./gpt-unicode-test-fix.patch + ++ stdenv.lib.optional stdenv.hostPlatform.isMusl + (fetchpatch { + url = "https://git.alpinelinux.org/cgit/aports/plain/main/parted/fix-includes.patch?id=9c5cd3c329a40ba4559cc1d8c7d17a9bf95c237b"; + sha256 = "117ypyiwvzym6pi8xmy16wa5z3sbpx7gh6haabs6kfb1x2894z7q"; + }); postPatch = stdenv.lib.optionalString doCheck '' patchShebangs tests @@ -31,7 +36,7 @@ stdenv.mkDerivation rec { # Tests were previously failing due to Hydra running builds as uid 0. # That should hopefully be fixed now. - doCheck = true; + doCheck = !stdenv.hostPlatform.isMusl; /* translation test */ preCheck = stdenv.lib.optionalString doCheck diff --git a/pkgs/tools/networking/curl/default.nix b/pkgs/tools/networking/curl/default.nix index dbe2a6639352..32a8a7888484 100644 --- a/pkgs/tools/networking/curl/default.nix +++ b/pkgs/tools/networking/curl/default.nix @@ -1,4 +1,4 @@ -{ stdenv, fetchurl, pkgconfig, perl +{ stdenv, lib, fetchurl, pkgconfig, perl , http2Support ? true, nghttp2 , idnSupport ? false, libidn ? null , ldapSupport ? false, openldap ? null @@ -24,11 +24,14 @@ assert brotliSupport -> brotli != null; assert gssSupport -> kerberos != null; stdenv.mkDerivation rec { - name = "curl-7.58.0"; + name = "curl-7.59.0"; src = fetchurl { - url = "https://curl.haxx.se/download/${name}.tar.bz2"; - sha256 = "0cg7klhf1ksnbw5wvwa802qir877zv4y3dj7swz1xh07g3wq3c0w"; + urls = [ + "https://github.com/curl/curl/releases/download/${lib.replaceStrings ["."] ["_"] name}/${name}.tar.bz2" + "https://curl.haxx.se/download/${name}.tar.bz2" + ]; + sha256 = "185mazhi4bc5mc6rvhrmnc67j8l3sg7f0w2hp5gmi5ccdbyhz4mm"; }; outputs = [ "bin" "dev" "out" "man" "devdoc" ]; diff --git a/pkgs/tools/networking/lftp/default.nix b/pkgs/tools/networking/lftp/default.nix index 3e4f1eaeeefe..36eced808569 100644 --- a/pkgs/tools/networking/lftp/default.nix +++ b/pkgs/tools/networking/lftp/default.nix @@ -15,8 +15,7 @@ stdenv.mkDerivation rec { nativeBuildInputs = [ pkgconfig ]; - buildInputs = [ gnutls readline zlib libidn2 gmp libiconv libunistring ] - ++ stdenv.lib.optional stdenv.isDarwin gettext; + buildInputs = [ gnutls readline zlib libidn2 gmp libiconv libunistring gettext ]; hardeningDisable = stdenv.lib.optional stdenv.isDarwin "format"; diff --git a/pkgs/tools/networking/netcat-openbsd/default.nix b/pkgs/tools/networking/netcat-openbsd/default.nix index 8c9247013778..2d9776abfcfc 100644 --- a/pkgs/tools/networking/netcat-openbsd/default.nix +++ b/pkgs/tools/networking/netcat-openbsd/default.nix @@ -1,4 +1,4 @@ -{stdenv, fetchurl, pkgconfig, libbsd}: +{stdenv, fetchurl, fetchpatch, pkgconfig, libbsd}: stdenv.mkDerivation rec { version = "1.187"; @@ -27,6 +27,13 @@ stdenv.mkDerivation rec { done ''; + patches = stdenv.lib.optional stdenv.hostPlatform.isMusl [ + (fetchpatch { + url = "https://gitweb.gentoo.org/proj/musl.git/plain/net-analyzer/openbsd-netcat/files/openbsd-netcat-1.105-b64_ntop.patch?id=4a5864922232c7df550c21f2a7b77fe6f8ffc6d6"; + sha256 = "1cgqb6fxas5yiwf26hq57v627hhmcskl5j6rx30090ha2ksjqyvr"; + }) + ]; + installPhase = '' runHook preInstall install -Dm0755 nc $out/bin/nc diff --git a/pkgs/tools/networking/unbound/default.nix b/pkgs/tools/networking/unbound/default.nix index cc2f994d0d54..ed5c30aa42b5 100644 --- a/pkgs/tools/networking/unbound/default.nix +++ b/pkgs/tools/networking/unbound/default.nix @@ -2,11 +2,11 @@ stdenv.mkDerivation rec { name = "unbound-${version}"; - version = "1.6.8"; + version = "1.7.0"; src = fetchurl { url = "https://unbound.net/downloads/${name}.tar.gz"; - sha256 = "0jfxhh4gc5amhndikskz1s7da27ycn442j3l20bm992n7zijid73"; + sha256 = "18i6p6zqmbs9gj57mz3iwz828csaab26gb534b8wrn0kzdqr1pcl"; }; outputs = [ "out" "lib" "man" ]; # "dev" would only split ~20 kB diff --git a/pkgs/tools/networking/vde2/default.nix b/pkgs/tools/networking/vde2/default.nix index ff54e1ab2d21..39674d22aa1d 100644 --- a/pkgs/tools/networking/vde2/default.nix +++ b/pkgs/tools/networking/vde2/default.nix @@ -1,4 +1,4 @@ -{ stdenv, fetchurl, openssl, libpcap, python2 }: +{ stdenv, fetchurl, fetchpatch, openssl, libpcap, python2 }: stdenv.mkDerivation rec { name = "vde2-2.3.2"; @@ -8,6 +8,14 @@ stdenv.mkDerivation rec { sha256 = "14xga0ib6p1wrv3hkl4sa89yzjxv7f1vfqaxsch87j6scdm59pr2"; }; + patches = stdenv.lib.optional stdenv.hostPlatform.isMusl ( + fetchpatch { + url = "https://git.alpinelinux.org/cgit/aports/plain/main/vde2/musl-build-fix.patch?id=ddee2f86a48e087867d4a2c12849b2e3baccc238"; + sha256 = "0b5382v541bkxhqylilcy34bh83ag96g71f39m070jzvi84kx8af"; + } + ); + + buildInputs = [ openssl libpcap python2 ]; hardeningDisable = [ "format" ]; diff --git a/pkgs/tools/networking/wget/default.nix b/pkgs/tools/networking/wget/default.nix index b31ae93066ef..e2d4712d5bc3 100644 --- a/pkgs/tools/networking/wget/default.nix +++ b/pkgs/tools/networking/wget/default.nix @@ -1,5 +1,5 @@ { stdenv, fetchurl, gettext, pkgconfig, perl -, libidn2, zlib, pcre, libuuid, libiconv +, libidn2, zlib, pcre, libuuid, libiconv, libintl , IOSocketSSL, LWP, python3, lzip , libpsl ? null , openssl ? null }: @@ -25,12 +25,10 @@ stdenv.mkDerivation rec { do sed -i "$i" -e's/localhost/127.0.0.1/g' done - '' + stdenv.lib.optionalString stdenv.isDarwin '' - export LIBS="-liconv -lintl" ''; - nativeBuildInputs = [ gettext pkgconfig perl lzip ]; - buildInputs = [ libidn2 libiconv zlib pcre libuuid ] + nativeBuildInputs = [ gettext pkgconfig perl lzip libiconv libintl ]; + buildInputs = [ libidn2 zlib pcre libuuid ] ++ stdenv.lib.optionals doCheck [ IOSocketSSL LWP python3 ] ++ stdenv.lib.optional (openssl != null) openssl ++ stdenv.lib.optional (libpsl != null) libpsl diff --git a/pkgs/tools/networking/whois/default.nix b/pkgs/tools/networking/whois/default.nix index 48a3d1591fc9..4a40c3200407 100644 --- a/pkgs/tools/networking/whois/default.nix +++ b/pkgs/tools/networking/whois/default.nix @@ -18,8 +18,6 @@ stdenv.mkDerivation rec { for i in Makefile po/Makefile; do substituteInPlace $i --replace "prefix = /usr" "prefix = $out" done - '' + stdenv.lib.optionalString (stdenv.isDarwin || stdenv.hostPlatform.isMusl) '' - echo "whois_LDADD += -liconv" >> Makefile ''; makeFlags = [ "HAVE_ICONV=1" ]; diff --git a/pkgs/tools/package-management/disnix/default.nix b/pkgs/tools/package-management/disnix/default.nix index 03831f9b8b87..a55fd33f8991 100644 --- a/pkgs/tools/package-management/disnix/default.nix +++ b/pkgs/tools/package-management/disnix/default.nix @@ -1,15 +1,15 @@ -{ stdenv, fetchurl, pkgconfig, glib, libxml2, libxslt, getopt, nixUnstable, dysnomia, libintlOrEmpty, libiconv }: +{ stdenv, fetchurl, pkgconfig, glib, libxml2, libxslt, getopt, nixUnstable, dysnomia, libintl, libiconv }: stdenv.mkDerivation { name = "disnix-0.8"; - + src = fetchurl { url = https://github.com/svanderburg/disnix/files/1756701/disnix-0.8.tar.gz; sha256 = "02cmj1jqk5i90szjsn5csr7qb7n42v04rvl9syx0zi9sx9ldnb0w"; }; - + nativeBuildInputs = [ pkgconfig ]; - buildInputs = [ glib libxml2 libxslt getopt nixUnstable libintlOrEmpty libiconv dysnomia ]; + buildInputs = [ glib libxml2 libxslt getopt nixUnstable libintl libiconv dysnomia ]; meta = { description = "A Nix-based distributed service deployment tool"; diff --git a/pkgs/tools/security/gnupg/22.nix b/pkgs/tools/security/gnupg/22.nix index c47780588cd7..860c90eb4c9d 100644 --- a/pkgs/tools/security/gnupg/22.nix +++ b/pkgs/tools/security/gnupg/22.nix @@ -28,8 +28,6 @@ stdenv.mkDerivation rec { readline libusb gnutls adns openldap zlib bzip2 sqlite ]; - NIX_LDFLAGS = stdenv.lib.optionalString stdenv.isDarwin "-lintl"; - patches = [ ./fix-libusb-include-path.patch ]; diff --git a/pkgs/tools/security/pinentry/default.nix b/pkgs/tools/security/pinentry/default.nix index ac00c1fd5443..07cf15baa224 100644 --- a/pkgs/tools/security/pinentry/default.nix +++ b/pkgs/tools/security/pinentry/default.nix @@ -1,5 +1,6 @@ { fetchurl, fetchpatch, stdenv, lib, pkgconfig -, libgpgerror, libassuan, libcap ? null, libsecret ? null, ncurses ? null, gtk2 ? null, gcr ? null, qt ? null +, libgpgerror, libassuan, libcap ? null, libsecret ? null, ncurses ? null, gtk2 ? null, gcr ? null, qt ? null +, enableEmacs ? false }: let @@ -33,6 +34,7 @@ stdenv.mkDerivation rec { (mkEnable (libsecret != null) "libsecret") (mkEnable (ncurses != null) "pinentry-curses") (mkEnable true "pinentry-tty") + (mkEnable enableEmacs "pinentry-emacs") (mkEnable (gtk2 != null) "pinentry-gtk2") (mkEnable (gcr != null) "pinentry-gnome3") (mkEnable (qt != null) "pinentry-qt") diff --git a/pkgs/tools/text/odt2txt/default.nix b/pkgs/tools/text/odt2txt/default.nix index 187a6526dc3c..3feecdf4f53c 100644 --- a/pkgs/tools/text/odt2txt/default.nix +++ b/pkgs/tools/text/odt2txt/default.nix @@ -12,8 +12,6 @@ stdenv.mkDerivation rec { buildInputs = [ zlib libiconv ]; - NIX_LDFLAGS = stdenv.lib.optionalString stdenv.isDarwin "-liconv"; - meta = { description = "Simple .odt to .txt converter"; homepage = http://stosberg.net/odt2txt; diff --git a/pkgs/tools/text/recode/default.nix b/pkgs/tools/text/recode/default.nix index acf657d2292c..9946da614c71 100644 --- a/pkgs/tools/text/recode/default.nix +++ b/pkgs/tools/text/recode/default.nix @@ -1,5 +1,5 @@ -{ stdenv, fetchFromGitHub, python, perl, intltool, flex, autoreconfHook, -texinfo, libiconv }: +{ stdenv, fetchFromGitHub, python, perl, intltool, flex, autoreconfHook +, texinfo, libiconv, libintl }: stdenv.mkDerivation rec { name = "recode-3.7-2fd838565"; @@ -12,15 +12,13 @@ stdenv.mkDerivation rec { }; nativeBuildInputs = [ python perl intltool flex texinfo autoreconfHook libiconv ]; + buildInputs = [ libintl ]; preAutoreconf = '' # fix build with new automake, https://bugs.gentoo.org/show_bug.cgi?id=419455 substituteInPlace Makefile.am --replace "ACLOCAL = ./aclocal.sh @ACLOCAL@" "" sed -i '/^AM_C_PROTOTYPES/d' configure.ac substituteInPlace src/Makefile.am --replace "ansi2knr" "" - '' - + stdenv.lib.optionalString stdenv.isDarwin '' - export LDFLAGS=-lintl ''; #doCheck = true; # doesn't work yet diff --git a/pkgs/tools/text/unrtf/default.nix b/pkgs/tools/text/unrtf/default.nix index c1b4aa1cf2c6..361b6782526b 100644 --- a/pkgs/tools/text/unrtf/default.nix +++ b/pkgs/tools/text/unrtf/default.nix @@ -19,8 +19,7 @@ stdenv.mkDerivation rec { nativeBuildInputs = [ autoconf automake ]; - buildInputs = [ ] ++ stdenv.lib.optional stdenv.isDarwin libiconv; - NIX_LDFLAGS = stdenv.lib.optionalString stdenv.isDarwin "-liconv"; + buildInputs = [ libiconv ]; preConfigure = "./bootstrap"; diff --git a/pkgs/top-level/aliases.nix b/pkgs/top-level/aliases.nix index 9962c3c8fe6e..7f6d55f3808c 100644 --- a/pkgs/top-level/aliases.nix +++ b/pkgs/top-level/aliases.nix @@ -120,6 +120,7 @@ mapAliases (rec { libgnome_keyring = libgnome-keyring; # added 2018-02-25 libgnome_keyring3 = libgnome-keyring3; # added 2018-02-25 libgumbo = gumbo; # added 2018-01-21 + libintlOrEmpty = stdenv.lib.optional (!stdenv.isLinux || hostPlatform.libc != "glibc") gettext; # added 2018-03-14 libjson_rpc_cpp = libjson-rpc-cpp; # added 2017-02-28 libmysql = mysql.connector-c; # added # 2017-12-28, this was a misnomer refering to libmysqlclient libtidy = html-tidy; # added 2014-12-21 @@ -235,6 +236,10 @@ mapAliases (rec { wineStable = winePackages.stable; wineUnstable = winePackages.unstable; + # added 2018-03-26 + libva-full = libva; + libva1-full = libva1; + inherit (ocaml-ng) # added 2016-09-14 ocamlPackages_3_10_0 ocamlPackages_3_11_2 ocamlPackages_3_12_1 ocamlPackages_4_00_1 ocamlPackages_4_01_0 ocamlPackages_4_02 diff --git a/pkgs/top-level/all-packages.nix b/pkgs/top-level/all-packages.nix index a3f388da1ee7..d71a05a3db3c 100644 --- a/pkgs/top-level/all-packages.nix +++ b/pkgs/top-level/all-packages.nix @@ -4265,6 +4265,10 @@ with pkgs; gtk2 = null; }; + pinentry_emacs = pinentry_ncurses.override { + enableEmacs = true; + }; + pinentry_gnome = pinentry_ncurses.override { gcr = gnome3.gcr; }; @@ -7481,8 +7485,6 @@ with pkgs; binutils = if targetPlatform.isDarwin then darwin.binutils - else if targetPlatform.isRiscV - then binutils_2_30 else binutils-raw; binutils-unwrapped = callPackage ../development/tools/misc/binutils { @@ -7493,15 +7495,6 @@ with pkgs; libc = if targetPlatform != hostPlatform then libcCross else stdenv.cc.libc; bintools = binutils-unwrapped; }; - binutils-unwrapped_2_30 = callPackage ../development/tools/misc/binutils/2.30.nix { - # FHS sys dirs presumably only have stuff for the build platform - noSysDirs = (targetPlatform != buildPlatform) || noSysDirs; - }; - binutils-raw_2_30 = wrapBintoolsWith { - libc = if targetPlatform != hostPlatform then libcCross else stdenv.cc.libc; - bintools = binutils-unwrapped_2_30; - }; - binutils_2_30 = binutils-raw_2_30; binutils_nogold = lowPrio (binutils-raw.override { bintools = binutils-raw.bintools.override { @@ -7816,11 +7809,7 @@ with pkgs; gnumake382 = callPackage ../development/tools/build-managers/gnumake/3.82 { }; gnumake3 = gnumake382; - gnumake42 = callPackage ../development/tools/build-managers/gnumake/4.2 { }; - gnumake = if hostPlatform.isRiscV # Technically this check should be for glibc version. - then gnumake42HEAD - else gnumake42; - gnumake42HEAD = callPackage ../development/tools/build-managers/gnumake/4.2/head.nix { }; + gnumake = callPackage ../development/tools/build-managers/gnumake/4.2 { }; gnustep = recurseIntoAttrs (callPackage ../desktops/gnustep {}); @@ -8926,12 +8915,10 @@ with pkgs; icon-lang = callPackage ../development/interpreters/icon-lang { }; libgit2 = callPackage ../development/libraries/git2 { - inherit (darwin) libiconv; inherit (darwin.apple_sdk.frameworks) Security; }; libgit2_0_25 = callPackage ../development/libraries/git2/0.25.nix { - inherit (darwin) libiconv; inherit (darwin.apple_sdk.frameworks) Security; }; @@ -8946,13 +8933,9 @@ with pkgs; glfw2 = callPackage ../development/libraries/glfw/2.x.nix { }; glfw3 = callPackage ../development/libraries/glfw/3.x.nix { }; - glibc_2_26 = callPackage ../development/libraries/glibc { + glibc = callPackage ../development/libraries/glibc { installLocales = config.glibc.locales or false; }; - glibc_2_27 = callPackage ../development/libraries/glibc/2.27.nix { - installLocales = config.glibc.locales or false; - }; - glibc = if hostPlatform.isRiscV then glibc_2_27 else glibc_2_26; glibc_memusage = callPackage ../development/libraries/glibc { installLocales = false; @@ -8960,11 +8943,7 @@ with pkgs; }; # Being redundant to avoid cycles on boot. TODO: find a better way - glibcCross = let - expr = if hostPlatform.isRiscV - then ../development/libraries/glibc/2.27.nix - else ../development/libraries/glibc; - in callPackage expr { + glibcCross = callPackage ../development/libraries/glibc { installLocales = config.glibc.locales or false; stdenv = crossLibcStdenv; }; @@ -9945,11 +9924,7 @@ with pkgs; mysql = mysql57; }; - libnatspec = callPackage ../development/libraries/libnatspec ( - stdenv.lib.optionalAttrs stdenv.isDarwin { - inherit (darwin) libiconv; - } - ); + libnatspec = callPackage ../development/libraries/libnatspec { }; libndp = callPackage ../development/libraries/libndp { }; @@ -10007,7 +9982,7 @@ with pkgs; # We also provide `libiconvReal`, which will always be a standalone libiconv, # just in case you want it regardless of platform. libiconv = - if hostPlatform.libc == "glibc" + if (hostPlatform.libc == "glibc" || hostPlatform.libc == "musl") then glibcIconv (if hostPlatform != buildPlatform then libcCross else stdenv.cc.libc) @@ -10028,7 +10003,7 @@ with pkgs; }; # On non-GNU systems we need GNU Gettext for libintl. - libintlOrEmpty = stdenv.lib.optional (!stdenv.isLinux || hostPlatform.libc != "glibc") gettext; + libintl = if hostPlatform.libc != "glibc" then gettext else null; libid3tag = callPackage ../development/libraries/libid3tag { gperf = gperf_3_0; @@ -10358,17 +10333,15 @@ with pkgs; }); libva = callPackage ../development/libraries/libva { }; - libva-full = libva.override { minimal = false; }; + libva-minimal = libva.override { minimal = true; }; libva-utils = callPackage ../development/libraries/libva-utils { }; libva1 = callPackage ../development/libraries/libva/1.0.0.nix { }; - libva1-full = libva1.override { minimal = false; }; + libva1-minimal = libva1.override { minimal = true; }; libvdpau = callPackage ../development/libraries/libvdpau { }; - libvdpau-va-gl = callPackage ../development/libraries/libvdpau-va-gl { - libva = libva-full; # also wants libva-{x11} - }; + libvdpau-va-gl = callPackage ../development/libraries/libvdpau-va-gl { }; libvirt = callPackage ../development/libraries/libvirt { }; @@ -10528,60 +10501,47 @@ with pkgs; ## libGL/libGLU/Mesa stuff # Default libGL implementation, should provide headers and libGL.so/libEGL.so/... to link agains them - # Default implementation is `mesa`, but can be eventually replaced with `libglvnd`, - # or other runtime dispatcher - libGL = mesa_noglu; + libGL = libGLDarwinOr mesa_noglu.stubs; # Default libGLU - libGLU = mesa_glu; + libGLU = libGLDarwinOr mesa_glu; # Combined derivation, contains both libGL and libGLU # Please, avoid using this attribute. It was meant as transitional hack # for packages that assume that libGLU and libGL live in the same prefix. # libGLU_combined propagates both libGL and libGLU - libGLU_combined = mesa; + libGLU_combined = libGLDarwinOr (buildEnv { + name = "libGLU-combined"; + paths = [ libGL libGLU ]; + extraOutputsToInstall = [ "dev" ]; + }); # Default derivation with libGL.so.1 to link into /run/opengl-drivers (if need) - libGL_driver = mesa_drivers; + libGL_driver = libGLDarwinOr mesa_drivers; libGLSupported = lib.elem system lib.platforms.mesaPlatforms; - libGLDarwinOr = alternative: if stdenv.isDarwin - then callPackage ../development/libraries/mesa-darwin { - inherit (darwin.apple_sdk.frameworks) OpenGL; - inherit (darwin.apple_sdk.libs) Xplugin; - inherit (darwin) apple_sdk; - } - else alternative; + libGLDarwin = callPackage ../development/libraries/mesa-darwin { + inherit (darwin.apple_sdk.frameworks) OpenGL; + inherit (darwin.apple_sdk.libs) Xplugin; + inherit (darwin) apple_sdk; + }; + + libGLDarwinOr = alternative: if stdenv.isDarwin then libGLDarwin else alternative; - # FIXME: should be `libGL = libGLDarwinOr mesa_nonglu` but this change cause mass rebuild, - # until all packages will refer to libGL/GLU/GLU combined - mesa_noglu = libGLDarwinOr (callPackage ../development/libraries/mesa { + mesa_noglu = callPackage ../development/libraries/mesa { # 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; # no more support in nixpkgs ATM - }); + }; - mesa_glu = libGLDarwinOr (callPackage ../development/libraries/mesa-glu { }); - mesa_drivers = libGLDarwinOr ( + mesa_glu = callPackage ../development/libraries/mesa-glu { }; + mesa_drivers = let mo = mesa_noglu.override { grsecEnabled = config.grsecurity or false; enableTextureFloats = true; }; - in mo.drivers - ); - - # Please, avoid using this attribute. It was meant as transitional hack - # for packages that assume that libGLU and libGL live in the same prefix. - # Otherwise it's better to use mesa_glu or mesa_noglu, depending on whether - # you need libGLU or not (_glu propagates _noglu). - mesa = libGLDarwinOr (buildEnv { - name = "mesa-${mesa_noglu.version}"; - paths = [ mesa_noglu.dev mesa_noglu.out mesa_glu mesa_glu.dev ]; - meta = { - platforms = lib.platforms.unix; - }; - }); + in mo.drivers; ## End libGL/libGLU/Mesa stuff @@ -11153,9 +11113,7 @@ with pkgs; libopenshot-audio = callPackage ../applications/video/openshot-qt/libopenshot-audio.nix { }; - libqtav = callPackage ../development/libraries/libqtav { - libva = libva-full; # also wants libva-x11 - }; + libqtav = callPackage ../development/libraries/libqtav { }; kpmcore = callPackage ../development/libraries/kpmcore { }; @@ -11688,13 +11646,9 @@ with pkgs; v8_static = lowPrio (self.v8.override { static = true; }); - vaapiIntel = callPackage ../development/libraries/vaapi-intel { - libva = libva-full; # also wants libva-{x11,drm,wayland} - }; + vaapiIntel = callPackage ../development/libraries/vaapi-intel { }; - vaapiVdpau = callPackage ../development/libraries/vaapi-vdpau { - libva = libva-full; # needs libva-{x11,glx} - }; + vaapiVdpau = callPackage ../development/libraries/vaapi-vdpau { }; vale = callPackage ../tools/text/vale { }; @@ -11739,9 +11693,7 @@ with pkgs; stdenv = overrideCC stdenv gcc6; # upstream code incompatible with gcc7 }; - wavpack = callPackage ../development/libraries/wavpack { - inherit (darwin) libiconv; - }; + wavpack = callPackage ../development/libraries/wavpack { }; wayland = callPackage ../development/libraries/wayland { graphviz = graphviz-nox; @@ -11933,7 +11885,9 @@ with pkgs; czmq = czmq3; }; - zig = callPackage ../development/compilers/zig {}; + zig = callPackage ../development/compilers/zig { + llvmPackages = llvmPackages_6; + }; zimlib = callPackage ../development/libraries/zimlib { }; @@ -12883,12 +12837,11 @@ with pkgs; inherit clangStdenv fetchurl fetchgit fetchpatch stdenv intltool freetype fontconfig libxslt expat libpng zlib perl mesa_drivers spice-protocol libunwind dbus libuuid openssl gperf m4 libevdev tradcpp libinput mcpp makeWrapper autoreconfHook - autoconf automake libtool mtdev pixman + autoconf automake libtool mtdev pixman libGL cairo epoxy; inherit (buildPackages) pkgconfig xmlto asciidoc flex bison; inherit (darwin) apple_sdk cf-private libobjc; bootstrap_cmds = if stdenv.isDarwin then darwin.bootstrap_cmds else null; - mesa = libGL; python = python2; # Incompatible with Python 3x udev = if stdenv.isLinux then udev else null; libdrm = if stdenv.isLinux then libdrm else null; @@ -13499,6 +13452,8 @@ with pkgs; systemtap = callPackage ../development/tools/profiling/systemtap { }; + tmon = callPackage ../os-specific/linux/tmon { }; + tp_smapi = callPackage ../os-specific/linux/tp_smapi { }; usbip = callPackage ../os-specific/linux/usbip { }; @@ -14750,9 +14705,7 @@ with pkgs; autopanosiftc = callPackage ../applications/graphics/autopanosiftc { }; - avidemux = libsForQt5.callPackage ../applications/video/avidemux { - libva = libva-full; - }; + avidemux = libsForQt5.callPackage ../applications/video/avidemux { }; avogadro = callPackage ../applications/science/chemistry/avogadro { eigen = eigen2; @@ -14973,7 +14926,9 @@ with pkgs; chromiumDev = lowPrio (chromium.override { channel = "dev"; }); - chuck = callPackage ../applications/audio/chuck { }; + chuck = callPackage ../applications/audio/chuck { + inherit (darwin.apple_sdk.frameworks) AppKit Carbon CoreAudio CoreMIDI CoreServices Kernel; + }; cinelerra = callPackage ../applications/video/cinelerra { }; @@ -16773,7 +16728,6 @@ with pkgs; mpv = callPackage ../applications/video/mpv rec { inherit (luaPackages) luasocket; youtube-dl = pythonPackages.youtube-dl; - libva = libva-full; waylandSupport = stdenv.isLinux; alsaSupport = !stdenv.isDarwin; pulseSupport = !stdenv.isDarwin; @@ -17293,7 +17247,9 @@ with pkgs; qemu-riscv = callPackage ../applications/virtualization/qemu/riscv.nix {}; - qgis = callPackage ../applications/gis/qgis {}; + qgis = callPackage ../applications/gis/qgis { + inherit (darwin.apple_sdk.frameworks) IOKit ApplicationServices; + }; qgroundcontrol = libsForQt5.callPackage ../applications/science/robotics/qgroundcontrol { }; @@ -18184,7 +18140,6 @@ with pkgs; vlc = callPackage ../applications/video/vlc { ffmpeg = ffmpeg_2; - libva = libva-full; # also wants libva-x11 }; vlc_npapi = callPackage ../applications/video/vlc/plugin.nix { @@ -18441,9 +18396,7 @@ with pkgs; gtk = gtk2; }; - kodiPlain = callPackage ../applications/video/kodi { - libva = libva-full; - }; + kodiPlain = callPackage ../applications/video/kodi { }; xbmcPlain = kodiPlain; kodiPlugins = recurseIntoAttrs (callPackage ../applications/video/kodi/plugins.nix {}); diff --git a/pkgs/top-level/perl-packages.nix b/pkgs/top-level/perl-packages.nix index 91e3581b6835..7deb2330c9aa 100644 --- a/pkgs/top-level/perl-packages.nix +++ b/pkgs/top-level/perl-packages.nix @@ -8071,8 +8071,7 @@ let self = _self // overrides; _self = with self; { LocaleGettext = buildPerlPackage { name = "LocaleGettext-1.05"; - buildInputs = stdenv.lib.optional (stdenv.isFreeBSD || stdenv.isDarwin || stdenv.isCygwin) pkgs.gettext; - NIX_CFLAGS_LINK = stdenv.lib.optional (stdenv.isFreeBSD || stdenv.isDarwin || stdenv.isCygwin) "-lintl"; + buildInputs = [ pkgs.gettext ]; src = fetchurl { url = mirror://cpan/authors/id/P/PV/PVANDRY/gettext-1.05.tar.gz; sha256 = "15262a00vx714szpx8p2z52wxkz46xp7acl72znwjydyq4ypydi7"; diff --git a/pkgs/top-level/python-packages.nix b/pkgs/top-level/python-packages.nix index 963b255a8876..b2c6b3402f5d 100644 --- a/pkgs/top-level/python-packages.nix +++ b/pkgs/top-level/python-packages.nix @@ -14069,7 +14069,7 @@ in { description = "A Python binding to QScintilla, Qt based text editing control"; license = licenses.lgpl21Plus; maintainers = with maintainers; [ danbst ]; - platforms = platforms.linux; + platforms = platforms.unix; }; }); |