Clone of https://github.com/NixOS/nixpkgs.git (to stress-test knotserver)
at python-updates 100 lines 1.9 kB view raw
1{ 2 lib, 3 stdenv, 4 fetchurl, 5 pkg-config, 6 atk, 7 cairo, 8 glib, 9 gtk3, 10 pango, 11 vala, 12 libxml2, 13 perl, 14 intltool, 15 gettext, 16 gobject-introspection, 17 dbus, 18 xvfb-run, 19 shared-mime-info, 20 testers, 21}: 22 23stdenv.mkDerivation (finalAttrs: { 24 pname = "gtksourceview"; 25 version = "3.24.11"; 26 27 src = 28 let 29 inherit (finalAttrs) pname version; 30 in 31 fetchurl { 32 url = "mirror://gnome/sources/${pname}/${lib.versions.majorMinor version}/${pname}-${version}.tar.xz"; 33 sha256 = "1zbpj283b5ycz767hqz5kdq02wzsga65pp4fykvhg8xj6x50f6v9"; 34 }; 35 36 propagatedBuildInputs = [ 37 # Required by gtksourceview-3.0.pc 38 gtk3 39 # Used by gtk_source_language_manager_guess_language 40 shared-mime-info 41 ]; 42 43 outputs = [ 44 "out" 45 "dev" 46 ]; 47 48 nativeBuildInputs = [ 49 pkg-config 50 intltool 51 perl 52 gobject-introspection 53 vala 54 ]; 55 56 nativeCheckInputs = [ 57 xvfb-run 58 dbus 59 ]; 60 61 buildInputs = [ 62 atk 63 cairo 64 glib 65 pango 66 libxml2 67 gettext 68 ]; 69 70 preBuild = '' 71 substituteInPlace gtksourceview/gtksourceview-utils.c --replace "@NIX_SHARE_PATH@" "$out/share" 72 ''; 73 74 patches = [ ./3.x-nix_share_path.patch ]; 75 76 env = lib.optionalAttrs stdenv.cc.isGNU { 77 NIX_CFLAGS_COMPILE = "-Wno-error=incompatible-pointer-types"; 78 }; 79 80 enableParallelBuilding = true; 81 82 doCheck = stdenv.hostPlatform.isLinux; 83 checkPhase = '' 84 NO_AT_BRIDGE=1 \ 85 XDG_DATA_DIRS="$XDG_DATA_DIRS:${shared-mime-info}/share" \ 86 xvfb-run -s '-screen 0 800x600x24' dbus-run-session \ 87 --config-file=${dbus}/share/dbus-1/session.conf \ 88 make check 89 ''; 90 91 passthru.tests.pkg-config = testers.testMetaPkgConfig finalAttrs.finalPackage; 92 93 meta = with lib; { 94 homepage = "https://gitlab.gnome.org/GNOME/gtksourceview"; 95 pkgConfigModules = [ "gtksourceview-3.0" ]; 96 platforms = with platforms; linux ++ darwin; 97 license = licenses.lgpl21; 98 teams = [ teams.gnome ]; 99 }; 100})