crudini: 0.9 -> 0.9.3
This commit is contained in:
parent
f0fec244ca
commit
85ecfecdbe
@ -1,47 +1,53 @@
|
|||||||
{ stdenv, fetchFromGitHub, python2Packages, help2man }:
|
{ stdenv, fetchFromGitHub, python2Packages, help2man, installShellFiles }:
|
||||||
|
|
||||||
python2Packages.buildPythonApplication rec {
|
let
|
||||||
|
# py3 is supposedly working in version 0.9.3 but the tests fail so stick to py2
|
||||||
|
pypkgs = python2Packages;
|
||||||
|
|
||||||
|
in
|
||||||
|
pypkgs.buildPythonApplication rec {
|
||||||
pname = "crudini";
|
pname = "crudini";
|
||||||
version = "0.9";
|
version = "0.9.3";
|
||||||
|
|
||||||
src = fetchFromGitHub {
|
src = fetchFromGitHub {
|
||||||
owner = "pixelb";
|
owner = "pixelb";
|
||||||
repo = "crudini";
|
repo = "crudini";
|
||||||
rev = version;
|
rev = version;
|
||||||
sha256 = "0x9z9lsygripj88gadag398pc9zky23m16wmh8vbgw7ld1nhkiav";
|
sha256 = "0298hvg0fpk0m0bjpwryj3icksbckwqqsr9w1ain55wf5s0v24k3";
|
||||||
};
|
};
|
||||||
|
|
||||||
nativeBuildInputs = [ help2man ];
|
nativeBuildInputs = [ help2man installShellFiles ];
|
||||||
propagatedBuildInputs = with python2Packages; [ iniparse ];
|
|
||||||
|
|
||||||
doCheck = true;
|
propagatedBuildInputs = with pypkgs; [ iniparse ];
|
||||||
|
|
||||||
prePatch = ''
|
postPatch = ''
|
||||||
# make runs the unpatched version in src so we need to patch them in addition to tests
|
substituteInPlace crudini-help \
|
||||||
patchShebangs .
|
--replace ./crudini $out/bin/crudini
|
||||||
'';
|
substituteInPlace tests/test.sh \
|
||||||
|
--replace ..: $out/bin:
|
||||||
postBuild = ''
|
|
||||||
make all
|
|
||||||
'';
|
'';
|
||||||
|
|
||||||
postInstall = ''
|
postInstall = ''
|
||||||
mkdir -p $out/share/{man/man1,doc/crudini}
|
# this just creates the man page
|
||||||
|
make all
|
||||||
|
|
||||||
cp README EXAMPLES $out/share/doc/crudini/
|
install -Dm444 -t $out/share/doc/${pname} README EXAMPLES
|
||||||
for f in *.1 ; do
|
installManPage *.1
|
||||||
gzip -c $f > $out/share/man/man1/$(basename $f).gz
|
|
||||||
done
|
|
||||||
'';
|
'';
|
||||||
|
|
||||||
checkPhase = ''
|
checkPhase = ''
|
||||||
|
runHook preCheck
|
||||||
|
|
||||||
pushd tests >/dev/null
|
pushd tests >/dev/null
|
||||||
./test.sh
|
bash ./test.sh
|
||||||
|
popd >/dev/null
|
||||||
|
|
||||||
|
runHook postCheck
|
||||||
'';
|
'';
|
||||||
|
|
||||||
meta = with stdenv.lib; {
|
meta = with stdenv.lib; {
|
||||||
description = "A utility for manipulating ini files ";
|
description = "A utility for manipulating ini files ";
|
||||||
homepage = http://www.pixelbeat.org/programs/crudini/;
|
homepage = "https://www.pixelbeat.org/programs/crudini/";
|
||||||
license = licenses.gpl2;
|
license = licenses.gpl2;
|
||||||
maintainers = with maintainers; [ peterhoeg ];
|
maintainers = with maintainers; [ peterhoeg ];
|
||||||
};
|
};
|
||||||
|
Loading…
x
Reference in New Issue
Block a user