mirror of
https://github.com/ilyakooo0/nixpkgs.git
synced 2025-01-02 17:09:09 +03:00
Merge pull request #108801 from AndersonTorres/update-argtable
argtable: 3.0.1 -> 3.1.5 libmicrohttpd: init at 0.9.72 libjson-rpc-cpp: 0.7.0 -> 1.3.0
This commit is contained in:
commit
1373f75002
40
pkgs/development/libraries/argtable/default.nix
Normal file
40
pkgs/development/libraries/argtable/default.nix
Normal file
@ -0,0 +1,40 @@
|
||||
{ stdenv
|
||||
, fetchFromGitHub
|
||||
, cmake
|
||||
}:
|
||||
|
||||
stdenv.mkDerivation rec {
|
||||
pname = "argtable";
|
||||
version = "3.1.5";
|
||||
srcVersion = "v${version}.1c1bb23";
|
||||
|
||||
src = fetchFromGitHub {
|
||||
owner = "argtable";
|
||||
repo = "argtable3";
|
||||
rev = srcVersion;
|
||||
sha256 = "sha256-sL6mnxsuL1K0DY26jLF/2Czo0RxHYJ3xU3VyavISiMM=";
|
||||
};
|
||||
|
||||
nativeBuildInputs = [ cmake ];
|
||||
|
||||
postPatch = ''
|
||||
patchShebangs tools/build
|
||||
'';
|
||||
|
||||
meta = with stdenv.lib; {
|
||||
homepage = "https://argtable.org";
|
||||
description = "A single-file, ANSI C command-line parsing library";
|
||||
longDescription = ''
|
||||
Argtable is an open source ANSI C library that parses GNU-style
|
||||
command-line options. It simplifies command-line parsing by defining a
|
||||
declarative-style API that you can use to specify what your command-line
|
||||
syntax looks like. Argtable will automatically generate consistent error
|
||||
handling logic and textual descriptions of the command line syntax, which
|
||||
are essential but tedious to implement for a robust CLI program.
|
||||
'';
|
||||
license = with licenses; bsd3;
|
||||
maintainers = with maintainers; [ AndersonTorres artuuge ];
|
||||
platforms = with platforms; all;
|
||||
};
|
||||
}
|
||||
# TODO [ AndersonTorres ]: a NixOS test suite
|
@ -1,19 +1,47 @@
|
||||
{ stdenv, fetchFromGitHub, cmake, jsoncpp, argtable, curl, libmicrohttpd
|
||||
, doxygen, catch, pkgconfig
|
||||
{ stdenv
|
||||
, fetchFromGitHub
|
||||
, fetchpatch
|
||||
, pkg-config
|
||||
, cmake
|
||||
, argtable
|
||||
, catch2
|
||||
, curl
|
||||
, doxygen
|
||||
, hiredis
|
||||
, jsoncpp
|
||||
, libmicrohttpd
|
||||
}:
|
||||
|
||||
stdenv.mkDerivation rec {
|
||||
pname = "libjson-rpc-cpp";
|
||||
version = "0.7.0";
|
||||
version = "1.3.0";
|
||||
|
||||
src = fetchFromGitHub {
|
||||
owner = "cinemast";
|
||||
repo = "libjson-rpc-cpp";
|
||||
sha256 = "07bg4nyvx0yyhy8c4x9i22kwqpx5jlv36dvpabgbb46ayyndhr7a";
|
||||
sha256 = "sha256-EAakiqlfMprwLjloDekOssaB/EnAmn5njcwHGZtYs9w=";
|
||||
rev = "v${version}";
|
||||
};
|
||||
|
||||
NIX_CFLAGS_COMPILE = "-I${catch}/include/catch";
|
||||
NIX_CFLAGS_COMPILE = "-I${catch2}/include/catch2";
|
||||
|
||||
patches = [
|
||||
(fetchpatch {
|
||||
name = "int-to-MHD_Result.patch";
|
||||
url = "https://patch-diff.githubusercontent.com/raw/cinemast/libjson-rpc-cpp/pull/299.patch";
|
||||
sha256 = "sha256-hiey6etzbOxhMElTMX7offKbey7c2OO/UWeN03k0AaM=";
|
||||
})
|
||||
];
|
||||
|
||||
nativeBuildInputs = [ pkg-config cmake doxygen ];
|
||||
buildInputs = [
|
||||
argtable
|
||||
catch2
|
||||
curl
|
||||
hiredis
|
||||
jsoncpp
|
||||
libmicrohttpd
|
||||
];
|
||||
|
||||
postPatch = ''
|
||||
for f in cmake/FindArgtable.cmake \
|
||||
@ -26,37 +54,43 @@ stdenv.mkDerivation rec {
|
||||
sed -i -re 's#MATCHES "jsoncpp"#MATCHES ".*/jsoncpp/json$"#g' cmake/FindJsoncpp.cmake
|
||||
'';
|
||||
|
||||
configurePhase = ''
|
||||
preConfigure = ''
|
||||
mkdir -p Build/Install
|
||||
pushd Build
|
||||
|
||||
cmake .. -DCMAKE_INSTALL_PREFIX=$(pwd)/Install \
|
||||
-DCMAKE_BUILD_TYPE=Release
|
||||
'';
|
||||
|
||||
installPhase = ''
|
||||
mkdir -p $out
|
||||
# this hack is needed because the cmake scripts
|
||||
# require write permission to absolute paths
|
||||
configurePhase = ''
|
||||
runHook preConfigure
|
||||
cmake .. -DCMAKE_INSTALL_PREFIX=$(pwd)/Install \
|
||||
-DCMAKE_BUILD_TYPE=Release
|
||||
runHook postConfigure
|
||||
'';
|
||||
|
||||
preInstall = ''
|
||||
function fixRunPath {
|
||||
p=$(patchelf --print-rpath $1)
|
||||
q="$p:${stdenv.lib.makeLibraryPath [ jsoncpp argtable libmicrohttpd curl ]}:$out/lib"
|
||||
patchelf --set-rpath $q $1
|
||||
}
|
||||
|
||||
make install
|
||||
mkdir -p $out
|
||||
'';
|
||||
|
||||
sed -i -re "s#-([LI]).*/Build/Install(.*)#-\1$out\2#g" Install/lib/pkgconfig/*.pc
|
||||
for f in Install/lib/*.so* $(find Install/bin -executable -type f); do
|
||||
postInstall = ''
|
||||
sed -i -re "s#-([LI]).*/Build/Install(.*)#-\1$out\2#g" Install/lib64/pkgconfig/*.pc
|
||||
for f in Install/lib64/*.so* $(find Install/bin -executable -type f); do
|
||||
fixRunPath $f
|
||||
done
|
||||
|
||||
cp -r Install/* $out
|
||||
'';
|
||||
|
||||
nativeBuildInputs = [ pkgconfig ];
|
||||
buildInputs = [ cmake jsoncpp argtable curl libmicrohttpd doxygen catch ];
|
||||
|
||||
enableParallelBuilding = true;
|
||||
installPhase = ''
|
||||
runHook preInstall
|
||||
make install
|
||||
runHook postInstall
|
||||
'';
|
||||
|
||||
meta = with stdenv.lib; {
|
||||
description = "C++ framework for json-rpc (json remote procedure call)";
|
||||
|
10
pkgs/development/libraries/libmicrohttpd/0.9.72.nix
Normal file
10
pkgs/development/libraries/libmicrohttpd/0.9.72.nix
Normal file
@ -0,0 +1,10 @@
|
||||
{ stdenv, callPackage, fetchurl }:
|
||||
|
||||
callPackage ./generic.nix ( rec {
|
||||
version = "0.9.72";
|
||||
|
||||
src = fetchurl {
|
||||
url = "mirror://gnu/libmicrohttpd/libmicrohttpd-${version}.tar.gz";
|
||||
sha256 = "sha256-Cugl+ODX9BIB/USg3xz0VMHLC8UP6dWcJlUiYCZML/g=";
|
||||
};
|
||||
})
|
@ -1,41 +0,0 @@
|
||||
{ stdenv
|
||||
, fetchgit
|
||||
}:
|
||||
stdenv.mkDerivation {
|
||||
pname = "argtable";
|
||||
version = "3.0.1";
|
||||
|
||||
src = fetchgit {
|
||||
url = "https://github.com/argtable/argtable3.git";
|
||||
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; {
|
||||
homepage = "https://www.argtable.org/";
|
||||
description = "A Cross-Platform, Single-File, ANSI C Command-Line Parsing Library";
|
||||
license = licenses.bsd3;
|
||||
maintainers = with maintainers; [ artuuge ];
|
||||
};
|
||||
}
|
@ -905,14 +905,14 @@ in
|
||||
|
||||
apitrace = libsForQt514.callPackage ../applications/graphics/apitrace {};
|
||||
|
||||
argtable = callPackage ../development/libraries/argtable { };
|
||||
|
||||
arguments = callPackage ../development/libraries/arguments { };
|
||||
|
||||
argus = callPackage ../tools/networking/argus {};
|
||||
|
||||
argus-clients = callPackage ../tools/networking/argus-clients {};
|
||||
|
||||
argtable = callPackage ../tools/misc/argtable {};
|
||||
|
||||
argyllcms = callPackage ../tools/graphics/argyllcms {};
|
||||
|
||||
arp-scan = callPackage ../tools/misc/arp-scan { };
|
||||
@ -14671,7 +14671,9 @@ in
|
||||
|
||||
libjreen = callPackage ../development/libraries/libjreen { };
|
||||
|
||||
libjson-rpc-cpp = callPackage ../development/libraries/libjson-rpc-cpp { };
|
||||
libjson-rpc-cpp = callPackage ../development/libraries/libjson-rpc-cpp {
|
||||
libmicrohttpd = libmicrohttpd_0_9_72;
|
||||
};
|
||||
|
||||
libkate = callPackage ../development/libraries/libkate { };
|
||||
|
||||
@ -14710,6 +14712,7 @@ in
|
||||
|
||||
libmicrohttpd_0_9_70 = callPackage ../development/libraries/libmicrohttpd/0.9.70.nix { };
|
||||
libmicrohttpd_0_9_71 = callPackage ../development/libraries/libmicrohttpd/0.9.71.nix { };
|
||||
libmicrohttpd_0_9_72 = callPackage ../development/libraries/libmicrohttpd/0.9.72.nix { };
|
||||
libmicrohttpd = libmicrohttpd_0_9_71;
|
||||
|
||||
libmikmod = callPackage ../development/libraries/libmikmod {
|
||||
|
Loading…
Reference in New Issue
Block a user