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
44 lines
1.2 KiB
Nix
44 lines
1.2 KiB
Nix
{
|
|
lib,
|
|
stdenv,
|
|
fetchFromGitHub,
|
|
cmake,
|
|
}:
|
|
|
|
stdenv.mkDerivation (finalAttrs: {
|
|
pname = "epoll-shim";
|
|
version = "0.0.20240608";
|
|
|
|
src = fetchFromGitHub {
|
|
owner = "jiixyj";
|
|
repo = "epoll-shim";
|
|
rev = "v${finalAttrs.version}";
|
|
hash = "sha256-PIVzVjXOECGv41KtAUmGzUiQ+4lVIyzGEOzVQQ1Pc54=";
|
|
};
|
|
|
|
nativeBuildInputs = [
|
|
cmake
|
|
];
|
|
|
|
cmakeFlags = [
|
|
"-DCMAKE_INSTALL_PKGCONFIGDIR=${placeholder "out"}/lib/pkgconfig"
|
|
"-DBUILD_TESTING=${lib.boolToString finalAttrs.finalPackage.doCheck}"
|
|
]
|
|
++ lib.optionals (stdenv.buildPlatform != stdenv.hostPlatform && stdenv.hostPlatform.isFreeBSD) [
|
|
# fails in cross configurations for not being able to detect this value
|
|
"-DALLOWS_ONESHOT_TIMERS_WITH_TIMEOUT_ZERO=YES"
|
|
];
|
|
|
|
# https://github.com/jiixyj/epoll-shim/issues/41
|
|
# https://github.com/jiixyj/epoll-shim/pull/34
|
|
doCheck = !stdenv.hostPlatform.isDarwin;
|
|
|
|
meta = with lib; {
|
|
description = "Small epoll implementation using kqueue";
|
|
homepage = "https://github.com/jiixyj/epoll-shim";
|
|
license = licenses.mit;
|
|
platforms = platforms.darwin ++ platforms.freebsd ++ platforms.netbsd ++ platforms.openbsd;
|
|
maintainers = with maintainers; [ wegank ];
|
|
};
|
|
})
|