2
0
mirror of https://github.com/NixOS/nixpkgs.git synced 2025-01-20 20:03:24 +00:00
nixpkgs/pkgs/development/libraries/stb/default.nix

Ignoring revisions in .git-blame-ignore-revs. Click here to bypass and see the normal blame view.

46 lines
1.1 KiB
Nix
Raw Normal View History

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