2021-01-19 07:50:56 +01:00
|
|
|
{ lib, stdenv, fetchFromGitHub, mono, gtk-sharp-2_0, pkg-config, makeWrapper, gnome2, gtk2 }:
|
2019-08-13 23:52:01 +02:00
|
|
|
stdenv.mkDerivation {
|
2015-08-16 00:05:29 +02:00
|
|
|
version = "git-2014-08-20";
|
2019-08-15 14:41:18 +02:00
|
|
|
pname = "supertux-editor";
|
2015-08-16 00:05:29 +02:00
|
|
|
|
|
|
|
src = fetchFromGitHub {
|
|
|
|
owner = "SuperTux";
|
|
|
|
repo = "supertux-editor";
|
|
|
|
rev = "0c666e8ccc7daf9e9720fe79abd63f8fa979c5e5";
|
|
|
|
sha256 = "08y5haclgxvcii3hpdvn1ah8qd0f3n8xgxxs8zryj02b8n7cz3vx";
|
|
|
|
};
|
|
|
|
|
2021-02-07 10:17:39 +01:00
|
|
|
nativeBuildInputs = [ pkg-config makeWrapper ];
|
|
|
|
buildInputs = [mono gtk-sharp-2_0 gnome2.libglade gtk2 ];
|
2015-08-16 00:05:29 +02:00
|
|
|
|
|
|
|
installPhase = ''
|
|
|
|
mkdir -p $out/bin $out/lib/supertux-editor
|
|
|
|
cp *.{dll,dll.config,exe} $out/lib/supertux-editor
|
|
|
|
makeWrapper "${mono}/bin/mono" $out/bin/supertux-editor \
|
|
|
|
--add-flags "$out/lib/supertux-editor/supertux-editor.exe" \
|
2016-09-11 23:24:51 +02:00
|
|
|
--prefix MONO_GAC_PREFIX : ${gtk-sharp-2_0} \
|
2015-08-16 00:05:29 +02:00
|
|
|
--suffix LD_LIBRARY_PATH : $(echo $NIX_LDFLAGS | sed 's/ -L/:/g;s/ -rpath /:/g;s/-rpath //')
|
|
|
|
|
|
|
|
makeWrapper "${mono}/bin/mono" $out/bin/supertux-editor-debug \
|
|
|
|
--add-flags "--debug $out/lib/supertux-editor/supertux-editor.exe" \
|
2016-09-11 23:24:51 +02:00
|
|
|
--prefix MONO_GAC_PREFIX : ${gtk-sharp-2_0} \
|
2015-08-16 00:05:29 +02:00
|
|
|
--suffix LD_LIBRARY_PATH : $(echo $NIX_LDFLAGS | sed 's/ -L/:/g;s/ -rpath /:/g;s/-rpath //')
|
|
|
|
'';
|
|
|
|
|
|
|
|
# Always needed on Mono, otherwise nothing runs
|
|
|
|
dontStrip = true;
|
|
|
|
|
2021-01-11 08:54:33 +01:00
|
|
|
meta = with lib; {
|
2015-08-16 00:05:29 +02:00
|
|
|
description = "Level editor for SuperTux";
|
2020-04-01 03:11:51 +02:00
|
|
|
homepage = "https://github.com/SuperTux/supertux-editor";
|
2015-08-16 00:05:29 +02:00
|
|
|
license = licenses.gpl3Plus;
|
|
|
|
maintainers = with maintainers; [ mathnerd314 ];
|
|
|
|
platforms = platforms.linux;
|
|
|
|
};
|
|
|
|
}
|