summary refs log tree commit diff
diff options
context:
space:
mode:
authorThomas Gerbet <thomas@gerbet.me>2023-04-26 11:45:54 +0200
committerThomas Gerbet <thomas@gerbet.me>2023-04-26 13:40:47 +0200
commitaf92bfe9b3dadc000efa8861d369c562f3746ba7 (patch)
tree7b7ee4ecc89999c2ce3a2bc535a2768d1654bc0b
parent6c7741326492e8d313ea801db9a737bfaec88b43 (diff)
downloadnixpkgs-af92bfe9b3dadc000efa8861d369c562f3746ba7.tar
nixpkgs-af92bfe9b3dadc000efa8861d369c562f3746ba7.tar.gz
nixpkgs-af92bfe9b3dadc000efa8861d369c562f3746ba7.tar.bz2
nixpkgs-af92bfe9b3dadc000efa8861d369c562f3746ba7.tar.lz
nixpkgs-af92bfe9b3dadc000efa8861d369c562f3746ba7.tar.xz
nixpkgs-af92bfe9b3dadc000efa8861d369c562f3746ba7.tar.zst
nixpkgs-af92bfe9b3dadc000efa8861d369c562f3746ba7.zip
gerbv: 2.7.0 -> 2.9.6, switch to the maintained fork
The current 2.7.0 has a bunch of known vulnerabilities
(CVE-2021-40391, CVE-2021-40393, CVE-2021-40394, CVE-2021-40400, CVE-2021-40401, CVE-2021-40402 and CVE-2021-40403)
and is not maintained upstream.

A forked repository exists and is maintained. Debian/Ubuntu, Fedora and Homebrew have switched to it.

Changelogs:
https://github.com/gerbv/gerbv/releases/tag/v2.9.6
https://github.com/gerbv/gerbv/releases/tag/v2.9.5
https://github.com/gerbv/gerbv/releases/tag/v2.9.4
https://github.com/gerbv/gerbv/releases/tag/v2.9.3
https://github.com/gerbv/gerbv/releases/tag/v2.9.2
https://github.com/gerbv/gerbv/releases/tag/v2.9.1
https://github.com/gerbv/gerbv/releases/tag/v2.9.0
https://github.com/gerbv/gerbv/releases/tag/v2.8.2
-rw-r--r--pkgs/applications/science/electronics/gerbv/default.nix29
1 files changed, 12 insertions, 17 deletions
diff --git a/pkgs/applications/science/electronics/gerbv/default.nix b/pkgs/applications/science/electronics/gerbv/default.nix
index 0c45184e31c..a8eb0ac4c08 100644
--- a/pkgs/applications/science/electronics/gerbv/default.nix
+++ b/pkgs/applications/science/electronics/gerbv/default.nix
@@ -1,34 +1,29 @@
-{ lib, stdenv, fetchurl, fetchpatch, pkg-config, gettext, libtool, automake, autoconf, cairo, gtk2-x11, autoreconfHook }:
+{ lib, stdenv, fetchFromGitHub, pkg-config, gettext, libtool, automake, autoconf, cairo, gtk2-x11, autoreconfHook }:
 
 stdenv.mkDerivation rec {
   pname = "gerbv";
-  version = "2.7.0";
+  version = "2.9.6";
 
-  src = fetchurl {
-    url = "mirror://sourceforge/gerbv/${pname}-${version}.tar.gz";
-    sha256 = "sha256-xe6AjEIwzmvjrRCrY8VHCYOG1DAicE3iXduTeOYgU7Q=";
+  src = fetchFromGitHub {
+    owner = "gerbv";
+    repo = pname;
+    rev = "v${version}";
+    hash = "sha256-HNhrnXOBlzfO/roWzTsg0RcJPb0c7RuJepankB5zNts=";
   };
 
-  patches = [
-    # Pull patch pending upstream inclusion for -fno-common toolchains:
-    #  https://sourceforge.net/p/gerbv/patches/84/
-    (fetchpatch {
-      name = "fnoc-mmon.patch";
-      url = "https://sourceforge.net/p/gerbv/patches/84/attachment/0001-gerbv-fix-build-on-gcc-10-fno-common.patch";
-      sha256 = "1avfbkqhxl7wxn1z19y30ilkwvdgpdkzhzawrs5y3damxmqq8ggk";
-    })
-  ];
+  postPatch = ''
+    sed -i '/AC_INIT/s/m4_esyscmd.*/${version}])/' configure.ac
+  '';
 
   nativeBuildInputs = [ autoreconfHook pkg-config automake autoconf ];
   buildInputs = [ gettext libtool cairo gtk2-x11 ];
 
   configureFlags = ["--disable-update-desktop-database"];
 
-  env.NIX_CFLAGS_COMPILE = "-Wno-format-security";
-
   meta = with lib; {
     description = "A Gerber (RS-274X) viewer";
-    homepage = "http://gerbv.geda-project.org/";
+    homepage = "https://gerbv.github.io/";
+    changelog = "https://github.com/gerbv/gerbv/releases/tag/v${version}";
     maintainers = with maintainers; [ mog ];
     platforms = platforms.unix;
     license = licenses.gpl2;