summaryrefslogtreecommitdiffstats
path: root/pkgs/by-name/li/libxp/package.nix
blob: 076b7ddb55106e9c3a8370aab44f45122b303f81 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
# TODO: remove this deprecated package
# X.Org removed support for the Xprt server from the xorg-server releases in the 1.6.0 release in
# 2009, and the standalone git repo it was moved to has been unmaintained since 2009, making it
# difficult to actually use this library.
# Some packages in nixpkgs still somehow depend on it tho.
{
  lib,
  stdenv,
  fetchurl,
  pkg-config,
  xorgproto,
  libx11,
  libxau,
  libxext,
  writeScript,
  testers,
}:
stdenv.mkDerivation (finalAttrs: {
  pname = "libxp";
  version = "1.0.4";

  outputs = [
    "out"
    "dev"
  ];

  src = fetchurl {
    url = "mirror://xorg/individual/lib/libXp-${finalAttrs.version}.tar.xz";
    hash = "sha256-HxnjuOgqNKj9mImn2a8KvoWIywP7V8N8VpY0zzud8aQ=";
  };

  strictDeps = true;

  nativeBuildInputs = [ pkg-config ];

  buildInputs = [
    xorgproto
    libx11
    libxau
    libxext
  ];

  propagatedBuildInputs = [ xorgproto ];

  passthru = {
    updateScript = writeScript "update-${finalAttrs.pname}" ''
      #!/usr/bin/env nix-shell
      #!nix-shell -i bash -p common-updater-scripts
      version="$(list-directory-versions --pname libXp \
        --url https://xorg.freedesktop.org/releases/individual/lib/ \
        | sort -V | tail -n1)"
      update-source-version ${finalAttrs.pname} "$version"
    '';
    tests.pkg-config = testers.testMetaPkgConfig finalAttrs.finalPackage;
  };

  meta = {
    description = "X Print Client Library";
    longDescription = ''
      This library provides support for X11 clients to print via the X Print Extension, as
      previously implemented in the Xprt server.
    '';
    homepage = "https://gitlab.freedesktop.org/xorg/lib/libxp";
    license = lib.licenses.x11;
    maintainers = [ ];
    pkgConfigModules = [ "xp" ];
    platforms = lib.platforms.unix;
  };
})