diff --git a/pkgs/applications/misc/taskopen/default.nix b/pkgs/applications/misc/taskopen/default.nix index 91790359af4e..88050d2f449d 100644 --- a/pkgs/applications/misc/taskopen/default.nix +++ b/pkgs/applications/misc/taskopen/default.nix @@ -1,20 +1,27 @@ -{ fetchurl, lib, stdenv, makeWrapper, which, perl, perlPackages }: +{ lib, stdenv, fetchFromGitHub, makeWrapper, which, perl, perlPackages }: -stdenv.mkDerivation { - name = "taskopen-1.1.5"; - src = fetchurl { - url = "https://github.com/ValiValpas/taskopen/archive/v1.1.5.tar.gz"; - sha256 = "sha256-7fncdt1wCJ4zNLrCf93yRFD8Q4XQ3DCJ1+zJg9Gcl3w="; +stdenv.mkDerivation rec { + pname = "taskopen"; + version = "1.1.5"; + + src = fetchFromGitHub { + owner = "ValiValpas"; + repo = "taskopen"; + rev = "v${version}"; + sha256 = "sha256-/xf7Ph2KKiZ5lgLKk95nCgw/z9wIBmuWf3QGaNebgHg="; }; - nativeBuildInputs = [ makeWrapper ]; - buildInputs = [ which perl ] ++ (with perlPackages; [ JSON ]); - - installPhase = '' + postPatch = '' # 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 + ''; + nativeBuildInputs = [ makeWrapper ]; + buildInputs = [ which ] + ++ (with perlPackages; [ JSON perl ]); + + installPhase = '' make PREFIX=$out make PREFIX=$out install ''; @@ -28,7 +35,7 @@ stdenv.mkDerivation { description = "Script for taking notes and open urls with taskwarrior"; homepage = "https://github.com/ValiValpas/taskopen"; platforms = platforms.linux; - license = lib.licenses.free ; + license = licenses.free; maintainers = [ maintainers.winpat ]; }; }