fasm: init at 1.73.04 (#50378)

This commit is contained in:
Orivej Desh 2018-11-15 13:20:00 +00:00 committed by Orivej Desh (NixOS)
parent 650036f022
commit 101133deae
3 changed files with 57 additions and 0 deletions

View file

@ -0,0 +1,24 @@
{ stdenvNoCC, lib, fetchurl }:
stdenvNoCC.mkDerivation rec {
name = "fasm-bin-${version}";
version = "1.73.04";
src = fetchurl {
url = "https://flatassembler.net/fasm-${version}.tgz";
sha256 = "0y0xkf9fzcm5gklhdi61wjpd1p8islpbcnkv5k16aqci3qsd0ia1";
};
installPhase = ''
install -D fasm${lib.optionalString stdenvNoCC.isx86_64 ".x64"} $out/bin/fasm
'';
meta = with lib; {
description = "x86(-64) macro assembler to binary, MZ, PE, COFF, and ELF";
homepage = https://flatassembler.net/download.php;
license = licenses.bsd2;
maintainers = with maintainers; [ orivej ];
platforms = [ "i686-linux" "x86_64-linux" ];
};
}

View file

@ -0,0 +1,28 @@
{ stdenv, lib, fasm-bin, isx86_64 }:
stdenv.mkDerivation rec {
inherit (fasm-bin) version src meta;
name = "fasm-${version}";
nativeBuildInputs = [ fasm-bin ];
buildPhase = ''
fasm source/Linux${lib.optionalString isx86_64 "/x64"}/fasm.asm fasm
for tool in listing prepsrc symbols; do
fasm tools/libc/$tool.asm
cc -o tools/libc/fasm-$tool tools/libc/$tool.o
done
'';
outputs = [ "out" "doc" ];
installPhase = ''
install -Dt $out/bin fasm tools/libc/fasm-*
docs=$doc/share/doc/fasm
mkdir -p $docs
cp -r examples/ *.txt tools/fas.txt $docs
cp tools/readme.txt $docs/tools.txt
'';
}

View file

@ -6644,6 +6644,11 @@ with pkgs;
apache-flex-sdk = callPackage ../development/compilers/apache-flex-sdk { };
fasm = pkgsi686Linux.callPackage ../development/compilers/fasm {
inherit (stdenv) isx86_64;
};
fasm-bin = callPackage ../development/compilers/fasm/bin.nix { };
fpc = callPackage ../development/compilers/fpc { };
gambit = callPackage ../development/compilers/gambit { stdenv = gccStdenv; };