nixpkgs/pkgs/applications/science/misc/openmvg/default.nix
Jonathan Ringer 9bb3fccb5b treewide: pkgs.pkgconfig -> pkgs.pkg-config, move pkgconfig to alias.nix
continuation of #109595

pkgconfig was aliased in 2018, however, it remained in
all-packages.nix due to its wide usage. This cleans
up the remaining references to pkgs.pkgsconfig and
moves the entry to aliases.nix.

python3Packages.pkgconfig remained unchanged because
it's the canonical name of the upstream package
on pypi.
2021-01-19 01:16:25 -08:00

50 lines
1.4 KiB
Nix

{ lib, stdenv, fetchFromGitHub, pkg-config, cmake
, libjpeg ? null
, zlib ? null
, libpng ? null
, eigen ? null
, libtiff ? null
, enableExamples ? false
, enableDocs ? false }:
stdenv.mkDerivation rec {
version = "1.6";
pname = "openmvg";
src = fetchFromGitHub {
owner = "openmvg";
repo = "openmvg";
rev = "v${version}";
sha256 = "0mrsi0dzgi7cjzn13r9xv7rnc8c9a4h8ip78xy88m9xsyr21wd1h";
fetchSubmodules = true;
};
buildInputs = [ libjpeg zlib libpng eigen libtiff ];
nativeBuildInputs = [ cmake pkg-config ];
cmakeFlags = [
"-DCMAKE_CXX_FLAGS=-std=c++11"
"-DOpenMVG_BUILD_EXAMPLES=${if enableExamples then "ON" else "OFF"}"
"-DOpenMVG_BUILD_DOC=${if enableDocs then "ON" else "OFF"}"
];
cmakeDir = "./src";
dontUseCmakeBuildDir = true;
# This can be enabled, but it will exhause virtual memory on most machines.
enableParallelBuilding = false;
# Without hardeningDisable, certain flags are passed to the compile that break the build (primarily string format errors)
hardeningDisable = [ "all" ];
meta = {
description = "A library for computer-vision scientists and targeted for the Multiple View Geometry community";
homepage = "https://openmvg.readthedocs.io/en/latest/";
license = lib.licenses.mpl20;
platforms = lib.platforms.linux;
maintainers = with lib.maintainers; [ mdaiter ];
};
}