nixpkgs/pkgs/by-name/jw/jwasm/package.nix

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

51 lines
1.3 KiB
Nix
Raw Normal View History

2024-06-14 16:23:10 +00:00
{
lib,
fetchFromGitHub,
stdenv,
2021-08-02 21:14:06 +00:00
}:
2018-01-05 03:47:15 +00:00
stdenv.mkDerivation (finalAttrs: {
pname = "jwasm";
2024-06-14 16:25:37 +00:00
version = "2.18";
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";
rev = "v${finalAttrs.version}";
2024-06-14 16:25:37 +00:00
hash = "sha256-xbiyGBTzIkAfUy45JdAl77gbvArzVUQNPOxa+H2uGFo=";
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"
'';
2024-09-09 18:43:06 +00:00
preInstall = ''
mkdir -p ${placeholder "out"}/bin
'';
2021-08-02 21:14:06 +00:00
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
2024-06-14 16:23:10 +00:00
meta = {
2021-08-02 21:14:06 +00:00
homepage = "https://github.com/Baron-von-Riedesel/JWasm/";
2018-01-05 03:47:15 +00:00
description = "MASM-compatible x86 assembler";
2024-06-14 16:23:10 +00:00
changelog = "https://github.com/Baron-von-Riedesel/JWasm/releases/tag/${finalAttrs.src.rev}";
2024-09-09 18:43:06 +00:00
mainProgram = "jwasm";
2024-06-14 16:23:10 +00:00
license = lib.licenses.gpl2Plus;
maintainers = with lib.maintainers; [ AndersonTorres ];
platforms = lib.platforms.unix;
broken = stdenv.hostPlatform.isDarwin;
2018-01-05 03:47:15 +00:00
};
})
2021-08-02 21:14:06 +00:00
# TODO: generalize for Windows builds