summary refs log tree commit diff
diff options
context:
space:
mode:
authorJörg Thalheim <joerg@thalheim.io>2021-09-18 18:47:35 +0200
committerJörg Thalheim <joerg@thalheim.io>2021-09-20 09:51:08 +0200
commit86682241081f7e291b8df454f60c0200b7f26050 (patch)
treefdc0332a27a37fec2154fc2541e3bdf1dc1dd5a9
parent4a849e9da42c9579bfb311b4f86215e2e2ffe522 (diff)
downloadnixpkgs-86682241081f7e291b8df454f60c0200b7f26050.tar
nixpkgs-86682241081f7e291b8df454f60c0200b7f26050.tar.gz
nixpkgs-86682241081f7e291b8df454f60c0200b7f26050.tar.bz2
nixpkgs-86682241081f7e291b8df454f60c0200b7f26050.tar.lz
nixpkgs-86682241081f7e291b8df454f60c0200b7f26050.tar.xz
nixpkgs-86682241081f7e291b8df454f60c0200b7f26050.tar.zst
nixpkgs-86682241081f7e291b8df454f60c0200b7f26050.zip
libsixel: 1.8.6 -> 1.10.1
- Switched to maintained fork of libsixel
- Linked CVEs were fixed in 1.10.1
-rw-r--r--pkgs/development/libraries/libsixel/default.nix50
1 files changed, 38 insertions, 12 deletions
diff --git a/pkgs/development/libraries/libsixel/default.nix b/pkgs/development/libraries/libsixel/default.nix
index 0d5a54f9693..549f4385fa5 100644
--- a/pkgs/development/libraries/libsixel/default.nix
+++ b/pkgs/development/libraries/libsixel/default.nix
@@ -1,30 +1,56 @@
-{lib, stdenv, fetchFromGitHub}:
+{ lib
+, stdenv
+, fetchFromGitHub
+, meson
+, ninja
+, libbsd
+, gdk-pixbuf
+, gd
+, libjpeg
+, pkg-config
+, fetchpatch
+}:
 stdenv.mkDerivation rec {
-  version = "1.8.6";
   pname = "libsixel";
+  version = "1.10.1";
 
   src = fetchFromGitHub {
+    owner = "libsixel";
     repo = "libsixel";
     rev = "v${version}";
-    owner = "saitoha";
-    sha256 = "1saxdj6sldv01g6w6yk8vr7px4bl31xca3a82j6v1j3fw5rbfphy";
+    sha256 = "sha256-ACypJTFjXSzBjo4hQzUiJOqnaRaZnYX+/NublN9sbBo=";
   };
 
-  configureFlags = [
-    "--enable-tests"
+  patches = [
+    (fetchpatch {
+      url = "https://github.com/libsixel/libsixel/commit/4d3e53ee007f3b71f638875f9fabbba658b2ca8a.patch";
+      sha256 = "sha256-iDfsTyUczjtzV3pt1ZErbhVO2rMm2ZYKWSBl+ru+5HA=";
+    })
+  ];
+
+  buildInputs = [
+    libbsd gdk-pixbuf gd
+  ];
+
+  nativeBuildInputs = [
+    meson ninja pkg-config
   ];
 
   doCheck = true;
 
+  mesonFlags = [
+    "-Dtests=enabled"
+    # build system seems to be broken here, it still seems to handle jpeg
+    # through some other ways.
+    "-Djpeg=disabled"
+    "-Dpng=disabled"
+  ];
+
   meta = with lib; {
     description = "The SIXEL library for console graphics, and converter programs";
-    homepage = "http://saitoha.github.com/libsixel";
+    homepage = "https://github.com/libsixel/libsixel";
     maintainers = with maintainers; [ vrthra ];
     license = licenses.mit;
-    platforms = with platforms; unix;
-    knownVulnerabilities = [
-      "CVE-2020-11721" # https://github.com/saitoha/libsixel/issues/134
-      "CVE-2020-19668" # https://github.com/saitoha/libsixel/issues/136
-    ];
+    platforms = platforms.unix;
   };
 }