summary refs log tree commit diff
path: root/pkgs/development/libraries/dlib/default.nix
diff options
context:
space:
mode:
authorndowens <ndowens04@gmail.com>2017-03-12 11:15:38 -0500
committerndowens <ndowens04@gmail.com>2017-03-12 11:15:38 -0500
commit496b2930702c6ecab344fe6f6205dea0039ef43a (patch)
tree6584f9625a7458f57246e528cd920e0b5376dcc4 /pkgs/development/libraries/dlib/default.nix
parent41625dcab64efe29c3b15876f27ec520927367bf (diff)
downloadnixpkgs-496b2930702c6ecab344fe6f6205dea0039ef43a.tar
nixpkgs-496b2930702c6ecab344fe6f6205dea0039ef43a.tar.gz
nixpkgs-496b2930702c6ecab344fe6f6205dea0039ef43a.tar.bz2
nixpkgs-496b2930702c6ecab344fe6f6205dea0039ef43a.tar.lz
nixpkgs-496b2930702c6ecab344fe6f6205dea0039ef43a.tar.xz
nixpkgs-496b2930702c6ecab344fe6f6205dea0039ef43a.tar.zst
nixpkgs-496b2930702c6ecab344fe6f6205dea0039ef43a.zip
dlib: 18.10 -> 19.4
Diffstat (limited to 'pkgs/development/libraries/dlib/default.nix')
-rw-r--r--pkgs/development/libraries/dlib/default.nix40
1 files changed, 10 insertions, 30 deletions
diff --git a/pkgs/development/libraries/dlib/default.nix b/pkgs/development/libraries/dlib/default.nix
index 8a24445dcca..fe4e7907c9f 100644
--- a/pkgs/development/libraries/dlib/default.nix
+++ b/pkgs/development/libraries/dlib/default.nix
@@ -1,45 +1,25 @@
-{ stdenv, fetchurl, cmake, xlibsWrapper }:
+{ stdenv, fetchFromGitHub, cmake, xlibsWrapper }:
 
 stdenv.mkDerivation rec {
-  version = "18.10";
+  version = "19.4";
   name = "dlib-${version}";
 
-  src = fetchurl {
-    url = "mirror://sourceforge/dclib/dlib/${name}.tar.bz2";
-    sha256 = "1g3v13azc29m5r7zqs3x0g731hny6spb66cxnra7f167z31ka3s7";
+  src = fetchFromGitHub {
+    owner = "davisking";
+    repo = "dlib";
+    rev ="v${version}";
+    sha256 = "0zqa36i4s5i7n6284sp22qrhm3k37n9vqmpz068nm02vj9h0a2j4";
   };
 
-  # 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 xlibsWrapper ];
-  propagatedBuildInputs = [ xlibsWrapper ];
+  nativeBuildInputs = [ cmake ];
 
   meta = with stdenv.lib; {
     description = "A general purpose cross-platform C++ machine learning library";
     homepage = http://www.dlib.net;
-    license = stdenv.lib.licenses.boost;
+    license = licenses.boost;
     maintainers = with maintainers; [ christopherpoole ];
-    platforms = stdenv.lib.platforms.all;
+    platforms = platforms.all;
   };
 }