f34ce41345
GitOrigin-RevId: b73c2221a46c13557b1b3be9c2070cc42cf01eb3
51 lines
1.1 KiB
Nix
51 lines
1.1 KiB
Nix
{ lib, stdenv
|
|
, fetchFromGitHub
|
|
, cmake
|
|
, pkg-config
|
|
, libglut
|
|
, lapack
|
|
, libusb1
|
|
, blas
|
|
, zlib
|
|
, eigen
|
|
}:
|
|
|
|
stdenv.mkDerivation rec {
|
|
pname = "libsurvive";
|
|
version = "1.01";
|
|
|
|
src = fetchFromGitHub {
|
|
owner = "cntools";
|
|
repo = pname;
|
|
rev = "v${version}";
|
|
# Fixes 'Unknown CMake command "cnkalman_generate_code"'
|
|
fetchSubmodules = true;
|
|
hash = "sha256-NcxdTKra+YkLt/iu9+1QCeQZLV3/qlhma2Ns/+ZYVsk=";
|
|
};
|
|
|
|
nativeBuildInputs = [ cmake pkg-config ];
|
|
|
|
buildInputs = [
|
|
libglut
|
|
lapack
|
|
libusb1
|
|
blas
|
|
zlib
|
|
eigen
|
|
];
|
|
|
|
# https://github.com/cntools/libsurvive/issues/272
|
|
postPatch = ''
|
|
substituteInPlace survive.pc.in \
|
|
libs/cnkalman/cnkalman.pc.in libs/cnkalman/libs/cnmatrix/cnmatrix.pc.in \
|
|
--replace '$'{exec_prefix}/@CMAKE_INSTALL_LIBDIR@ @CMAKE_INSTALL_FULL_LIBDIR@
|
|
'';
|
|
|
|
meta = with lib; {
|
|
description = "Open Source Lighthouse Tracking System";
|
|
homepage = "https://github.com/cntools/libsurvive";
|
|
license = licenses.mit;
|
|
maintainers = with maintainers; [ expipiplus1 prusnak ];
|
|
platforms = platforms.linux;
|
|
};
|
|
}
|