diff --git a/pkgs/by-name/pi/picat/package.nix b/pkgs/by-name/pi/picat/package.nix index 7aeeb75be2e7..839161187d46 100644 --- a/pkgs/by-name/pi/picat/package.nix +++ b/pkgs/by-name/pi/picat/package.nix @@ -5,8 +5,18 @@ zlib, }: -let - ARCH = +stdenv.mkDerivation { + pname = "picat"; + version = "3.8#7"; + + src = fetchurl { + url = "https://picat-lang.org/download/picat387_src.tar.gz"; + hash = "sha256-H+aFmagdb7jU4LZCYrNPa4ZWVB1ziiJHrUe4b1ImWks="; + }; + + buildInputs = [ zlib ]; + + env.ARCH = { x86_64-linux = "linux64"; aarch64-linux = "linux64"; @@ -15,39 +25,36 @@ let aarch64-darwin = "mac64"; } ."${stdenv.hostPlatform.system}" or (throw "Unsupported system: ${stdenv.hostPlatform.system}"); -in -stdenv.mkDerivation { - pname = "picat"; - version = "3.6#8"; - - src = fetchurl { - url = "http://picat-lang.org/download/picat368_src.tar.gz"; - hash = "sha256-eJxF5atvJq3fhFltcQCGTP/sgUmfsfCohUgm3x2U1n0="; - }; - - buildInputs = [ zlib ]; - - inherit ARCH; hardeningDisable = [ "format" ]; + enableParallelBuilding = true; buildPhase = '' + runHook preBuild + cd emu make -j $NIX_BUILD_CORES -f Makefile.$ARCH + + runHook postBuild ''; + installPhase = '' + runHook preInstall + mkdir -p $out/bin $out/share cp picat $out/bin/ cp -r ../doc $out/share/doc cp -r ../exs $out/share/examples + + runHook postInstall ''; - meta = with lib; { + meta = { description = "Logic-based programming language"; mainProgram = "picat"; homepage = "http://picat-lang.org/"; - license = licenses.mpl20; + license = lib.licenses.mpl20; platforms = [ "x86_64-linux" "aarch64-linux" @@ -55,7 +62,7 @@ stdenv.mkDerivation { "x86_64-darwin" "aarch64-darwin" ]; - maintainers = with maintainers; [ + maintainers = with lib.maintainers; [ earldouglas thoughtpolice ];