2019-02-17 15:07:27 +00:00
|
|
|
{ lib, fetchurl, stdenv, libiconv, ncurses, lua }:
|
2018-04-10 05:28:02 +01:00
|
|
|
|
|
|
|
stdenv.mkDerivation rec {
|
|
|
|
name = "dit-${version}";
|
2019-02-17 15:07:27 +00:00
|
|
|
version = "0.5";
|
2018-04-10 05:28:02 +01:00
|
|
|
|
|
|
|
src = fetchurl {
|
|
|
|
url = "https://hisham.hm/dit/releases/${version}/${name}.tar.gz";
|
2019-02-17 15:07:27 +00:00
|
|
|
sha256 = "05vhr1gl3bb5fg49v84xhmjaqdjw6djampvylw10ydvbpnpvjvjc";
|
2018-04-10 05:28:02 +01:00
|
|
|
};
|
|
|
|
|
2019-02-17 15:07:27 +00:00
|
|
|
buildInputs = [ ncurses lua ]
|
|
|
|
++ lib.optional stdenv.isDarwin libiconv;
|
2018-04-10 05:28:02 +01:00
|
|
|
|
2019-02-17 15:07:27 +00:00
|
|
|
# fix paths
|
2018-04-10 05:28:02 +01:00
|
|
|
prePatch = ''
|
|
|
|
patchShebangs tools/GenHeaders
|
|
|
|
substituteInPlace Prototypes.h --replace 'tail' "$(type -P tail)"
|
|
|
|
'';
|
|
|
|
|
|
|
|
meta = with stdenv.lib; {
|
|
|
|
description = "A console text editor for Unix that you already know how to use";
|
|
|
|
homepage = https://hisham.hm/dit/;
|
|
|
|
license = licenses.gpl2;
|
|
|
|
platforms = with platforms; linux;
|
|
|
|
maintainers = with maintainers; [ davidak ];
|
|
|
|
};
|
|
|
|
}
|