icon-lang: rework to support darwin and building without graphics
This commit is contained in:
parent
2ea8d578e0
commit
31d1ce7e64
@ -1,19 +1,24 @@
|
|||||||
{ stdenv, fetchFromGitHub, libX11, libXt }:
|
{ stdenv, fetchFromGitHub, libX11, libXt , withGraphics ? true }:
|
||||||
|
|
||||||
stdenv.mkDerivation rec {
|
stdenv.mkDerivation rec {
|
||||||
name = "icon-lang-${version}";
|
name = "icon-lang-${version}";
|
||||||
version = "9.5.1";
|
version = "9.5.1";
|
||||||
src = fetchFromGitHub {
|
src = fetchFromGitHub {
|
||||||
rev = "39d7438e8d23ccfe20c0af8bbbf61e34d9c715e9";
|
|
||||||
owner = "gtownsend";
|
owner = "gtownsend";
|
||||||
repo = "icon";
|
repo = "icon";
|
||||||
|
rev = "rel${builtins.replaceStrings ["."] [""] version}";
|
||||||
sha256 = "1gkvj678ldlr1m5kjhx6zpmq11nls8kxa7pyy64whgakfzrypynw";
|
sha256 = "1gkvj678ldlr1m5kjhx6zpmq11nls8kxa7pyy64whgakfzrypynw";
|
||||||
};
|
};
|
||||||
buildInputs = [ libX11 libXt ];
|
|
||||||
|
|
||||||
configurePhase = ''
|
buildInputs = stdenv.lib.optionals withGraphics [ libX11 libXt ];
|
||||||
make X-Configure name=linux
|
|
||||||
'';
|
configurePhase =
|
||||||
|
let
|
||||||
|
_name = if stdenv.isDarwin then "macintosh" else "linux";
|
||||||
|
in
|
||||||
|
''
|
||||||
|
make ${stdenv.lib.optionalString withGraphics "X-"}Configure name=${_name}
|
||||||
|
'';
|
||||||
|
|
||||||
installPhase = ''
|
installPhase = ''
|
||||||
make Install dest=$out
|
make Install dest=$out
|
||||||
@ -21,8 +26,8 @@ stdenv.mkDerivation rec {
|
|||||||
|
|
||||||
meta = with stdenv.lib; {
|
meta = with stdenv.lib; {
|
||||||
description = ''A very high level general-purpose programming language'';
|
description = ''A very high level general-purpose programming language'';
|
||||||
maintainers = with maintainers; [ vrthra ];
|
maintainers = with maintainers; [ vrthra yurrriq ];
|
||||||
platforms = platforms.linux;
|
platforms = with platforms; linux ++ darwin;
|
||||||
license = licenses.publicDomain;
|
license = licenses.publicDomain;
|
||||||
homepage = https://www.cs.arizona.edu/icon/;
|
homepage = https://www.cs.arizona.edu/icon/;
|
||||||
};
|
};
|
||||||
|
Loading…
x
Reference in New Issue
Block a user