571c71e6f7
We are migrating packages that meet below requirements: 1. using `callPackage` 2. called path is a directory 3. overriding set is empty (`{ }`) 4. not containing path expressions other than relative path (to makenixpkgs-vet happy) 5. not referenced by nix files outside of the directory, other than`pkgs/top-level/all-packages.nix` 6. not referencing nix files outside of the directory 7. not referencing `default.nix` (since it's changed to `package.nix`) 8. `outPath` doesn't change after migration The tool is here: https://github.com/Aleksanaa/by-name-migrate.
45 lines
1.3 KiB
Nix
45 lines
1.3 KiB
Nix
{lib, stdenvNoCC, haskellPackages, fetchurl, writers}:
|
|
|
|
stdenvNoCC.mkDerivation rec {
|
|
pname = "hledger-check-fancyassertions";
|
|
inherit (haskellPackages.hledger-lib) version;
|
|
|
|
src = fetchurl {
|
|
name = "hledger-check-fancyassertion-${version}.hs";
|
|
url = "https://raw.githubusercontent.com/simonmichael/hledger/hledger-lib-${version}/bin/hledger-check-fancyassertions.hs";
|
|
sha256 = "0lyyz8dqkknd9d073l613kdkaqd9r6ymdw94d7mwp17pxvfr17wf";
|
|
};
|
|
|
|
dontUnpack = true;
|
|
dontBuild = true;
|
|
|
|
executable = writers.writeHaskell
|
|
"hledger-check-fancyassertions"
|
|
{
|
|
libraries = with haskellPackages; [
|
|
hledger-lib
|
|
base base-compat base-compat-batteries filepath
|
|
megaparsec microlens optparse-applicative string-qq text time
|
|
transformers
|
|
];
|
|
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
|
|
mainProgram = "hledger-check-fancyassertions";
|
|
};
|
|
}
|