Some checks failed
Periodic Merges (6h) / master → staging-nixos (push) Failing after 12m50s
Periodic Merges (6h) / master → staging-next (push) Failing after 12m54s
Periodic Merges (24h) / merge-base(master,staging) → haskell-updates (push) Failing after 11m54s
Periodic Merges (6h) / staging-next → staging (push) Failing after 12m13s
Periodic Merges (24h) / staging-next-25.05 → staging-25.05 (push) Failing after 13m24s
Periodic Merges (24h) / release-25.05 → staging-next-25.05 (push) Failing after 14m28s
48 lines
1.2 KiB
Nix
48 lines
1.2 KiB
Nix
{
|
|
lib,
|
|
stdenv,
|
|
fetchpatch,
|
|
fetchFromGitHub,
|
|
gtest,
|
|
}:
|
|
|
|
stdenv.mkDerivation (finalAttrs: {
|
|
pname = "libnop";
|
|
version = "0-unstable-2022-09-04";
|
|
|
|
src = fetchFromGitHub {
|
|
owner = "luxonis";
|
|
repo = "libnop";
|
|
rev = "ab842f51dc2eb13916dc98417c2186b78320ed10";
|
|
sha256 = "sha256-d2z/lDI9pe5TR82MxGkR9bBMNXPvzqb9Gsd5jOv6x1A=";
|
|
};
|
|
|
|
patches = [
|
|
# System install
|
|
# https://github.com/luxonis/libnop/pull/6/commits/ae29a8772f38fdb1efc24af9ec2e3f6814eb2158.patch
|
|
./001-system-install.patch
|
|
# Fix template warning
|
|
# https://github.com/luxonis/libnop/pull/6/commits/199978a0fb0dc31de43b80f7504b53958fd202ee.patch
|
|
./002-fix-template-warning.patch
|
|
];
|
|
|
|
nativeBuildInputs = [ gtest ];
|
|
|
|
# Add optimization flags to address _FORTIFY_SOURCE warning
|
|
NIX_CFLAGS_COMPILE = [ "-O1" ];
|
|
|
|
installPhase = ''
|
|
runHook preInstall
|
|
make INSTALL_PREFIX=$out install
|
|
runHook postInstall
|
|
'';
|
|
|
|
meta = {
|
|
description = "Fast, header-only C++ serialization library";
|
|
homepage = "https://github.com/google/libnop";
|
|
license = lib.licenses.asl20;
|
|
platforms = lib.platforms.all;
|
|
maintainers = with lib.maintainers; [ phodina ];
|
|
};
|
|
})
|