2014-09-18 14:16:12 +04:00
|
|
|
{ lib, stdenv, fetchurl, enableLargeConfig ? false }:
|
2004-11-19 17:57:43 +03:00
|
|
|
|
2012-10-03 22:06:53 +04:00
|
|
|
stdenv.mkDerivation rec {
|
2016-12-01 03:19:25 +03:00
|
|
|
name = "boehm-gc-7.2g";
|
2008-09-05 12:03:44 +04:00
|
|
|
|
2011-02-02 15:17:29 +03:00
|
|
|
src = fetchurl {
|
2016-12-01 03:19:25 +03:00
|
|
|
url = http://www.hboehm.info/gc/gc_source/gc-7.2g.tar.gz;
|
|
|
|
sha256 = "0bvw6cc555qg5b7dgcqy3ryiw0wir79dqy0glff3hjmyy7i2jkjq";
|
2011-02-02 15:17:29 +03:00
|
|
|
};
|
2015-05-27 16:13:39 +03:00
|
|
|
patches = if stdenv.isCygwin then [ ./cygwin.patch ] else null;
|
2009-09-18 18:30:10 +04:00
|
|
|
|
2016-08-29 03:30:01 +03:00
|
|
|
outputs = [ "out" "dev" "doc" ];
|
2013-08-26 14:04:19 +04:00
|
|
|
|
2014-09-18 14:16:12 +04:00
|
|
|
configureFlags =
|
|
|
|
[ "--enable-cplusplus" ]
|
|
|
|
++ lib.optional enableLargeConfig "--enable-large-config";
|
2012-10-03 22:06:53 +04:00
|
|
|
|
2008-09-05 12:03:44 +04:00
|
|
|
doCheck = true;
|
|
|
|
|
2012-10-03 22:06:53 +04:00
|
|
|
# Don't run the native `strip' when cross-compiling.
|
|
|
|
dontStrip = stdenv ? cross;
|
|
|
|
|
2013-08-26 14:04:19 +04:00
|
|
|
postInstall =
|
|
|
|
''
|
|
|
|
mkdir -p $out/share/doc
|
|
|
|
mv $out/share/gc $out/share/doc/gc
|
|
|
|
'';
|
|
|
|
|
2008-01-06 03:12:25 +03:00
|
|
|
meta = {
|
2009-09-16 16:39:57 +04:00
|
|
|
description = "The Boehm-Demers-Weiser conservative garbage collector for C and C++";
|
|
|
|
|
|
|
|
longDescription = ''
|
|
|
|
The Boehm-Demers-Weiser conservative garbage collector can be used as a
|
|
|
|
garbage collecting replacement for C malloc or C++ new. It allows you
|
|
|
|
to allocate memory basically as you normally would, without explicitly
|
|
|
|
deallocating memory that is no longer useful. The collector
|
|
|
|
automatically recycles memory when it determines that it can no longer
|
|
|
|
be otherwise accessed.
|
|
|
|
|
|
|
|
The collector is also used by a number of programming language
|
|
|
|
implementations that either use C as intermediate code, want to
|
|
|
|
facilitate easier interoperation with C libraries, or just prefer the
|
|
|
|
simple collector interface.
|
|
|
|
|
|
|
|
Alternatively, the garbage collector may be used as a leak detector for
|
|
|
|
C or C++ programs, though that is not its primary goal.
|
|
|
|
'';
|
|
|
|
|
2014-11-18 03:47:23 +03:00
|
|
|
homepage = http://hboehm.info/gc/;
|
2009-09-16 16:39:57 +04:00
|
|
|
|
|
|
|
# non-copyleft, X11-style license
|
2014-11-18 03:47:23 +03:00
|
|
|
license = http://hboehm.info/gc/license.txt;
|
2009-09-16 16:39:57 +04:00
|
|
|
|
2015-01-14 00:33:24 +03:00
|
|
|
maintainers = [ ];
|
2010-02-12 17:14:40 +03:00
|
|
|
platforms = stdenv.lib.platforms.all;
|
2004-11-19 17:57:43 +03:00
|
|
|
};
|
|
|
|
}
|