uudeview: don't hardeningDisable format

- adopt a patch which several other distributions use
- name -> pname + version
- license: gpl2Plus
This commit is contained in:
Frank Doepper 2021-09-17 08:05:25 +02:00
parent b93e36116f
commit 60f8a42d3a

View file

@ -1,19 +1,35 @@
{ lib, stdenv, fetchurl, tcl, tk }: { lib
, stdenv
, fetchurl
, fetchpatch
, tcl
, tk
}:
stdenv.mkDerivation rec { stdenv.mkDerivation rec {
pname = "uudeview"; pname = "uudeview";
version = "0.5.20"; version = "0.5.20";
src = fetchurl { 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"; sha256 = "0dg4v888fxhmf51vxq1z1gd57fslsidn15jf42pj4817vw6m36p4";
}; };
buildInputs = [ tcl tk ]; buildInputs = [ tcl tk ];
hardeningDisable = [ "format" ];
configureFlags = [ "--enable-tk=${tk.dev}" "--enable-tcl=${tcl}" ]; configureFlags = [ "--enable-tk=${tk.dev}" "--enable-tcl=${tcl}" ];
# https://wiki.tcl.tk/3577 patches = [
patches = [ ./matherr.patch ]; # 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 = '' postPatch = ''
substituteInPlace tcl/xdeview --replace "exec uuwish" "exec $out/bin/uuwish" substituteInPlace tcl/xdeview --replace "exec uuwish" "exec $out/bin/uuwish"
''; '';
@ -21,7 +37,7 @@ stdenv.mkDerivation rec {
meta = { meta = {
description = "The Nice and Friendly Decoder"; description = "The Nice and Friendly Decoder";
homepage = "http://www.fpx.de/fp/Software/UUDeview/"; homepage = "http://www.fpx.de/fp/Software/UUDeview/";
license = lib.licenses.gpl2; license = lib.licenses.gpl2Plus;
maintainers = with lib.maintainers; [ woffs ]; maintainers = with lib.maintainers; [ woffs ];
platforms = lib.platforms.linux; platforms = lib.platforms.linux;
}; };