aboutsummaryrefslogtreecommitdiff
path: root/pkgs/development/libraries/dlib
diff options
context:
space:
mode:
authorChristopher Poole <mail@christopherpoole.net>2014-10-07 16:36:30 +1100
committerChristopher Poole <mail@christopherpoole.net>2014-10-07 16:36:30 +1100
commit7af2d07f244cdd785d79a698428f3ffaf597b58b (patch)
treec96eb6940c5dadfc0813194fe2a01d6ecb9fc287 /pkgs/development/libraries/dlib
parent4b072cfe08e3d6878ac5e6bdbbcdc37e8a70aec9 (diff)
Added the dlib machine learning library.
Diffstat (limited to 'pkgs/development/libraries/dlib')
-rw-r--r--pkgs/development/libraries/dlib/default.nix45
1 files changed, 45 insertions, 0 deletions
diff --git a/pkgs/development/libraries/dlib/default.nix b/pkgs/development/libraries/dlib/default.nix
new file mode 100644
index 000000000000..8dfc91a125fe
--- /dev/null
+++ b/pkgs/development/libraries/dlib/default.nix
@@ -0,0 +1,45 @@
+{ stdenv, fetchurl, cmake, x11 }:
+
+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;
+ buildInputs = [ cmake x11 ];
+ propagatedBuildInputs = [ x11 ];
+
+ meta = {
+ description = "Dlib is a general purpose cross-platform C++ machine learning library.";
+ homepage = http://www.dlib.net;
+ license = stdenv.lib.licenses.boost;
+ maintainers = [ ];
+ platforms = stdenv.lib.platforms.all;
+ };
+}
+