nixos/packages/mirism.nix

31 lines
749 B
Nix
Raw Normal View History

2023-11-12 21:59:03 +08:00
{
lib, stdenv, requireFile,
boost, nghttp2, brotli, nameof, cppcoro, tgbot-cpp, libbacktrace, fmt, date
}: stdenv.mkDerivation rec
{
name = "mirism";
# nix-store --query --hash $(nix store add-path . --name 'mirism')
src = requireFile
{
inherit name;
2024-02-01 09:30:37 +08:00
sha256 = "0f50pvdafhlmrlbf341mkp9q50v4ld5pbx92d2w1633f18zghbzf";
2023-11-12 21:59:03 +08:00
hashMode = "recursive";
message = "Source file not found.";
};
buildInputs = [ boost nghttp2.dev brotli nameof cppcoro tgbot-cpp libbacktrace fmt date ];
buildPhase =
''
runHook preBuild
make ng01 beta
runHook postBuild
'';
installPhase =
''
runHook preInstall
mkdir -p $out/bin
cp build/{ng01,beta} $out/bin
2024-06-06 22:31:49 +08:00
ln -s ${src} $out/src
2023-11-12 21:59:03 +08:00
runHook postInstall
'';
}