tarsnapper: add meta

+33 -9
+33 -9
pkgs/tools/backup/tarsnapper/default.nix
··· 1 - { python3Packages, fetchFromGitHub , tarsnap }: 1 + { lib 2 + , python3Packages 3 + , fetchFromGitHub 4 + , tarsnap 5 + }: 2 6 3 7 python3Packages.buildPythonApplication rec { 4 - name = "tarsnapper-${version}"; 8 + pname = "tarsnapper"; 5 9 version = "0.4"; 6 10 7 11 src = fetchFromGitHub { 8 12 owner = "miracle2k"; 9 - repo = "tarsnapper"; 13 + repo = pname; 10 14 rev = version; 11 15 sha256 = "03db49188f4v1946c8mqqj30ah10x68hbg3a58js0syai32v12pm"; 12 16 }; 13 17 14 - checkInputs = with python3Packages; [ nose pytest ]; 18 + propagatedBuildInputs = with python3Packages; [ 19 + pyyaml 20 + python-dateutil 21 + pexpect 22 + ]; 23 + 24 + checkInputs = with python3Packages; [ 25 + nose 26 + ]; 27 + 28 + patches = [ 29 + # Remove standard module argparse from requirements 30 + ./remove-argparse.patch 31 + ]; 32 + 33 + makeWrapperArgs = [ "--prefix PATH : ${lib.makeBinPath [ tarsnap ]}" ]; 15 34 16 35 checkPhase = '' 17 - py.test . 36 + runHook preCheck 37 + nosetests tests 38 + runHook postCheck 18 39 ''; 19 40 20 - propagatedBuildInputs = with python3Packages; [ pyyaml python-dateutil pexpect ]; 41 + pythonImportsCheck = [ "tarsnapper" ]; 21 42 22 - patches = [ ./remove-argparse.patch ]; 23 - 24 - makeWrapperArgs = ["--prefix PATH : ${tarsnap}/bin"]; 43 + meta = with lib; { 44 + description = "Wrapper which expires backups using a gfs-scheme"; 45 + homepage = "https://github.com/miracle2k/tarsnapper"; 46 + license = licenses.bsd2; 47 + maintainers = with maintainers; [ ]; 48 + }; 25 49 }