2024-04-21 15:54:59 +00:00
|
|
|
{ lib, stdenv, fetchFromGitHub, copyPkgconfigItems, makePkgconfigItem }:
|
2022-04-15 01:41:22 +00:00
|
|
|
|
|
|
|
stdenv.mkDerivation rec {
|
|
|
|
pname = "symfpu";
|
|
|
|
version = "unstable-2019-05-17";
|
|
|
|
|
|
|
|
src = fetchFromGitHub {
|
|
|
|
owner = "martin-cs";
|
|
|
|
repo = "symfpu";
|
|
|
|
rev = "8fbe139bf0071cbe0758d2f6690a546c69ff0053";
|
|
|
|
sha256 = "1jf5lkn67q136ppfacw3lsry369v7mdr1rhidzjpbz18jfy9zl9q";
|
|
|
|
};
|
|
|
|
|
2024-04-21 15:54:59 +00:00
|
|
|
nativeBuildInputs = [ copyPkgconfigItems ];
|
|
|
|
|
|
|
|
pkgconfigItems = [
|
|
|
|
(makePkgconfigItem {
|
|
|
|
name = "symfpu";
|
|
|
|
inherit version;
|
|
|
|
cflags = [ "-I\${includedir}" ];
|
|
|
|
variables = {
|
|
|
|
includedir = "@includedir@";
|
|
|
|
};
|
|
|
|
inherit (meta) description;
|
|
|
|
})
|
|
|
|
];
|
|
|
|
|
|
|
|
env = {
|
|
|
|
# copyPkgconfigItems will substitute this in the pkg-config file
|
|
|
|
includedir = "${placeholder "out"}/include";
|
|
|
|
};
|
|
|
|
|
2022-04-15 01:41:22 +00:00
|
|
|
installPhase = ''
|
2024-04-21 15:54:59 +00:00
|
|
|
runHook preInstall
|
|
|
|
|
|
|
|
mkdir -p $out/include/symfpu
|
|
|
|
cp -r * $out/include/symfpu/
|
|
|
|
|
|
|
|
runHook postInstall
|
2022-04-15 01:41:22 +00:00
|
|
|
'';
|
|
|
|
|
|
|
|
meta = with lib; {
|
|
|
|
description = "A (concrete or symbolic) implementation of IEEE-754 / SMT-LIB floating-point";
|
|
|
|
homepage = "https://github.com/martin-cs/symfpu";
|
|
|
|
license = licenses.gpl3Only;
|
|
|
|
platforms = platforms.unix;
|
|
|
|
maintainers = with maintainers; [ shadaj ];
|
|
|
|
};
|
|
|
|
}
|