2024-06-05 15:53:02 +00:00
|
|
|
|
{
|
|
|
|
|
lib,
|
|
|
|
|
stdenv,
|
|
|
|
|
fetchurl,
|
2024-07-27 06:49:29 +00:00
|
|
|
|
fetchpatch2,
|
2024-06-05 15:53:02 +00:00
|
|
|
|
alsa-lib,
|
|
|
|
|
boost,
|
|
|
|
|
curl,
|
2024-09-19 14:19:46 +00:00
|
|
|
|
ffmpeg_6,
|
2024-06-05 15:53:02 +00:00
|
|
|
|
icoutils,
|
|
|
|
|
libGLU,
|
|
|
|
|
libmad,
|
|
|
|
|
libogg,
|
|
|
|
|
libpng,
|
|
|
|
|
libsndfile,
|
|
|
|
|
libvorbis,
|
|
|
|
|
lua,
|
|
|
|
|
makeDesktopItem,
|
|
|
|
|
makeWrapper,
|
|
|
|
|
miniupnpc,
|
|
|
|
|
openal,
|
|
|
|
|
pkg-config,
|
|
|
|
|
SDL2,
|
|
|
|
|
SDL2_image,
|
|
|
|
|
SDL2_net,
|
|
|
|
|
SDL2_ttf,
|
|
|
|
|
speex,
|
|
|
|
|
unzip,
|
|
|
|
|
zlib,
|
|
|
|
|
zziplib,
|
|
|
|
|
testers,
|
2024-01-02 11:29:13 +00:00
|
|
|
|
}:
|
|
|
|
|
|
|
|
|
|
stdenv.mkDerivation (finalAttrs: {
|
2024-06-05 15:53:02 +00:00
|
|
|
|
outputs = [
|
|
|
|
|
"out"
|
|
|
|
|
"icons"
|
|
|
|
|
];
|
2024-01-02 11:29:13 +00:00
|
|
|
|
pname = "alephone";
|
2024-09-19 14:19:46 +00:00
|
|
|
|
version = "1.10";
|
2024-01-02 11:29:13 +00:00
|
|
|
|
|
|
|
|
|
src = fetchurl {
|
|
|
|
|
url =
|
2024-06-05 15:53:02 +00:00
|
|
|
|
let
|
2024-09-19 14:19:46 +00:00
|
|
|
|
date = "20240822";
|
2024-06-05 15:53:02 +00:00
|
|
|
|
in
|
|
|
|
|
"https://github.com/Aleph-One-Marathon/alephone/releases/download/release-${date}/AlephOne-${date}.tar.bz2";
|
2024-09-19 14:19:46 +00:00
|
|
|
|
hash = "sha256-Es2Uo0RIJHYeO/60XiHVLJe9Eoan8DREtAI2KGjuLaM=";
|
2024-01-02 11:29:13 +00:00
|
|
|
|
};
|
|
|
|
|
|
2024-06-05 15:53:02 +00:00
|
|
|
|
nativeBuildInputs = [
|
|
|
|
|
pkg-config
|
|
|
|
|
icoutils
|
|
|
|
|
];
|
2024-01-02 11:29:13 +00:00
|
|
|
|
|
|
|
|
|
buildInputs = [
|
|
|
|
|
alsa-lib
|
|
|
|
|
boost
|
|
|
|
|
curl
|
2024-09-19 14:19:46 +00:00
|
|
|
|
ffmpeg_6
|
2024-01-02 11:29:13 +00:00
|
|
|
|
libGLU
|
|
|
|
|
libmad
|
|
|
|
|
libogg
|
|
|
|
|
libpng
|
|
|
|
|
libsndfile
|
|
|
|
|
libvorbis
|
|
|
|
|
lua
|
|
|
|
|
miniupnpc
|
|
|
|
|
openal
|
|
|
|
|
SDL2
|
|
|
|
|
SDL2_image
|
|
|
|
|
SDL2_net
|
|
|
|
|
SDL2_ttf
|
|
|
|
|
speex
|
|
|
|
|
zlib
|
|
|
|
|
zziplib
|
|
|
|
|
];
|
|
|
|
|
|
|
|
|
|
configureFlags = [ "--with-boost-libdir=${boost.out}/lib" ];
|
|
|
|
|
makeFlags = [ "AR:=$(AR)" ];
|
|
|
|
|
|
|
|
|
|
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
|
|
|
|
|
'';
|
|
|
|
|
|
2024-06-05 15:53:02 +00:00
|
|
|
|
passthru.tests.version =
|
|
|
|
|
# test that the version is correct
|
2024-09-26 11:04:55 +00:00
|
|
|
|
testers.testVersion { package = finalAttrs.finalPackage; };
|
2024-06-05 15:53:02 +00:00
|
|
|
|
|
2024-01-02 11:29:13 +00:00
|
|
|
|
meta = {
|
2024-06-05 15:53:02 +00:00
|
|
|
|
description = "Aleph One is the open source continuation of Bungie’s Marathon 2 game engine";
|
2024-04-21 15:54:59 +00:00
|
|
|
|
mainProgram = "alephone";
|
2024-01-02 11:29:13 +00:00
|
|
|
|
homepage = "https://alephone.lhowon.org/";
|
|
|
|
|
license = [ lib.licenses.gpl3 ];
|
|
|
|
|
maintainers = with lib.maintainers; [ ehmry ];
|
|
|
|
|
platforms = lib.platforms.linux;
|
|
|
|
|
};
|
|
|
|
|
|
|
|
|
|
passthru.makeWrapper =
|
2024-06-05 15:53:02 +00:00
|
|
|
|
{
|
|
|
|
|
pname,
|
|
|
|
|
desktopName,
|
|
|
|
|
version,
|
|
|
|
|
zip,
|
|
|
|
|
meta,
|
2024-09-26 11:04:55 +00:00
|
|
|
|
icon ? finalAttrs.finalPackage.icons + "/alephone.png",
|
2024-06-05 15:53:02 +00:00
|
|
|
|
...
|
2024-01-02 11:29:13 +00:00
|
|
|
|
}@extraArgs:
|
2024-06-05 15:53:02 +00:00
|
|
|
|
stdenv.mkDerivation (
|
|
|
|
|
{
|
|
|
|
|
inherit pname version;
|
2024-01-02 11:29:13 +00:00
|
|
|
|
|
2024-06-05 15:53:02 +00:00
|
|
|
|
desktopItem = makeDesktopItem {
|
|
|
|
|
name = desktopName;
|
|
|
|
|
exec = pname;
|
|
|
|
|
genericName = pname;
|
|
|
|
|
categories = [ "Game" ];
|
|
|
|
|
comment = meta.description;
|
|
|
|
|
inherit desktopName icon;
|
|
|
|
|
};
|
2024-01-02 11:29:13 +00:00
|
|
|
|
|
2024-06-05 15:53:02 +00:00
|
|
|
|
src = zip;
|
2024-01-02 11:29:13 +00:00
|
|
|
|
|
2024-06-05 15:53:02 +00:00
|
|
|
|
nativeBuildInputs = [
|
|
|
|
|
makeWrapper
|
|
|
|
|
unzip
|
|
|
|
|
];
|
2024-01-02 11:29:13 +00:00
|
|
|
|
|
2024-06-05 15:53:02 +00:00
|
|
|
|
dontConfigure = true;
|
|
|
|
|
dontBuild = true;
|
2024-01-02 11:29:13 +00:00
|
|
|
|
|
2024-06-05 15:53:02 +00:00
|
|
|
|
installPhase = ''
|
|
|
|
|
mkdir -p $out/bin $out/data/$pname $out/share/applications
|
|
|
|
|
cp -a * $out/data/$pname
|
|
|
|
|
cp $desktopItem/share/applications/* $out/share/applications
|
2024-09-26 11:04:55 +00:00
|
|
|
|
makeWrapper ${finalAttrs.finalPackage}/bin/alephone $out/bin/$pname \
|
2024-06-05 15:53:02 +00:00
|
|
|
|
--add-flags $out/data/$pname
|
|
|
|
|
'';
|
|
|
|
|
}
|
|
|
|
|
// extraArgs
|
|
|
|
|
// {
|
|
|
|
|
meta =
|
2024-09-26 11:04:55 +00:00
|
|
|
|
finalAttrs.finalPackage.meta
|
2024-06-05 15:53:02 +00:00
|
|
|
|
// {
|
|
|
|
|
license = lib.licenses.free;
|
|
|
|
|
mainProgram = pname;
|
|
|
|
|
hydraPlatforms = [ ];
|
|
|
|
|
}
|
|
|
|
|
// meta;
|
|
|
|
|
}
|
|
|
|
|
);
|
2024-01-02 11:29:13 +00:00
|
|
|
|
})
|