@@ -0,0 +1,39 @@
1+{ stdenv, fetchFromGitHub, mono, gtk-sharp, pkgconfig, makeWrapper, gnome, gtk }:
2+stdenv.mkDerivation rec {
3+ version = "git-2014-08-20";
4+ name = "supertux-editor-${version}";
5+
6+ src = fetchFromGitHub {
7+ owner = "SuperTux";
8+ repo = "supertux-editor";
9+ rev = "0c666e8ccc7daf9e9720fe79abd63f8fa979c5e5";
10+ sha256 = "08y5haclgxvcii3hpdvn1ah8qd0f3n8xgxxs8zryj02b8n7cz3vx";
11+ };
12+
13+ buildInputs = [mono gtk-sharp pkgconfig makeWrapper gnome.libglade gtk ];
14+
15+ installPhase = ''
16+ mkdir -p $out/bin $out/lib/supertux-editor
17+ cp *.{dll,dll.config,exe} $out/lib/supertux-editor
18+ makeWrapper "${mono}/bin/mono" $out/bin/supertux-editor \
19+ --add-flags "$out/lib/supertux-editor/supertux-editor.exe" \
20+ --prefix MONO_GAC_PREFIX : ${gtk-sharp} \
21+ --suffix LD_LIBRARY_PATH : $(echo $NIX_LDFLAGS | sed 's/ -L/:/g;s/ -rpath /:/g;s/-rpath //')
22+
23+ makeWrapper "${mono}/bin/mono" $out/bin/supertux-editor-debug \
24+ --add-flags "--debug $out/lib/supertux-editor/supertux-editor.exe" \
25+ --prefix MONO_GAC_PREFIX : ${gtk-sharp} \
26+ --suffix LD_LIBRARY_PATH : $(echo $NIX_LDFLAGS | sed 's/ -L/:/g;s/ -rpath /:/g;s/-rpath //')
27+ '';
28+
29+ # Always needed on Mono, otherwise nothing runs
30+ dontStrip = true;
31+
32+ meta = with stdenv.lib; {
33+ description = "Level editor for SuperTux";
34+ homepage = https://github.com/SuperTux/supertux-editor;
35+ license = licenses.gpl3Plus;
36+ maintainers = with maintainers; [ mathnerd314 ];
37+ platforms = platforms.linux;
38+ };
39+}