From a3251fb2e0ade5c4d83d41108cbabc6c79f2bd7e Mon Sep 17 00:00:00 2001 From: Alyssa Ross Date: Sat, 13 Feb 2021 02:28:07 +0000 Subject: [PATCH] motif: fix format-security --- pkgs/development/libraries/motif/default.nix | 14 +++++++++----- 1 file changed, 9 insertions(+), 5 deletions(-) diff --git a/pkgs/development/libraries/motif/default.nix b/pkgs/development/libraries/motif/default.nix index 28b954d948c..f99bd8f2630 100644 --- a/pkgs/development/libraries/motif/default.nix +++ b/pkgs/development/libraries/motif/default.nix @@ -1,4 +1,4 @@ -{ lib, stdenv, fetchurl, pkg-config, libtool +{ lib, stdenv, fetchurl, fetchpatch, pkg-config, libtool , xlibsWrapper, xbitmaps, libXrender, libXmu, libXt , expat, libjpeg, libpng, libiconv , flex @@ -26,14 +26,18 @@ stdenv.mkDerivation rec { propagatedBuildInputs = [ libXp libXau ]; - hardeningDisable = [ "format" ]; - prePatch = lib.optionalString (!demoSupport) '' sed '/^SUBDIRS =,^$/s/\//' -i Makefile.{am,in} ''; - patches = [ ./Remove-unsupported-weak-refs-on-darwin.patch - ./Add-X.Org-to-bindings-file.patch + patches = [ + ./Remove-unsupported-weak-refs-on-darwin.patch + ./Add-X.Org-to-bindings-file.patch + (fetchpatch rec { + name = "fix-format-security.patch"; + url = "https://raw.githubusercontent.com/void-linux/void-packages/b9a1110dabb01c052dadc1abae1413bd4afe3652/srcpkgs/motif/patches/02-${name}"; + sha256 = "13vzpf8yxvhf4gl7q0yzlr6ak1yzx382fsqsrv5lc8jbbg4nwrrq"; + }) ]; enableParallelBuilding = true;