1{
2 lib,
3 stdenv,
4 fetchurl,
5 pkg-config,
6 writeScript,
7 testers,
8}:
9stdenv.mkDerivation (finalAttrs: {
10 pname = "xtrans";
11 version = "1.6.0";
12
13 src = fetchurl {
14 url = "mirror://xorg/individual/lib/xtrans-${finalAttrs.version}.tar.xz";
15 hash = "sha256-+q/qFmvyRRoXPZ1ZM1KUDsZAQUXF0dpcITQjzk01npI=";
16 };
17
18 strictDeps = true;
19
20 nativeBuildInputs = [ pkg-config ];
21
22 passthru = {
23 updateScript = writeScript "update-${finalAttrs.pname}" ''
24 #!/usr/bin/env nix-shell
25 #!nix-shell -i bash -p common-updater-scripts
26 version="$(list-directory-versions --pname ${finalAttrs.pname} \
27 --url https://xorg.freedesktop.org/releases/individual/lib/ \
28 | sort -V | tail -n1)"
29 update-source-version ${finalAttrs.pname} "$version"
30 '';
31 tests.pkg-config = testers.testMetaPkgConfig finalAttrs.finalPackage;
32 };
33
34 meta = {
35 description = "X Window System Protocols Transport layer shared code";
36 homepage = "https://gitlab.freedesktop.org/xorg/lib/libxtrans";
37 license = with lib.licenses; [
38 mitOpenGroup
39 hpnd
40 mit
41 x11
42 hpndSellVariant
43 ];
44 maintainers = [ ];
45 pkgConfigModules = [ "xtrans" ];
46 platforms = lib.platforms.unix;
47 };
48})