-
-
Save sflavelle/b314eabd6f84d7843076a8a3d611dd2b to your computer and use it in GitHub Desktop.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
with import <nixpkgs> {}; | |
with python311Packages; | |
buildPythonApplication rec { | |
pname = "Archipelago"; | |
version = "0.4.4"; | |
format = "other"; | |
disabled = pythonOlder "3.8"; | |
src = fetchFromGitHub { | |
owner = "ArchipelagoMW"; | |
repo = "Archipelago"; | |
rev = version; | |
hash = "sha256-8PTssTxupdu7nRmk7kevpHcD14G2YsmwoiXpQWzUxds="; | |
fetchSubmodules = true; | |
}; | |
nativeBuildInputs = [ | |
copyDesktopItems | |
makeWrapper | |
ensureNewerSourcesForZipFilesHook | |
pip wheel setuptools cx-freeze pygobject3 | |
charset-normalizer | |
git | |
]; | |
propagatedBuildInputs = [ | |
bsdiff4 | |
certifi | |
colorama | |
cymem | |
cython | |
jellyfish | |
jinja2 | |
kivy | |
orjson | |
platformdirs | |
pyyaml | |
schema | |
websockets | |
nest-asyncio | |
]; | |
preBuild = '' | |
sed -ie "s/input(/print(/g" ModuleUpdate.py | |
''; | |
buildPhase = '' | |
# pygobject is an optional dependency for kivy that's not in requirements | |
# charset-normalizer was somehow incomplete in the github runner | |
python -m venv venv | |
source venv/bin/activate | |
python setup.py build_exe --yes bdist_appimage --yes | |
echo -e "setup.py build output:\n `ls build`" | |
echo -e "setup.py dist output:\n `ls dist`" | |
# cd dist && export APPIMAGE_NAME="`ls *.AppImage`" && cd .. | |
# export TAR_NAME="''${APPIMAGE_NAME%.AppImage}.tar.gz" | |
# (cd build && DIR_NAME="`ls | grep exe`" && mv "$DIR_NAME" Archipelago && tar -czvf ../dist/$TAR_NAME Archipelago && mv Archipelago "$DIR_NAME") | |
# echo "APPIMAGE_NAME=$APPIMAGE_NAME" >> $GITHUB_ENV | |
# echo "TAR_NAME=$TAR_NAME" >> $GITHUB_ENV | |
''; | |
pythonImportsCheck = [ "Archipelago" ]; | |
meta = { | |
homepage = "https://archipelago.gg/"; | |
description = "A multi-game, multi-world randomizer framework"; | |
license = lib.licenses.mit; | |
platforms = [ "x86_64-linux" ]; | |
mainProgram = "ArchipelagoLauncher"; | |
}; | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment