2020-04-24 23:36:52 +00:00
|
|
|
{ stdenv, fetchurl, zlib }:
|
|
|
|
|
2020-11-21 19:51:51 +00:00
|
|
|
let
|
|
|
|
ARCH = {
|
|
|
|
i686-linux = "linux32";
|
|
|
|
x86_64-linux = "linux64";
|
|
|
|
aarch64-linux = "linux64";
|
|
|
|
}."${stdenv.hostPlatform.system}" or (throw "Unsupported system: ${stdenv.hostPlatform.system}");
|
|
|
|
in
|
2020-04-24 23:36:52 +00:00
|
|
|
stdenv.mkDerivation {
|
|
|
|
pname = "picat";
|
2020-11-21 19:51:51 +00:00
|
|
|
version = "3.0p3";
|
2020-04-24 23:36:52 +00:00
|
|
|
|
|
|
|
src = fetchurl {
|
2020-11-21 19:51:51 +00:00
|
|
|
url = "http://picat-lang.org/download/picat30_3_src.tar.gz";
|
|
|
|
sha256 = "052w0vk2xfmky5nv280ysb8in6vaph7i79yvbddqmahzszarq5hw";
|
2020-04-24 23:36:52 +00:00
|
|
|
};
|
|
|
|
|
|
|
|
buildInputs = [ zlib ];
|
|
|
|
|
2020-11-21 19:51:51 +00:00
|
|
|
inherit ARCH;
|
2020-04-24 23:36:52 +00:00
|
|
|
|
|
|
|
hardeningDisable = [ "format" ];
|
2020-10-07 09:15:18 +00:00
|
|
|
enableParallelBuilding = true;
|
2020-04-24 23:36:52 +00:00
|
|
|
|
2020-11-21 19:51:51 +00:00
|
|
|
buildPhase = "cd emu && make -j $NIX_BUILD_CORES -f Makefile.$ARCH";
|
|
|
|
installPhase = "mkdir -p $out/bin && cp picat $out/bin/picat";
|
2020-04-24 23:36:52 +00:00
|
|
|
|
2020-11-21 19:51:51 +00:00
|
|
|
meta = with stdenv.lib; {
|
2020-04-24 23:36:52 +00:00
|
|
|
description = "Logic-based programming langage";
|
2020-11-21 19:51:51 +00:00
|
|
|
homepage = "http://picat-lang.org/";
|
|
|
|
license = licenses.mpl20;
|
|
|
|
platforms = platforms.linux;
|
|
|
|
maintainers = with maintainers; [ earldouglas thoughtpolice ];
|
2020-04-24 23:36:52 +00:00
|
|
|
};
|
|
|
|
}
|