about summary refs log tree commit diff
path: root/nixpkgs/pkgs/development/compilers/mcpp/default.nix
blob: 023bae48b3e9b6be4efc5243646a4ac658fb5a58 (plain) (blame)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
{ stdenv, fetchurl, fetchpatch }:

stdenv.mkDerivation rec {
  pname = "mcpp";
  version = "2.7.2";

  src = fetchurl {
    url = "mirror://sourceforge/mcpp/mcpp-${version}.tar.gz";
    sha256 = "0r48rfghjm90pkdyr4khxg783g9v98rdx2n69xn8f6c5i0hl96rv";
  };

  configureFlags = [ "--enable-mcpplib" ];

  patches = [
    (fetchpatch {
      name = "CVE-2019-14274.patch";
      url = "https://github.com/h8liu/mcpp/commit/ea453aca2742be6ac43ba4ce0da6f938a7e5a5d8.patch";
      sha256 = "0svkdr3w9b45v6scgzvggw9nsh6a3k7g19fqk0w3vlckwmk5ydzr";
    })
  ];

  meta = with stdenv.lib; {
    homepage = "http://mcpp.sourceforge.net/";
    description = "A portable c preprocessor";
    license = licenses.bsd2;
    platforms = platforms.unix;
  };
}