2022-08-12 12:06:08 +00:00
|
|
|
{ lib, stdenv, fetchFromGitHub, copyPkgconfigItems, makePkgconfigItem }:
|
2020-04-24 23:36:52 +00:00
|
|
|
|
2022-08-12 12:06:08 +00:00
|
|
|
stdenv.mkDerivation rec {
|
2020-04-24 23:36:52 +00:00
|
|
|
pname = "stb";
|
2023-08-04 22:07:22 +00:00
|
|
|
version = "unstable-2023-01-29";
|
2020-04-24 23:36:52 +00:00
|
|
|
|
|
|
|
src = fetchFromGitHub {
|
|
|
|
owner = "nothings";
|
|
|
|
repo = "stb";
|
2023-08-04 22:07:22 +00:00
|
|
|
rev = "5736b15f7ea0ffb08dd38af21067c314d6a3aae9";
|
|
|
|
hash = "sha256-s2ASdlT3bBNrqvwfhhN6skjbmyEnUgvNOrvhgUSRj98=";
|
2020-04-24 23:36:52 +00:00
|
|
|
};
|
|
|
|
|
2022-08-12 12:06:08 +00:00
|
|
|
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;
|
|
|
|
})
|
|
|
|
];
|
|
|
|
|
2020-04-24 23:36:52 +00:00
|
|
|
dontBuild = true;
|
|
|
|
|
|
|
|
installPhase = ''
|
2022-08-12 12:06:08 +00:00
|
|
|
runHook preInstall
|
2020-04-24 23:36:52 +00:00
|
|
|
mkdir -p $out/include/stb
|
|
|
|
cp *.h $out/include/stb/
|
2022-08-12 12:06:08 +00:00
|
|
|
runHook postInstall
|
2020-04-24 23:36:52 +00:00
|
|
|
'';
|
|
|
|
|
2021-02-05 17:12:51 +00:00
|
|
|
meta = with lib; {
|
2020-04-24 23:36:52 +00:00
|
|
|
description = "Single-file public domain libraries for C/C++";
|
|
|
|
homepage = "https://github.com/nothings/stb";
|
|
|
|
license = licenses.publicDomain;
|
|
|
|
platforms = platforms.all;
|
2024-01-02 11:29:13 +00:00
|
|
|
maintainers = with maintainers; [ ];
|
2020-04-24 23:36:52 +00:00
|
|
|
};
|
|
|
|
}
|