From 8be3b7c1057d3cbc790c674b6f63d8a6019c1052 Mon Sep 17 00:00:00 2001 From: Austin Seipp Date: Fri, 20 Nov 2020 21:00:57 -0600 Subject: [PATCH] picat: enable on aarch64-linux Signed-off-by: Austin Seipp --- pkgs/development/compilers/picat/default.nix | 17 +++++++++-------- 1 file changed, 9 insertions(+), 8 deletions(-) diff --git a/pkgs/development/compilers/picat/default.nix b/pkgs/development/compilers/picat/default.nix index 8fe3031e6b35..4898f991079c 100644 --- a/pkgs/development/compilers/picat/default.nix +++ b/pkgs/development/compilers/picat/default.nix @@ -1,5 +1,12 @@ { stdenv, fetchurl, zlib }: +let + ARCH = { + i686-linux = "linux32"; + x86_64-linux = "linux64"; + aarch64-linux = "linux64"; + }."${stdenv.hostPlatform.system}" or (throw "Unsupported system: ${stdenv.hostPlatform.system}"); +in stdenv.mkDerivation { pname = "picat"; version = "3.0p3"; @@ -11,19 +18,13 @@ stdenv.mkDerivation { buildInputs = [ zlib ]; - ARCH = if stdenv.hostPlatform.system == "i686-linux" then "linux32" - else if stdenv.hostPlatform.system == "x86_64-linux" then "linux64" - else throw "Unsupported system"; + inherit ARCH; hardeningDisable = [ "format" ]; enableParallelBuilding = true; buildPhase = "cd emu && make -j $NIX_BUILD_CORES -f Makefile.$ARCH"; - - installPhase = '' - mkdir -p $out/bin - cp picat $out/bin/picat - ''; + installPhase = "mkdir -p $out/bin && cp picat $out/bin/picat"; meta = with stdenv.lib; { description = "Logic-based programming langage";