1 { fetchFromGitHub, lib, stdenv, makeWrapper, unzip, libxml2, m4, uthash, which }:
3 stdenv.mkDerivation rec {
7 src = fetchFromGitHub {
11 sha256 = "14r9bjw6lgz85a59a4ajspvg12swiqxi17zicl8r7p29pi9lsibp";
12 fetchSubmodules = true;
16 # we dont rely on build.sh :
17 export PATH="$PWD/bin:$PATH" # needed to have zcc in testsuite
18 export ZCCCFG=$PWD/lib/config/
19 # we don't want to build zsdcc since it required network (svn)
20 # we test in checkPhase
21 substituteInPlace Makefile \
22 --replace 'testsuite bin/z88dk-lib$(EXESUFFIX)' 'bin/z88dk-lib$(EXESUFFIX)'\
23 --replace 'ALL_EXT = bin/zsdcc$(EXESUFFIX)' 'ALL_EXT ='
29 #failed on Issue_1105_function_pointer_calls
30 doCheck = stdenv.hostPlatform.system != "aarch64-linux";
32 #_FORTIFY_SOURCE requires compiling with optimization (-O)
33 NIX_CFLAGS_COMPILE = "-O";
35 short_rev = builtins.substring 0 7 src.rev;
37 "git_rev=${short_rev}"
43 nativeBuildInputs = [ which makeWrapper unzip ];
44 buildInputs = [ libxml2 m4 uthash ];
47 mkdir -p $out/{bin,share}
50 installTargets = [ "libs" "install" ];
53 homepage = "https://www.z88dk.org";
54 description = "z80 Development Kit";
55 license = licenses.clArtistic;
56 maintainers = [ maintainers.siraben ];
57 platforms = platforms.unix;