{ pkgs ? import {}, }: let src = builtins.filterSource (path: type: !builtins.elem (baseNameOf path) [ "target" "default.nix" "shell.nix" "nixos-module.nix" ] ) ./.; build = { pname, cargoSha256 }: pkgs.rustPlatform.buildRustPackage { inherit pname cargoSha256 src; version = "0.1.0"; nativeBuildInputs = with pkgs; [ pkg-config ]; buildInputs = with pkgs; [ openssl postgresql.lib ]; preBuild = "pushd ${pname}"; postBuild = "popd"; }; in { ticker-update = build { pname = "ticker-update"; cargoSha256 = "0ly7z50am7xgqcgghkzxqgi8fx1jmsl5zh32rymnwq1yad5z19nq"; }; ticker-serve = (build { pname = "ticker-serve"; cargoSha256 = "1wqyg7mil35a8d0779yq3w14x7p5ahmfxnmlxx9a0mnfy8jxizb4"; }).overrideAttrs (oa: { postBuild = '' ${oa.postBuild} mkdir -p $out/shared/libticker $out/shared/ticker-serve cp -ar ticker-serve/static $out/shared/ticker-serve/ cp -ar schema.sql $out/shared/libticker/ ''; }); }