Merge pull request #35235 from dotlambda/ddar

ddar: move out of pythonPackages and fix tests
This commit is contained in:
Frederik Rietdijk 2018-02-20 20:41:21 +00:00 committed by GitHub
commit 452958f498
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
5 changed files with 111 additions and 21 deletions

View File

@ -0,0 +1,39 @@
{ lib, buildPythonApplication, fetchFromGitHub, python, protobuf, roundup }:
buildPythonApplication rec {
pname = "ddar";
version = "1.0";
src = fetchFromGitHub {
owner = "basak";
repo = pname;
rev = "v${version}";
sha256 = "158jdy5261k9yw540g48hddy5zyqrr81ir9fjlcy4jnrwfkg7ynm";
};
prePatch = ''
substituteInPlace t/local-functions \
--replace 'PATH="$ddar_src:$PATH"' 'PATH="$out/bin:$PATH"'
# Test requires additional software and compilation of some C programs
substituteInPlace t/basic-test.sh \
--replace it_stores_and_extracts_corpus0 dont_test
'';
preBuild = ''
make -f Makefile.prep synctus/ddar_pb2.py
'';
propagatedBuildInputs = [ protobuf ];
checkInputs = [ roundup ];
checkPhase = ''
roundup t/basic-test.sh
'';
meta = with lib; {
description = "Unix de-duplicating archiver";
license = licenses.gpl3;
homepage = src.meta.homepage;
};
}

View File

@ -0,0 +1,38 @@
{ stdenv, fetchFromGitHub, ronn, shocco }:
stdenv.mkDerivation rec {
name = "roundup-${version}";
version = "0.0.6";
src = fetchFromGitHub {
owner = "bmizerany";
repo = "roundup";
rev = "v${version}";
sha256 = "0nxaqmbv8mdvq9wcaqxk6k5mr31i68jzxf1wxa6pp7xp4prwdc9z";
};
prePatch = ''
# Don't change $PATH
substituteInPlace configure --replace PATH= NIRVANA=
# There are only man pages in sections 1 and 5 \
substituteInPlace Makefile --replace "{1..9}" "1 5"
'';
nativeBuildInputs = [ ronn shocco ];
installTargets = [ "install" "install-man" ];
preInstall = ''
for i in 1 5; do
mkdir -p $out/share/man/man$i
done
'';
meta = with stdenv.lib; {
description = "A unit testing tool for running test plans which are written in any POSIX shell";
homepage = http://bmizerany.github.io/roundup/;
license = licenses.mit;
maintainers = with maintainers; [ dotlambda ];
platforms = platforms.all;
};
}

View File

@ -0,0 +1,28 @@
{ stdenv, fetchFromGitHub, perlPackages, pythonPackages }:
stdenv.mkDerivation rec {
name = "shocco-${version}";
version = "1.0";
src = fetchFromGitHub {
owner = "rtomayko";
repo = "shocco";
rev = version;
sha256 = "1nkwcw9fqf4vyrwidqi6by7nrmainkjqkirkz3yxmzk6kzwr38mi";
};
prePatch = ''
# Don't change $PATH
substituteInPlace configure --replace PATH= NIRVANA=
'';
buildInputs = [ perlPackages.TextMarkdown pythonPackages.pygments ];
meta = with stdenv.lib; {
description = "A quick-and-dirty, literate-programming-style documentation generator for / in POSIX shell";
homepage = https://rtomayko.github.io/shocco/;
license = licenses.mit;
platforms = platforms.all;
maintainers = with maintainers; [ dotlambda ];
};
}

View File

@ -1040,6 +1040,8 @@ with pkgs;
dateutils = callPackage ../tools/misc/dateutils { };
ddar = pythonPackages.callPackage ../tools/backup/ddar { };
ddate = callPackage ../tools/misc/ddate { };
dehydrated = callPackage ../tools/admin/dehydrated { };
@ -4507,6 +4509,8 @@ with pkgs;
rnv = callPackage ../tools/text/xml/rnv { };
roundup = callPackage ../tools/misc/roundup { };
routino = callPackage ../tools/misc/routino { };
rq = callPackage ../development/tools/rq {
@ -4637,6 +4641,8 @@ with pkgs;
sharutils = callPackage ../tools/archivers/sharutils { };
shocco = callPackage ../tools/text/shocco { };
shotwell = callPackage ../applications/graphics/shotwell { };
shout = nodePackages.shout;

View File

@ -3836,27 +3836,6 @@ in {
};
});
ddar = buildPythonPackage {
name = "ddar-1.0";
src = pkgs.fetchurl {
url = "https://github.com/basak/ddar/archive/v1.0.tar.gz";
sha256 = "08lv7hrbhcv6hbl01sx8fgx3l8s2nn8rvcicdidafwm87bvi2nmr";
};
preBuild = ''
make -f Makefile.prep synctus/ddar_pb2.py
'';
propagatedBuildInputs = with self; [ protobuf ];
meta = {
description = "Unix de-duplicating archiver";
license = licenses.gpl3;
homepage = https://github.com/basak/ddar;
};
};
decorator = callPackage ../development/python-modules/decorator { };
deform = buildPythonPackage rec {