diff options
author | Guillaume Girol <symphorien+git@xlumurb.eu> | 2024-04-03 12:00:00 +0000 |
---|---|---|
committer | Guillaume Girol <symphorien+git@xlumurb.eu> | 2024-04-03 12:00:00 +0000 |
commit | 5ff10ee902e80132c5e92321a03452cd7b0d403b (patch) | |
tree | 9f8ad1a5f8f5ff3b758672f47223a90ee94e0637 /pkgs/applications/science | |
parent | 5a610c5f8d00da3e05694ae5b5fa0b4abc81218f (diff) |
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
Diffstat (limited to 'pkgs/applications/science')
-rw-r--r-- | pkgs/applications/science/logic/symfpu/default.nix | 29 |
1 files changed, 26 insertions, 3 deletions
diff --git a/pkgs/applications/science/logic/symfpu/default.nix b/pkgs/applications/science/logic/symfpu/default.nix index af61b7c617c78..2c83793114a15 100644 --- a/pkgs/applications/science/logic/symfpu/default.nix +++ b/pkgs/applications/science/logic/symfpu/default.nix @@ -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; { |