autodocodec/nix/overlay.nix

31 lines
756 B
Nix
Raw Normal View History

2021-10-20 18:59:50 +03:00
final:
previous:
with final.haskell.lib;
{
2021-10-24 20:21:59 +03:00
autodocodecPackages =
2021-10-20 18:59:50 +03:00
let
2021-10-24 20:21:59 +03:00
autodocodecPkg = name:
2021-10-20 18:59:50 +03:00
doBenchmark (buildStrictly (final.haskellPackages.callCabal2nixWithOptions name (final.gitignoreSource (../. + "/${name}")) "--no-hpack" { }));
in
final.lib.genAttrs [
2021-10-24 20:21:59 +03:00
"autodocodec"
"autodocodec-aeson"
"autodocodec-yaml"
2021-10-20 18:59:50 +03:00
]
2021-10-24 20:21:59 +03:00
autodocodecPkg;
2021-10-20 18:59:50 +03:00
2021-10-24 20:21:59 +03:00
autodocodecRelease =
2021-10-20 18:59:50 +03:00
final.symlinkJoin {
2021-10-24 20:21:59 +03:00
name = "autodocodec-release";
paths = final.lib.attrValues final.autodocodecPackages;
2021-10-20 18:59:50 +03:00
};
haskellPackages = previous.haskellPackages.override (
old: {
overrides = final.lib.composeExtensions (old.overrides or (_: _: { })) (
2021-10-24 20:21:59 +03:00
self: super: final.autodocodecPackages
2021-10-20 18:59:50 +03:00
);
}
);
}