2021-08-02 23:14:06 +02:00
|
|
|
{ lib
|
|
|
|
, stdenv
|
|
|
|
, fetchFromGitHub
|
|
|
|
}:
|
2018-01-05 04:47:15 +01:00
|
|
|
|
2020-03-31 21:54:43 +02:00
|
|
|
stdenv.mkDerivation rec {
|
2019-08-15 14:41:18 +02:00
|
|
|
pname = "jwasm";
|
2021-08-02 23:14:06 +02:00
|
|
|
version = "2.14";
|
2018-01-05 04:47:15 +01:00
|
|
|
|
|
|
|
src = fetchFromGitHub {
|
2021-08-02 23:14:06 +02:00
|
|
|
owner = "Baron-von-Riedesel";
|
2018-01-05 04:47:15 +01:00
|
|
|
repo = "JWasm";
|
2021-08-02 23:14:06 +02:00
|
|
|
rev = "v${version}";
|
|
|
|
hash = "sha256-BUSsF73Q2vq6tF/YHMUyAmmFE/WWVQLRFJZkOD8T7f8=";
|
2018-01-05 04:47:15 +01:00
|
|
|
};
|
|
|
|
|
2021-08-02 23:14:06 +02:00
|
|
|
outputs = [ "out" "doc" ];
|
2018-01-05 04:47:15 +01:00
|
|
|
|
2021-08-02 23:14:06 +02: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 21:54:43 +02:00
|
|
|
'';
|
2018-01-05 04:47:15 +01:00
|
|
|
|
2021-08-02 23:14:06 +02:00
|
|
|
meta = with lib; {
|
|
|
|
homepage = "https://github.com/Baron-von-Riedesel/JWasm/";
|
2018-01-05 04:47:15 +01:00
|
|
|
description = "A MASM-compatible x86 assembler";
|
|
|
|
license = licenses.gpl2Plus;
|
|
|
|
maintainers = with maintainers; [ AndersonTorres ];
|
2021-08-02 23:14:06 +02:00
|
|
|
platforms = platforms.unix;
|
2018-01-05 04:47:15 +01:00
|
|
|
};
|
|
|
|
}
|
2021-08-02 23:14:06 +02:00
|
|
|
# TODO: generalize for Windows builds
|