1{ stdenv, fetchurl, pkgconfig, pure }:
2
3stdenv.mkDerivation rec {
4 baseName = "stllib";
5 version = "0.6";
6 name = "pure-${baseName}-${version}";
7
8 src = fetchurl {
9 url = "https://bitbucket.org/purelang/pure-lang/downloads/pure-stllib-${version}.tar.gz";
10 sha256 = "1d550764fc2f8ba6ddbd1fbd3da2d6965b69e2c992747265d9ebe4f16aa5e455";
11 };
12
13 postPatch = ''
14 for f in pure-stlmap/{stlmap.cpp,stlmmap.cpp,stlhmap.cpp}; do
15 sed -i '1i\#include <cstddef>' $f
16 done
17 '';
18
19 buildInputs = [ pkgconfig ];
20 propagatedBuildInputs = [ pure ];
21 makeFlags = "libdir=$(out)/lib prefix=$(out)/";
22 setupHook = ../generic-setup-hook.sh;
23
24 meta = {
25 description = "An “umbrella” package that contains a pair of Pure addons, pure-stlvec and pure-stlmap";
26 homepage = http://puredocs.bitbucket.org/pure-stllib.html;
27 license = stdenv.lib.licenses.bsd3;
28 platforms = stdenv.lib.platforms.linux;
29 maintainers = with stdenv.lib.maintainers; [ asppsa ];
30 };
31}