summary refs log tree commit diff
diff options
context:
space:
mode:
authorBen Siraphob <bensiraphob@gmail.com>2022-04-07 00:18:09 -0500
committerBen Siraphob <bensiraphob@gmail.com>2022-05-30 14:54:36 -0700
commitab76f3220da5b6cfdf39f16683ec4be53299fc79 (patch)
tree93e1749de03d414bf45e58e7bfd35589df7fa9c6
parenta3fdbc61a065de375b517f677b1aaf7b5e6e1fbd (diff)
downloadnixpkgs-ab76f3220da5b6cfdf39f16683ec4be53299fc79.tar
nixpkgs-ab76f3220da5b6cfdf39f16683ec4be53299fc79.tar.gz
nixpkgs-ab76f3220da5b6cfdf39f16683ec4be53299fc79.tar.bz2
nixpkgs-ab76f3220da5b6cfdf39f16683ec4be53299fc79.tar.lz
nixpkgs-ab76f3220da5b6cfdf39f16683ec4be53299fc79.tar.xz
nixpkgs-ab76f3220da5b6cfdf39f16683ec4be53299fc79.tar.zst
nixpkgs-ab76f3220da5b6cfdf39f16683ec4be53299fc79.zip
xedit: fix build on darwin
-rw-r--r--pkgs/applications/editors/xedit/default.nix9
1 files changed, 8 insertions, 1 deletions
diff --git a/pkgs/applications/editors/xedit/default.nix b/pkgs/applications/editors/xedit/default.nix
index 5de0aed3404..539ef5087c7 100644
--- a/pkgs/applications/editors/xedit/default.nix
+++ b/pkgs/applications/editors/xedit/default.nix
@@ -22,6 +22,13 @@ stdenv.mkDerivation rec {
     sha256 = "0b5ic13aasv6zh20v2k7zyxsqbnsxfq5rs3w8nwzl1gklmgrjxa3";
   };
 
+  # ./lisp/mathimp.c:493:10: error: implicitly declaring library function 'finite' with type 'int (double)'
+  postPatch = lib.optionalString stdenv.isDarwin ''
+    for i in $(find . -type f -name "*.c"); do
+      substituteInPlace $i --replace "finite" "isfinite"
+    done
+  '';
+
   nativeBuildInputs = [ autoreconfHook pkg-config utilmacros ];
   buildInputs = [
     libX11
@@ -40,6 +47,6 @@ stdenv.mkDerivation rec {
     homepage = "https://gitlab.freedesktop.org/xorg/app/xedit";
     license = with licenses; [ mit ];
     maintainers = with maintainers; [ shamilton ];
-    platforms = platforms.linux;
+    platforms = platforms.unix;
   };
 }