diff --git a/pkgs/development/libraries/clearsilver/builder.sh b/pkgs/development/libraries/clearsilver/builder.sh deleted file mode 100644 index 2acff02e1355..000000000000 --- a/pkgs/development/libraries/clearsilver/builder.sh +++ /dev/null @@ -1,9 +0,0 @@ -source $stdenv/setup - -mkdir -p $out -mkdir -p $out/site-packages - -export PYTHON_SITE=$out/site-packages -configureFlags="--with-python=$python/bin/python --disable-apache --disable-perl --disable-ruby --disable-java --disable-csharp" - -genericBuild diff --git a/pkgs/development/libraries/clearsilver/default.nix b/pkgs/development/libraries/clearsilver/default.nix index 34a26e9da86b..cd1789a13bbd 100644 --- a/pkgs/development/libraries/clearsilver/default.nix +++ b/pkgs/development/libraries/clearsilver/default.nix @@ -1,4 +1,4 @@ -{ stdenv, fetchurl, python }: +{ stdenv, fetchurl, fetchpatch, python }: stdenv.mkDerivation rec { name = "clearsilver-0.10.5"; @@ -8,12 +8,29 @@ stdenv.mkDerivation rec { sha256 = "1046m1dpq3nkgxbis2dr2x7hynmy51n64465q78d7pdgvqwa178y"; }; - builder = ./builder.sh; + PYTHON_SITE = "$(out)/site-packages"; - inherit stdenv python; + configureFlags = "--with-python=${python}/bin/python --disable-apache --disable-perl --disable-ruby --disable-java --disable-csharp"; - meta = { + preInstall = '' + mkdir -p $out + mkdir -p $out/site-packages + ''; + + patches = [ + (fetchpatch { + url = "https://sources.debian.net/data/main/c/clearsilver/0.10.5-1.6/debian/patches/clang-gcc5.patch"; + sha256 = "0d44v9jx0b6k8nvrhknd958i9rs59kdh73z0lb4f1mzi8if16c38"; + }) + (fetchpatch { + url = "https://sources.debian.net/data/main/c/clearsilver/0.10.5-1.6/debian/patches/CVE-2011-4357.diff"; + sha256 = "1lfncavxdqckrz03gv97lcliygbpi9lnih944vmdbn9zw6fwcipi"; + }) + ]; + + meta = with stdenv.lib; { description = "Fast, powerful, and language-neutral HTML template system"; homepage = http://www.clearsilver.net/; + license = licenses.free; }; }