From 6896348d0fad85cfa3975d729b0279537981edfb Mon Sep 17 00:00:00 2001 From: Thomas Gerbet Date: Sun, 30 Jan 2022 10:56:31 +0100 Subject: [PATCH] librecad: apply patch for CVE-2021-45342 https://github.com/LibreCAD/LibreCAD/issues/1464 --- pkgs/applications/misc/librecad/default.nix | 9 +++++++++ 1 file changed, 9 insertions(+) diff --git a/pkgs/applications/misc/librecad/default.nix b/pkgs/applications/misc/librecad/default.nix index 05d5f93162c..54ed6c10f42 100644 --- a/pkgs/applications/misc/librecad/default.nix +++ b/pkgs/applications/misc/librecad/default.nix @@ -1,6 +1,7 @@ { lib , boost , fetchFromGitHub +, fetchpatch , installShellFiles , mkDerivation , muparser @@ -23,6 +24,14 @@ mkDerivation rec { sha256 = "sha256-RNg7ioMriH4A7V65+4mh8NhsUHs/8IbTt38nVkYilCE="; }; + patches = [ + (fetchpatch { + url = "https://github.com/LibreCAD/LibreCAD/pull/1465/commits/4edcbe72679f95cb60979c77a348c1522a20b0f4.patch"; + sha256 = "sha256-P0G2O5sL7Ip860ByxFQ87TfV/lq06wCQnzPxADGqFPs="; + name = "CVE-2021-45342.patch"; + }) + ]; + postPatch = '' substituteInPlace scripts/postprocess-unix.sh \ --replace /bin/sh ${runtimeShell}