From 8147fb683c111f40da54d245c965517bd2885b43 Mon Sep 17 00:00:00 2001 From: Sergei Trofimovich Date: Fri, 26 Nov 2021 12:56:51 +0000 Subject: [PATCH] samtools: pull upstream fix for ncurses-6.3 Without the fix build on ncurses-6.3 fails as: bam_tview_curses.c:88:5: error: format not a string literal and no format arguments [-Werror=format-security] 88 | mvprintw(y,x,str); | ^~~~~~~~ --- .../applications/science/biology/samtools/default.nix | 11 ++++++++++- 1 file changed, 10 insertions(+), 1 deletion(-) diff --git a/pkgs/applications/science/biology/samtools/default.nix b/pkgs/applications/science/biology/samtools/default.nix index 99210092a154..98b0394c35f1 100644 --- a/pkgs/applications/science/biology/samtools/default.nix +++ b/pkgs/applications/science/biology/samtools/default.nix @@ -1,4 +1,4 @@ -{ lib, stdenv, fetchurl, zlib, htslib, perl, ncurses ? null }: +{ lib, stdenv, fetchurl, fetchpatch, zlib, htslib, perl, ncurses ? null }: stdenv.mkDerivation rec { pname = "samtools"; @@ -9,6 +9,15 @@ stdenv.mkDerivation rec { sha256 = "sha256-YWyi4FHMgAmh6cAc/Yx8r4twkW3f9m87dpFAeUZfjGA="; }; + patches = [ + # Pull upstream patch for ncurses-6.3 support + (fetchpatch { + name = "ncurses-6.3.patch"; + url = "https://github.com/samtools/samtools/commit/396ef20eb0854d6b223c3223b60bb7efe42301f7.patch"; + sha256 = "sha256-p0l9ymXK9nqL2w8EytbW+qeaI7dD86IQgIVxacBj838="; + }) + ]; + nativeBuildInputs = [ perl ]; buildInputs = [ zlib ncurses htslib ];