nixpkgs/pkgs/by-name/li/libclxclient/package.nix
aleksana 571c71e6f7 treewide: migrate packages to pkgs/by-name, take 1
We are migrating packages that meet below requirements:

1. using `callPackage`
2. called path is a directory
3. overriding set is empty (`{ }`)
4. not containing path expressions other than relative path (to
makenixpkgs-vet happy)
5. not referenced by nix files outside of the directory, other
than`pkgs/top-level/all-packages.nix`
6. not referencing nix files outside of the directory
7. not referencing `default.nix` (since it's changed to `package.nix`)
8. `outPath` doesn't change after migration

The tool is here: https://github.com/Aleksanaa/by-name-migrate.
2024-11-09 20:04:51 +08:00

50 lines
1.3 KiB
Nix

{ lib, stdenv, fetchurl, libclthreads, libX11, libXft, xorg, pkg-config }:
stdenv.mkDerivation rec {
pname = "libclxclient";
version = "3.9.2";
src = fetchurl {
url = "https://kokkinizita.linuxaudio.org/linuxaudio/downloads/clxclient-${version}.tar.bz2";
sha256 = "10bq6fy8d3pr1x2x3xx9qhf2hdxrwdgvg843a2y6lx70y1jfj0c5";
};
buildInputs = [ libclthreads libX11 libXft xorg.xorgproto ];
nativeBuildInputs = [ pkg-config ];
env.NIX_CFLAGS_COMPILE = "-I${xorg.xorgproto}/include -I${libXft.dev}/include";
patchPhase = ''
cd source
# use pkg-config instead of pkgcon:
sed -e 's/pkgconf/pkg-config/g' -i ./Makefile
# don't run ldconfig:
sed -e "/ldconfig/d" -i ./Makefile
# make sure it can find clxclient.h:
sed -e 's/<clxclient.h>/"clxclient.h"/' -i ./enumip.cc
'';
makeFlags = [
"PREFIX=$(out)"
"SUFFIX=''"
];
preInstall = ''
# The Makefile does not create the include directory
mkdir -p $out/include
'';
postInstall = ''
ln $out/lib/libclxclient.so $out/lib/libclxclient.so.3
'';
meta = with lib; {
description = "Zita X11 library";
homepage = "http://kokkinizita.linuxaudio.org/linuxaudio/downloads/index.html";
license = licenses.lgpl21;
maintainers = with maintainers; [ magnetophon ];
platforms = platforms.linux;
};
}