about summary refs log tree commit diff
path: root/pkgs/development/compilers/jwasm
diff options
context:
space:
mode:
authorAndersonTorres <torres.anderson.85@protonmail.com>2021-08-02 18:14:06 -0300
committerAndersonTorres <torres.anderson.85@protonmail.com>2021-08-02 18:14:47 -0300
commitb3d8b97db668c8555ba6433ab1ee51fc41c327b1 (patch)
tree550f87cd925f469941cc351ce01cc241915f3ce3 /pkgs/development/compilers/jwasm
parent16851a19a606858091cad14a6461c23be395d5e3 (diff)
jwasm: 2.13 -> 2.14
Diffstat (limited to 'pkgs/development/compilers/jwasm')
-rw-r--r--pkgs/development/compilers/jwasm/default.nix43
1 files changed, 26 insertions, 17 deletions
diff --git a/pkgs/development/compilers/jwasm/default.nix b/pkgs/development/compilers/jwasm/default.nix
index 2f1727ae0de04..88e9450ef9d60 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"
+  '';
+
+  postInstall = ''
+    install -Dpm644 $src/Html/License.html \
+                    $src/Html/Manual.html \
+                    $src/Html/Readme.html \
+                    -t $doc/share/doc/jwasm/
   '';
 
-  meta = {
+  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