From d7d609790a94b3b5f7a2c6107b151264f6d83b2d Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Robert=20Sch=C3=BCtz?= Date: Tue, 28 Dec 2021 09:35:57 +0000 Subject: [PATCH] yrd: use python3 --- pkgs/tools/networking/yrd/default.nix | 28 ++++++++++++++++++--------- 1 file changed, 19 insertions(+), 9 deletions(-) diff --git a/pkgs/tools/networking/yrd/default.nix b/pkgs/tools/networking/yrd/default.nix index 75a89b859fe..1aace6aefbb 100644 --- a/pkgs/tools/networking/yrd/default.nix +++ b/pkgs/tools/networking/yrd/default.nix @@ -1,27 +1,37 @@ -{ lib, fetchFromGitHub, pythonPackages }: +{ lib +, python3 +, fetchFromGitHub +}: -let +python3.pkgs.buildPythonApplication rec { pname = "yrd"; version = "0.5.3"; - sha256 = "1yx1hr8z4cvlb3yi24dwafs0nxq41k4q477jc9q24w61a0g662ps"; - -in pythonPackages.buildPythonApplication { - name = "${pname}-${version}"; src = fetchFromGitHub { owner = "kpcyrd"; repo = pname; rev = "v${version}"; - inherit sha256; + sha256 = "1yx1hr8z4cvlb3yi24dwafs0nxq41k4q477jc9q24w61a0g662ps"; }; - propagatedBuildInputs = with pythonPackages; [ argh ]; + propagatedBuildInputs = with python3.pkgs; [ + argh + requests + ]; + + checkInputs = with python3.pkgs; [ + nose + ]; + + checkPhase = '' + nosetests -v yrd + ''; meta = with lib; { description = "Cjdns swiss army knife"; maintainers = with maintainers; [ akru ]; platforms = platforms.linux; - license = licenses.gpl3; + license = licenses.gpl3Only; homepage = "https://github.com/kpcyrd/yrd"; }; }