@@ -1,4 +1,4 @@
1−{ lib, stdenv, fetchFromGitHub }:
1+{ lib, stdenv, fetchFromGitHub, fetchpatch }:
22
33stdenv.mkDerivation rec {
44 pname = "samurai";
@@ -13,6 +13,19 @@ stdenv.mkDerivation rec {
1313
1414 makeFlags = [ "DESTDIR=" "PREFIX=${placeholder "out"}" ];
1515
16+ patches = [
17+ (fetchpatch {
18+ name = "CVE-2021-30218.patch";
19+ url = "https://github.com/michaelforney/samurai/commit/e84b6d99c85043fa1ba54851ee500540ec206918.patch";
20+ sha256 = "sha256-hyndwj6st4rwOJ35Iu0qL12dR5E6CBvsulvR27PYKMw=";
21+ })
22+ (fetchpatch {
23+ name = "CVE-2021-30219.patch";
24+ url = "https://github.com/michaelforney/samurai/commit/d2af3bc375e2a77139c3a28d6128c60cd8d08655.patch";
25+ sha256 = "sha256-rcdwKjHeq5Oaga9wezdHSg/7ljkynfbnkBc2ciMW5so=";
26+ })
27+ ];
28+
1629 meta = with lib; {
1730 description = "ninja-compatible build tool written in C";
1831 homepage = "https://github.com/michaelforney/samurai";