2023-10-09 19:29:22 +00:00
|
|
|
{ lib
|
|
|
|
, fetchFromGitHub
|
|
|
|
, fetchpatch
|
|
|
|
, 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";
|
2023-10-09 19:29:22 +00:00
|
|
|
version = "0.9.5";
|
|
|
|
format = "pyproject";
|
2020-04-24 23:36:52 +00:00
|
|
|
|
|
|
|
src = fetchFromGitHub {
|
2020-10-07 09:15:18 +00:00
|
|
|
owner = "pixelb";
|
|
|
|
repo = "crudini";
|
|
|
|
rev = version;
|
2023-10-09 19:29:22 +00:00
|
|
|
hash = "sha256-BU4u7uBsNyDOwWUjOIlBWcf1AeUXXZ+johAe+bjws1U=";
|
2020-04-24 23:36:52 +00:00
|
|
|
};
|
|
|
|
|
|
|
|
postPatch = ''
|
2023-10-09 19:29:22 +00:00
|
|
|
patchShebangs crudini.py crudini-help tests/test.sh
|
2020-04-24 23:36:52 +00:00
|
|
|
'';
|
|
|
|
|
2023-10-09 19:29:22 +00:00
|
|
|
env.SETUPTOOLS_SCM_PRETEND_VERSION = version;
|
|
|
|
|
|
|
|
nativeBuildInputs = [
|
|
|
|
help2man
|
|
|
|
installShellFiles
|
|
|
|
python3Packages.setuptools
|
|
|
|
python3Packages.setuptools-scm
|
|
|
|
python3Packages.wheel
|
|
|
|
];
|
|
|
|
|
|
|
|
propagatedBuildInputs = with python3Packages; [ iniparse ];
|
|
|
|
|
2020-04-24 23:36:52 +00:00
|
|
|
postInstall = ''
|
|
|
|
# this just creates the man page
|
|
|
|
make all
|
|
|
|
|
2023-10-09 19:29:22 +00:00
|
|
|
install -Dm444 -t $out/share/doc/${pname} README.md EXAMPLES
|
2020-04-24 23:36:52 +00:00
|
|
|
installManPage *.1
|
|
|
|
'';
|
|
|
|
|
|
|
|
checkPhase = ''
|
|
|
|
runHook preCheck
|
|
|
|
|
|
|
|
pushd tests >/dev/null
|
2023-10-09 19:29:22 +00:00
|
|
|
./test.sh
|
2020-04-24 23:36:52 +00:00
|
|
|
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 ];
|
2023-10-09 19:29:22 +00:00
|
|
|
mainProgram = "crudini";
|
2020-04-24 23:36:52 +00:00
|
|
|
};
|
|
|
|
}
|