crudini: 0.9.3 -> 0.9.4

This commit is contained in:
Theodore Ni 2023-08-29 11:21:22 -07:00 committed by Peter Hoeg
parent 63f920e4f2
commit fae0b99edc

View file

@ -1,32 +1,52 @@
{ lib, fetchFromGitHub, python3Packages, help2man, installShellFiles }: { lib
, fetchFromGitHub
, fetchpatch
, python3Packages
, help2man
, installShellFiles
}:
python3Packages.buildPythonApplication rec { python3Packages.buildPythonApplication rec {
pname = "crudini"; pname = "crudini";
version = "0.9.3"; version = "0.9.4";
format = "pyproject";
src = fetchFromGitHub { src = fetchFromGitHub {
owner = "pixelb"; owner = "pixelb";
repo = "crudini"; repo = "crudini";
rev = version; rev = version;
sha256 = "0298hvg0fpk0m0bjpwryj3icksbckwqqsr9w1ain55wf5s0v24k3"; hash = "sha256-jbTOaCF/ZqRpM0scDBBAcV5bSYg/QhBPbM9R5cONZ2o=";
}; };
nativeBuildInputs = [ help2man installShellFiles ]; patches = [
(fetchpatch {
propagatedBuildInputs = with python3Packages; [ iniparse ]; name = "add-missing-install-file.patch";
url = "https://github.com/pixelb/crudini/commit/d433e4d9c4106ae26985e3f4b2efa593bdd5c274.patch";
hash = "sha256-aDGzoG4i2tvYeL8m1WoqwNFNHe4xR1dGk+XDt3f3i5E=";
})
];
postPatch = '' postPatch = ''
substituteInPlace crudini-help \ patchShebangs crudini.py crudini-help tests/test.sh
--replace ./crudini $out/bin/crudini
substituteInPlace tests/test.sh \
--replace ..: $out/bin:
''; '';
env.SETUPTOOLS_SCM_PRETEND_VERSION = version;
nativeBuildInputs = [
help2man
installShellFiles
python3Packages.setuptools
python3Packages.setuptools-scm
python3Packages.wheel
];
propagatedBuildInputs = with python3Packages; [ iniparse ];
postInstall = '' postInstall = ''
# this just creates the man page # this just creates the man page
make all make all
install -Dm444 -t $out/share/doc/${pname} README EXAMPLES install -Dm444 -t $out/share/doc/${pname} README.md EXAMPLES
installManPage *.1 installManPage *.1
''; '';
@ -34,7 +54,7 @@ python3Packages.buildPythonApplication rec {
runHook preCheck runHook preCheck
pushd tests >/dev/null pushd tests >/dev/null
bash ./test.sh ./test.sh
popd >/dev/null popd >/dev/null
runHook postCheck runHook postCheck
@ -45,5 +65,6 @@ python3Packages.buildPythonApplication rec {
homepage = "https://www.pixelbeat.org/programs/crudini/"; homepage = "https://www.pixelbeat.org/programs/crudini/";
license = licenses.gpl2Only; license = licenses.gpl2Only;
maintainers = with maintainers; [ peterhoeg ]; maintainers = with maintainers; [ peterhoeg ];
mainProgram = "crudini";
}; };
} }