summary refs log tree commit diff
path: root/pkgs/development/tools/parsing/jikespg
diff options
context:
space:
mode:
authorBen Siraphob <bensiraphob@gmail.com>2021-03-08 23:23:18 +0700
committerBen Siraphob <bensiraphob@gmail.com>2021-03-09 09:16:10 +0700
commit0be95fbe46b23fc790e6db9c5f4e188ef8926c3a (patch)
tree0d93718b9087e8138fa116264c41664dad99cb87 /pkgs/development/tools/parsing/jikespg
parent30350ec028f41b35a309cad5c0a55e92a80adb92 (diff)
downloadnixpkgs-0be95fbe46b23fc790e6db9c5f4e188ef8926c3a.tar
nixpkgs-0be95fbe46b23fc790e6db9c5f4e188ef8926c3a.tar.gz
nixpkgs-0be95fbe46b23fc790e6db9c5f4e188ef8926c3a.tar.bz2
nixpkgs-0be95fbe46b23fc790e6db9c5f4e188ef8926c3a.tar.lz
nixpkgs-0be95fbe46b23fc790e6db9c5f4e188ef8926c3a.tar.xz
nixpkgs-0be95fbe46b23fc790e6db9c5f4e188ef8926c3a.tar.zst
nixpkgs-0be95fbe46b23fc790e6db9c5f4e188ef8926c3a.zip
jikespg: fix darwin build
Diffstat (limited to 'pkgs/development/tools/parsing/jikespg')
-rw-r--r--pkgs/development/tools/parsing/jikespg/default.nix19
1 files changed, 11 insertions, 8 deletions
diff --git a/pkgs/development/tools/parsing/jikespg/default.nix b/pkgs/development/tools/parsing/jikespg/default.nix
index 34e62886683..8179855e6eb 100644
--- a/pkgs/development/tools/parsing/jikespg/default.nix
+++ b/pkgs/development/tools/parsing/jikespg/default.nix
@@ -1,25 +1,28 @@
 {lib, stdenv, fetchurl}:
 
 stdenv.mkDerivation rec {
-  name = "jikespg-1.3";
+  pname = "jikespg";
+  version = "1.3";
 
   src = fetchurl {
-    url = "mirror://sourceforge/jikes/${name}.tar.gz";
+    url = "mirror://sourceforge/jikes/${pname}-${version}.tar.gz";
     sha256 = "083ibfxaiw1abxmv1crccx1g6sixkbyhxn2hsrlf6fwii08s6rgw";
   };
 
+  postPatch = ''
+    substituteInPlace Makefile --replace "gcc" "${stdenv.cc.targetPrefix}cc"
+  '';
+
   sourceRoot = "jikespg/src";
 
-  installPhase =
-    ''
-      mkdir -p $out/bin
-      cp jikespg $out/bin
-    '';
+  installPhase = ''
+    install -Dm755 -t $out/bin jikespg
+  '';
 
   meta = with lib; {
     homepage = "http://jikes.sourceforge.net/";
     description = "The Jikes Parser Generator";
-    platforms = platforms.linux;
+    platforms = platforms.all;
     license = licenses.ipl10;
     maintainers = with maintainers; [ pSub ];
   };