Web-based Calendar Aggregator https://ticker.c3d2.de/
You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

default.nix 1.0KB

1234567891011121314151617181920212223242526272829303132333435363738394041
  1. { pkgs ? import <nixpkgs> {},
  2. }:
  3. let
  4. src = builtins.filterSource (path: type:
  5. !builtins.elem (baseNameOf path) [
  6. "target"
  7. "default.nix"
  8. "shell.nix"
  9. "nixos-module.nix"
  10. ]
  11. ) ./.;
  12. build = { pname, cargoSha256 }: pkgs.rustPlatform.buildRustPackage {
  13. inherit pname cargoSha256 src;
  14. version = "0.1.0";
  15. nativeBuildInputs = with pkgs; [ pkg-config ];
  16. buildInputs = with pkgs; [
  17. openssl
  18. postgresql.lib
  19. ];
  20. preBuild = "pushd ${pname}";
  21. postBuild = "popd";
  22. };
  23. in {
  24. ticker-update = build {
  25. pname = "ticker-update";
  26. cargoSha256 = "0kn01p0srv9c3wiaj2a0qpvzqmrs5y721q5nrf0hdhjqkvvlj6j1";
  27. };
  28. ticker-serve = (build {
  29. pname = "ticker-serve";
  30. cargoSha256 = "0p5g59r24lr54598lnjmb5nms7bm7k2bjr91gxprwqp7zs5yjwr4";
  31. }).overrideAttrs (oa: {
  32. postBuild = ''
  33. ${oa.postBuild}
  34. mkdir -p $out/shared/libticker $out/shared/ticker-serve
  35. cp -ar ticker-serve/static $out/shared/ticker-serve/
  36. cp -ar schema.sql $out/shared/libticker/
  37. '';
  38. });
  39. }