2021-09-12 13:11:49 +00:00
|
|
|
{ lib, stdenv, fetchFromGitHub, makeWrapper, which, perl, perlPackages }:
|
2019-04-24 16:21:52 +00:00
|
|
|
|
2021-09-12 13:11:49 +00:00
|
|
|
stdenv.mkDerivation rec {
|
|
|
|
pname = "taskopen";
|
|
|
|
version = "1.1.5";
|
2019-04-24 16:21:52 +00:00
|
|
|
|
2021-09-12 13:11:49 +00:00
|
|
|
src = fetchFromGitHub {
|
|
|
|
owner = "ValiValpas";
|
|
|
|
repo = "taskopen";
|
|
|
|
rev = "v${version}";
|
|
|
|
sha256 = "sha256-/xf7Ph2KKiZ5lgLKk95nCgw/z9wIBmuWf3QGaNebgHg=";
|
|
|
|
};
|
2019-04-24 16:21:52 +00:00
|
|
|
|
2021-09-12 13:11:49 +00:00
|
|
|
postPatch = ''
|
2019-04-24 16:21:52 +00:00
|
|
|
# We don't need a DESTDIR and an empty string results in an absolute path
|
|
|
|
# (due to the trailing slash) which breaks the build.
|
|
|
|
sed 's|$(DESTDIR)/||' -i Makefile
|
2021-09-12 13:11:49 +00:00
|
|
|
'';
|
|
|
|
|
|
|
|
nativeBuildInputs = [ makeWrapper ];
|
|
|
|
buildInputs = [ which ]
|
|
|
|
++ (with perlPackages; [ JSON perl ]);
|
2019-04-24 16:21:52 +00:00
|
|
|
|
2021-09-12 13:11:49 +00:00
|
|
|
installPhase = ''
|
2019-04-24 16:21:52 +00:00
|
|
|
make PREFIX=$out
|
|
|
|
make PREFIX=$out install
|
|
|
|
'';
|
|
|
|
|
|
|
|
postFixup = ''
|
|
|
|
wrapProgram $out/bin/taskopen \
|
|
|
|
--set PERL5LIB "$PERL5LIB"
|
|
|
|
'';
|
|
|
|
|
2021-01-11 07:54:33 +00:00
|
|
|
meta = with lib; {
|
2019-04-24 16:21:52 +00:00
|
|
|
description = "Script for taking notes and open urls with taskwarrior";
|
2024-03-19 02:14:51 +00:00
|
|
|
mainProgram = "taskopen";
|
2020-04-01 01:11:51 +00:00
|
|
|
homepage = "https://github.com/ValiValpas/taskopen";
|
2019-04-24 16:21:52 +00:00
|
|
|
platforms = platforms.linux;
|
2023-12-30 14:46:49 +00:00
|
|
|
license = licenses.gpl2Plus;
|
2019-04-24 16:21:52 +00:00
|
|
|
maintainers = [ maintainers.winpat ];
|
|
|
|
};
|
|
|
|
}
|