2020-04-24 23:36:52 +00:00
|
|
|
{ stdenv, lib, bundlerEnv, bundlerUpdateScript, makeWrapper }:
|
|
|
|
|
|
|
|
stdenv.mkDerivation rec {
|
|
|
|
pname = "reckon";
|
|
|
|
version = (import ./gemset.nix).reckon.version;
|
|
|
|
|
|
|
|
phases = [ "installPhase" ];
|
|
|
|
|
|
|
|
buildInputs = [ makeWrapper ];
|
|
|
|
|
|
|
|
installPhase = let
|
|
|
|
env = bundlerEnv {
|
|
|
|
name = "${pname}-${version}-gems";
|
|
|
|
|
|
|
|
gemdir = ./.;
|
|
|
|
};
|
|
|
|
in ''
|
2021-02-13 14:23:35 +00:00
|
|
|
runHook preInstall
|
2020-04-24 23:36:52 +00:00
|
|
|
mkdir -p $out/bin
|
|
|
|
makeWrapper ${env}/bin/reckon $out/bin/reckon
|
2021-02-13 14:23:35 +00:00
|
|
|
runHook postInstall
|
2020-04-24 23:36:52 +00:00
|
|
|
'';
|
|
|
|
|
|
|
|
passthru.updateScript = bundlerUpdateScript "reckon";
|
|
|
|
|
|
|
|
meta = with lib; {
|
|
|
|
description = "Flexibly import bank account CSV files into Ledger for command line accounting";
|
|
|
|
license = licenses.mit;
|
|
|
|
maintainers = with maintainers; [ nicknovitski ];
|
|
|
|
platforms = platforms.unix;
|
|
|
|
};
|
|
|
|
}
|