fasm: 1.73.74 -> 1.73.75
This commit is contained in:
@@ -2,15 +2,18 @@
|
||||
stdenvNoCC,
|
||||
lib,
|
||||
fetchurl,
|
||||
writeShellScript,
|
||||
curl,
|
||||
nix-update,
|
||||
}:
|
||||
|
||||
stdenvNoCC.mkDerivation (finalAttrs: {
|
||||
pname = "fasm-bin";
|
||||
version = "1.73.34";
|
||||
version = "1.73.35";
|
||||
|
||||
src = fetchurl {
|
||||
url = "https://flatassembler.net/fasm-${finalAttrs.version}.tgz";
|
||||
hash = "sha256-CAlGTsfvpDRWsHh9UysgBorjX+mygEWjFeRaznyDszw=";
|
||||
hash = "sha256-o03sfQvC3Hn6q7aL2LwvYrbPsx1pwBRJNnzkzYCYk04=";
|
||||
};
|
||||
|
||||
installPhase = ''
|
||||
@@ -21,6 +24,25 @@ stdenvNoCC.mkDerivation (finalAttrs: {
|
||||
runHook postInstall
|
||||
'';
|
||||
|
||||
passthru.updateScript = writeShellScript "update-fasm" ''
|
||||
set -euo pipefail
|
||||
|
||||
version=""
|
||||
while IFS= read -r line; do
|
||||
if [[ "$line" =~ fasm-([0-9]+\.[0-9]+\.[0-9]+)\.tgz ]]; then
|
||||
version="''${BASH_REMATCH[1]}"
|
||||
break
|
||||
fi
|
||||
done < <(${lib.getExe curl} -fsSL https://flatassembler.net/download.php)
|
||||
|
||||
if [[ -z "$version" ]]; then
|
||||
echo "Could not determine latest fasm version" >&2
|
||||
exit 1
|
||||
fi
|
||||
|
||||
${lib.getExe nix-update} fasm-bin --version "$version"
|
||||
'';
|
||||
|
||||
meta = {
|
||||
description = "x86(-64) macro assembler to binary, MZ, PE, COFF, and ELF";
|
||||
homepage = "https://flatassembler.net/";
|
||||
|
||||
@@ -13,7 +13,7 @@ stdenv.mkDerivation {
|
||||
nativeBuildInputs = [ fasm-bin ];
|
||||
|
||||
buildPhase = ''
|
||||
fasm source/Linux${lib.optionalString isx86_64 "/x64"}/fasm.asm fasm
|
||||
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
|
||||
@@ -33,4 +33,6 @@ stdenv.mkDerivation {
|
||||
cp -r examples/ *.txt tools/fas.txt $docs
|
||||
cp tools/readme.txt $docs/tools.txt
|
||||
'';
|
||||
|
||||
passthru.updateScript = fasm-bin.updateScript;
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user