2021-09-26 15:10:31 +02:00
|
|
|
{lib, stdenvNoCC, haskellPackages, fetchurl, writers}:
|
|
|
|
|
2021-12-21 16:00:52 +01:00
|
|
|
let
|
|
|
|
hledger-lib = haskellPackages.hledger-lib_1_24_1;
|
|
|
|
in
|
|
|
|
|
2021-09-26 15:10:31 +02:00
|
|
|
stdenvNoCC.mkDerivation rec {
|
|
|
|
pname = "hledger-check-fancyassertions";
|
2021-12-21 16:00:52 +01:00
|
|
|
inherit (hledger-lib) version;
|
2021-09-26 15:10:31 +02:00
|
|
|
|
|
|
|
src = fetchurl {
|
2021-12-21 16:00:52 +01:00
|
|
|
name = "hledger-check-fancyassertion-${version}.hs";
|
2021-09-26 15:10:31 +02:00
|
|
|
url = "https://raw.githubusercontent.com/simonmichael/hledger/hledger-lib-${version}/bin/hledger-check-fancyassertions.hs";
|
2021-12-21 16:00:52 +01:00
|
|
|
sha256 = "0naggvivc6szsc8haa52a6lm079ikz5qfva0ljnqx0f1zlkxv984";
|
2021-09-26 15:10:31 +02:00
|
|
|
};
|
|
|
|
|
|
|
|
dontUnpack = true;
|
|
|
|
dontBuild = true;
|
|
|
|
|
|
|
|
executable = writers.writeHaskell
|
|
|
|
"hledger-check-fancyassertions"
|
|
|
|
{
|
2021-12-21 16:00:52 +01:00
|
|
|
libraries = [
|
|
|
|
hledger-lib
|
|
|
|
] ++ (with haskellPackages; [
|
|
|
|
base base-compat base-compat-batteries filepath
|
2021-09-26 15:10:31 +02:00
|
|
|
megaparsec microlens optparse-applicative string-qq text time
|
|
|
|
transformers
|
2021-12-21 16:00:52 +01:00
|
|
|
]);
|
2021-09-26 15:10:31 +02: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
|
|
|
|
};
|
|
|
|
}
|