3
0
Fork 0
forked from mirrors/nixpkgs

stb: add pkgconfig file

This commit is contained in:
Artturin 2022-06-22 19:24:31 +03:00
parent 7249b8a2f3
commit 0b7a3b24d6

View file

@ -1,6 +1,6 @@
{ lib, stdenv, fetchFromGitHub }:
{ lib, stdenv, fetchFromGitHub, copyPkgconfigItems, makePkgconfigItem }:
stdenv.mkDerivation {
stdenv.mkDerivation rec {
pname = "stb";
version = "unstable-2021-09-10";
@ -11,11 +11,28 @@ stdenv.mkDerivation {
sha256 = "0qq35cd747lll4s7bmnxb3pqvyp2hgcr9kyf758fax9lx76iwjhr";
};
nativeBuildInputs = [ copyPkgconfigItems ];
pkgconfigItems = [
(makePkgconfigItem rec {
name = "stb";
version = "1";
cflags = [ "-I${variables.includedir}/stb" ];
variables = rec {
prefix = "${placeholder "out"}";
includedir = "${prefix}/include";
};
inherit (meta) description;
})
];
dontBuild = true;
installPhase = ''
runHook preInstall
mkdir -p $out/include/stb
cp *.h $out/include/stb/
runHook postInstall
'';
meta = with lib; {