2021-02-05 17:12:51 +00:00
|
|
|
{ lib, stdenv
|
2021-01-09 10:05:03 +00:00
|
|
|
, fetchFromGitHub
|
|
|
|
, cmake
|
|
|
|
, pkg-config
|
2024-07-27 06:49:29 +00:00
|
|
|
, libglut
|
2022-01-13 20:06:32 +00:00
|
|
|
, lapack
|
2021-01-09 10:05:03 +00:00
|
|
|
, libusb1
|
2022-01-13 20:06:32 +00:00
|
|
|
, blas
|
2021-01-09 10:05:03 +00:00
|
|
|
, zlib
|
2022-06-16 17:23:12 +00:00
|
|
|
, eigen
|
2021-01-09 10:05:03 +00:00
|
|
|
}:
|
|
|
|
|
|
|
|
stdenv.mkDerivation rec {
|
|
|
|
pname = "libsurvive";
|
2022-08-12 12:06:08 +00:00
|
|
|
version = "1.01";
|
2021-01-09 10:05:03 +00:00
|
|
|
|
|
|
|
src = fetchFromGitHub {
|
|
|
|
owner = "cntools";
|
|
|
|
repo = pname;
|
|
|
|
rev = "v${version}";
|
2022-06-16 17:23:12 +00:00
|
|
|
# Fixes 'Unknown CMake command "cnkalman_generate_code"'
|
|
|
|
fetchSubmodules = true;
|
2024-07-27 06:49:29 +00:00
|
|
|
hash = "sha256-NcxdTKra+YkLt/iu9+1QCeQZLV3/qlhma2Ns/+ZYVsk=";
|
2021-01-09 10:05:03 +00:00
|
|
|
};
|
|
|
|
|
|
|
|
nativeBuildInputs = [ cmake pkg-config ];
|
|
|
|
|
|
|
|
buildInputs = [
|
2024-07-27 06:49:29 +00:00
|
|
|
libglut
|
2022-01-13 20:06:32 +00:00
|
|
|
lapack
|
2021-01-09 10:05:03 +00:00
|
|
|
libusb1
|
2022-01-13 20:06:32 +00:00
|
|
|
blas
|
2021-01-09 10:05:03 +00:00
|
|
|
zlib
|
2022-06-16 17:23:12 +00:00
|
|
|
eigen
|
2021-01-09 10:05:03 +00:00
|
|
|
];
|
|
|
|
|
2022-09-30 11:47:45 +00:00
|
|
|
# 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@
|
|
|
|
'';
|
|
|
|
|
2021-02-05 17:12:51 +00:00
|
|
|
meta = with lib; {
|
2021-01-09 10:05:03 +00:00
|
|
|
description = "Open Source Lighthouse Tracking System";
|
|
|
|
homepage = "https://github.com/cntools/libsurvive";
|
|
|
|
license = licenses.mit;
|
|
|
|
maintainers = with maintainers; [ expipiplus1 prusnak ];
|
|
|
|
platforms = platforms.linux;
|
|
|
|
};
|
|
|
|
}
|