duktape: Add pkgconfig file
This commit is contained in:
parent
41fa3118b6
commit
f5b2b2f1db
@ -1,4 +1,4 @@
|
||||
{ lib, stdenv, fetchurl }:
|
||||
{ lib, stdenv, fetchurl, validatePkgConfig }:
|
||||
|
||||
stdenv.mkDerivation rec {
|
||||
pname = "duktape";
|
||||
@ -8,6 +8,8 @@ stdenv.mkDerivation rec {
|
||||
sha256 = "19szwxzvl2g65fw95ggvb8h0ma5bd9vvnnccn59hwnc4dida1x4n";
|
||||
};
|
||||
|
||||
nativeBuildInputs = [ validatePkgConfig ];
|
||||
|
||||
postPatch = ''
|
||||
substituteInPlace Makefile.sharedlibrary \
|
||||
--replace 'gcc' '${stdenv.cc.targetPrefix}cc' \
|
||||
@ -23,9 +25,10 @@ stdenv.mkDerivation rec {
|
||||
installPhase = ''
|
||||
install -d $out/bin
|
||||
install -m755 duk $out/bin/
|
||||
install -d $out/lib
|
||||
install -d $out/lib/pkgconfig
|
||||
install -d $out/include
|
||||
make -f Makefile.sharedlibrary install INSTALL_PREFIX=$out
|
||||
substituteAll ${./duktape.pc.in} $out/lib/pkgconfig/duktape.pc
|
||||
'';
|
||||
enableParallelBuilding = true;
|
||||
|
||||
|
10
pkgs/development/interpreters/duktape/duktape.pc.in
Normal file
10
pkgs/development/interpreters/duktape/duktape.pc.in
Normal file
@ -0,0 +1,10 @@
|
||||
prefix=@out@
|
||||
exec_prefix=${prefix}
|
||||
libdir=${exec_prefix}/lib
|
||||
includedir=${prefix}/include
|
||||
|
||||
Name: duktape
|
||||
Description: An embeddable Javascript engine, with a focus on portability and compact footprint
|
||||
Version: @version@
|
||||
Libs: -L${libdir} -lduktape
|
||||
Cflags: -I${includedir}
|
Loading…
Reference in New Issue
Block a user