biome: 1.9.2 -> 1.9.3
[NixPkgs.git] / pkgs / tools / misc / crudini / default.nix
blob041a0095fb1c789965998efcf29bdc6612c3aab1
1 { lib
2 , fetchFromGitHub
3 , python3Packages
4 , help2man
5 , installShellFiles
6 }:
8 python3Packages.buildPythonApplication rec {
9   pname = "crudini";
10   version = "0.9.5";
11   format = "pyproject";
13   src = fetchFromGitHub {
14     owner = "pixelb";
15     repo = "crudini";
16     rev = version;
17     hash = "sha256-BU4u7uBsNyDOwWUjOIlBWcf1AeUXXZ+johAe+bjws1U=";
18   };
20   postPatch = ''
21     patchShebangs crudini.py crudini-help tests/test.sh
22   '';
24   nativeBuildInputs = [
25     help2man
26     installShellFiles
27     python3Packages.setuptools
28     python3Packages.setuptools-scm
29     python3Packages.wheel
30   ];
32   propagatedBuildInputs = with python3Packages; [ iniparse ];
34   postInstall = ''
35     # this just creates the man page
36     make all
38     install -Dm444 -t $out/share/doc/${pname} README.md EXAMPLES
39     installManPage *.1
40   '';
42   checkPhase = ''
43     runHook preCheck
45     pushd tests >/dev/null
46     ./test.sh
47     popd >/dev/null
49     runHook postCheck
50   '';
52   meta = with lib; {
53     description = "Utility for manipulating ini files";
54     homepage = "https://www.pixelbeat.org/programs/crudini/";
55     license = licenses.gpl2Only;
56     maintainers = with maintainers; [ peterhoeg ];
57     mainProgram = "crudini";
58   };