Merge pull request #113402 from siraben/zasm-xcompile
This commit is contained in:
commit
6a9a6b95c8
|
@ -1,20 +1,26 @@
|
||||||
{ fetchFromGitHub, zlib, lib, stdenv }:
|
{ lib, stdenv, fetchFromGitHub, zlib }:
|
||||||
let
|
let
|
||||||
libs-src = fetchFromGitHub {
|
libs-src = fetchFromGitHub {
|
||||||
owner = "megatokio";
|
owner = "megatokio";
|
||||||
repo = "Libraries";
|
repo = "Libraries";
|
||||||
rev = "97ea480051b106e83a086dd42583dfd3e9d458a1";
|
# 2021-02-02
|
||||||
sha256 = "1kqmjb9660mnb0r18s1grrrisx6b73ijsinlyr97vz6992jd5dzh";
|
rev = "c5cb3ed512c677db6f33e2d3539dfbb6e547030b";
|
||||||
|
sha256 = "sha256-GiplhZf640uScVdKL6E/fegOgtC9SE1xgBqcX86XADk=";
|
||||||
};
|
};
|
||||||
in
|
in
|
||||||
stdenv.mkDerivation {
|
stdenv.mkDerivation rec {
|
||||||
pname = "zasm";
|
pname = "zasm";
|
||||||
version = "4.2.6";
|
version = "4.4.7";
|
||||||
|
|
||||||
src = fetchFromGitHub {
|
src = fetchFromGitHub {
|
||||||
owner = "megatokio";
|
owner = "megatokio";
|
||||||
repo = "zasm";
|
repo = "zasm";
|
||||||
rev = "f1424add17a5514895a598d6b5e3982579961519";
|
rev = version;
|
||||||
sha256 = "1kqnqdqp2bfsazs6vfx2aiqanxxagn8plx8g6rc11vmr8yqnnpks";
|
sha256 = "sha256-Zbno8kmzss1H2FjwzHB4U7UXxa6oDfsPV80MVVFfM68=";
|
||||||
|
extraPostFetch = ''
|
||||||
|
# remove folder containing files with weird names (causes the hash to turn out differently under macOS vs. Linux)
|
||||||
|
rm -rv $out/Test
|
||||||
|
'';
|
||||||
};
|
};
|
||||||
|
|
||||||
buildInputs = [ zlib ];
|
buildInputs = [ zlib ];
|
||||||
|
@ -23,22 +29,23 @@ stdenv.mkDerivation {
|
||||||
ln -sf ${libs-src} Libraries
|
ln -sf ${libs-src} Libraries
|
||||||
'';
|
'';
|
||||||
|
|
||||||
buildPhase = ''
|
makeFlags = [
|
||||||
cd Linux
|
"CC=${stdenv.cc.targetPrefix}cc"
|
||||||
make
|
"CXX=${stdenv.cc.targetPrefix}c++"
|
||||||
'';
|
"LINK=${stdenv.cc.targetPrefix}c++"
|
||||||
|
"STRIP=${stdenv.cc.targetPrefix}strip"
|
||||||
|
];
|
||||||
|
|
||||||
installPhase = ''
|
installPhase = ''
|
||||||
mkdir -p $out/bin
|
install -Dm755 -t $out/bin zasm
|
||||||
mv zasm $out/bin
|
|
||||||
'';
|
'';
|
||||||
|
|
||||||
meta = with lib; {
|
meta = with lib; {
|
||||||
description = "Z80 / 8080 assembler (for unix-style OS)";
|
description = "Z80 / 8080 / Z180 assembler (for unix-style OS)";
|
||||||
homepage = "https://k1.spdns.de/Develop/Projects/zasm/Distributions/";
|
homepage = "https://k1.spdns.de/Develop/Projects/zasm/Distributions/";
|
||||||
license = licenses.bsd2;
|
license = licenses.bsd2;
|
||||||
maintainers = [ maintainers.turbomack ];
|
maintainers = [ maintainers.turbomack ];
|
||||||
platforms = platforms.linux;
|
platforms = platforms.unix;
|
||||||
badPlatforms = platforms.aarch64;
|
badPlatforms = platforms.aarch64;
|
||||||
};
|
};
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in a new issue