diff options
author | Artturin <Artturin@artturin.com> | 2022-06-22 19:24:31 +0300 |
---|---|---|
committer | Artturin <Artturin@artturin.com> | 2022-07-20 06:24:20 +0300 |
commit | 0b7a3b24d606b794785e5d8a7b81138a9815d216 (patch) | |
tree | 01a1357a2d0dec799747985726205c5ccaaa37b5 /pkgs/development/libraries/stb | |
parent | 7249b8a2f3318bb03c50429f5907015e99901c0b (diff) |
stb: add pkgconfig file
Diffstat (limited to 'pkgs/development/libraries/stb')
-rw-r--r-- | pkgs/development/libraries/stb/default.nix | 21 |
1 files changed, 19 insertions, 2 deletions
diff --git a/pkgs/development/libraries/stb/default.nix b/pkgs/development/libraries/stb/default.nix index 22a97d890e562..fee0cb42164e0 100644 --- a/pkgs/development/libraries/stb/default.nix +++ b/pkgs/development/libraries/stb/default.nix @@ -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; { |