summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorstuebinm2023-11-14 21:43:06 +0100
committerstuebinm2023-11-15 01:39:36 +0100
commitb9f2405fdf68a9d04359f8efafb544df11528668 (patch)
tree5e7e5968bd0f72cc18e8212f0cb50c99439df5e3
parent579dc4f19e4c4b36a927d93425b1f778a8ab4c86 (diff)
bahnhof.name haskell rewrite
Diffstat (limited to '')
-rw-r--r--chaski/services/bahnhof-name.nix4
-rw-r--r--flake.lock8
-rw-r--r--pkgs/overlay.nix42
3 files changed, 37 insertions, 17 deletions
diff --git a/chaski/services/bahnhof-name.nix b/chaski/services/bahnhof-name.nix
index d11f7ec..7360372 100644
--- a/chaski/services/bahnhof-name.nix
+++ b/chaski/services/bahnhof-name.nix
@@ -10,7 +10,7 @@
path = [ pkgs.bahnhof-name ];
script = ''
cd ${pkgs.bahnhof-name.outPath}
- bin/bahnhofname
+ bin/bahnhof-name
'';
};
@@ -18,7 +18,7 @@
let vhost = {
enableACME = true;
forceSSL = true;
- locations."/".proxyPass = "http://localhost:2345";
+ locations."/".proxyPass = "http://localhost:8080";
}; in builtins.listToAttrs
(map (name: { inherit name; value = vhost; })
["bahnhof.name" "ril100.bahnhof.name"
diff --git a/flake.lock b/flake.lock
index 7a45a60..618931b 100644
--- a/flake.lock
+++ b/flake.lock
@@ -19,11 +19,11 @@
"bahnhof-name": {
"flake": false,
"locked": {
- "lastModified": 1699283859,
- "narHash": "sha256-F6jQ9K0ylao8EvApnvqWSXI3vAszOUk03pEfPhoiwBY=",
+ "lastModified": 1700002238,
+ "narHash": "sha256-rnpOc8r5Mh3MkcHi0SOWIW2utCAsEoRD0TLC6A6W4qo=",
"ref": "refs/heads/main",
- "rev": "e816bce69c7df9b54fb9a67a4c18c757fa46f571",
- "revCount": 13,
+ "rev": "b33c00f1c390265fc8dec98f57e36ee4ca9ba2ac",
+ "revCount": 17,
"type": "git",
"url": "https://stuebinm.eu/git/bahnhof.name"
},
diff --git a/pkgs/overlay.nix b/pkgs/overlay.nix
index 7449786..71ee3b4 100644
--- a/pkgs/overlay.nix
+++ b/pkgs/overlay.nix
@@ -84,17 +84,37 @@ in
isabelle-rust-utils = self.isabelle-utils;
};
- bahnhof-name = let
- inherit (self.callPackage "${inputs.nix-gleam.outPath}/builder/default.nix" {}) buildGleamApplication;
- in buildGleamApplication {
- version = "0.1";
- pname = "bahnhof.name";
- src = inputs.bahnhof-name;
-
- postInstall = ''
- cp -r $src/data $out
- '';
- };
+ bahnhof-name =
+ let
+ haskellPkgs = self.haskellPackages.override (old: {
+ overrides = self': super': with self.haskell.lib; {
+ fuzzyfind = unmarkBroken (doJailbreak super'.fuzzyfind);
+ };
+ });
+ pkg = { mkDerivation, base, bytestring, cassava, containers
+ , fuzzyfind, fuzzyset, http-client, http-client-openssl, http-types
+ , lib, stm, text, time, vector, wai, wai-extra, warp
+ }:
+ mkDerivation {
+ pname = "bahnhof.name";
+ version = "0.2.0.0";
+ src = inputs.bahnhof-name;
+ isLibrary = false;
+ isExecutable = true;
+ executableHaskellDepends = [
+ base bytestring cassava containers fuzzyfind fuzzyset http-client
+ http-client-openssl http-types stm text time vector wai wai-extra
+ warp
+ ];
+ mainProgram = "bahnhof-name";
+ license = lib.licenses.eupl12;
+ postInstall = ''
+ cp -r $src/data $out
+ '';
+ };
+ in
+ haskellPkgs.callPackage pkg {};
+
#### sporadically maintained / updated ####