nixpkgs mirror (for testing)
github.com/NixOS/nixpkgs
nix
1{
2 lib,
3 stdenv,
4 fetchurl,
5 pkg-config,
6 libx11,
7 xorgproto,
8 writeScript,
9}:
10stdenv.mkDerivation (finalAttrs: {
11 pname = "xprop";
12 version = "1.2.8";
13
14 src = fetchurl {
15 url = "mirror://xorg/individual/app/xprop-${finalAttrs.version}.tar.xz";
16 hash = "sha256-1onirbfve0OfZGm1HNqKfa78gyQ4VMKjuPhNDwKdZ+4=";
17 };
18
19 strictDeps = true;
20
21 nativeBuildInputs = [ pkg-config ];
22
23 buildInputs = [
24 libx11
25 xorgproto
26 ];
27
28 passthru = {
29 updateScript = writeScript "update-${finalAttrs.pname}" ''
30 #!/usr/bin/env nix-shell
31 #!nix-shell -i bash -p common-updater-scripts
32 version="$(list-directory-versions --pname ${finalAttrs.pname} \
33 --url https://xorg.freedesktop.org/releases/individual/app/ \
34 | sort -V | tail -n1)"
35 update-source-version ${finalAttrs.pname} "$version"
36 '';
37 };
38
39 meta = {
40 description = "Command line tool to display and/or set window and font properties of an X server";
41 homepage = "https://gitlab.freedesktop.org/xorg/app/xprop";
42 license = with lib.licenses; [
43 mitOpenGroup
44 hpndSellVariant
45 mit
46 ];
47 mainProgram = "xprop";
48 maintainers = [ ];
49 platforms = lib.platforms.unix;
50 };
51})