nixpkgs/pkgs/by-name/li/libsurvive/package.nix

Ignoring revisions in .git-blame-ignore-revs. Click here to bypass and see the normal blame view.

52 lines
1.1 KiB
Nix
Raw Normal View History

{ lib, stdenv
2021-01-05 16:28:38 +00:00
, fetchFromGitHub
, cmake
, pkg-config
, libglut
, lapack
2021-01-05 16:28:38 +00:00
, libusb1
, blas
2021-01-05 16:28:38 +00:00
, zlib
, 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}";
# Fixes 'Unknown CMake command "cnkalman_generate_code"'
fetchSubmodules = true;
hash = "sha256-NcxdTKra+YkLt/iu9+1QCeQZLV3/qlhma2Ns/+ZYVsk=";
2021-01-05 16:28:38 +00:00
};
nativeBuildInputs = [ cmake pkg-config ];
buildInputs = [
libglut
lapack
2021-01-05 16:28:38 +00:00
libusb1
blas
2021-01-05 16:28:38 +00:00
zlib
eigen
2021-01-05 16:28:38 +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@
'';
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;
maintainers = with maintainers; [ prusnak ];
2021-01-05 16:28:38 +00:00
platforms = platforms.linux;
};
}