2021-02-05 17:12:51 +00:00
|
|
|
{ lib, fetchFromGitHub, python3Packages, help2man, installShellFiles }:
|
2020-04-24 23:36:52 +00:00
|
|
|
|
2020-10-07 09:15:18 +00:00
|
|
|
python3Packages.buildPythonApplication rec {
|
2020-04-24 23:36:52 +00:00
|
|
|
pname = "crudini";
|
|
|
|
version = "0.9.3";
|
|
|
|
|
|
|
|
src = fetchFromGitHub {
|
2020-10-07 09:15:18 +00:00
|
|
|
owner = "pixelb";
|
|
|
|
repo = "crudini";
|
|
|
|
rev = version;
|
2020-04-24 23:36:52 +00:00
|
|
|
sha256 = "0298hvg0fpk0m0bjpwryj3icksbckwqqsr9w1ain55wf5s0v24k3";
|
|
|
|
};
|
|
|
|
|
|
|
|
nativeBuildInputs = [ help2man installShellFiles ];
|
|
|
|
|
2020-10-07 09:15:18 +00:00
|
|
|
propagatedBuildInputs = with python3Packages; [ iniparse ];
|
2020-04-24 23:36:52 +00:00
|
|
|
|
|
|
|
postPatch = ''
|
|
|
|
substituteInPlace crudini-help \
|
|
|
|
--replace ./crudini $out/bin/crudini
|
|
|
|
substituteInPlace tests/test.sh \
|
|
|
|
--replace ..: $out/bin:
|
|
|
|
'';
|
|
|
|
|
|
|
|
postInstall = ''
|
|
|
|
# this just creates the man page
|
|
|
|
make all
|
|
|
|
|
|
|
|
install -Dm444 -t $out/share/doc/${pname} README EXAMPLES
|
|
|
|
installManPage *.1
|
|
|
|
'';
|
|
|
|
|
|
|
|
checkPhase = ''
|
|
|
|
runHook preCheck
|
|
|
|
|
|
|
|
pushd tests >/dev/null
|
|
|
|
bash ./test.sh
|
|
|
|
popd >/dev/null
|
|
|
|
|
|
|
|
runHook postCheck
|
|
|
|
'';
|
|
|
|
|
2021-01-15 22:18:51 +00:00
|
|
|
meta = with lib; {
|
2020-04-24 23:36:52 +00:00
|
|
|
description = "A utility for manipulating ini files ";
|
|
|
|
homepage = "https://www.pixelbeat.org/programs/crudini/";
|
2020-10-07 09:15:18 +00:00
|
|
|
license = licenses.gpl2Only;
|
2020-04-24 23:36:52 +00:00
|
|
|
maintainers = with maintainers; [ peterhoeg ];
|
|
|
|
};
|
|
|
|
}
|