From b3d8b97db668c8555ba6433ab1ee51fc41c327b1 Mon Sep 17 00:00:00 2001 From: AndersonTorres Date: Mon, 2 Aug 2021 18:14:06 -0300 Subject: [PATCH] jwasm: 2.13 -> 2.14 --- pkgs/development/compilers/jwasm/default.nix | 43 ++++++++++++-------- 1 file changed, 26 insertions(+), 17 deletions(-) diff --git a/pkgs/development/compilers/jwasm/default.nix b/pkgs/development/compilers/jwasm/default.nix index 2f1727ae0de..88e9450ef9d 100644 --- a/pkgs/development/compilers/jwasm/default.nix +++ b/pkgs/development/compilers/jwasm/default.nix @@ -1,33 +1,42 @@ -{ lib, stdenv, fetchFromGitHub -, cmake }: +{ lib +, stdenv +, fetchFromGitHub +}: -with lib; stdenv.mkDerivation rec { pname = "jwasm"; - version = "2.13"; + version = "2.14"; src = fetchFromGitHub { - owner = "JWasm"; + owner = "Baron-von-Riedesel"; repo = "JWasm"; - rev = version; - sha256 = "0m972pc8vk8s9yv1pi85fsjgm6hj24gab7nalw2q04l0359nqi7w"; + rev = "v${version}"; + hash = "sha256-BUSsF73Q2vq6tF/YHMUyAmmFE/WWVQLRFJZkOD8T7f8="; }; - nativeBuildInputs = [ cmake ]; + outputs = [ "out" "doc" ]; - installPhase = '' - install -Dpm755 jwasm -t $out/bin/ - install -Dpm644 $src/History.txt $src/Readme.txt \ - $src/Doc/enh.txt $src/Doc/fixes.txt \ - $src/Doc/gencode.txt $src/Doc/overview.txt \ - -t $out/share/doc/jwasm/ + dontConfigure = true; + + preBuild = '' + cp ${if stdenv.cc.isClang then "CLUnix.mak" else "GccUnix.mak"} Makefile + substituteInPlace Makefile \ + --replace "/usr/local/bin" "${placeholder "out"}/bin" ''; - meta = { + postInstall = '' + install -Dpm644 $src/Html/License.html \ + $src/Html/Manual.html \ + $src/Html/Readme.html \ + -t $doc/share/doc/jwasm/ + ''; + + meta = with lib; { + homepage = "https://github.com/Baron-von-Riedesel/JWasm/"; description = "A MASM-compatible x86 assembler"; - homepage = "http://jwasm.github.io/"; license = licenses.gpl2Plus; maintainers = with maintainers; [ AndersonTorres ]; - platforms = platforms.darwin ++ platforms.linux; + platforms = platforms.unix; }; } +# TODO: generalize for Windows builds