2024-10-06 19:14:57 +01:00
|
|
|
{
|
|
|
|
lib,
|
|
|
|
stdenv,
|
|
|
|
fetchFromGitHub,
|
|
|
|
}:
|
2017-01-24 14:23:15 +00:00
|
|
|
|
|
|
|
stdenv.mkDerivation {
|
2021-06-22 14:21:29 +01:00
|
|
|
pname = "blocksruntime";
|
2024-10-06 19:14:57 +01:00
|
|
|
version = "unstable-2017-10-28";
|
2017-01-24 14:23:15 +00:00
|
|
|
|
|
|
|
src = fetchFromGitHub {
|
|
|
|
owner = "mackyle";
|
|
|
|
repo = "blocksruntime";
|
2024-10-06 19:14:57 +01:00
|
|
|
rev = "9cc93ae2b58676c23fd02cf0c686fa15b7a3ff81";
|
|
|
|
sha256 = "sha256-pQMNZBgkF4uADOVCWXB5J3qQt8JMe8vo6ZmbtSVA5Xo=";
|
2017-01-24 14:23:15 +00:00
|
|
|
};
|
|
|
|
|
2024-10-06 19:14:57 +01:00
|
|
|
buildPhase = ''
|
|
|
|
runHook preBuild
|
|
|
|
./buildlib ${lib.optionalString (!stdenv.hostPlatform.isStatic) "-shared"}
|
|
|
|
runHook postBuild
|
2017-01-24 14:23:15 +00:00
|
|
|
'';
|
|
|
|
|
2024-10-06 19:14:57 +01:00
|
|
|
installPhase = ''
|
|
|
|
runHook preInstall
|
|
|
|
prefix="/" DESTDIR=$out ./installlib ${
|
|
|
|
if stdenv.hostPlatform.isStatic then "-static" else "-shared"
|
|
|
|
}
|
|
|
|
runHook postInstall
|
|
|
|
'';
|
2017-01-24 14:23:15 +00:00
|
|
|
|
2024-10-06 19:14:57 +01:00
|
|
|
checkPhase = ''
|
|
|
|
runHook preCheck
|
|
|
|
./checktests
|
|
|
|
runHook postChck
|
|
|
|
'';
|
2017-01-24 14:23:15 +00:00
|
|
|
|
|
|
|
doCheck = false; # hasdescriptor.c test fails, hrm.
|
|
|
|
|
2021-01-21 17:00:13 +00:00
|
|
|
meta = with lib; {
|
2020-06-27 10:37:16 +01:00
|
|
|
description = "Installs the BlocksRuntime library from the compiler-rt";
|
|
|
|
homepage = "https://github.com/mackyle/blocksruntime";
|
|
|
|
license = licenses.mit;
|
|
|
|
};
|
2017-01-24 14:23:15 +00:00
|
|
|
}
|