about summary refs log tree commit diff
diff options
context:
space:
mode:
authorEric Bailey <eric@ericb.me>2019-01-09 23:50:35 -0600
committerEric Bailey <eric@ericb.me>2019-08-07 14:09:15 -0500
commit31d1ce7e643ae60cc3d801252408fbbc06781b34 (patch)
tree32d91e70ac5ff29262992e4067c4de867b9e83b7
parent2ea8d578e069f571365a6acd26cb099bef85a0e6 (diff)
downloadnixlib-31d1ce7e643ae60cc3d801252408fbbc06781b34.tar
nixlib-31d1ce7e643ae60cc3d801252408fbbc06781b34.tar.gz
nixlib-31d1ce7e643ae60cc3d801252408fbbc06781b34.tar.bz2
nixlib-31d1ce7e643ae60cc3d801252408fbbc06781b34.tar.lz
nixlib-31d1ce7e643ae60cc3d801252408fbbc06781b34.tar.xz
nixlib-31d1ce7e643ae60cc3d801252408fbbc06781b34.tar.zst
nixlib-31d1ce7e643ae60cc3d801252408fbbc06781b34.zip
icon-lang: rework to support darwin and building without graphics
-rw-r--r--pkgs/development/interpreters/icon-lang/default.nix21
1 files changed, 13 insertions, 8 deletions
diff --git a/pkgs/development/interpreters/icon-lang/default.nix b/pkgs/development/interpreters/icon-lang/default.nix
index 3bec73ea0369..56becd3d6c94 100644
--- a/pkgs/development/interpreters/icon-lang/default.nix
+++ b/pkgs/development/interpreters/icon-lang/default.nix
@@ -1,19 +1,24 @@
-{ stdenv, fetchFromGitHub, libX11, libXt }:
+{ stdenv, fetchFromGitHub, libX11, libXt , withGraphics ? true }:
 
 stdenv.mkDerivation rec {
   name = "icon-lang-${version}";
   version = "9.5.1";
   src = fetchFromGitHub {
-    rev = "39d7438e8d23ccfe20c0af8bbbf61e34d9c715e9";
     owner = "gtownsend";
     repo = "icon";
+    rev = "rel${builtins.replaceStrings ["."] [""] version}";
     sha256 = "1gkvj678ldlr1m5kjhx6zpmq11nls8kxa7pyy64whgakfzrypynw";
   };
-  buildInputs = [ libX11 libXt ];
 
-  configurePhase = ''
-    make X-Configure name=linux
-  '';
+  buildInputs = stdenv.lib.optionals withGraphics [ libX11 libXt ];
+
+  configurePhase =
+    let
+      _name = if stdenv.isDarwin then "macintosh" else "linux";
+    in
+    ''
+      make ${stdenv.lib.optionalString withGraphics "X-"}Configure name=${_name}
+    '';
 
   installPhase = ''
     make Install dest=$out
@@ -21,8 +26,8 @@ stdenv.mkDerivation rec {
 
   meta = with stdenv.lib; {
     description = ''A very high level general-purpose programming language'';
-    maintainers = with maintainers; [ vrthra ];
-    platforms = platforms.linux;
+    maintainers = with maintainers; [ vrthra yurrriq ];
+    platforms = with platforms; linux ++ darwin;
     license = licenses.publicDomain;
     homepage = https://www.cs.arizona.edu/icon/;
   };