diff options
author | stuebinm | 2021-10-03 03:13:05 +0200 |
---|---|---|
committer | stuebinm | 2021-10-03 03:13:23 +0200 |
commit | 22c6837abde39c5a75baeefa95908792867e42de (patch) | |
tree | 00566d70fd0b4dcd0e773177d850129f479a0bb2 /hosts/chaski/services/VaaS/default.nix | |
parent | ee21f53dea4f8e069bb8a97d808b9cf1f030a910 (diff) |
add gtfs validator as a service
This just runs the GTFS validator as a web service, since it's a
horrible piece of python2 stuff which I don't want to set up every time
I used it (nor except other people to do so if they need it).
Diffstat (limited to 'hosts/chaski/services/VaaS/default.nix')
-rw-r--r-- | hosts/chaski/services/VaaS/default.nix | 30 |
1 files changed, 30 insertions, 0 deletions
diff --git a/hosts/chaski/services/VaaS/default.nix b/hosts/chaski/services/VaaS/default.nix new file mode 100644 index 0000000..427270c --- /dev/null +++ b/hosts/chaski/services/VaaS/default.nix @@ -0,0 +1,30 @@ +{ pkgs, compiler ? "default", doBenchmark ? false }: + +let + + inherit pkgs; + + f = { mkDerivation, base, base32, bytestring, http-client + , http-client-tls, http-types, lib, process, wai, warp + }: + mkDerivation { + pname = "VaaS"; + version = "0.1.0.0"; + src = ./.; + isLibrary = false; + isExecutable = true; + executableHaskellDepends = [ + base base32 bytestring http-client http-client-tls http-types + process wai warp + ]; + license = "unknown"; + hydraPlatforms = lib.platforms.none; + }; + + haskellPackages = if compiler == "default" + then pkgs.haskellPackages + else pkgs.haskell.packages.${compiler}; + + variant = if doBenchmark then pkgs.haskell.lib.doBenchmark else pkgs.lib.id; +in + variant (haskellPackages.callPackage f {}) |