feat(users/Profpatsch/whatcd-resolver): add executable

Change-Id: I28f5c26443b9a878f8f374af2c7935831d17ab12
Reviewed-on: https://cl.tvl.fyi/c/depot/+/9355
Tested-by: BuildkiteCI
Autosubmit: Profpatsch <mail@profpatsch.de>
Reviewed-by: Profpatsch <mail@profpatsch.de>
This commit is contained in:
Profpatsch 2023-09-17 19:27:52 +02:00 committed by clbot
parent 07b0dff209
commit 3de9601764
3 changed files with 37 additions and 1 deletions

View file

@ -0,0 +1,6 @@
module Main where
import WhatcdResolver qualified
main :: IO ()
main = WhatcdResolver.main

View file

@ -9,6 +9,7 @@ let
src = depot.users.Profpatsch.exactSource ./. [
./whatcd-resolver.cabal
./Main.hs
./src/WhatcdResolver.hs
];
@ -43,5 +44,26 @@ let
license = lib.licenses.mit;
};
bins = depot.nix.getBins whatcd-resolver [ "whatcd-resolver" ];
in
whatcd-resolver
depot.nix.writeExecline "whatcd-resolver-wrapped" { } [
"importas"
"-i"
"PATH"
"PATH"
"export"
"PATH"
"${pkgs.postgresql}/bin:$${PATH}"
"export"
"WHATCD_RESOLVER_TOOLS"
(pkgs.linkFarm "whatcd-resolver-tools" [
{
name = "pg_format";
path = "${pkgs.pgformatter}/bin/pg_format";
}
])
bins.whatcd-resolver
]

View file

@ -94,3 +94,11 @@ library
wai,
warp,
executable whatcd-resolver
import: common-options
main-is: Main.hs
build-depends:
base >=4.15 && <5,
whatcd-resolver