taskopen: modernize

+18 -11
+18 -11
pkgs/applications/misc/taskopen/default.nix
··· 1 - { fetchurl, lib, stdenv, makeWrapper, which, perl, perlPackages }: 1 + { lib, stdenv, fetchFromGitHub, makeWrapper, which, perl, perlPackages }: 2 2 3 - stdenv.mkDerivation { 4 - name = "taskopen-1.1.5"; 5 - src = fetchurl { 6 - url = "https://github.com/ValiValpas/taskopen/archive/v1.1.5.tar.gz"; 7 - sha256 = "sha256-7fncdt1wCJ4zNLrCf93yRFD8Q4XQ3DCJ1+zJg9Gcl3w="; 3 + stdenv.mkDerivation rec { 4 + pname = "taskopen"; 5 + version = "1.1.5"; 6 + 7 + src = fetchFromGitHub { 8 + owner = "ValiValpas"; 9 + repo = "taskopen"; 10 + rev = "v${version}"; 11 + sha256 = "sha256-/xf7Ph2KKiZ5lgLKk95nCgw/z9wIBmuWf3QGaNebgHg="; 8 12 }; 9 13 10 - nativeBuildInputs = [ makeWrapper ]; 11 - buildInputs = [ which perl ] ++ (with perlPackages; [ JSON ]); 12 - 13 - installPhase = '' 14 + postPatch = '' 14 15 # We don't need a DESTDIR and an empty string results in an absolute path 15 16 # (due to the trailing slash) which breaks the build. 16 17 sed 's|$(DESTDIR)/||' -i Makefile 18 + ''; 17 19 20 + nativeBuildInputs = [ makeWrapper ]; 21 + buildInputs = [ which ] 22 + ++ (with perlPackages; [ JSON perl ]); 23 + 24 + installPhase = '' 18 25 make PREFIX=$out 19 26 make PREFIX=$out install 20 27 ''; ··· 28 35 description = "Script for taking notes and open urls with taskwarrior"; 29 36 homepage = "https://github.com/ValiValpas/taskopen"; 30 37 platforms = platforms.linux; 31 - license = lib.licenses.free ; 38 + license = licenses.free; 32 39 maintainers = [ maintainers.winpat ]; 33 40 }; 34 41 }