nixpkgs/pkgs/applications/misc/tasknc/default.nix
Profpatsch 4a7f99d55d treewide: with stdenv.lib; in meta -> with lib;
Part of: https://github.com/NixOS/nixpkgs/issues/108938

meta = with stdenv.lib;

is a widely used pattern. We want to slowly remove
the `stdenv.lib` indirection and encourage people
to use `lib` directly. Thus let’s start with the meta
field.

This used a rewriting script to mostly automatically
replace all occurances of this pattern, and add the
`lib` argument to the package header if it doesn’t
exist yet.

The script in its current form is available at
https://cs.tvl.fyi/depot@2f807d7f141068d2d60676a89213eaa5353ca6e0/-/blob/users/Profpatsch/nixpkgs-rewriter/default.nix
2021-01-11 10:38:22 +01:00

43 lines
1.1 KiB
Nix

{ lib, stdenv, fetchFromGitHub, makeWrapper, perl, ncurses5, taskwarrior }:
stdenv.mkDerivation rec {
version = "2020-12-17";
pname = "tasknc";
src = fetchFromGitHub {
owner = "lharding";
repo = "tasknc";
rev = "a182661fbcc097a933d5e8cce3922eb1734a563e";
sha256 = "0jrv2k1yizfdjndbl06lmy2bb62ky2rjdk308967j31c5kqqnw56";
};
nativeBuildInputs = [
makeWrapper
perl # For generating the man pages with pod2man
];
buildInputs = [ ncurses5 ];
hardeningDisable = [ "format" ];
buildFlags = [ "VERSION=${version}" ];
installPhase = ''
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
'';
meta = with lib; {
homepage = "https://github.com/lharding/tasknc";
description = "A ncurses wrapper around taskwarrior";
maintainers = with maintainers; [ matthiasbeyer infinisil ];
platforms = platforms.linux; # Cannot test others
license = licenses.mit;
};
}