nixpkgs-suyu/pkgs/development/compilers/zasm/default.nix

Ignoring revisions in .git-blame-ignore-revs. Click here to bypass and see the normal blame view.

52 lines
1.3 KiB
Nix
Raw Normal View History

{ lib, stdenv, fetchFromGitHub, zlib }:
2020-01-25 19:46:04 +01:00
let
libs-src = fetchFromGitHub {
owner = "megatokio";
repo = "Libraries";
# 2021-02-02
rev = "c5cb3ed512c677db6f33e2d3539dfbb6e547030b";
sha256 = "sha256-GiplhZf640uScVdKL6E/fegOgtC9SE1xgBqcX86XADk=";
2020-01-25 19:46:04 +01:00
};
in
stdenv.mkDerivation rec {
2020-01-25 19:46:04 +01:00
pname = "zasm";
version = "4.4.7";
2020-01-25 19:46:04 +01:00
src = fetchFromGitHub {
owner = "megatokio";
repo = "zasm";
rev = version;
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
'';
2020-01-25 19:46:04 +01:00
};
buildInputs = [ zlib ];
configurePhase = ''
ln -sf ${libs-src} Libraries
'';
makeFlags = [
"CC=${stdenv.cc.targetPrefix}cc"
"CXX=${stdenv.cc.targetPrefix}c++"
"LINK=${stdenv.cc.targetPrefix}c++"
"STRIP=${stdenv.cc.targetPrefix}strip"
];
2020-01-25 19:46:04 +01:00
installPhase = ''
install -Dm755 -t $out/bin zasm
2020-01-25 19:46:04 +01:00
'';
meta = with lib; {
description = "Z80 / 8080 / Z180 assembler (for unix-style OS)";
2020-01-25 19:46:04 +01:00
homepage = "https://k1.spdns.de/Develop/Projects/zasm/Distributions/";
license = licenses.bsd2;
maintainers = [ maintainers.turbomack ];
platforms = platforms.unix;
2020-01-25 19:46:04 +01:00
badPlatforms = platforms.aarch64;
};
}