2021-10-04 12:37:57 +00:00
|
|
|
{lib, stdenvNoCC, haskellPackages, fetchurl, writers}:
|
|
|
|
|
|
|
|
stdenvNoCC.mkDerivation rec {
|
|
|
|
pname = "hledger-check-fancyassertions";
|
2022-04-03 18:54:34 +00:00
|
|
|
inherit (haskellPackages.hledger-lib) version;
|
2021-10-04 12:37:57 +00:00
|
|
|
|
|
|
|
src = fetchurl {
|
2021-12-30 13:39:12 +00:00
|
|
|
name = "hledger-check-fancyassertion-${version}.hs";
|
2021-10-04 12:37:57 +00:00
|
|
|
url = "https://raw.githubusercontent.com/simonmichael/hledger/hledger-lib-${version}/bin/hledger-check-fancyassertions.hs";
|
2022-12-28 21:21:41 +00:00
|
|
|
sha256 = "0lyyz8dqkknd9d073l613kdkaqd9r6ymdw94d7mwp17pxvfr17wf";
|
2021-10-04 12:37:57 +00:00
|
|
|
};
|
|
|
|
|
|
|
|
dontUnpack = true;
|
|
|
|
dontBuild = true;
|
|
|
|
|
|
|
|
executable = writers.writeHaskell
|
|
|
|
"hledger-check-fancyassertions"
|
|
|
|
{
|
2022-04-03 18:54:34 +00:00
|
|
|
libraries = with haskellPackages; [
|
2021-12-30 13:39:12 +00:00
|
|
|
hledger-lib
|
|
|
|
base base-compat base-compat-batteries filepath
|
2021-10-04 12:37:57 +00:00
|
|
|
megaparsec microlens optparse-applicative string-qq text time
|
|
|
|
transformers
|
2022-04-03 18:54:34 +00:00
|
|
|
];
|
2021-10-04 12:37:57 +00:00
|
|
|
inherit (haskellPackages) ghc;
|
|
|
|
}
|
|
|
|
src;
|
|
|
|
|
|
|
|
installPhase = ''
|
|
|
|
runHook preInstall
|
|
|
|
install -D $executable $out/bin/${pname}
|
|
|
|
runHook postInstall
|
|
|
|
'';
|
|
|
|
|
|
|
|
meta = with lib; {
|
|
|
|
description = "Complex account balance assertions for hledger journals";
|
|
|
|
homepage = "https://hledger.org/";
|
|
|
|
changelog = "https://github.com/simonmichael/hledger/blob/master/CHANGES.md";
|
|
|
|
license = licenses.gpl3;
|
|
|
|
maintainers = [ maintainers.DamienCassou ];
|
|
|
|
platforms = lib.platforms.all; # GHC can cross-compile
|
2024-02-29 20:09:43 +00:00
|
|
|
mainProgram = "hledger-check-fancyassertions";
|
2021-10-04 12:37:57 +00:00
|
|
|
};
|
|
|
|
}
|