diff --git a/pkgs/applications/misc/gcalcli/default.nix b/pkgs/applications/misc/gcalcli/default.nix index 759d4983921e..6a55f0ff7420 100644 --- a/pkgs/applications/misc/gcalcli/default.nix +++ b/pkgs/applications/misc/gcalcli/default.nix @@ -2,29 +2,30 @@ stdenv, lib, fetchFromGitHub, - python3, - libnotify ? null, + python3Packages, + libnotify, }: -with python3.pkgs; - -buildPythonApplication rec { +python3Packages.buildPythonApplication rec { pname = "gcalcli"; version = "4.3.0"; + pyproject = true; src = fetchFromGitHub { owner = "insanum"; - repo = pname; - rev = "v${version}"; - sha256 = "0s5fhcmz3n0dwh3vkqr4aigi59q43v03ch5jhh6v75149icwr0df"; + repo = "gcalcli"; + rev = "refs/tags/v${version}"; + hash = "sha256-roHMWUwklLMNhLJANsAeBKcSX1Qk47kH5A3Y8SuDrmg="; }; postPatch = lib.optionalString stdenv.isLinux '' substituteInPlace gcalcli/argparsers.py \ - --replace "'notify-send" "'${libnotify}/bin/notify-send" + --replace-fail "'notify-send" "'${lib.getExe libnotify}" ''; - propagatedBuildInputs = [ + build-system = with python3Packages; [ setuptools ]; + + dependencies = with python3Packages; [ python-dateutil gflags httplib2 @@ -37,7 +38,7 @@ buildPythonApplication rec { libnotify ]; - nativeCheckInputs = [ pytestCheckHook ]; + nativeCheckInputs = with python3Packages; [ pytestCheckHook ]; meta = with lib; { description = "CLI for Google Calendar";