summary refs log tree commit diff
path: root/pkgs/tools/misc/uudeview
diff options
context:
space:
mode:
authorFrank Doepper <woffs@woffs.de>2021-09-17 08:05:25 +0200
committerFrank Doepper <woffs@woffs.de>2021-09-17 08:05:25 +0200
commit60f8a42d3aa8fa095cb3830fb28a02d8ae3b4831 (patch)
tree7acdaf9fb16b708334c343918219b823255b6607 /pkgs/tools/misc/uudeview
parentb93e36116f8a7d6b9113155ca7166c64848995b9 (diff)
uudeview: don't hardeningDisable format
- adopt a patch which several other distributions use
- name -> pname + version
- license: gpl2Plus
Diffstat (limited to 'pkgs/tools/misc/uudeview')
-rw-r--r--pkgs/tools/misc/uudeview/default.nix28
1 files changed, 22 insertions, 6 deletions
diff --git a/pkgs/tools/misc/uudeview/default.nix b/pkgs/tools/misc/uudeview/default.nix
index 82edd2df4dd98..6875e6f123432 100644
--- a/pkgs/tools/misc/uudeview/default.nix
+++ b/pkgs/tools/misc/uudeview/default.nix
@@ -1,19 +1,35 @@
-{ lib, stdenv, fetchurl, tcl, tk }:
+{ lib
+, stdenv
+, fetchurl
+, fetchpatch
+, tcl
+, tk
+}:
 
 stdenv.mkDerivation rec {
   pname = "uudeview";
   version = "0.5.20";
+
   src = fetchurl {
-    url = "http://www.fpx.de/fp/Software/UUDeview/download/uudeview-${version}.tar.gz";
+    url = "http://www.fpx.de/fp/Software/UUDeview/download/${pname}-${version}.tar.gz";
     sha256 = "0dg4v888fxhmf51vxq1z1gd57fslsidn15jf42pj4817vw6m36p4";
   };
 
   buildInputs = [ tcl tk ];
-  hardeningDisable = [ "format" ];
+
   configureFlags = [ "--enable-tk=${tk.dev}" "--enable-tcl=${tcl}" ];
 
-  # https://wiki.tcl.tk/3577
-  patches = [ ./matherr.patch ];
+  patches = [
+    # https://wiki.tcl.tk/3577
+    ./matherr.patch
+    # format hardening
+    (fetchpatch {
+      url = "https://raw.githubusercontent.com/OpenMandrivaAssociation/uudeview/master/uudeview-0.5.20-fix-str-fmt.patch";
+      sha256 = "1biipck60mhpd0j6jwizaisvqa8alisw1dpfqm6zf7ic5b93hmfw";
+      extraPrefix = "";
+    })
+  ];
+
   postPatch = ''
     substituteInPlace tcl/xdeview --replace "exec uuwish" "exec $out/bin/uuwish"
   '';
@@ -21,7 +37,7 @@ stdenv.mkDerivation rec {
   meta = {
     description = "The Nice and Friendly Decoder";
     homepage = "http://www.fpx.de/fp/Software/UUDeview/";
-    license = lib.licenses.gpl2;
+    license = lib.licenses.gpl2Plus;
     maintainers = with lib.maintainers; [ woffs ];
     platforms = lib.platforms.linux;
   };