about summary refs log tree commit diff
path: root/nixpkgs/pkgs/games/doom-ports/eureka-editor/default.nix
blob: 2d547f959048ba83bcc35373d6c8fa093d0dc8a8 (plain) (blame)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
{ lib, stdenv, fetchzip, fltk, zlib, xdg-utils, xorg, libjpeg, libGLU }:

stdenv.mkDerivation rec {
  pname = "eureka-editor";
  version = "1.27b";

  src = fetchzip {
    url = "mirror://sourceforge/eureka-editor/Eureka/${lib.versions.majorMinor version}/eureka-${version}-source.tar.gz";
    sha256 = "075w7xxsgbgh6dhndc1pfxb2h1s5fhsw28yl1c025gmx9bb4v3bf";
  };

  buildInputs = [ fltk zlib xdg-utils libjpeg xorg.libXinerama libGLU ];

  enableParallelBuilding = true;

  postPatch = ''
    substituteInPlace src/main.cc --replace /usr/local $out
    substituteInPlace Makefile    --replace /usr/local $out
  '';

  preInstall = ''
    mkdir -p $out/bin $out/share/applications $out/share/icons $out/man/man6
    cp misc/eureka.desktop $out/share/applications
    cp misc/eureka.ico $out/share/icons
    cp misc/eureka.6 $out/man/man6
  '';

  meta = with lib; {
    homepage = "https://eureka-editor.sourceforge.net";
    description = "A map editor for the classic DOOM games, and a few related games such as Heretic and Hexen";
    mainProgram = "eureka";
    license = licenses.gpl2Plus;
    platforms = platforms.all;
    badPlatforms = platforms.darwin;
    maintainers = with maintainers; [ neonfuz ];
  };
}