2021-11-06 11:32:39 +00:00
|
|
|
{ lib, stdenv, fetchFromGitHub, fetchpatch, makeWrapper, perl, ncurses5, taskwarrior }:
|
2015-03-07 14:48:35 +00:00
|
|
|
|
|
|
|
stdenv.mkDerivation rec {
|
2020-12-17 17:47:54 +00:00
|
|
|
version = "2020-12-17";
|
2019-08-15 13:41:18 +01:00
|
|
|
pname = "tasknc";
|
2015-03-07 14:48:35 +00:00
|
|
|
|
2018-02-02 09:23:29 +00:00
|
|
|
src = fetchFromGitHub {
|
|
|
|
owner = "lharding";
|
|
|
|
repo = "tasknc";
|
2020-12-17 17:47:54 +00:00
|
|
|
rev = "a182661fbcc097a933d5e8cce3922eb1734a563e";
|
|
|
|
sha256 = "0jrv2k1yizfdjndbl06lmy2bb62ky2rjdk308967j31c5kqqnw56";
|
2015-03-07 14:48:35 +00:00
|
|
|
};
|
|
|
|
|
2021-11-06 11:32:39 +00:00
|
|
|
# Pull pending upstream inclusion for ncurses-6.3:
|
|
|
|
# https://github.com/lharding/tasknc/pull/57
|
|
|
|
patches = [
|
|
|
|
(fetchpatch {
|
|
|
|
name = "ncurses-6.3.patch";
|
|
|
|
url = "https://github.com/lharding/tasknc/commit/f74ea0641e9bf287acf22fac9f6eeea571b01800.patch";
|
|
|
|
sha256 = "18a90zj85sw2zfnfcv055nvi0lx3h8lcgsyabdfk94ksn78pygrv";
|
|
|
|
})
|
|
|
|
];
|
|
|
|
|
2018-02-02 09:23:29 +00:00
|
|
|
nativeBuildInputs = [
|
|
|
|
makeWrapper
|
|
|
|
perl # For generating the man pages with pod2man
|
|
|
|
];
|
|
|
|
|
2018-06-20 22:18:14 +01:00
|
|
|
buildInputs = [ ncurses5 ];
|
2018-02-02 09:23:29 +00:00
|
|
|
|
2016-02-26 17:38:15 +00:00
|
|
|
hardeningDisable = [ "format" ];
|
2016-02-08 00:21:29 +00:00
|
|
|
|
2018-02-02 09:23:29 +00:00
|
|
|
buildFlags = [ "VERSION=${version}" ];
|
2015-03-07 14:48:35 +00:00
|
|
|
|
|
|
|
installPhase = ''
|
2018-02-02 09:23:29 +00:00
|
|
|
mkdir -p $out/bin/
|
|
|
|
mkdir -p $out/share/man/man1
|
|
|
|
mkdir -p $out/share/tasknc
|
|
|
|
|
|
|
|
DESTDIR=$out PREFIX= MANPREFIX=/share/man make install
|
|
|
|
|
|
|
|
wrapProgram $out/bin/tasknc --prefix PATH : ${taskwarrior}/bin
|
2015-03-07 14:48:35 +00:00
|
|
|
'';
|
|
|
|
|
|
|
|
|
2021-01-11 07:54:33 +00:00
|
|
|
meta = with lib; {
|
2020-04-01 02:11:51 +01:00
|
|
|
homepage = "https://github.com/lharding/tasknc";
|
2016-06-20 11:53:46 +01:00
|
|
|
description = "A ncurses wrapper around taskwarrior";
|
2019-02-20 18:52:48 +00:00
|
|
|
maintainers = with maintainers; [ matthiasbeyer infinisil ];
|
2018-02-02 09:23:29 +00:00
|
|
|
platforms = platforms.linux; # Cannot test others
|
2018-08-04 15:47:10 +01:00
|
|
|
license = licenses.mit;
|
2015-03-07 14:48:35 +00:00
|
|
|
};
|
|
|
|
}
|