diff --git a/pkgs/by-name/xk/xkbcomp/package.nix b/pkgs/by-name/xk/xkbcomp/package.nix new file mode 100644 index 000000000000..24cf1311e7b1 --- /dev/null +++ b/pkgs/by-name/xk/xkbcomp/package.nix @@ -0,0 +1,65 @@ +{ + lib, + stdenv, + fetchFromGitLab, + autoreconfHook, + pkg-config, + util-macros, + bison, + libx11, + libxkbfile, + xorgproto, + xkeyboard-config, + nix-update-script, + testers, +}: +stdenv.mkDerivation (finalAttrs: { + pname = "xkbcomp"; + version = "1.5.0"; + + src = fetchFromGitLab { + domain = "gitlab.freedesktop.org"; + group = "xorg"; + owner = "app"; + repo = "xkbcomp"; + tag = "xkbcomp-${finalAttrs.version}"; + hash = "sha256-nkyBjIOX9Qr0K+R0JcvJ7egI0a8Zh/tyhZvG7E+VlZU="; + }; + + strictDeps = true; + + nativeBuildInputs = [ + autoreconfHook + pkg-config + util-macros + bison + ]; + + buildInputs = [ + util-macros # unused dependency but the build fails if pkg-config can't find it + libx11 + libxkbfile + xorgproto + ]; + + configureFlags = [ "--with-xkb-config-root=${xkeyboard-config}/share/X11/xkb" ]; + + passthru = { + updateScript = nix-update-script { extraArgs = [ "--version-regex=xkbcomp-(.*)" ]; }; + tests.pkg-config = testers.testMetaPkgConfig finalAttrs.finalPackage; + }; + + meta = { + description = "XKB keyboard description compiler"; + homepage = "https://gitlab.freedesktop.org/xorg/app/xkbcomp"; + license = with lib.licenses; [ + hpnd + mitOpenGroup + hpndDec + ]; + mainProgram = "xkbcomp"; + maintainers = [ ]; + pkgConfigModules = [ "xkbcomp" ]; + platforms = lib.platforms.unix; + }; +}) diff --git a/pkgs/servers/x11/xorg/default.nix b/pkgs/servers/x11/xorg/default.nix index 8214510a6daf..6585dcb56a07 100644 --- a/pkgs/servers/x11/xorg/default.nix +++ b/pkgs/servers/x11/xorg/default.nix @@ -136,6 +136,7 @@ xhost, xinit, xinput, + xkbcomp, xkbevd, xkbprint, xkbutils, @@ -226,6 +227,7 @@ self: with self; { xhost xinit xinput + xkbcomp xkbevd xkbprint xkbutils @@ -2090,42 +2092,4 @@ self: with self; { }) ) { }; - # THIS IS A GENERATED FILE. DO NOT EDIT! - xkbcomp = callPackage ( - { - stdenv, - pkg-config, - fetchurl, - libX11, - libxkbfile, - xorgproto, - testers, - }: - stdenv.mkDerivation (finalAttrs: { - pname = "xkbcomp"; - version = "1.5.0"; - builder = ./builder.sh; - src = fetchurl { - url = "mirror://xorg/individual/app/xkbcomp-1.5.0.tar.xz"; - sha256 = "0q3092w42w9wyfr5zf3ymkmzlqr24z6kz6ypkinxnxh7c0k1zhra"; - }; - hardeningDisable = [ - "bindnow" - "relro" - ]; - strictDeps = true; - nativeBuildInputs = [ pkg-config ]; - buildInputs = [ - libX11 - libxkbfile - xorgproto - ]; - passthru.tests.pkg-config = testers.testMetaPkgConfig finalAttrs.finalPackage; - meta = { - pkgConfigModules = [ "xkbcomp" ]; - platforms = lib.platforms.unix; - }; - }) - ) { }; - } diff --git a/pkgs/servers/x11/xorg/generate-expr-from-tarballs.pl b/pkgs/servers/x11/xorg/generate-expr-from-tarballs.pl index fdaad80937a1..4c0f28afa380 100755 --- a/pkgs/servers/x11/xorg/generate-expr-from-tarballs.pl +++ b/pkgs/servers/x11/xorg/generate-expr-from-tarballs.pl @@ -468,6 +468,7 @@ print OUT <