Skip to content

Commit

Permalink
crudini: actually run tests and install docs/man
Browse files Browse the repository at this point in the history
  • Loading branch information
peterhoeg committed Jul 26, 2017
1 parent cadb42f commit 998a0e8
Showing 1 changed file with 22 additions and 2 deletions.
24 changes: 22 additions & 2 deletions pkgs/tools/misc/crudini/default.nix
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
{ stdenv, fetchFromGitHub, python2Packages }:
{ stdenv, fetchFromGitHub, python2Packages, help2man }:

python2Packages.buildPythonApplication rec {
name = "crudini-${version}";
Expand All @@ -11,10 +11,30 @@ python2Packages.buildPythonApplication rec {
sha256 = "0x9z9lsygripj88gadag398pc9zky23m16wmh8vbgw7ld1nhkiav";
};

nativeBuildInputs = [ help2man ];
propagatedBuildInputs = with python2Packages; [ iniparse ];

checkPhase = ''
doCheck = true;

prePatch = ''
# make runs the unpatched version in src so we need to patch them in addition to tests
patchShebangs .
'';

postBuild = ''
make all
'';

postInstall = ''
mkdir -p $out/share/{man/man1,doc/crudini}
cp README EXAMPLES $out/share/doc/crudini/
for f in *.1 ; do
gzip -c $f > $out/share/man/man1/$(basename $f).gz
done
'';

checkPhase = ''
pushd tests >/dev/null
./test.sh
'';
Expand Down

0 comments on commit 998a0e8

Please sign in to comment.