nixpkgs/pkgs/tools/text/reckon/default.nix
mosjek 17c51d6906
reckon: add missing runtime dependency
The csv parser uses the command `file`, which is currently not
available. The link leads to the code in which the command is used:

974b3ebe2c/lib/reckon/csv_parser.rb (L277-L281)
2024-11-02 20:32:07 +01:00

36 lines
938 B
Nix

{ stdenv, lib, bundlerEnv, bundlerUpdateScript, makeWrapper, file }:
stdenv.mkDerivation rec {
pname = "reckon";
version = (import ./gemset.nix).reckon.version;
dontUnpack = true;
nativeBuildInputs = [ makeWrapper ];
installPhase = let
env = bundlerEnv {
name = "${pname}-${version}-gems";
gemdir = ./.;
};
in ''
runHook preInstall
mkdir -p $out/bin
makeWrapper ${env}/bin/reckon $out/bin/reckon \
--prefix PATH : ${lib.makeBinPath [ file ]}
runHook postInstall
'';
passthru.updateScript = bundlerUpdateScript "reckon";
meta = with lib; {
description = "Flexibly import bank account CSV files into Ledger for command line accounting";
mainProgram = "reckon";
license = licenses.mit;
maintainers = with maintainers; [ nicknovitski ];
platforms = platforms.unix;
changelog = "https://github.com/cantino/reckon/blob/v${version}/CHANGELOG.md";
};
}