2022-07-17 18:22:25 +02:00
|
|
|
{ depot, pkgs, lib, ... }:
|
|
|
|
|
|
|
|
let
|
2023-05-28 20:58:20 +02:00
|
|
|
bins = depot.nix.getBins pkgs.sqlite [ "sqlite3" ];
|
2022-07-17 18:22:25 +02:00
|
|
|
|
2023-05-28 20:58:20 +02:00
|
|
|
cas-serve = pkgs.haskellPackages.mkDerivation {
|
|
|
|
pname = "cas-serve";
|
|
|
|
version = "0.1.0";
|
2022-07-17 18:22:25 +02:00
|
|
|
|
2023-05-28 20:58:20 +02:00
|
|
|
src = depot.users.Profpatsch.exactSource ./. [
|
|
|
|
./cas-serve.cabal
|
|
|
|
./CasServe.hs
|
|
|
|
];
|
|
|
|
|
|
|
|
libraryHaskellDepends = [
|
|
|
|
pkgs.haskellPackages.pa-prelude
|
|
|
|
pkgs.haskellPackages.pa-label
|
2024-03-31 11:56:52 +02:00
|
|
|
pkgs.haskellPackages.crypton
|
2023-05-28 20:58:20 +02:00
|
|
|
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
|
|
|
|
];
|
2022-07-17 18:22:25 +02:00
|
|
|
in
|
|
|
|
cas-serve
|