nixpkgs mirror (for testing)
github.com/NixOS/nixpkgs
nix
1{ stdenv, lib, fetchFromGitHub, cmake, pkgconfig, openblas, libpng, libjpeg
2, guiSupport ? false, libX11
3}:
4
5stdenv.mkDerivation rec {
6 version = "19.6";
7 name = "dlib-${version}";
8
9 src = fetchFromGitHub {
10 owner = "davisking";
11 repo = "dlib";
12 rev ="v${version}";
13 sha256 = "1nlx4z53jnk7wysaxrzbyyqb65m45rw4g1fagazl2jvwh1qn49ds";
14 };
15
16 postPatch = ''
17 rm -rf dlib/external
18 '';
19
20 enableParallelBuilding = true;
21 nativeBuildInputs = [ cmake pkgconfig ];
22 buildInputs = [ openblas libpng libjpeg ] ++ lib.optional guiSupport libX11;
23
24 meta = with stdenv.lib; {
25 description = "A general purpose cross-platform C++ machine learning library";
26 homepage = http://www.dlib.net;
27 license = licenses.boost;
28 maintainers = with maintainers; [ christopherpoole ];
29 platforms = platforms.all;
30 };
31}
32