2021-01-21 17:00:13 +00:00
|
|
|
{ lib, stdenv
|
2021-01-05 16:28:38 +00:00
|
|
|
, fetchFromGitHub
|
|
|
|
, cmake
|
|
|
|
, pkg-config
|
2024-06-20 04:39:23 +00:00
|
|
|
, libglut
|
2021-11-13 10:55:00 +00:00
|
|
|
, lapack
|
2021-01-05 16:28:38 +00:00
|
|
|
, libusb1
|
2021-11-13 10:55:00 +00:00
|
|
|
, blas
|
2021-01-05 16:28:38 +00:00
|
|
|
, zlib
|
2022-05-21 04:39:54 +00:00
|
|
|
, eigen
|
2021-01-05 16:28:38 +00:00
|
|
|
}:
|
|
|
|
|
|
|
|
stdenv.mkDerivation rec {
|
|
|
|
pname = "libsurvive";
|
2022-07-31 21:17:41 +00:00
|
|
|
version = "1.01";
|
2021-01-05 16:28:38 +00:00
|
|
|
|
|
|
|
src = fetchFromGitHub {
|
|
|
|
owner = "cntools";
|
|
|
|
repo = pname;
|
|
|
|
rev = "v${version}";
|
2022-05-21 04:39:54 +00:00
|
|
|
# Fixes 'Unknown CMake command "cnkalman_generate_code"'
|
|
|
|
fetchSubmodules = true;
|
2024-07-14 10:59:26 +00:00
|
|
|
hash = "sha256-NcxdTKra+YkLt/iu9+1QCeQZLV3/qlhma2Ns/+ZYVsk=";
|
2021-01-05 16:28:38 +00:00
|
|
|
};
|
|
|
|
|
|
|
|
nativeBuildInputs = [ cmake pkg-config ];
|
|
|
|
|
|
|
|
buildInputs = [
|
2024-06-20 04:39:23 +00:00
|
|
|
libglut
|
2021-11-13 10:55:00 +00:00
|
|
|
lapack
|
2021-01-05 16:28:38 +00:00
|
|
|
libusb1
|
2021-11-13 10:55:00 +00:00
|
|
|
blas
|
2021-01-05 16:28:38 +00:00
|
|
|
zlib
|
2022-05-21 04:39:54 +00:00
|
|
|
eigen
|
2021-01-05 16:28:38 +00:00
|
|
|
];
|
|
|
|
|
2022-05-17 12:39:47 +00:00
|
|
|
# https://github.com/cntools/libsurvive/issues/272
|
|
|
|
postPatch = ''
|
|
|
|
substituteInPlace survive.pc.in \
|
2022-09-28 16:03:44 +00:00
|
|
|
libs/cnkalman/cnkalman.pc.in libs/cnkalman/libs/cnmatrix/cnmatrix.pc.in \
|
2022-05-17 12:39:47 +00:00
|
|
|
--replace '$'{exec_prefix}/@CMAKE_INSTALL_LIBDIR@ @CMAKE_INSTALL_FULL_LIBDIR@
|
|
|
|
'';
|
|
|
|
|
2021-01-21 17:00:13 +00:00
|
|
|
meta = with lib; {
|
2021-01-05 16:28:38 +00:00
|
|
|
description = "Open Source Lighthouse Tracking System";
|
|
|
|
homepage = "https://github.com/cntools/libsurvive";
|
|
|
|
license = licenses.mit;
|
2024-11-08 04:56:36 +00:00
|
|
|
maintainers = with maintainers; [ prusnak ];
|
2021-01-05 16:28:38 +00:00
|
|
|
platforms = platforms.linux;
|
|
|
|
};
|
|
|
|
}
|