diff options
author | Alyssa Ross <hi@alyssa.is> | 2023-09-01 11:51:02 +0000 |
---|---|---|
committer | Alyssa Ross <hi@alyssa.is> | 2023-09-01 11:51:02 +0000 |
commit | aa4353b499e6950b7333578f936455a628145c31 (patch) | |
tree | c6332cedece2327a18d08794755b3fc0f9f1905b /nixpkgs/pkgs/tools/misc/crudini/default.nix | |
parent | ac456d475f4e50818499b804359355c0f3b4bbf7 (diff) | |
parent | 52185f4d76c18d8348f963795dfed1de018e8dfe (diff) | |
download | nixlib-aa4353b499e6950b7333578f936455a628145c31.tar nixlib-aa4353b499e6950b7333578f936455a628145c31.tar.gz nixlib-aa4353b499e6950b7333578f936455a628145c31.tar.bz2 nixlib-aa4353b499e6950b7333578f936455a628145c31.tar.lz nixlib-aa4353b499e6950b7333578f936455a628145c31.tar.xz nixlib-aa4353b499e6950b7333578f936455a628145c31.tar.zst nixlib-aa4353b499e6950b7333578f936455a628145c31.zip |
Merge https://github.com/NixOS/nixpkgs
Diffstat (limited to 'nixpkgs/pkgs/tools/misc/crudini/default.nix')
-rw-r--r-- | nixpkgs/pkgs/tools/misc/crudini/default.nix | 45 |
1 files changed, 33 insertions, 12 deletions
diff --git a/nixpkgs/pkgs/tools/misc/crudini/default.nix b/nixpkgs/pkgs/tools/misc/crudini/default.nix index 6527a01e43b7..1e25413b151f 100644 --- a/nixpkgs/pkgs/tools/misc/crudini/default.nix +++ b/nixpkgs/pkgs/tools/misc/crudini/default.nix @@ -1,32 +1,52 @@ -{ lib, fetchFromGitHub, python3Packages, help2man, installShellFiles }: +{ lib +, fetchFromGitHub +, fetchpatch +, python3Packages +, help2man +, installShellFiles +}: python3Packages.buildPythonApplication rec { pname = "crudini"; - version = "0.9.3"; + version = "0.9.4"; + format = "pyproject"; src = fetchFromGitHub { owner = "pixelb"; repo = "crudini"; rev = version; - sha256 = "0298hvg0fpk0m0bjpwryj3icksbckwqqsr9w1ain55wf5s0v24k3"; + hash = "sha256-jbTOaCF/ZqRpM0scDBBAcV5bSYg/QhBPbM9R5cONZ2o="; }; - nativeBuildInputs = [ help2man installShellFiles ]; - - propagatedBuildInputs = with python3Packages; [ iniparse ]; + patches = [ + (fetchpatch { + name = "add-missing-install-file.patch"; + url = "https://github.com/pixelb/crudini/commit/d433e4d9c4106ae26985e3f4b2efa593bdd5c274.patch"; + hash = "sha256-aDGzoG4i2tvYeL8m1WoqwNFNHe4xR1dGk+XDt3f3i5E="; + }) + ]; postPatch = '' - substituteInPlace crudini-help \ - --replace ./crudini $out/bin/crudini - substituteInPlace tests/test.sh \ - --replace ..: $out/bin: + patchShebangs crudini.py crudini-help tests/test.sh ''; + env.SETUPTOOLS_SCM_PRETEND_VERSION = version; + + nativeBuildInputs = [ + help2man + installShellFiles + python3Packages.setuptools + python3Packages.setuptools-scm + python3Packages.wheel + ]; + + propagatedBuildInputs = with python3Packages; [ iniparse ]; + postInstall = '' # this just creates the man page make all - install -Dm444 -t $out/share/doc/${pname} README EXAMPLES + install -Dm444 -t $out/share/doc/${pname} README.md EXAMPLES installManPage *.1 ''; @@ -34,7 +54,7 @@ python3Packages.buildPythonApplication rec { runHook preCheck pushd tests >/dev/null - bash ./test.sh + ./test.sh popd >/dev/null runHook postCheck @@ -45,5 +65,6 @@ python3Packages.buildPythonApplication rec { homepage = "https://www.pixelbeat.org/programs/crudini/"; license = licenses.gpl2Only; maintainers = with maintainers; [ peterhoeg ]; + mainProgram = "crudini"; }; } |