dit: 0.4 -> 0.5

* dit: 0.4 -> 0.5

adds darwin support
should work on *BSD

* dit: limit to linux
This commit is contained in:
David Kleuker 2019-02-17 16:07:27 +01:00 committed by Ryan Mulligan
parent e48b3308b5
commit 2646ce0afe

View File

@ -1,22 +1,20 @@
{ fetchurl, stdenv, coreutils, ncurses, lua }: { lib, fetchurl, stdenv, libiconv, ncurses, lua }:
stdenv.mkDerivation rec { stdenv.mkDerivation rec {
name = "dit-${version}"; name = "dit-${version}";
version = "0.4"; version = "0.5";
src = fetchurl { src = fetchurl {
url = "https://hisham.hm/dit/releases/${version}/${name}.tar.gz"; url = "https://hisham.hm/dit/releases/${version}/${name}.tar.gz";
sha256 = "0bwczbv7annbbpg7bgbsqd5kwypn81sza4v7v99fin94wwmcn784"; sha256 = "05vhr1gl3bb5fg49v84xhmjaqdjw6djampvylw10ydvbpnpvjvjc";
}; };
buildInputs = [ coreutils ncurses lua ]; buildInputs = [ ncurses lua ]
++ lib.optional stdenv.isDarwin libiconv;
# fix paths
prePatch = '' prePatch = ''
patchShebangs tools/GenHeaders patchShebangs tools/GenHeaders
'';
# needs GNU tail for tail -r
postPatch = ''
substituteInPlace Prototypes.h --replace 'tail' "$(type -P tail)" substituteInPlace Prototypes.h --replace 'tail' "$(type -P tail)"
''; '';