cetcd
This commit is contained in:
parent
c28b44152f
commit
c9b5820d80
3 changed files with 48 additions and 19 deletions
|
|
@ -6,19 +6,28 @@
|
|||
...
|
||||
}:
|
||||
|
||||
stdenv.mkDerivation {
|
||||
let
|
||||
pname = "cetcd";
|
||||
version = "1.0.0";
|
||||
meta = with lib; {
|
||||
description = "c binding of etcd client api";
|
||||
homepage = "https://github.com/shafreeck/cetcd";
|
||||
license = lib.license.apsl20;
|
||||
};
|
||||
in
|
||||
stdenv.mkDerivation {
|
||||
pname = pname;
|
||||
version = version;
|
||||
|
||||
src = fetchFromGitHub {
|
||||
owner = "shen390s";
|
||||
repo = "cetcd";
|
||||
rev = "master";
|
||||
# sha256 = "sha256-9dzSc3w+yxYzsF/rZe3qIarKOpjt2zvIyjuS5FXngIM=";
|
||||
sha256 = "sha256-BTJXrJyjPp5ynHH5Ct91PFiWATzBal4rsnX84wJ0nCg=";
|
||||
};
|
||||
|
||||
nativeBuildInputs = [
|
||||
pkgs.make
|
||||
pkgs.gnumake
|
||||
pkgs.curl
|
||||
pkgs.pkg-config
|
||||
pkgs.yajl
|
||||
|
|
@ -37,4 +46,21 @@ stdenv.mkDerivation {
|
|||
make install prefix=$out
|
||||
runHook postInstall
|
||||
'';
|
||||
|
||||
postInstall = ''
|
||||
mkdir -p $out/lib/pkgconfig
|
||||
cat >$out/lib/pkgconfig/cetcd.pc <<EOF
|
||||
prefix=$out
|
||||
exec_prefix=\''${prefix}
|
||||
libdir=$out/lib
|
||||
includedir=\''${prefix}/include
|
||||
|
||||
Name: ${pname}
|
||||
Description: ${meta.description}
|
||||
Version: ${version}
|
||||
Libs: -L\''${libdir} -lcetcd
|
||||
Cflags: -I\''${includedir}
|
||||
EOF
|
||||
'';
|
||||
|
||||
}
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue