diff options
author | Orivej Desh <orivej@gmx.fr> | 2017-03-18 23:22:48 +0000 |
---|---|---|
committer | Orivej Desh <orivej@gmx.fr> | 2017-03-19 22:36:29 +0000 |
commit | 9d38774a2834b32471bd69b0ec2034ff883d871c (patch) | |
tree | e5cf069e876249e44dfac6951b939f272d2af967 /pkgs/games/gargoyle/default.nix | |
parent | 4385a67ef269215b6804689e849ed2bf793363f0 (diff) | |
download | nixlib-9d38774a2834b32471bd69b0ec2034ff883d871c.tar nixlib-9d38774a2834b32471bd69b0ec2034ff883d871c.tar.gz nixlib-9d38774a2834b32471bd69b0ec2034ff883d871c.tar.bz2 nixlib-9d38774a2834b32471bd69b0ec2034ff883d871c.tar.lz nixlib-9d38774a2834b32471bd69b0ec2034ff883d871c.tar.xz nixlib-9d38774a2834b32471bd69b0ec2034ff883d871c.tar.zst nixlib-9d38774a2834b32471bd69b0ec2034ff883d871c.zip |
gargoyle: init at 2017-03-12
Diffstat (limited to 'pkgs/games/gargoyle/default.nix')
-rw-r--r-- | pkgs/games/gargoyle/default.nix | 60 |
1 files changed, 60 insertions, 0 deletions
diff --git a/pkgs/games/gargoyle/default.nix b/pkgs/games/gargoyle/default.nix new file mode 100644 index 000000000000..ecee61513b42 --- /dev/null +++ b/pkgs/games/gargoyle/default.nix @@ -0,0 +1,60 @@ +{ stdenv, fetchFromGitHub, jam, pkgconfig, gtk2, SDL, SDL_mixer, SDL_sound, smpeg, libvorbis }: + +let + + jamenv = if stdenv.isDarwin then '' + export NIX_CFLAGS_COMPILE="$NIX_CFLAGS_COMPILE -I${SDL.dev}/include/SDL" + export GARGLKINI="$out/Applications/Gargoyle.app/Contents/Resources/garglk.ini" + '' else '' + export NIX_LDFLAGS="$NIX_LDFLAGS -rpath $out/libexec/gargoyle" + export DESTDIR="$out" + export _BINDIR=libexec/gargoyle + export _APPDIR=libexec/gargoyle + export _LIBDIR=libexec/gargoyle + export GARGLKINI="$out/etc/garglk.ini" + ''; + +in + +stdenv.mkDerivation { + name = "gargoyle-2017-03-12"; + + src = fetchFromGitHub { + owner = "garglk"; + repo = "garglk"; + rev = "7d8fe875927c332ea30d75656bc982354b42f602"; + sha256 = "00nac7j84gfql1cr11cs9ad4j1gsxrnkqfx6mis4ijf7d6px3sih"; + }; + + nativeBuildInputs = [ jam pkgconfig ]; + + buildInputs = [ gtk2 SDL SDL_mixer ] ++ ( + if stdenv.isDarwin then [ smpeg libvorbis ] else [ SDL_sound ] + ); + + patches = [ ./darwin.patch ]; + + buildPhase = jamenv + "jam -j$NIX_BUILD_CORES"; + + installPhase = if stdenv.isDarwin then (builtins.readFile ./darwin.sh) else jamenv + '' + jam -j$NIX_BUILD_CORES install + mkdir -p "$out/bin" + ln -s ../libexec/gargoyle/gargoyle "$out/bin" + mkdir -p "$out/etc" + cp garglk/garglk.ini "$out/etc" + mkdir -p "$out/share/applications" + cp garglk/gargoyle.desktop "$out/share/applications" + mkdir -p "$out/share/icons/hicolor/32x32/apps" + cp garglk/gargoyle-house.png "$out/share/icons/hicolor/32x32/apps" + ''; + + enableParallelBuilding = true; + + meta = with stdenv.lib; { + homepage = http://ccxvii.net/gargoyle/; + license = licenses.gpl2Plus; + description = "Interactive fiction interpreter GUI"; + platforms = platforms.unix; + maintainers = with maintainers; [ orivej ]; + }; +} |