2021-01-11 07:54:33 +00:00
|
|
|
|
{ lib, stdenv, fetchurl, boost, curl, ffmpeg, icoutils, libGLU, libmad, libogg
|
2021-01-17 02:04:36 +00:00
|
|
|
|
, libpng, libsndfile, libvorbis, lua, pkg-config, SDL2, SDL2_image, SDL2_net
|
2020-12-09 13:47:30 +00:00
|
|
|
|
, SDL2_ttf, smpeg, speex, zziplib, zlib, makeWrapper, makeDesktopItem, unzip
|
|
|
|
|
, alephone }:
|
2020-02-11 20:32:39 +00:00
|
|
|
|
|
|
|
|
|
let
|
|
|
|
|
self = stdenv.mkDerivation rec {
|
|
|
|
|
outputs = [ "out" "icons" ];
|
|
|
|
|
pname = "alephone";
|
2020-12-09 13:47:30 +00:00
|
|
|
|
version = "1.3.1";
|
2020-02-11 20:32:39 +00:00
|
|
|
|
|
|
|
|
|
src = fetchurl {
|
2020-12-09 13:47:30 +00:00
|
|
|
|
url = let date = "20200904";
|
|
|
|
|
in "https://github.com/Aleph-One-Marathon/alephone/releases/download/release-${date}/AlephOne-${date}.tar.bz2";
|
|
|
|
|
sha256 = "13ck3mp9qd5pkiq6zwvr744bwvmnqkgj5vpf325sz1mcvnv7l8lh";
|
2020-02-11 20:32:39 +00:00
|
|
|
|
};
|
|
|
|
|
|
2021-01-17 02:04:36 +00:00
|
|
|
|
nativeBuildInputs = [ pkg-config icoutils ];
|
2020-02-11 20:32:39 +00:00
|
|
|
|
|
|
|
|
|
buildInputs = [
|
|
|
|
|
boost
|
|
|
|
|
curl
|
|
|
|
|
ffmpeg
|
2020-12-09 13:47:30 +00:00
|
|
|
|
libGLU
|
2020-02-11 20:32:39 +00:00
|
|
|
|
libmad
|
|
|
|
|
libsndfile
|
|
|
|
|
libogg
|
|
|
|
|
libpng
|
|
|
|
|
libvorbis
|
|
|
|
|
lua
|
2020-12-09 13:47:30 +00:00
|
|
|
|
SDL2
|
|
|
|
|
SDL2_image
|
|
|
|
|
SDL2_net
|
|
|
|
|
SDL2_ttf
|
2020-02-11 20:32:39 +00:00
|
|
|
|
smpeg
|
|
|
|
|
speex
|
|
|
|
|
zziplib
|
|
|
|
|
zlib
|
|
|
|
|
];
|
|
|
|
|
|
|
|
|
|
configureFlags = [ "--with-boost=${boost}" ];
|
|
|
|
|
|
|
|
|
|
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-11 07:54:33 +00:00
|
|
|
|
meta = with lib; {
|
2020-02-11 20:32:39 +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;
|
|
|
|
|
categories = "Game;";
|
|
|
|
|
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
|
|
|
|
|
'';
|
|
|
|
|
|
2020-04-10 11:40:59 +00:00
|
|
|
|
meta = alephone.meta // {
|
2021-01-15 04:31:39 +00:00
|
|
|
|
license = lib.licenses.free;
|
2020-04-10 11:40:59 +00:00
|
|
|
|
hydraPlatforms = [ ];
|
|
|
|
|
} // meta;
|
2021-02-11 13:55:01 +00:00
|
|
|
|
} // extraArgs);
|
2020-02-11 20:32:39 +00:00
|
|
|
|
}
|