z88dk: 20180217 -> unstable-2019-05-09
This commit is contained in:
parent
3cf719f605
commit
9655dcba3d
@ -1,37 +1,46 @@
|
|||||||
{ fetchFromGitHub, fetchpatch, stdenv, makeWrapper, unzip, libxml2, m4, uthash }:
|
{ fetchFromGitHub, stdenv, makeWrapper, unzip, libxml2, m4, uthash, which }:
|
||||||
|
|
||||||
stdenv.mkDerivation rec {
|
stdenv.mkDerivation rec {
|
||||||
name = "z88dk-${version}";
|
pname = "z88dk";
|
||||||
version = "20180217";
|
version = "unstable-2019-05-09";
|
||||||
rev = "49a7c6032b2675af742f5b0b3aa5bd5260bdd814";
|
|
||||||
short_rev = "${builtins.substring 0 7 rev}";
|
|
||||||
|
|
||||||
src = fetchFromGitHub {
|
src = fetchFromGitHub {
|
||||||
owner = "z88dk";
|
owner = "z88dk";
|
||||||
repo = "z88dk";
|
repo = "z88dk";
|
||||||
inherit rev;
|
rev = "826d68632c3a7c17df88dd2ec54571a6041da69c";
|
||||||
sha256 = "00vbklh6lkq1gyd08ig2vcg6c1mghvlwfx3vq3wldf34hcs3k4pp";
|
sha256 = "104qgb01sdb97mkcxnq1cdlqi5qvjm4rd9bg5r42pdfz81ss49xj";
|
||||||
|
fetchSubmodules = true;
|
||||||
};
|
};
|
||||||
|
|
||||||
# https://github.com/z88dk/z88dk/pull/612
|
|
||||||
patches = [(fetchpatch {
|
|
||||||
url = "https://github.com/Mic92/z88dk/commit/5b4ca132fa1f31c9ac48cf2220358715739ca0b2.patch";
|
|
||||||
sha256 = "1p2l31j68p7jzykhkhd9iagn2lr08hdclk3cl9l32p1q6ghdipfv";
|
|
||||||
})];
|
|
||||||
|
|
||||||
postPatch = ''
|
postPatch = ''
|
||||||
# we dont rely on build.sh :
|
# we dont rely on build.sh :
|
||||||
export PATH="$PWD/bin:$PATH" # needed to have zcc in testsuite
|
export PATH="$PWD/bin:$PATH" # needed to have zcc in testsuite
|
||||||
export ZCCCFG=$PWD/lib/config/
|
export ZCCCFG=$PWD/lib/config/
|
||||||
|
# we don't want to build zsdcc since it required network (svn)
|
||||||
|
# we test in checkPhase
|
||||||
|
substituteInPlace Makefile \
|
||||||
|
--replace 'testsuite bin/z88dk-lib$(EXESUFFIX)' 'bin/z88dk-lib$(EXESUFFIX)'\
|
||||||
|
--replace 'ALL_EXT = bin/zsdcc$(EXESUFFIX)' 'ALL_EXT ='
|
||||||
'';
|
'';
|
||||||
|
|
||||||
|
checkPhase = ''
|
||||||
|
make testsuite
|
||||||
|
'';
|
||||||
|
#failed on Issue_1105_function_pointer_calls
|
||||||
|
doCheck = stdenv.hostPlatform.system != "aarch64-linux";
|
||||||
|
|
||||||
|
#_FORTIFY_SOURCE requires compiling with optimization (-O)
|
||||||
|
NIX_CFLAGS_COMPILE = "-O";
|
||||||
|
|
||||||
|
short_rev = "${builtins.substring 0 7 src.rev}";
|
||||||
makeFlags = [
|
makeFlags = [
|
||||||
"prefix=$(out)"
|
|
||||||
"git_rev=${short_rev}"
|
"git_rev=${short_rev}"
|
||||||
"version=${version}"
|
"version=${version}"
|
||||||
|
"prefix=$(out)"
|
||||||
"git_count=0"
|
"git_count=0"
|
||||||
];
|
];
|
||||||
nativeBuildInputs = [ makeWrapper unzip ];
|
|
||||||
|
nativeBuildInputs = [ which makeWrapper unzip ];
|
||||||
buildInputs = [ libxml2 m4 uthash ];
|
buildInputs = [ libxml2 m4 uthash ];
|
||||||
|
|
||||||
preInstall = ''
|
preInstall = ''
|
||||||
@ -41,10 +50,10 @@ stdenv.mkDerivation rec {
|
|||||||
installTargets = "libs install";
|
installTargets = "libs install";
|
||||||
|
|
||||||
meta = with stdenv.lib; {
|
meta = with stdenv.lib; {
|
||||||
homepage = https://www.z88dk.org;
|
homepage = "https://www.z88dk.org";
|
||||||
description = "z80 Development Kit";
|
description = "z80 Development Kit";
|
||||||
license = licenses.clArtistic;
|
license = licenses.clArtistic;
|
||||||
maintainers = [ maintainers.genesis ];
|
maintainers = [ maintainers.genesis ];
|
||||||
platforms = [ "x86_64-linux" ];
|
platforms = platforms.linux;
|
||||||
};
|
};
|
||||||
}
|
}
|
||||||
|
Loading…
x
Reference in New Issue
Block a user