Files
nixpkgs/pkgs/by-name/fl/flasm/package.nix
Ihar Hrachyshka 567e8dfd8e treewide: clean up 'meta = with' pattern
This commit was created by a combination of scripts and tools:
- an ast-grep script to prefix things in meta with `lib.`,
- a modified nixf-diagnose / nixf combination to remove unused `with
lib;`, and
- regular nixfmt.

Co-authored-by: Wolfgang Walther <walther@technowledgy.de>
2025-12-10 18:09:49 +01:00

57 lines
1.2 KiB
Nix

{
lib,
stdenv,
fetchzip,
unzip,
fetchpatch,
bison,
flex,
gperf,
zlib,
}:
stdenv.mkDerivation {
pname = "flasm";
version = "1.64";
src = fetchzip {
url = "https://www.nowrap.de/download/flasm16src.zip";
sha256 = "03hvxm66rb6rjwbr07hc3k7ia5rim2xlhxbd9qmcai9xwmyiqafg";
stripRoot = false;
};
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";
})
];
makeFlags = [ "CC=${stdenv.cc.targetPrefix}cc" ];
nativeBuildInputs = [
unzip
bison
flex
gperf
];
buildInputs = [ zlib ];
installPhase = ''
install -Dm755 flasm -t $out/bin
'';
meta = {
description = "Assembler and disassembler for Flash (SWF) bytecode";
mainProgram = "flasm";
homepage = "https://flasm.sourceforge.net/";
license = lib.licenses.bsd2;
maintainers = with lib.maintainers; [ siraben ];
platforms = lib.platforms.all;
};
}