2021-08-02 21:14:06 +00:00
|
|
|
{ lib
|
|
|
|
, stdenv
|
|
|
|
, fetchFromGitHub
|
|
|
|
}:
|
2018-01-05 03:47:15 +00:00
|
|
|
|
2022-11-15 13:18:10 +00:00
|
|
|
stdenv.mkDerivation (finalAttrs: {
|
2019-08-15 12:41:18 +00:00
|
|
|
pname = "jwasm";
|
2023-04-11 05:15:21 +00:00
|
|
|
version = "2.17";
|
2018-01-05 03:47:15 +00:00
|
|
|
|
|
|
|
src = fetchFromGitHub {
|
2021-08-02 21:14:06 +00:00
|
|
|
owner = "Baron-von-Riedesel";
|
2018-01-05 03:47:15 +00:00
|
|
|
repo = "JWasm";
|
2022-11-15 13:18:10 +00:00
|
|
|
rev = "v${finalAttrs.version}";
|
2023-04-11 05:15:21 +00:00
|
|
|
hash = "sha256-22eNtHXF+RQT4UbXIVjn1JP/s6igp5O1oQT7sVl7c1U=";
|
2018-01-05 03:47:15 +00:00
|
|
|
};
|
|
|
|
|
2021-08-02 21:14:06 +00:00
|
|
|
outputs = [ "out" "doc" ];
|
2018-01-05 03:47:15 +00:00
|
|
|
|
2021-08-02 21:14:06 +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-03-31 19:54:43 +00:00
|
|
|
'';
|
2018-01-05 03:47:15 +00:00
|
|
|
|
2021-08-02 21:14:06 +00:00
|
|
|
meta = with lib; {
|
|
|
|
homepage = "https://github.com/Baron-von-Riedesel/JWasm/";
|
2018-01-05 03:47:15 +00:00
|
|
|
description = "A MASM-compatible x86 assembler";
|
2022-11-15 13:18:10 +00:00
|
|
|
changelog = "https://github.com/Baron-von-Riedesel/JWasm/releases/tag/v${finalAttrs.version}";
|
2018-01-05 03:47:15 +00:00
|
|
|
license = licenses.gpl2Plus;
|
|
|
|
maintainers = with maintainers; [ AndersonTorres ];
|
2021-08-02 21:14:06 +00:00
|
|
|
platforms = platforms.unix;
|
2022-11-15 13:18:10 +00:00
|
|
|
broken = stdenv.isDarwin;
|
2018-01-05 03:47:15 +00:00
|
|
|
};
|
2022-11-15 13:18:10 +00:00
|
|
|
})
|
2021-08-02 21:14:06 +00:00
|
|
|
# TODO: generalize for Windows builds
|