From b8ee16d6c7b2ed407f0cbb15fadb9c5cd90b91b1 Mon Sep 17 00:00:00 2001 From: Fabian Affolter Date: Mon, 5 Dec 2022 20:10:34 +0100 Subject: [PATCH] opentimestamps-client: update style - enable tests - specify license - add pythonImportsCheck - add changelog to meta --- .../misc/opentimestamps-client/default.nix | 31 +++++++++++++------ 1 file changed, 22 insertions(+), 9 deletions(-) diff --git a/pkgs/tools/misc/opentimestamps-client/default.nix b/pkgs/tools/misc/opentimestamps-client/default.nix index 6c17cf62a640..93c10530697f 100644 --- a/pkgs/tools/misc/opentimestamps-client/default.nix +++ b/pkgs/tools/misc/opentimestamps-client/default.nix @@ -1,27 +1,40 @@ -{ lib, buildPythonApplication, fetchFromGitHub, isPy3k -, opentimestamps, appdirs, GitPython, pysocks, fetchpatch, git +{ lib +, fetchFromGitHub +, python3 }: -buildPythonApplication rec { +python3.pkgs.buildPythonApplication rec { pname = "opentimestamps-client"; version = "0.7.1"; - disabled = (!isPy3k); + format = "setuptools"; - # We can't use the pypi source because it doesn't include README.md which is - # needed in setup.py src = fetchFromGitHub { owner = "opentimestamps"; repo = "opentimestamps-client"; rev = "refs/tags/opentimestamps-client-v${version}"; - sha256 = "sha256-0dWaXetRlF1MveBdJ0sAdqJ5HCdn08gkbX+nen/ygsQ="; + hash = "sha256-0dWaXetRlF1MveBdJ0sAdqJ5HCdn08gkbX+nen/ygsQ="; }; - propagatedBuildInputs = [ opentimestamps appdirs GitPython pysocks ]; + propagatedBuildInputs = with python3.pkgs; [ + appdirs + gitpython + opentimestamps + pysocks + ]; + + checkInputs = with python3.pkgs; [ + pytestCheckHook + ]; + + pythonImportsCheck = [ + "otsclient" + ]; meta = with lib; { description = "Command-line tool to create and verify OpenTimestamps proofs"; homepage = "https://github.com/opentimestamps/opentimestamps-client"; - license = licenses.lgpl3; + changelog = "https://github.com/opentimestamps/opentimestamps-client/releases/tag/opentimestamps-client-v${version}"; + license = licenses.lgpl3Only; maintainers = with maintainers; [ erikarvstedt ]; }; }