2024-06-20 14:57:18 +00:00
|
|
|
{
|
|
|
|
lib,
|
|
|
|
fetchFromGitHub,
|
|
|
|
stdenv,
|
2021-08-05 21:33:18 +00:00
|
|
|
}:
|
2020-04-24 23:36:52 +00:00
|
|
|
|
2022-11-21 17:40:18 +00:00
|
|
|
stdenv.mkDerivation (finalAttrs: {
|
2020-04-24 23:36:52 +00:00
|
|
|
pname = "jwasm";
|
2024-06-20 14:57:18 +00:00
|
|
|
version = "2.18";
|
2020-04-24 23:36:52 +00:00
|
|
|
|
|
|
|
src = fetchFromGitHub {
|
2021-08-05 21:33:18 +00:00
|
|
|
owner = "Baron-von-Riedesel";
|
2020-04-24 23:36:52 +00:00
|
|
|
repo = "JWasm";
|
2022-11-21 17:40:18 +00:00
|
|
|
rev = "v${finalAttrs.version}";
|
2024-06-20 14:57:18 +00:00
|
|
|
hash = "sha256-xbiyGBTzIkAfUy45JdAl77gbvArzVUQNPOxa+H2uGFo=";
|
2020-04-24 23:36:52 +00:00
|
|
|
};
|
|
|
|
|
2021-08-05 21:33:18 +00:00
|
|
|
outputs = [ "out" "doc" ];
|
2020-04-24 23:36:52 +00:00
|
|
|
|
2021-08-05 21:33:18 +00:00
|
|
|
dontConfigure = true;
|
|
|
|
|
|
|
|
preBuild = ''
|
|
|
|
cp ${if stdenv.cc.isClang then "CLUnix.mak" else "GccUnix.mak"} Makefile
|
|
|
|
substituteInPlace Makefile \
|
|
|
|
--replace "/usr/local/bin" "${placeholder "out"}/bin"
|
|
|
|
'';
|
|
|
|
|
|
|
|
postInstall = ''
|
|
|
|
install -Dpm644 $src/Html/License.html \
|
|
|
|
$src/Html/Manual.html \
|
|
|
|
$src/Html/Readme.html \
|
|
|
|
-t $doc/share/doc/jwasm/
|
2020-04-24 23:36:52 +00:00
|
|
|
'';
|
|
|
|
|
2024-06-20 14:57:18 +00:00
|
|
|
meta = {
|
2021-08-05 21:33:18 +00:00
|
|
|
homepage = "https://github.com/Baron-von-Riedesel/JWasm/";
|
2024-06-20 14:57:18 +00:00
|
|
|
description = "MASM-compatible x86 assembler";
|
|
|
|
changelog = "https://github.com/Baron-von-Riedesel/JWasm/releases/tag/${finalAttrs.src.rev}";
|
|
|
|
license = lib.licenses.gpl2Plus;
|
|
|
|
maintainers = with lib.maintainers; [ AndersonTorres ];
|
|
|
|
platforms = lib.platforms.unix;
|
2022-11-21 17:40:18 +00:00
|
|
|
broken = stdenv.isDarwin;
|
2020-04-24 23:36:52 +00:00
|
|
|
};
|
2022-11-21 17:40:18 +00:00
|
|
|
})
|
2021-08-05 21:33:18 +00:00
|
|
|
# TODO: generalize for Windows builds
|