Merge pull request #172116 from marsam/ledger-completions

ledger: install completions

authored by

davidak and committed by
GitHub
b135d3b2 547f9bf9

+16 -3
+16 -3
pkgs/applications/office/ledger/default.nix
··· 1 1 { stdenv, lib, fetchFromGitHub, cmake, boost, gmp, mpfr, libedit, python3 2 - , texinfo, gnused, usePython ? true }: 2 + , fetchpatch, installShellFiles, texinfo, gnused, usePython ? true }: 3 3 4 4 stdenv.mkDerivation rec { 5 5 pname = "ledger"; ··· 19 19 gmp mpfr libedit gnused 20 20 ] ++ lib.optional usePython python3; 21 21 22 - nativeBuildInputs = [ cmake texinfo ]; 22 + nativeBuildInputs = [ cmake texinfo installShellFiles ]; 23 23 24 24 cmakeFlags = [ 25 25 "-DCMAKE_INSTALL_LIBDIR=lib" ··· 34 34 --replace 'DESTINATION ''${Python_SITEARCH}' 'DESTINATION "${python3.sitePackages}"' 35 35 ''; 36 36 37 + patches = [ 38 + # Add support for $XDG_CONFIG_HOME. Remove with the next release 39 + (fetchpatch { 40 + url = "https://github.com/ledger/ledger/commit/c79674649dee7577d6061e3d0776922257520fd0.patch"; 41 + sha256 = "sha256-vwVQnY9EUCXPzhDJ4PSOmQStb9eF6H0yAOiEmL6sAlk="; 42 + excludes = [ "doc/NEWS.md" ]; 43 + }) 44 + ]; 45 + 37 46 installTargets = [ "doc" "install" ]; 47 + 48 + postInstall = '' 49 + installShellCompletion --cmd ledger --bash $src/contrib/ledger-completion.bash 50 + ''; 38 51 39 52 meta = with lib; { 40 53 homepage = "https://ledger-cli.org/"; ··· 49 62 ''; 50 63 51 64 platforms = platforms.all; 52 - maintainers = with maintainers; [ jwiegley ]; 65 + maintainers = with maintainers; [ jwiegley marsam ]; 53 66 }; 54 67 }