2022-06-16 17:23:12 +00:00
|
|
|
{ lib, stdenv, fetchzip, unzip, fetchpatch, bison, flex, gperf, zlib }:
|
2020-12-25 13:55:36 +00:00
|
|
|
|
|
|
|
stdenv.mkDerivation rec {
|
|
|
|
pname = "flasm";
|
|
|
|
version = "1.64";
|
|
|
|
|
|
|
|
src = fetchzip {
|
|
|
|
url = "https://www.nowrap.de/download/flasm16src.zip";
|
|
|
|
sha256 = "03hvxm66rb6rjwbr07hc3k7ia5rim2xlhxbd9qmcai9xwmyiqafg";
|
|
|
|
stripRoot = false;
|
|
|
|
};
|
|
|
|
|
2022-06-16 17:23:12 +00:00
|
|
|
patches = [
|
|
|
|
# Pull patch pending upstream inclusion for -fno-common toolchains:
|
|
|
|
# https://sourceforge.net/p/flasm/patches/2/
|
|
|
|
(fetchpatch {
|
|
|
|
name = "fno-common.patch";
|
|
|
|
url = "https://sourceforge.net/p/flasm/patches/2/attachment/0001-flasm-fix-build-on-gcc-10-fno-common.patch";
|
|
|
|
sha256 = "0ic7k1mmyvhpnxam89dbg8i9bfzk70zslfdxgpmkszx097bj1hv6";
|
|
|
|
})
|
|
|
|
];
|
|
|
|
|
2021-02-17 17:02:09 +00:00
|
|
|
makeFlags = [ "CC=${stdenv.cc.targetPrefix}cc" ];
|
2020-12-25 13:55:36 +00:00
|
|
|
|
|
|
|
nativeBuildInputs = [ unzip bison flex gperf ];
|
|
|
|
|
|
|
|
buildInputs = [ zlib ];
|
|
|
|
|
|
|
|
installPhase = ''
|
|
|
|
install -Dm755 flasm -t $out/bin
|
|
|
|
'';
|
|
|
|
|
2021-02-05 17:12:51 +00:00
|
|
|
meta = with lib; {
|
2020-12-25 13:55:36 +00:00
|
|
|
description = "Assembler and disassembler for Flash (SWF) bytecode";
|
2023-02-02 18:25:31 +00:00
|
|
|
homepage = "https://flasm.sourceforge.net/";
|
2020-12-25 13:55:36 +00:00
|
|
|
license = licenses.bsd2;
|
|
|
|
maintainers = with maintainers; [ siraben ];
|
|
|
|
platforms = platforms.all;
|
|
|
|
};
|
|
|
|
}
|