2016-06-28 08:41:24 +02:00
|
|
|
{ stdenv
|
|
|
|
, fetchgit
|
|
|
|
}:
|
2019-08-13 23:52:01 +02:00
|
|
|
stdenv.mkDerivation {
|
2019-08-15 14:41:18 +02:00
|
|
|
pname = "argtable";
|
2016-06-28 08:41:24 +02:00
|
|
|
version = "3.0.1";
|
|
|
|
|
|
|
|
src = fetchgit {
|
2020-04-01 03:11:51 +02:00
|
|
|
url = "https://github.com/argtable/argtable3.git";
|
2016-06-28 08:41:24 +02:00
|
|
|
rev = "de93cfd85f755250285b337cba053a709a270721";
|
|
|
|
sha256 = "0fbvk78s3dwryrzgafdra0lb8w7lb873c6xgldl94ps9828x85i3";
|
|
|
|
};
|
|
|
|
|
|
|
|
buildPhase = ''
|
|
|
|
gcc -shared -o libargtable3.so -fPIC argtable3.c
|
|
|
|
|
|
|
|
pushd tests
|
|
|
|
make
|
|
|
|
popd
|
|
|
|
'';
|
|
|
|
|
|
|
|
installPhase = ''
|
|
|
|
mkdir -p $out/include
|
|
|
|
cp argtable3.h $out/include
|
|
|
|
|
|
|
|
mkdir -p $out/lib
|
|
|
|
cp libargtable3.so $out/lib
|
|
|
|
|
|
|
|
mkdir -p $out/src
|
|
|
|
cp argtable3.c $out/src
|
|
|
|
cp -r examples $out/src
|
|
|
|
ln -s $out/include/argtable3.h $out/src/argtable3.h
|
|
|
|
'';
|
|
|
|
|
|
|
|
meta = with stdenv.lib; {
|
2020-04-01 03:11:51 +02:00
|
|
|
homepage = "https://www.argtable.org/";
|
2016-06-28 08:41:24 +02:00
|
|
|
description = "A Cross-Platform, Single-File, ANSI C Command-Line Parsing Library";
|
|
|
|
license = licenses.bsd3;
|
|
|
|
maintainers = with maintainers; [ artuuge ];
|
|
|
|
};
|
|
|
|
}
|