nixpkgs mirror (for testing) github.com/NixOS/nixpkgs
nix
at litex 114 lines 2.9 kB view raw
1{ lib 2, stdenv 3, fetchurl 4, fetchpatch 5, pkg-config 6, libGL 7, glib 8, gdk-pixbuf 9, xorg 10, libintl 11, pangoSupport ? true 12, pango 13, cairo 14, gobject-introspection 15, wayland 16, gnome 17, mesa 18, automake 19, autoconf 20, gstreamerSupport ? true 21, gst_all_1 22, harfbuzz 23, OpenGL 24}: 25 26stdenv.mkDerivation rec { 27 pname = "cogl"; 28 version = "1.22.8"; 29 30 src = fetchurl { 31 url = "mirror://gnome/sources/${pname}/${lib.versions.majorMinor version}/cogl-${version}.tar.xz"; 32 sha256 = "0nfph4ai60ncdx7hy6hl1i1cmp761jgnyjfhagzi0iqq36qb41d8"; 33 }; 34 35 patches = [ 36 # Some deepin packages need the following patches. They have been 37 # submitted by Fedora on the GNOME Bugzilla 38 # (https://bugzilla.gnome.org/787443). Upstream thinks the patch 39 # could be merged, but dev can not make a new release. 40 ./patches/gnome_bugzilla_787443_359589_deepin.patch 41 ./patches/gnome_bugzilla_787443_361056_deepin.patch 42 ]; 43 44 outputs = [ "out" "dev" ]; 45 46 nativeBuildInputs = [ pkg-config libintl automake autoconf gobject-introspection ]; 47 48 configureFlags = [ 49 "--enable-introspection" 50 ] ++ lib.optionals (!stdenv.isDarwin) [ 51 "--enable-kms-egl-platform" 52 "--enable-wayland-egl-platform" 53 "--enable-wayland-egl-server" 54 "--enable-gles1" 55 "--enable-gles2" 56 ] ++ lib.optionals stdenv.isDarwin [ 57 "--disable-glx" 58 "--without-x" 59 ] ++ lib.optionals gstreamerSupport [ 60 "--enable-cogl-gst" 61 ]; 62 63 # TODO: this shouldn't propagate so many things 64 # especially not gobject-introspection 65 propagatedBuildInputs = [ 66 glib 67 gdk-pixbuf 68 gobject-introspection 69 ] ++ lib.optionals stdenv.isLinux [ 70 wayland 71 mesa 72 libGL 73 xorg.libXrandr 74 xorg.libXfixes 75 xorg.libXcomposite 76 xorg.libXdamage 77 ] ++ lib.optionals gstreamerSupport [ 78 gst_all_1.gstreamer 79 gst_all_1.gst-plugins-base 80 ]; 81 82 buildInputs = lib.optionals pangoSupport [ pango cairo harfbuzz ] 83 ++ lib.optionals stdenv.isDarwin [ OpenGL ]; 84 85 COGL_PANGO_DEP_CFLAGS = toString (lib.optionals (stdenv.isDarwin && pangoSupport) [ 86 "-I${pango.dev}/include/pango-1.0" 87 "-I${cairo.dev}/include/cairo" 88 "-I${harfbuzz.dev}/include/harfbuzz" 89 ]); 90 91 #doCheck = true; # all tests fail (no idea why) 92 93 passthru = { 94 updateScript = gnome.updateScript { 95 packageName = pname; 96 versionPolicy = "odd-unstable"; 97 }; 98 }; 99 100 meta = with lib; { 101 description = "A small open source library for using 3D graphics hardware for rendering"; 102 maintainers = with maintainers; [ lovek323 ]; 103 104 longDescription = '' 105 Cogl is a small open source library for using 3D graphics hardware for 106 rendering. The API departs from the flat state machine style of OpenGL 107 and is designed to make it easy to write orthogonal components that can 108 render without stepping on each other's toes. 109 ''; 110 111 platforms = platforms.unix; 112 license = with licenses; [ mit bsd3 publicDomain sgi-b-20 ]; 113 }; 114}