fix build

This commit is contained in:
陈浩南 2024-05-01 10:57:45 +08:00
parent 2d9c3cab76
commit eab9171d6c
2 changed files with 3 additions and 2 deletions

View File

@ -18,7 +18,7 @@
{
packages.x86_64-linux = rec
{
hpcstat = pkgs.stdenv.mkDerivation
hpcstat = pkgs.pkgsStatic.stdenv.mkDerivation
{
name = "hpcstat";
src = ./.;

View File

@ -9,6 +9,7 @@
# include <chrono>
# include <boost/filesystem.hpp>
# include <boost/process.hpp>
# include <boost/dll.hpp>
# include <fmt/format.h>
# include <fmt/ranges.h>
# include <zxorm/zxorm.hpp>
@ -163,7 +164,7 @@ std::optional<std::string> subaccount()
int main(int argc, const char** argv)
{
std::vector<std::string> args(argv, argv + argc);
Program = args[0];
Program = boost::dll::program_location().string();
if (args.size() == 1) { std::cout << "Usage: hpcstat initdb|login|logout|submitjob|finishjob\n"; return 1; }
else if (args[1] == "initdb")