nixpkgs/pkgs/development/libraries/dlib/default.nix
Maximilian Bosch ccdd229d21 dlib: 19.9 -> 19.13 (#41953)
This fixes the latest `dlib` build for `nixpkgs` compliancy:

* Patched `setup.py` to use number of jobs defined in `$NIX_BUILD_CORES`
  rather than using all available cores.

* Bumped `dlib` to latest version (v19.13 ATM).

* Dropped `openblas` build input, `cblas` which actually works lives in
  `dlib/external`. Otherwise the test suite runs into segfaults (see
  https://github.com/NixOS/nixpkgs/pull/39255#issuecomment-384535129 for
  further reference).

* Added myself as maintainer in case of any further breakage in the
  future.

Closes #39255

/cc @dotlambda @ryantm
2018-06-17 19:33:14 +02:00

31 lines
820 B
Nix

{ stdenv, lib, fetchFromGitHub, cmake, pkgconfig, libpng, libjpeg
, guiSupport ? false, libX11
}:
stdenv.mkDerivation rec {
version = "19.13";
name = "dlib-${version}";
src = fetchFromGitHub {
owner = "davisking";
repo = "dlib";
rev ="v${version}";
sha256 = "11ia4pd2lm2s9hzwrdvimj3r2qcnvjdp3g4fry2j1a6z9f99zvz3";
};
postPatch = ''
rm -rf dlib/external
'';
enableParallelBuilding = true;
nativeBuildInputs = [ cmake pkgconfig ];
buildInputs = [ libpng libjpeg ] ++ lib.optional guiSupport libX11;
meta = with stdenv.lib; {
description = "A general purpose cross-platform C++ machine learning library";
homepage = http://www.dlib.net;
license = licenses.boost;
maintainers = with maintainers; [ christopherpoole ma27 ];
platforms = platforms.linux;
};
}