2023-07-15 17:15:38 +00:00
|
|
|
|
{ lib, stdenv, fetchurl, alsa-lib, boost, curl, ffmpeg_4, icoutils, libGLU
|
|
|
|
|
, libmad, libogg, libpng, libsndfile, libvorbis, lua, miniupnpc, pkg-config
|
|
|
|
|
, SDL2, SDL2_image, SDL2_net, SDL2_ttf, speex, zziplib, zlib, makeWrapper
|
|
|
|
|
, makeDesktopItem, unzip, alephone }:
|
2020-04-24 23:36:52 +00:00
|
|
|
|
|
|
|
|
|
let
|
|
|
|
|
self = stdenv.mkDerivation rec {
|
|
|
|
|
outputs = [ "out" "icons" ];
|
|
|
|
|
pname = "alephone";
|
2023-07-15 17:15:38 +00:00
|
|
|
|
version = "1.6.2";
|
2020-04-24 23:36:52 +00:00
|
|
|
|
|
|
|
|
|
src = fetchurl {
|
2023-07-15 17:15:38 +00:00
|
|
|
|
url = let date = "20230529";
|
2020-12-25 13:55:36 +00:00
|
|
|
|
in "https://github.com/Aleph-One-Marathon/alephone/releases/download/release-${date}/AlephOne-${date}.tar.bz2";
|
2023-07-15 17:15:38 +00:00
|
|
|
|
sha256 = "sha256-UqhZvOMOxU4W0eLRRTQvGXaqTpWD5KIdXULClHW7Iyc=";
|
2020-04-24 23:36:52 +00:00
|
|
|
|
};
|
|
|
|
|
|
2021-02-05 17:12:51 +00:00
|
|
|
|
nativeBuildInputs = [ pkg-config icoutils ];
|
2020-04-24 23:36:52 +00:00
|
|
|
|
|
|
|
|
|
buildInputs = [
|
2023-07-15 17:15:38 +00:00
|
|
|
|
alsa-lib
|
2020-04-24 23:36:52 +00:00
|
|
|
|
boost
|
|
|
|
|
curl
|
2022-02-10 20:34:41 +00:00
|
|
|
|
ffmpeg_4
|
2020-12-25 13:55:36 +00:00
|
|
|
|
libGLU
|
2020-04-24 23:36:52 +00:00
|
|
|
|
libmad
|
|
|
|
|
libsndfile
|
|
|
|
|
libogg
|
|
|
|
|
libpng
|
|
|
|
|
libvorbis
|
|
|
|
|
lua
|
2023-07-15 17:15:38 +00:00
|
|
|
|
miniupnpc
|
2020-12-25 13:55:36 +00:00
|
|
|
|
SDL2
|
|
|
|
|
SDL2_image
|
|
|
|
|
SDL2_net
|
|
|
|
|
SDL2_ttf
|
2020-04-24 23:36:52 +00:00
|
|
|
|
speex
|
|
|
|
|
zziplib
|
|
|
|
|
zlib
|
|
|
|
|
];
|
|
|
|
|
|
2023-07-15 17:15:38 +00:00
|
|
|
|
configureFlags = [ "--with-boost-libdir=${boost.out}/lib" ];
|
2023-04-29 16:46:19 +00:00
|
|
|
|
makeFlags = [ "AR:=$(AR)" ];
|
2020-04-24 23:36:52 +00:00
|
|
|
|
|
|
|
|
|
enableParallelBuilding = true;
|
|
|
|
|
|
|
|
|
|
postInstall = ''
|
|
|
|
|
mkdir $icons
|
|
|
|
|
icotool -x -i 5 -o $icons Resources/Windows/*.ico
|
|
|
|
|
pushd $icons
|
|
|
|
|
for x in *_5_48x48x32.png; do
|
|
|
|
|
mv $x ''${x%_5_48x48x32.png}.png
|
|
|
|
|
done
|
|
|
|
|
popd
|
|
|
|
|
'';
|
|
|
|
|
|
2021-01-15 22:18:51 +00:00
|
|
|
|
meta = with lib; {
|
2020-04-24 23:36:52 +00:00
|
|
|
|
description =
|
|
|
|
|
"Aleph One is the open source continuation of Bungie’s Marathon 2 game engine";
|
|
|
|
|
homepage = "https://alephone.lhowon.org/";
|
|
|
|
|
license = with licenses; [ gpl3 ];
|
|
|
|
|
maintainers = with maintainers; [ ehmry ];
|
|
|
|
|
platforms = platforms.linux;
|
|
|
|
|
};
|
|
|
|
|
};
|
|
|
|
|
|
|
|
|
|
in self // {
|
|
|
|
|
makeWrapper = { pname, desktopName, version, zip, meta
|
|
|
|
|
, icon ? alephone.icons + "/alephone.png", ... }@extraArgs:
|
|
|
|
|
stdenv.mkDerivation ({
|
|
|
|
|
inherit pname version;
|
|
|
|
|
|
|
|
|
|
desktopItem = makeDesktopItem {
|
|
|
|
|
name = desktopName;
|
|
|
|
|
exec = pname;
|
|
|
|
|
genericName = pname;
|
2022-03-05 16:20:37 +00:00
|
|
|
|
categories = [ "Game" ];
|
2020-04-24 23:36:52 +00:00
|
|
|
|
comment = meta.description;
|
|
|
|
|
inherit desktopName icon;
|
|
|
|
|
};
|
|
|
|
|
|
|
|
|
|
src = zip;
|
|
|
|
|
|
|
|
|
|
nativeBuildInputs = [ makeWrapper unzip ];
|
|
|
|
|
|
|
|
|
|
dontConfigure = true;
|
|
|
|
|
dontBuild = true;
|
|
|
|
|
|
|
|
|
|
installPhase = ''
|
|
|
|
|
mkdir -p $out/bin $out/data/$pname $out/share/applications
|
|
|
|
|
cp -a * $out/data/$pname
|
|
|
|
|
cp $desktopItem/share/applications/* $out/share/applications
|
|
|
|
|
makeWrapper ${alephone}/bin/alephone $out/bin/$pname \
|
|
|
|
|
--add-flags $out/data/$pname
|
|
|
|
|
'';
|
2022-02-21 08:47:16 +00:00
|
|
|
|
} // extraArgs // {
|
2020-04-24 23:36:52 +00:00
|
|
|
|
meta = alephone.meta // {
|
2021-01-15 22:18:51 +00:00
|
|
|
|
license = lib.licenses.free;
|
2020-04-24 23:36:52 +00:00
|
|
|
|
hydraPlatforms = [ ];
|
|
|
|
|
} // meta;
|
2022-02-21 08:47:16 +00:00
|
|
|
|
});
|
2020-04-24 23:36:52 +00:00
|
|
|
|
}
|