at 18.03-beta 50 lines 1.3 kB view raw
1{ fetchFromGitHub, fetchpatch, stdenv, makeWrapper, unzip, libxml2, m4, uthash }: 2 3stdenv.mkDerivation rec { 4 name = "z88dk-${version}"; 5 version = "20180217"; 6 rev = "49a7c6032b2675af742f5b0b3aa5bd5260bdd814"; 7 short_rev = "${builtins.substring 0 7 rev}"; 8 9 src = fetchFromGitHub { 10 owner = "z88dk"; 11 repo = "z88dk"; 12 inherit rev; 13 sha256 = "00vbklh6lkq1gyd08ig2vcg6c1mghvlwfx3vq3wldf34hcs3k4pp"; 14 }; 15 16 # https://github.com/z88dk/z88dk/pull/612 17 patches = [(fetchpatch { 18 url = "https://github.com/Mic92/z88dk/commit/5b4ca132fa1f31c9ac48cf2220358715739ca0b2.patch"; 19 sha256 = "1p2l31j68p7jzykhkhd9iagn2lr08hdclk3cl9l32p1q6ghdipfv"; 20 })]; 21 22 postPatch = '' 23 # we dont rely on build.sh : 24 export PATH="$PWD/bin:$PATH" # needed to have zcc in testsuite 25 export ZCCCFG=$PWD/lib/config/ 26 ''; 27 28 makeFlags = [ 29 "prefix=$(out)" 30 "git_rev=${short_rev}" 31 "version=${version}" 32 "git_count=0" 33 ]; 34 nativeBuildInputs = [ makeWrapper unzip ]; 35 buildInputs = [ libxml2 m4 uthash ]; 36 37 preInstall = '' 38 mkdir -p $out/{bin,share} 39 ''; 40 41 installTargets = "libs install"; 42 43 meta = with stdenv.lib; { 44 homepage = https://www.z88dk.org; 45 description = "z80 Development Kit"; 46 license = licenses.clArtistic; 47 maintainers = [ maintainers.genesis ]; 48 platforms = [ "x86_64-linux" ]; 49 }; 50}