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