2024-08-06 21:11:33 +00:00
|
|
|
{ lib, stdenv, fetchFromGitHub, makeWrapper, gmp, gcc, openssl, zlib }:
|
2020-10-07 12:41:09 +00:00
|
|
|
|
|
|
|
stdenv.mkDerivation rec {
|
|
|
|
pname = "spasm-ng";
|
|
|
|
|
2024-08-06 21:11:33 +00:00
|
|
|
version = "unstable-2022-07-05";
|
2020-10-07 12:41:09 +00:00
|
|
|
|
|
|
|
src = fetchFromGitHub {
|
|
|
|
owner = "alberthdev";
|
|
|
|
repo = "spasm-ng";
|
2024-08-06 21:10:15 +00:00
|
|
|
rev = "5f0786d38f064835be674d4b7df42969967bb73c";
|
|
|
|
sha256 = "sha256-j7Z3oI+J0wZF4EG5OMMjuDe2o69KKGuJvfyHNPTLrXM=";
|
2020-10-07 12:41:09 +00:00
|
|
|
};
|
|
|
|
|
2024-08-06 21:11:33 +00:00
|
|
|
# GCC is needed for Darwin
|
|
|
|
nativeBuildInputs = [ makeWrapper gcc ];
|
2020-10-07 12:41:09 +00:00
|
|
|
buildInputs = [ gmp openssl zlib ];
|
|
|
|
|
|
|
|
enableParallelBuilding = true;
|
|
|
|
|
|
|
|
installPhase = ''
|
2024-08-06 21:11:33 +00:00
|
|
|
runHook preInstall
|
|
|
|
|
2020-10-07 12:41:09 +00:00
|
|
|
install -Dm755 spasm -t $out/bin
|
2024-08-06 21:11:33 +00:00
|
|
|
install -Dm555 inc/*.inc -t $out/include
|
|
|
|
|
|
|
|
runHook postInstall
|
|
|
|
'';
|
|
|
|
|
|
|
|
postFixup = ''
|
|
|
|
wrapProgram $out/bin/spasm --add-flags "-I $out/include"
|
2020-10-07 12:41:09 +00:00
|
|
|
'';
|
|
|
|
|
2021-01-22 11:25:31 +00:00
|
|
|
meta = with lib; {
|
2020-10-07 12:41:09 +00:00
|
|
|
homepage = "https://github.com/alberthdev/spasm-ng";
|
|
|
|
description = "Z80 assembler with extra features to support development for TI calculators";
|
2024-03-19 02:14:51 +00:00
|
|
|
mainProgram = "spasm";
|
2020-10-07 12:41:09 +00:00
|
|
|
license = licenses.gpl2Plus;
|
|
|
|
maintainers = with maintainers; [ siraben ];
|
|
|
|
platforms = platforms.unix;
|
|
|
|
};
|
|
|
|
}
|