tvl-depot/users/Profpatsch/cas-serve/default.nix
Profpatsch 8c4730c433 chore(users/Profpatsch/*): more cabal maintenance
Change-Id: Ib1714abce2815873eb50dbeac088e812fa9098ab
Reviewed-on: https://cl.tvl.fyi/c/depot/+/8686
Tested-by: BuildkiteCI
Reviewed-by: Profpatsch <mail@profpatsch.de>
Autosubmit: Profpatsch <mail@profpatsch.de>
2023-07-13 23:03:09 +00:00

38 lines
896 B
Nix

{ depot, pkgs, lib, ... }:
let
bins = depot.nix.getBins pkgs.sqlite [ "sqlite3" ];
cas-serve = pkgs.haskellPackages.mkDerivation {
pname = "cas-serve";
version = "0.1.0";
src = depot.users.Profpatsch.exactSource ./. [
./cas-serve.cabal
./CasServe.hs
];
libraryHaskellDepends = [
pkgs.haskellPackages.pa-prelude
pkgs.haskellPackages.pa-label
pkgs.haskellPackages.ihp-hsx
pkgs.haskellPackages.wai
pkgs.haskellPackages.warp
pkgs.haskellPackages.sqlite-simple
depot.users.Profpatsch.arglib.netencode.haskell
depot.users.Profpatsch.netencode.netencode-hs
];
isExecutable = true;
isLibrary = false;
license = lib.licenses.mit;
};
create-cas-database = depot.nix.writeExecline "create-cas-database" { readNArgs = 1; } [
bins.sqlite3
"$1"
"-init"
./schema.sql
];
in
cas-serve