Skip to content
Closed
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
23 changes: 16 additions & 7 deletions pkgs/by-name/ua/uae/package.nix
Original file line number Diff line number Diff line change
Expand Up @@ -8,15 +8,20 @@
SDL,
}:

stdenv.mkDerivation rec {
stdenv.mkDerivation (finalAttrs: {
pname = "uae";
version = "0.8.29";

src = fetchurl {
url = "https://web.archive.org/web/20130905032631/http://www.amigaemulator.org/files/sources/develop/uae-${version}.tar.bz2";
url = "https://web.archive.org/web/20130905032631/http://www.amigaemulator.org/files/sources/develop/uae-${finalAttrs.version}.tar.bz2";
sha256 = "05s3cd1rd5a970s938qf4c2xm3l7f54g5iaqw56v8smk355m4qr4";
};

# fix configure error: return type defaults to 'int' [-Wimplicit-int]
patchPhase = ''
sed -i 's/^main()/int main()/' ./src/tools/configure
'';

configureFlags = [
"--with-sdl"
"--with-sdl-sound"
Expand All @@ -32,10 +37,14 @@ stdenv.mkDerivation rec {
];

hardeningDisable = [ "format" ];
# Workaround build failure on -fno-common toolchains:
# ld: bsdsocket.o:(.bss+0x0): multiple definition of
# `socketbases'; main.o:(.bss+0x2792c0): first defined here
env.NIX_CFLAGS_COMPILE = "-fcommon";
env.NIX_CFLAGS_COMPILE = toString [
# Workaround build failure on -fno-common toolchains:
# ld: bsdsocket.o:(.bss+0x0): multiple definition of
# `socketbases'; main.o:(.bss+0x2792c0): first defined here
"-fcommon"
"-Wno-error=implicit-function-declaration"
"-Wno-error=incompatible-pointer-types"
];
LDFLAGS = [ "-lm" ];

meta = {
Expand All @@ -46,4 +55,4 @@ stdenv.mkDerivation rec {
platforms = lib.platforms.linux;
mainProgram = "uae";
};
}
})