at master 64 lines 1.5 kB view raw
1{ 2 lib, 3 stdenv, 4 fetchurl, 5 pkg-config, 6 xorgproto, 7 libx11, 8 writeScript, 9 testers, 10}: 11stdenv.mkDerivation (finalAttrs: { 12 pname = "libxrender"; 13 version = "0.9.12"; 14 15 outputs = [ 16 "out" 17 "dev" 18 "doc" 19 ]; 20 21 src = fetchurl { 22 url = "mirror://xorg/individual/lib/libXrender-${finalAttrs.version}.tar.xz"; 23 hash = "sha256-uDISjaSLOcjWCCJEgXQ0A60Wkb9OVU5L6cF03xcdG5c="; 24 }; 25 26 strictDeps = true; 27 28 nativeBuildInputs = [ pkg-config ]; 29 30 buildInputs = [ 31 xorgproto 32 libx11 33 ]; 34 35 propagatedBuildInputs = [ 36 xorgproto 37 libx11 38 ]; 39 40 configureFlags = lib.optional ( 41 stdenv.hostPlatform != stdenv.buildPlatform 42 ) "--enable-malloc0returnsnull"; 43 44 passthru = { 45 updateScript = writeScript "update-${finalAttrs.pname}" '' 46 #!/usr/bin/env nix-shell 47 #!nix-shell -i bash -p common-updater-scripts 48 version="$(list-directory-versions --pname libXrender \ 49 --url https://xorg.freedesktop.org/releases/individual/lib/ \ 50 | sort -V | tail -n1)" 51 update-source-version ${finalAttrs.pname} "$version" 52 ''; 53 tests.pkg-config = testers.testMetaPkgConfig finalAttrs.finalPackage; 54 }; 55 56 meta = { 57 description = "Xlib library for the Render Extension to the X11 protocol"; 58 homepage = "https://gitlab.freedesktop.org/xorg/lib/libxrender"; 59 license = lib.licenses.hpndSellVariant; 60 maintainers = [ ]; 61 pkgConfigModules = [ "xrender" ]; 62 platforms = lib.platforms.unix; 63 }; 64})