Merge master into staging-next

This commit is contained in:
github-actions[bot]
2021-01-11 06:33:30 +00:00
committed by GitHub
15 changed files with 550 additions and 8 deletions

View File

@@ -0,0 +1,93 @@
{ stdenv
, fetchsvn
# jdk8 is needed for building, but the game runs on newer jres as well
, jdk8
, jre
, ant
, makeWrapper
, makeDesktopItem
}:
let
desktopItem = makeDesktopItem {
type = "Application";
name = "Domination";
desktopName = "Domination";
exec = "domination";
icon = "domination";
};
editorDesktopItem = makeDesktopItem {
type = "Application";
name = "Domination Map Editor";
desktopName = "Domination Map Editor";
exec = "domination-map-editor";
icon = "domination";
};
in stdenv.mkDerivation {
pname = "domination";
version = "1.2.3";
# The .zip releases do not contain the build.xml file
src = fetchsvn {
url = "https://svn.code.sf.net/p/domination/code/Domination";
# There are no tags in the repository.
# Look for commits like "new version x.y.z info on website"
# or "website update for x.y.z".
rev = "1964";
sha256 = "0718gns8d69a1dfq3ywc9kddl1khnrmxqyal7brckbjgay8dq42f";
};
nativeBuildInputs = [
jdk8
ant
makeWrapper
];
buildPhase = "ant";
installPhase = ''
# Remove unnecessary files and launchers (they'd need to be wrapped anyway)
rm -r \
build/game/src.zip \
build/game/*.sh \
build/game/*.cmd \
build/game/*.exe \
build/game/*.app
mkdir -p $out/share/domination
cp -r build/game/* $out/share/domination/
# Reimplement the two launchers mentioned in Unix_shortcutSpec.xml with makeWrapper
mkdir -p $out/bin
makeWrapper ${jre}/bin/java $out/bin/domination \
--run "cd $out/share/domination" \
--add-flags "-jar $out/share/domination/Domination.jar"
makeWrapper ${jre}/bin/java $out/bin/domination-map-editor \
--run "cd $out/share/domination" \
--add-flags "-cp $out/share/domination/Domination.jar net.yura.domination.ui.swinggui.SwingGUIFrame"
install -Dm644 \
${desktopItem}/share/applications/Domination.desktop \
$out/share/applications/Domination.desktop
install -Dm644 \
"${editorDesktopItem}/share/applications/Domination Map Editor.desktop" \
"$out/share/applications/Domination Map Editor.desktop"
install -Dm644 build/game/resources/icon.png $out/share/pixmaps/domination.png
'';
meta = with stdenv.lib; {
homepage = "http://domination.sourceforge.net/";
downloadPage = "http://domination.sourceforge.net/download.shtml";
description = "A game that is a bit like the board game Risk or RisiKo";
longDescription = ''
Domination is a game that is a bit like the well known board game of Risk
or RisiKo. It has many game options and includes many maps.
It includes a map editor, a simple map format, multiplayer network play,
single player, hotseat, 5 user interfaces and many more features.
'';
license = licenses.gpl3;
maintainers = with maintainers; [ fgaz ];
platforms = platforms.all;
};
}

View File

@@ -0,0 +1,55 @@
{ stdenv
, fetchFromGitLab
, fetchzip
, SDL2, SDL2_mixer, SDL2_net
, gtk3, gobject-introspection
, python3Packages
, wrapGAppsHook
}:
let data = fetchzip {
url = "https://mirandir.pagesperso-orange.fr/files/additional-levels.tar.xz";
sha256 = "167hisscsbldrwrs54gq6446shl8h26qdqigmfg0lq3daynqycg2";
}; in
stdenv.mkDerivation rec {
pname = "jumpnbump";
version = "1.70-dev";
# By targeting the development version, we can omit the patches Arch uses
src = fetchFromGitLab {
domain = "gitlab.com";
owner = "LibreGames";
repo = pname;
rev = "5744738211ca691444f779aafee3537fb3562516";
sha256 = "0f1k26jicmb95bx19wgcdpwsbbl343i7mqqqc2z9lkb8drlsyqcy";
};
makeFlags = [ "PREFIX=$(out)" ];
nativeBuildInputs = [ python3Packages.wrapPython wrapGAppsHook ];
buildInputs = [ SDL2 SDL2_mixer SDL2_net gtk3 gobject-introspection ];
postInstall = ''
make -C menu PREFIX=$out all install
cp -r ${data}/* $out/share/jumpnbump/
rm $out/share/applications/jumpnbump-menu.desktop
sed -ie 's+Exec=jumpnbump+Exec=jumpnbump-menu+' $out/share/applications/jumpnbump.desktop
'';
pythonPath = with python3Packages; [ pygobject3 pillow ];
preFixup = ''
buildPythonPath "$out $pythonPath"
'';
postFixup = ''
wrapPythonPrograms
'';
meta = with stdenv.lib; {
description = "cute, true multiplayer platform game with bunnies";
homepage = "https://libregames.gitlab.io/jumpnbump/";
license = licenses.gpl2Plus;
maintainers = with maintainers; [ iblech ];
platforms = platforms.unix;
};
}