1{
2 lib,
3 stdenv,
4 fetchurl,
5 pkg-config,
6 m4,
7 python3,
8 xcbproto,
9 libxcb,
10 writeScript,
11 testers,
12}:
13stdenv.mkDerivation (finalAttrs: {
14 pname = "libxcb-errors";
15 version = "1.0.1";
16
17 outputs = [
18 "out"
19 "dev"
20 ];
21
22 src = fetchurl {
23 url = "mirror://xorg/individual/xcb/xcb-util-errors-${finalAttrs.version}.tar.xz";
24 hash = "sha256-VijIe5hCWa2Se6zYpClYMZw2vfSwZYh4A8nYIPuA81c=";
25 };
26
27 strictDeps = true;
28
29 nativeBuildInputs = [
30 pkg-config
31 m4
32 python3
33 ];
34
35 buildInputs = [
36 xcbproto
37 libxcb
38 ];
39
40 propagatedBuildInputs = [ libxcb ];
41
42 passthru = {
43 updateScript = writeScript "update-${finalAttrs.pname}" ''
44 #!/usr/bin/env nix-shell
45 #!nix-shell -i bash -p common-updater-scripts
46 version="$(list-directory-versions --pname xcb-util-errors \
47 --url https://xorg.freedesktop.org/releases/individual/lib/ \
48 | sort -V | tail -n1)"
49 update-source-version ${finalAttrs.pname} "$version"
50 '';
51 tests.pkg-config = testers.testMetaPkgConfig finalAttrs.finalPackage;
52 };
53
54 meta = {
55 description = "XCB utility library that gives human readable names to error, event & request codes";
56 homepage = "https://gitlab.freedesktop.org/xorg/lib/libxcb-errors";
57 license = lib.licenses.x11;
58 maintainers = [ ];
59 pkgConfigModules = [ "xcb-errors" ];
60 platforms = lib.platforms.unix;
61 };
62})