1 { lib, stdenv, fetchFromGitHub, makeWrapper, perlPackages, beancount }:
4 perlDeps = with perlPackages; [
16 in stdenv.mkDerivation rec {
17 pname = "ledger2beancount";
20 src = fetchFromGitHub {
22 repo = "ledger2beancount";
24 sha256 = "sha256-2LIP3ljK1HMAwjk2ueIf9pFL+UUnGDgx9GYNtRztdFY=";
29 nativeBuildInputs = [ makeWrapper ];
30 buildInputs = [ perlPackages.perl beancount ] ++ perlDeps;
32 makeFlags = [ "prefix=$(out)" ];
33 installFlags = [ "INSTALL=install" ];
37 cp -r $src/bin $out/bin
41 wrapProgram "$out/bin/ledger2beancount" \
42 --set PERL5LIB "${perlPackages.makeFullPerlPath perlDeps}"
46 description = "Ledger to Beancount text-based converter";
48 A script to automatically convert Ledger-based textual ledgers to Beancount ones.
50 Conversion is based on (concrete) syntax, so that information that is not meaningful for accounting reasons but still valuable (e.g., comments, formatting, etc.) can be preserved.
52 homepage = "https://github.com/beancount/ledger2beancount";
53 license = licenses.gpl3Plus;
54 platforms = platforms.all;
55 maintainers = with maintainers; [ pablovsky ];