20 stdenv.mkDerivation (finalAttrs: {
24 src = fetchFromGitHub {
25 owner = "BlitterStudio";
27 rev = "refs/tags/v${finalAttrs.version}";
28 hash = "sha256-EOoVJYefX2pQ2Zz9bLD1RS47u/+7ZWTMwZYha0juF64=";
49 enableParallelBuilding = true;
51 # Amiberry has traditionally behaved as a "Portable" app, meaning that it was designed to expect everything
52 # under the same directory. This is not compatible with Nix package conventions.
53 # The Amiberry behavior has changed since versions 5.7.4 and 6.3.4 (see
54 # https://github.com/BlitterStudio/amiberry/wiki/FAQ#q-where-does-amiberry-look-for-its-files-can-i-change-that
55 # for more information), however this is still not compatible with Nix packaging. The AMIBERRY_DATA_DIR can go
56 # in the nix store but the Amiberry configuration files must be stored in a user writable location.
57 # Fortunately Amiberry provides environment variables for specifying these locations which we can supply with the
58 # wrapper script below.
59 # One more caveat: Amiberry expects the configuration files path (AMIBERRY_HOME_DIR) to exist, otherwise it will
60 # fall back to behaving like a "Portable" app. The wrapper below ensures that the AMIBERRY_HOME_DIR path exists,
61 # preventing that fallback.
67 install -Dm444 data/amiberry.png $out/share/icons/hicolor/256x256/apps/amiberry.png
68 wrapProgram $out/bin/amiberry \
69 --set-default AMIBERRY_DATA_DIR $out \
70 --run 'AMIBERRY_HOME_DIR="$HOME/.amiberry"' \
72 $AMIBERRY_HOME_DIR/kickstarts \
73 $AMIBERRY_HOME_DIR/conf \
74 $AMIBERRY_HOME_DIR/nvram \
75 $AMIBERRY_HOME_DIR/plugins \
76 $AMIBERRY_HOME_DIR/screenshots \
77 $AMIBERRY_HOME_DIR/savestates \
78 $AMIBERRY_HOME_DIR/controllers \
79 $AMIBERRY_HOME_DIR/whdboot \
80 $AMIBERRY_HOME_DIR/lha \
81 $AMIBERRY_HOME_DIR/floppies \
82 $AMIBERRY_HOME_DIR/cdroms \
83 $AMIBERRY_HOME_DIR/harddrives'
90 desktopName = "Amiberry";
92 comment = "Amiga emulator";
102 homepage = "https://github.com/BlitterStudio/amiberry";
103 description = "Optimized Amiga emulator for Linux/macOS";
104 license = licenses.gpl3;
105 platforms = platforms.linux;
106 maintainers = with maintainers; [ michaelshmitty ];
107 mainProgram = "amiberry";