summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorThomas Gerbet <thomas@gerbet.me>2022-01-30 10:56:31 +0100
committergithub-actions[bot] <github-actions[bot]@users.noreply.github.com>2022-02-01 19:11:12 +0000
commit424aab574b2bd063f3c9a22675aecf20c7f286d7 (patch)
treed7fa0a5b67ee16e51bc3f580c4433c67ebfe6c29
parent(vscode|vscodium)-fhs: fix missing desktop icon (diff)
downloadnixpkgs-424aab574b2bd063f3c9a22675aecf20c7f286d7.tar.gz
librecad: apply patch for CVE-2021-45342
https://github.com/LibreCAD/LibreCAD/issues/1464 (cherry picked from commit 6896348d0fad85cfa3975d729b0279537981edfb)
-rw-r--r--pkgs/applications/misc/librecad/default.nix9
1 files changed, 9 insertions, 0 deletions
diff --git a/pkgs/applications/misc/librecad/default.nix b/pkgs/applications/misc/librecad/default.nix
index 691ebb4ba682..7b5c8c16f298 100644
--- a/pkgs/applications/misc/librecad/default.nix
+++ b/pkgs/applications/misc/librecad/default.nix
@@ -1,6 +1,7 @@
{ lib
, boost
, fetchFromGitHub
+, fetchpatch
, installShellFiles
, mkDerivationWith
, muparser
@@ -24,6 +25,14 @@ mkDerivationWith stdenv.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}