mirror of
https://github.com/NixOS/nixpkgs.git
synced 2025-02-02 02:03:21 +00:00
symfpu: install headers in $out/include, add a pkg-config file
bitwuzla switched to meson, and I found no other way to have meson find symfpu
This commit is contained in:
parent
5a610c5f8d
commit
5ff10ee902
@ -1,4 +1,4 @@
|
||||
{ lib, stdenv, fetchFromGitHub }:
|
||||
{ lib, stdenv, fetchFromGitHub, copyPkgconfigItems, makePkgconfigItem }:
|
||||
|
||||
stdenv.mkDerivation rec {
|
||||
pname = "symfpu";
|
||||
@ -11,9 +11,32 @@ stdenv.mkDerivation rec {
|
||||
sha256 = "1jf5lkn67q136ppfacw3lsry369v7mdr1rhidzjpbz18jfy9zl9q";
|
||||
};
|
||||
|
||||
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";
|
||||
};
|
||||
|
||||
installPhase = ''
|
||||
mkdir -p $out/symfpu
|
||||
cp -r * $out/symfpu/
|
||||
runHook preInstall
|
||||
|
||||
mkdir -p $out/include/symfpu
|
||||
cp -r * $out/include/symfpu/
|
||||
|
||||
runHook postInstall
|
||||
'';
|
||||
|
||||
meta = with lib; {
|
||||
|
Loading…
Reference in New Issue
Block a user