fission-codes / fission-server

Apache License 2.0
9 stars 0 forks source link

chore: add nix package #202

Closed walkah closed 10 months ago

walkah commented 10 months ago

Description

This PR adds a packages.default section to flake.nix for building fission server as a nix package. I've also bumped the nix version to 23.11 (from 23.05).

Type of change

Test plan (required)

You should be able to run nix build . and have the resulting binaries in ./result/bin

codecov[bot] commented 10 months ago

Codecov Report

Merging #202 (8f34d60) into main (652c373) will increase coverage by 0.69%. The diff coverage is n/a.

Additional details and impacted files [![Impacted file tree graph](https://app.codecov.io/gh/fission-codes/fission-server/pull/202/graphs/tree.svg?width=650&height=150&src=pr&token=GO3TTZLDO0&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=fission-codes)](https://app.codecov.io/gh/fission-codes/fission-server/pull/202?src=pr&el=tree&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=fission-codes) ```diff @@ Coverage Diff @@ ## main #202 +/- ## ========================================== + Coverage 18.08% 18.77% +0.69% ========================================== Files 63 63 Lines 2588 2588 Branches 1599 1599 ========================================== + Hits 468 486 +18 + Misses 1492 1491 -1 + Partials 628 611 -17 ``` [see 2 files with indirect coverage changes](https://app.codecov.io/gh/fission-codes/fission-server/pull/202/indirect-changes?src=pr&el=tree-more&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=fission-codes)
expede commented 10 months ago

I've tried running the resulting server binary at ./result/bin/fission-server-app, but it fails finding the settings:

I'm getting this, too. I even get it when running it from a directory that contains that file, since it's looking for a nix path.

I wonder if it makes sense to have it fall back through defaults, then check the current dir.

walkah commented 10 months ago

And the CARGO_MANIFEST_DIR env variable is inserted at compile-time. So we need to fix that. How would you prefer the config path to be provided @walkah?

I'd say a -c / --config <PATH> would be a great start. I can do plenty from there :)

walkah commented 10 months ago

And also yay, first contribution to fission-server I think? 🙌

Indeed! 🎉