Unverified Commit 47af6e31 authored by jopejoe1's avatar jopejoe1 Committed by GitHub
Browse files

lib{windowswm,xinerama,xkbfile,xshmfence,xtst}: refactor & move to...

lib{windowswm,xinerama,xkbfile,xshmfence,xtst}: refactor & move to pkgs/by-name from xorg namespace (#442326)
parents 265ed5e8 19d5fe04
Loading
Loading
Loading
Loading
+55 −0
Original line number Diff line number Diff line
{
  lib,
  stdenv,
  fetchurl,
  pkg-config,
  xorgproto,
  libx11,
  libxext,
  writeScript,
  testers,
}:
stdenv.mkDerivation (finalAttrs: {
  pname = "libwindowswm";
  version = "1.0.1";

  src = fetchurl {
    url = "mirror://xorg/individual/lib/libWindowsWM-${finalAttrs.version}.tar.bz2";
    hash = "sha256-JfB8+EfL6R02wg80i0uUlMRQT+ApZujN9lz1YxanDtw=";
  };

  strictDeps = true;

  nativeBuildInputs = [ pkg-config ];

  buildInputs = [
    xorgproto
    libx11
    libxext
  ];

  configureFlags = lib.optional (
    stdenv.hostPlatform != stdenv.buildPlatform
  ) "--enable-malloc0returnsnull";

  passthru = {
    updateScript = writeScript "update-${finalAttrs.pname}" ''
      #!/usr/bin/env nix-shell
      #!nix-shell -i bash -p common-updater-scripts
      version="$(list-directory-versions --pname libWindowsWM \
        --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 = "library for Cygwin/X rootless window management extension";
    homepage = "https://gitlab.freedesktop.org/xorg/lib/libwindowswm";
    license = lib.licenses.mit;
    maintainers = [ ];
    pkgConfigModules = [ "windowswm" ];
    platforms = lib.platforms.unix;
  };
})
+69 −0
Original line number Diff line number Diff line
{
  lib,
  stdenv,
  fetchurl,
  pkg-config,
  xorgproto,
  libx11,
  libxext,
  writeScript,
  testers,
}:
stdenv.mkDerivation (finalAttrs: {
  pname = "libxinerama";
  version = "1.1.5";

  outputs = [
    "out"
    "dev"
  ];

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

  strictDeps = true;

  nativeBuildInputs = [ pkg-config ];

  buildInputs = [
    xorgproto
    libx11
    libxext
  ];

  propagatedBuildInputs = [ xorgproto ];

  configureFlags = lib.optional (
    stdenv.hostPlatform != stdenv.buildPlatform
  ) "--enable-malloc0returnsnull";

  passthru = {
    updateScript = writeScript "update-${finalAttrs.pname}" ''
      #!/usr/bin/env nix-shell
      #!nix-shell -i bash -p common-updater-scripts
      version="$(list-directory-versions --pname libXinerama \
        --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 = "Library for Xinerama extension to X11 Protocol";
    homepage = "https://gitlab.freedesktop.org/xorg/lib/libxinerama";
    license = with lib.licenses; [
      mit
      mitOpenGroup
      # TODO: change this to a new license depending on if this
      # https://github.com/spdx/license-list-XML/issues/2831
      # actually creates a new license or just new markup for X11
      x11
    ];
    maintainers = [ ];
    pkgConfigModules = [ "xinerama" ];
    platforms = lib.platforms.unix;
  };
})
+60 −0
Original line number Diff line number Diff line
{
  lib,
  stdenv,
  fetchurl,
  pkg-config,
  xorgproto,
  libx11,
  writeScript,
  testers,
}:
stdenv.mkDerivation (finalAttrs: {
  pname = "libxkbfile";
  version = "1.1.3";

  outputs = [
    "out"
    "dev"
  ];

  src = fetchurl {
    url = "mirror://xorg/individual/lib/libxkbfile-${finalAttrs.version}.tar.xz";
    hash = "sha256-qbY+6pl6u57mqLT7tRWDHIQfRxr4RaCd5EOygAOHS+w=";
  };

  strictDeps = true;

  nativeBuildInputs = [ pkg-config ];

  buildInputs = [
    xorgproto
    libx11
  ];

  passthru = {
    updateScript = writeScript "update-${finalAttrs.pname}" ''
      #!/usr/bin/env nix-shell
      #!nix-shell -i bash -p common-updater-scripts
      version="$(list-directory-versions --pname ${finalAttrs.pname} \
        --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 = "XKB file handling routines";
    longDescription = ''
      libxkbfile is used by the X servers and utilities to parse the XKB configuration data files.
    '';
    homepage = "https://gitlab.freedesktop.org/xorg/lib/libxkbfile";
    license = with lib.licenses; [
      hpnd
      mitOpenGroup
    ];
    maintainers = [ ];
    pkgConfigModules = [ "xkbfile" ];
    platforms = lib.platforms.unix;
  };
})
+57 −0
Original line number Diff line number Diff line
{
  lib,
  stdenv,
  fetchurl,
  pkg-config,
  xorgproto,
  writeScript,
  testers,
}:
stdenv.mkDerivation (finalAttrs: {
  pname = "libxshmfence";
  version = "1.3.3";

  outputs = [
    "out"
    "dev"
  ];

  src = fetchurl {
    url = "mirror://xorg/individual/lib/libxshmfence-${finalAttrs.version}.tar.xz";
    hash = "sha256-1KTfCWq6lv6gLAKe46ROEaR+t/chPBpym+g+hew/3hA=";
  };

  strictDeps = true;

  nativeBuildInputs = [ pkg-config ];

  buildInputs = [ 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 ${finalAttrs.pname} \
        --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 = "Shared memory 'SyncFence' synchronization primitive library";
    longDescription = ''
      This library offers a CPU-based synchronization primitive compatible with the X SyncFence
      objects that can be shared between processes using file descriptor passing.
      There are two underlying implementations:
      - On Linux, the library uses futexes
      - On other systems, the library uses posix mutexes and condition variables.
    '';
    homepage = "https://gitlab.freedesktop.org/xorg/lib/libxshmfence";
    license = lib.licenses.hpndSellVariant;
    maintainers = [ ];
    pkgConfigModules = [ "xshmfence" ];
    platforms = lib.platforms.unix;
  };
})
+66 −0
Original line number Diff line number Diff line
{
  lib,
  stdenv,
  fetchurl,
  pkg-config,
  xorgproto,
  libx11,
  libxext,
  libxi,
  writeScript,
  testers,
}:
stdenv.mkDerivation (finalAttrs: {
  pname = "libxtst";
  version = "1.2.5";

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

  strictDeps = true;

  nativeBuildInputs = [ pkg-config ];

  buildInputs = [
    xorgproto
    libx11
    libxext
    libxi
  ];

  passthru = {
    updateScript = writeScript "update-${finalAttrs.pname}" ''
      #!/usr/bin/env nix-shell
      #!nix-shell -i bash -p common-updater-scripts
      version="$(list-directory-versions --pname libXtst \
        --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 = "Library for the XTEST and RECORD X11 extensions";
    longDescription = ''
      The XTEST extension is a minimal set of client and server extensions required to completely
      test the X11 server with no user intervention. This extension is not intended to support
      general journaling and playback of user actions.
      The RECORD extension supports the recording and reporting of all core X protocol and arbitrary
      X extension protocol.
    '';
    homepage = "https://gitlab.freedesktop.org/xorg/lib/libxtst";
    license = with lib.licenses; [
      mitOpenGroup
      hpndSellVariant
      hpndDoc
      x11
      hpndDocSell
    ];
    maintainers = [ ];
    pkgConfigModules = [ "xtst" ];
    platforms = lib.platforms.unix;
  };
})
Loading