diff options
7 files changed, 76 insertions, 4 deletions
diff --git a/pkgs/development/libraries/gdbm/default.nix b/pkgs/development/libraries/gdbm/default.nix index ecab75fb0ea9..bbebcca6e2f0 100644 --- a/pkgs/development/libraries/gdbm/default.nix +++ b/pkgs/development/libraries/gdbm/default.nix @@ -2,6 +2,8 @@ stdenv.mkDerivation rec { name = "gdbm-1.17"; + # FIXME: remove on update to > 1.17 + NIX_CFLAGS_COMPILE = if stdenv.cc.isClang then "-Wno-error=return-type" else null; src = fetchurl { url = "mirror://gnu/gdbm/${name}.tar.gz"; diff --git a/pkgs/development/libraries/libtiff/default.nix b/pkgs/development/libraries/libtiff/default.nix index c5a12432280b..bf0393fd89a6 100644 --- a/pkgs/development/libraries/libtiff/default.nix +++ b/pkgs/development/libraries/libtiff/default.nix @@ -13,8 +13,10 @@ stdenv.mkDerivation rec { prePatch = let debian = fetchurl { - url = http://http.debian.net/debian/pool/main/t/tiff/tiff_4.0.9-5.debian.tar.xz; - sha256 = "15lwcsd46gini27akms2ngyxnwi1hs2yskrv5x2wazs5fw5ii62w"; + # When the URL disappears, it typically means that Debian has new patches + # (probably security) and updating to new tarball will apply them as well. + url = http://http.debian.net/debian/pool/main/t/tiff/tiff_4.0.9-6.debian.tar.xz; + sha256 = "10yk5npchxscgsnd7ihd3bbbw2fxkl7ni0plm43c9q4nwp6ms52f"; }; in '' tar xf ${debian} diff --git a/pkgs/development/libraries/mesa/default.nix b/pkgs/development/libraries/mesa/default.nix index dbcfcf19bd10..e1a9477dcd63 100644 --- a/pkgs/development/libraries/mesa/default.nix +++ b/pkgs/development/libraries/mesa/default.nix @@ -88,6 +88,7 @@ let self = stdenv.mkDerivation { patches = [ ./symlink-drivers.patch ./missing-includes.patch # dev_t needs sys/stat.h, time_t needs time.h, etc.-- fixes build w/musl + ./disk_cache-include-dri-driver-path-in-cache-key.patch ]; outputs = [ "out" "dev" "drivers" "osmesa" ]; diff --git a/pkgs/development/libraries/mesa/disk_cache-include-dri-driver-path-in-cache-key.patch b/pkgs/development/libraries/mesa/disk_cache-include-dri-driver-path-in-cache-key.patch new file mode 100644 index 000000000000..47391567fb9b --- /dev/null +++ b/pkgs/development/libraries/mesa/disk_cache-include-dri-driver-path-in-cache-key.patch @@ -0,0 +1,52 @@ +From 9c9df280b318c26aece9873cf77b32e4f95634c1 Mon Sep 17 00:00:00 2001 +From: David McFarland <corngood@gmail.com> +Date: Mon, 6 Aug 2018 15:52:11 -0300 +Subject: [PATCH] disk_cache: include dri driver path in cache key + +This fixes invalid cache hits on NixOS where all shared library +timestamps in /nix/store are zero. +--- + src/util/Makefile.am | 3 +++ + src/util/disk_cache.c | 3 +++ + 2 files changed, 6 insertions(+) + +diff --git a/src/util/Makefile.am b/src/util/Makefile.am +index 07bf052175..aea09f60b3 100644 +--- a/src/util/Makefile.am ++++ b/src/util/Makefile.am +@@ -30,6 +30,9 @@ noinst_LTLIBRARIES = \ + libmesautil.la \ + libxmlconfig.la + ++AM_CFLAGS = \ ++ -DDISK_CACHE_KEY=\"$(drivers)\" ++ + AM_CPPFLAGS = \ + $(PTHREAD_CFLAGS) \ + -I$(top_srcdir)/include +diff --git a/src/util/disk_cache.c b/src/util/disk_cache.c +index 4a762eff20..8086c0be75 100644 +--- a/src/util/disk_cache.c ++++ b/src/util/disk_cache.c +@@ -388,8 +388,10 @@ disk_cache_create(const char *gpu_name, const char *timestamp, + + /* Create driver id keys */ + size_t ts_size = strlen(timestamp) + 1; ++ size_t key_size = strlen(DISK_CACHE_KEY) + 1; + size_t gpu_name_size = strlen(gpu_name) + 1; + cache->driver_keys_blob_size += ts_size; ++ cache->driver_keys_blob_size += key_size; + cache->driver_keys_blob_size += gpu_name_size; + + /* We sometimes store entire structs that contains a pointers in the cache, +@@ -410,6 +412,7 @@ disk_cache_create(const char *gpu_name, const char *timestamp, + uint8_t *drv_key_blob = cache->driver_keys_blob; + DRV_KEY_CPY(drv_key_blob, &cache_version, cv_size) + DRV_KEY_CPY(drv_key_blob, timestamp, ts_size) ++ DRV_KEY_CPY(drv_key_blob, DISK_CACHE_KEY, key_size) + DRV_KEY_CPY(drv_key_blob, gpu_name, gpu_name_size) + DRV_KEY_CPY(drv_key_blob, &ptr_size, ptr_size_size) + DRV_KEY_CPY(drv_key_blob, &driver_flags, driver_flags_size) +-- +2.18.0 + diff --git a/pkgs/development/libraries/ncurses/default.nix b/pkgs/development/libraries/ncurses/default.nix index 0cb69f937564..861b387a993a 100644 --- a/pkgs/development/libraries/ncurses/default.nix +++ b/pkgs/development/libraries/ncurses/default.nix @@ -21,7 +21,9 @@ stdenv.mkDerivation rec { sha256 = "05qdmbmrrn88ii9f66rkcmcyzp1kb1ymkx7g040lfkd1nkp7w1da"; }; - patches = lib.optional (!stdenv.cc.isClang) ./clang.patch; + # The patch st-0.7.patch needs to be removed, if ncurses is upgraded in the future. + # It is necessary for the 6.1 version of ncurses. + patches = [ ./st-0.7.patch ] ++ lib.optional (!stdenv.cc.isClang) ./clang.patch; outputs = [ "out" "dev" "man" ]; setOutputFlags = false; # some aren't supported diff --git a/pkgs/development/libraries/ncurses/st-0.7.patch b/pkgs/development/libraries/ncurses/st-0.7.patch new file mode 100644 index 000000000000..956f9b68d68f --- /dev/null +++ b/pkgs/development/libraries/ncurses/st-0.7.patch @@ -0,0 +1,13 @@ +diff --git a/misc/terminfo.src b/misc/terminfo.src +index 84f4810..ac300a7 100644 +--- a/misc/terminfo.src ++++ b/misc/terminfo.src +@@ -6260,7 +6260,7 @@ st-0.7|simpleterm 0.7, + %=%t3%e%p1%d%;m, + sgr=%?%p9%t\E(0%e\E(B%;\E[0%?%p6%t;1%;%?%p2%t;4%;%?%p1%p3%| + %t;7%;%?%p4%t;5%;%?%p5%t;2%;%?%p7%t;8%;m, +- Ss=\E]52;%p1%s;%p2%s\007, kDN3=\E[1;3B, kDN5=\E[1;5B, ++ Ms=\E]52;%p1%s;%p2%s\007, kDN3=\E[1;3B, kDN5=\E[1;5B, + kLFT3=\E[1;3D, kLFT5=\E[1;5D, kNXT3=\E[6;3~, + kNXT5=\E[6;5~, kPRV3=\E[5;3~, kPRV5=\E[5;5~, + kRIT3=\E[1;3C, kRIT5=\E[1;5C, kUP3=\E[1;3A, kUP5=\E[1;5A, diff --git a/pkgs/os-specific/linux/util-linux/default.nix b/pkgs/os-specific/linux/util-linux/default.nix index 1a7232afedb3..55673ccf0139 100644 --- a/pkgs/os-specific/linux/util-linux/default.nix +++ b/pkgs/os-specific/linux/util-linux/default.nix @@ -39,7 +39,7 @@ in stdenv.mkDerivation rec { "--disable-use-tty-group" "--enable-fs-paths-default=/run/wrappers/bin:/var/run/current-system/sw/bin:/sbin" "--disable-makeinstall-setuid" "--disable-makeinstall-chown" - (lib.withFeature (ncurses != null) "ncurses") + (lib.withFeature (ncurses != null) "ncursesw") (lib.withFeature (systemd != null) "systemd") (lib.withFeatureAs (systemd != null) "systemdsystemunitdir" "$bin/lib/systemd/system/") |