Merge pull request #119126 from fabaff/pycomfoconnect
[NixPkgs.git] / pkgs / development / compilers / picat / default.nix
blob159dec05e2939a365dbbabd88762ddf713b30a81
1 { lib, stdenv, fetchurl, zlib }:
3 let
4   ARCH = {
5     i686-linux    = "linux32";
6     x86_64-linux  = "linux64";
7     aarch64-linux = "linux64";
8   }."${stdenv.hostPlatform.system}" or (throw "Unsupported system: ${stdenv.hostPlatform.system}");
9 in
10 stdenv.mkDerivation {
11   pname = "picat";
12   version = "3.0p4";
14   src = fetchurl {
15     url    = "http://picat-lang.org/download/picat30_4_src.tar.gz";
16     sha256 = "1rwin44m7ni2h2v51sh2r8gj2k6wm6f86zgaylrria9jr57inpqj";
17   };
19   buildInputs = [ zlib ];
21   inherit ARCH;
23   hardeningDisable = [ "format" ];
24   enableParallelBuilding = true;
26   buildPhase = "cd emu && make -j $NIX_BUILD_CORES -f Makefile.$ARCH";
27   installPhase = "mkdir -p $out/bin && cp picat $out/bin/picat";
29   meta = with lib; {
30     description = "Logic-based programming langage";
31     homepage    = "http://picat-lang.org/";
32     license     = licenses.mpl20;
33     platforms   = platforms.linux;
34     maintainers = with maintainers; [ earldouglas thoughtpolice ];
35   };