lol
at 17.09-beta 59 lines 2.0 kB view raw
1{ stdenv, fetchurl, glib, flex, bison, pkgconfig, libffi, python 2, libintlOrEmpty, cctools 3, substituteAll, nixStoreDir ? builtins.storeDir 4}: 5# now that gobjectIntrospection creates large .gir files (eg gtk3 case) 6# it may be worth thinking about using multiple derivation outputs 7# In that case its about 6MB which could be separated 8 9let 10 ver_maj = "1.52"; 11 ver_min = "1"; 12in 13with stdenv.lib; 14stdenv.mkDerivation rec { 15 name = "gobject-introspection-${ver_maj}.${ver_min}"; 16 17 src = fetchurl { 18 url = "mirror://gnome/sources/gobject-introspection/${ver_maj}/${name}.tar.xz"; 19 sha256 = "1x5gkyrglv3dn9b4fsgw6asqgjw1wj7qc37g9pyac6pyaa6w7l1f"; 20 }; 21 22 outputs = [ "out" "dev" ]; 23 outputBin = "dev"; 24 outputMan = "dev"; # tiny pages 25 26 buildInputs = [ flex bison pkgconfig python setupHook/*move .gir*/ ] 27 ++ libintlOrEmpty 28 ++ stdenv.lib.optional stdenv.isDarwin cctools; 29 propagatedBuildInputs = [ libffi glib ]; 30 31 preConfigure = '' 32 sed 's|/usr/bin/env ||' -i tools/g-ir-tool-template.in 33 ''; 34 35 # outputs TODO: share/gobject-introspection-1.0/tests is needed during build 36 # by pygobject3 (and maybe others), but it's only searched in $out 37 38 setupHook = ./setup-hook.sh; 39 40 patches = stdenv.lib.singleton (substituteAll { 41 src = ./absolute_shlib_path.patch; 42 inherit nixStoreDir; 43 }); 44 45 meta = with stdenv.lib; { 46 description = "A middleware layer between C libraries and language bindings"; 47 homepage = http://live.gnome.org/GObjectIntrospection; 48 maintainers = with maintainers; [ lovek323 lethalman ]; 49 platforms = platforms.unix; 50 51 longDescription = '' 52 GObject introspection is a middleware layer between C libraries (using 53 GObject) and language bindings. The C library can be scanned at compile 54 time and generate a metadata file, in addition to the actual native C 55 library. Then at runtime, language bindings can read this metadata and 56 automatically provide bindings to call into the C library. 57 ''; 58 }; 59}