2015-09-15 12:13:22 +03:00
|
|
|
{ stdenv, fetchurl, cmake, xlibsWrapper }:
|
2014-10-07 09:36:30 +04:00
|
|
|
|
|
|
|
stdenv.mkDerivation rec {
|
|
|
|
version = "18.10";
|
|
|
|
name = "dlib-${version}";
|
|
|
|
|
|
|
|
src = fetchurl {
|
|
|
|
url = "mirror://sourceforge/dclib/dlib/${name}.tar.bz2";
|
|
|
|
sha256 = "1g3v13azc29m5r7zqs3x0g731hny6spb66cxnra7f167z31ka3s7";
|
|
|
|
};
|
|
|
|
|
|
|
|
# The supplied CMakeLists.txt does not have any install targets.
|
|
|
|
sources_var = "\$\{sources\}";
|
|
|
|
headers_var = "\$\{hearders\}";
|
|
|
|
preConfigure = ''
|
|
|
|
cat << EOF > CMakeLists.txt
|
|
|
|
cmake_minimum_required(VERSION 2.6 FATAL_ERROR)
|
|
|
|
project(dlib)
|
|
|
|
|
|
|
|
include_directories(./)
|
|
|
|
|
|
|
|
file(GLOB sources ./dlib/all/*.cpp)
|
|
|
|
file(GLOB headers ./dlib/*.h)
|
|
|
|
|
|
|
|
SET(LIBRARY_OUTPUT_PATH ".")
|
|
|
|
add_library(dlib "SHARED" dlib/all/source.cpp ${sources_var} ${headers_var})
|
|
|
|
|
|
|
|
install(TARGETS dlib DESTINATION lib)
|
|
|
|
install(DIRECTORY dlib/ DESTINATION include/dlib FILES_MATCHING PATTERN "*.h")
|
|
|
|
EOF
|
|
|
|
'';
|
|
|
|
|
|
|
|
enableParallelBuilding = true;
|
2015-09-15 12:13:22 +03:00
|
|
|
buildInputs = [ cmake xlibsWrapper ];
|
|
|
|
propagatedBuildInputs = [ xlibsWrapper ];
|
2014-10-07 09:36:30 +04:00
|
|
|
|
2014-10-10 03:18:42 +04:00
|
|
|
meta = with stdenv.lib; {
|
2014-11-11 16:20:43 +03:00
|
|
|
description = "A general purpose cross-platform C++ machine learning library";
|
2014-10-07 09:36:30 +04:00
|
|
|
homepage = http://www.dlib.net;
|
|
|
|
license = stdenv.lib.licenses.boost;
|
2014-10-10 03:18:42 +04:00
|
|
|
maintainers = with maintainers; [ christopherpoole ];
|
2014-10-07 09:36:30 +04:00
|
|
|
platforms = stdenv.lib.platforms.all;
|
|
|
|
};
|
|
|
|
}
|
|
|
|
|