diff options
author | Vika <vika@fireburn.ru> | 2022-05-07 20:31:56 +0300 |
---|---|---|
committer | Vika <vika@fireburn.ru> | 2022-05-07 20:31:56 +0300 |
commit | 5dcc84c404a0a927e531af70e8c5ad637ba96f90 (patch) | |
tree | c9a486a6f55ceb89403af61e8e52580e260557a4 | |
parent | fdc69ef250b44baeec08e32b2084952e2d17fb30 (diff) | |
download | kittybox-5dcc84c404a0a927e531af70e8c5ad637ba96f90.tar.zst |
flake.nix: fix build and clean up
- Somehow it looks like zlib is required, but wasn't passed - Log level in the test is set to (mostly) info - A needless comment is deleted - Single-step build is enabled. Since this is a multi-crate workspace now, naersk will not offer much in terms of incrementality (and I use `nix develop` anyway with a dev-shell)
-rw-r--r-- | flake.nix | 14 |
1 files changed, 8 insertions, 6 deletions
diff --git a/flake.nix b/flake.nix index 5405622..7bea7a6 100644 --- a/flake.nix +++ b/flake.nix @@ -187,19 +187,21 @@ }; rust-bin = pkgs.rust-bin.stable.latest; packages = { - kittybox = { stdenv, lib, openssl, pkg-config, protobuf, naersk-lib }: + kittybox = { stdenv, lib, openssl, zlib, pkg-config, protobuf, naersk-lib, lld, mold }: naersk-lib.buildPackage { pname = "kittybox"; version = "0.1.0"; src = ./.; - checkInputs = [ openssl.dev ]; + checkInputs = [ openssl.dev zlib ]; nativeBuildInputs = [ pkg-config protobuf ]; nativeCheckInputs = [ pkg-config ]; doCheck = stdenv.hostPlatform == stdenv.targetPlatform; + singleStep = true; + meta = with lib.meta; { maintainers = with maintainers; [ vika_nezrimaya ]; platforms = supportedSystems; @@ -232,7 +234,7 @@ # make an e2e test for common workflows (e.g. making a post) tokenEndpoint = "https://example.com"; authorizationEndpoint = "https://example.com"; - logLevel = "debug"; + logLevel = "info,kittybox=debug,retainer::cache=warn,h2=warn,rustls=warn"; }; environment.systemPackages = with pkgs; [ @@ -248,7 +250,6 @@ with subtest("Onboarding should correctly work..."): kittybox.copy_from_host("${./onboarding.json}", "/root/onboarding.json") - # Here we rely on a fact that the /nix/store is shared between the host and the VM kittybox.succeed("curl -vvv http://localhost:8080/ -d@/root/onboarding.json") # Testing for a known string is the easiest way to determine that the onboarding worked kittybox.succeed("curl --silent http://localhost:8080/ | grep 'vestige of the past long gone'") @@ -300,10 +301,11 @@ devShell = pkgs.mkShell { name = "rust-dev-shell"; + nativeBuildInputs = with pkgs; [ - pkg-config lld protobuf + pkg-config protobuf # required for httpmock, not actually used in the release - openssl.dev + openssl.dev zlib xh systemfd tokio-console cargo-watch cargo-edit cargo-outdated (rust-bin.default.override { extensions = [ "rust-src" ]; }) |