Clone of https://github.com/NixOS/nixpkgs.git (to stress-test knotserver)
1{ 2 lib, 3 stdenv, 4 fetchFromGitHub, 5 makeWrapper, 6 which, 7 perl, 8 perlPackages, 9}: 10 11stdenv.mkDerivation rec { 12 pname = "taskopen"; 13 version = "1.1.5"; 14 15 src = fetchFromGitHub { 16 owner = "ValiValpas"; 17 repo = "taskopen"; 18 rev = "v${version}"; 19 sha256 = "sha256-/xf7Ph2KKiZ5lgLKk95nCgw/z9wIBmuWf3QGaNebgHg="; 20 }; 21 22 postPatch = '' 23 # We don't need a DESTDIR and an empty string results in an absolute path 24 # (due to the trailing slash) which breaks the build. 25 sed 's|$(DESTDIR)/||' -i Makefile 26 ''; 27 28 nativeBuildInputs = [ makeWrapper ]; 29 buildInputs = [ 30 which 31 ] 32 ++ (with perlPackages; [ 33 JSON 34 perl 35 ]); 36 37 installPhase = '' 38 make PREFIX=$out 39 make PREFIX=$out install 40 ''; 41 42 postFixup = '' 43 wrapProgram $out/bin/taskopen \ 44 --set PERL5LIB "$PERL5LIB" 45 ''; 46 47 meta = with lib; { 48 description = "Script for taking notes and open urls with taskwarrior"; 49 mainProgram = "taskopen"; 50 homepage = "https://github.com/ValiValpas/taskopen"; 51 platforms = platforms.linux; 52 license = licenses.gpl2Plus; 53 maintainers = [ maintainers.winpat ]; 54 }; 55}