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/; };