2019-02-17 15:07:27 +00:00
|
|
|
{ lib, fetchurl, stdenv, libiconv, ncurses, lua }:
|
2018-04-10 04:28:02 +00:00
|
|
|
|
|
|
|
stdenv.mkDerivation rec {
|
2019-08-15 12:41:18 +00:00
|
|
|
pname = "dit";
|
2023-09-05 12:01:11 +00:00
|
|
|
version = "0.9";
|
2018-04-10 04:28:02 +00:00
|
|
|
|
|
|
|
src = fetchurl {
|
2019-08-15 12:41:18 +00:00
|
|
|
url = "https://hisham.hm/dit/releases/${version}/${pname}-${version}.tar.gz";
|
2023-09-05 12:01:11 +00:00
|
|
|
hash = "sha256-p1uD0Q2kqB40fbAEk7/fdOVg9T7SW+2aACSn7hDAD+E=";
|
2018-04-10 04:28:02 +00:00
|
|
|
};
|
|
|
|
|
2019-02-17 15:07:27 +00:00
|
|
|
buildInputs = [ ncurses lua ]
|
|
|
|
++ lib.optional stdenv.isDarwin libiconv;
|
2018-04-10 04:28:02 +00:00
|
|
|
|
2019-02-17 15:07:27 +00:00
|
|
|
# fix paths
|
2018-04-10 04:28:02 +00:00
|
|
|
prePatch = ''
|
|
|
|
patchShebangs tools/GenHeaders
|
|
|
|
substituteInPlace Prototypes.h --replace 'tail' "$(type -P tail)"
|
|
|
|
'';
|
|
|
|
|
2021-01-11 07:54:33 +00:00
|
|
|
meta = with lib; {
|
2018-04-10 04:28:02 +00:00
|
|
|
description = "A console text editor for Unix that you already know how to use";
|
2020-04-09 15:42:03 +00:00
|
|
|
homepage = "https://hisham.hm/dit/";
|
2018-04-10 04:28:02 +00:00
|
|
|
license = licenses.gpl2;
|
|
|
|
platforms = with platforms; linux;
|
|
|
|
maintainers = with maintainers; [ davidak ];
|
2023-11-27 01:17:53 +00:00
|
|
|
mainProgram = "dit";
|
2018-04-10 04:28:02 +00:00
|
|
|
};
|
|
|
|
}
|