2020-02-21 11:19:25 +00:00
|
|
|
{ stdenv, fetchFromGitHub, fetchpatch, libX11, libXt, withGraphics ? true }:
|
2016-06-07 08:55:33 +01:00
|
|
|
|
|
|
|
stdenv.mkDerivation rec {
|
2019-08-15 13:41:18 +01:00
|
|
|
pname = "icon-lang";
|
2016-06-07 08:55:33 +01:00
|
|
|
version = "9.5.1";
|
|
|
|
src = fetchFromGitHub {
|
|
|
|
owner = "gtownsend";
|
|
|
|
repo = "icon";
|
2019-01-10 05:50:35 +00:00
|
|
|
rev = "rel${builtins.replaceStrings ["."] [""] version}";
|
2016-06-07 08:55:33 +01:00
|
|
|
sha256 = "1gkvj678ldlr1m5kjhx6zpmq11nls8kxa7pyy64whgakfzrypynw";
|
|
|
|
};
|
|
|
|
|
2019-01-10 05:50:35 +00:00
|
|
|
buildInputs = stdenv.lib.optionals withGraphics [ libX11 libXt ];
|
|
|
|
|
2020-02-21 11:19:25 +00:00
|
|
|
patches = [
|
|
|
|
# Patch on git master, likely won't be necessary in future release
|
|
|
|
(fetchpatch {
|
|
|
|
url = "https://github.com/gtownsend/icon/commit/bfc4a6004d0d3984c8066289b8d8e563640c4ddd.patch";
|
|
|
|
sha256 = "1pqapjghk10rb73a1mfflki2wipjy4kvnravhmrilkqzb9hd6v8m";
|
|
|
|
excludes = [
|
|
|
|
"doc/relnotes.htm"
|
|
|
|
"src/h/version.h"
|
|
|
|
];
|
|
|
|
})
|
|
|
|
];
|
|
|
|
|
2019-01-10 05:50:35 +00:00
|
|
|
configurePhase =
|
|
|
|
let
|
|
|
|
_name = if stdenv.isDarwin then "macintosh" else "linux";
|
|
|
|
in
|
|
|
|
''
|
|
|
|
make ${stdenv.lib.optionalString withGraphics "X-"}Configure name=${_name}
|
|
|
|
'';
|
2016-06-07 08:55:33 +01:00
|
|
|
|
|
|
|
installPhase = ''
|
|
|
|
make Install dest=$out
|
|
|
|
'';
|
|
|
|
|
|
|
|
meta = with stdenv.lib; {
|
|
|
|
description = ''A very high level general-purpose programming language'';
|
2019-01-10 05:50:35 +00:00
|
|
|
maintainers = with maintainers; [ vrthra yurrriq ];
|
|
|
|
platforms = with platforms; linux ++ darwin;
|
2016-06-07 08:55:33 +01:00
|
|
|
license = licenses.publicDomain;
|
2020-04-01 02:11:51 +01:00
|
|
|
homepage = "https://www.cs.arizona.edu/icon/";
|
2016-06-07 08:55:33 +01:00
|
|
|
};
|
|
|
|
}
|