about summary refs log tree commit diff
path: root/nixpkgs/pkgs/applications/editors/jove/default.nix
blob: c2625271665ff01e8bd34019c3eb0c46fd6cfe2e (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
38
39
40
41
42
43
{ lib, stdenv, fetchFromGitHub
, groff
, ncurses
, makeWrapper
} :

stdenv.mkDerivation rec {
  pname = "jove";
  version = "4.17.3.7";

  src = fetchFromGitHub {
    owner = "jonmacs";
    repo = "jove";
    rev = version;
    sha256 = "sha256-fD87FIWZlfJE2tVX+0QaiGGqu+tJFHheXe1guJR/Hxg=";
  };

  nativeBuildInputs = [ makeWrapper ];
  buildInputs = [
    groff
    ncurses
  ];

  dontConfigure = true;

  preBuild = ''
    makeFlagsArray+=(SYSDEFS="-DSYSVR4 -D_XOPEN_SOURCE=500" \
      TERMCAPLIB=-lncurses JOVEHOME=${placeholder "out"})
  '';

  postInstall = ''
    wrapProgram $out/bin/teachjove \
      --prefix PATH ":" "$out/bin"
  '';

  meta = with lib; {
    description = "Jonathan's Own Version or Emacs";
    homepage = "https://github.com/jonmacs/jove";
    license = licenses.bsd2;
    maintainers = with maintainers; [ AndersonTorres ];
    platforms = platforms.unix;
  };
}