cli: get optional deps from our own flake

This ensures we actually test if all those binaries build
This commit is contained in:
Jörg Thalheim
2023-07-26 09:27:48 +02:00
parent ed474457b3
commit 09cc79867d
6 changed files with 46 additions and 34 deletions

View File

@@ -1,15 +1,29 @@
{
perSystem = { pkgs, ... }:
let
pyproject = builtins.fromTOML (builtins.readFile ./pyproject.toml);
name = pyproject.project.name;
package = pkgs.callPackage ./default.nix { };
shell = pkgs.callPackage ./shell.nix { };
in
{
packages.${name} = package;
devShells.${name} = shell;
packages.default = package;
checks = package.tests;
{ self, ... }: {
perSystem = { self', pkgs, ... }: {
devShells.clan = pkgs.callPackage ./shell.nix {
inherit self;
inherit (self'.packages) clan;
};
packages = {
clan = pkgs.callPackage ./default.nix {
inherit self;
zerotierone = self'.packages.zerotierone;
};
default = self'.packages.clan;
## Optional dependencies for clan cli, we re-expose them here to make sure they all build.
inherit (pkgs)
bash
bubblewrap
openssh
sshpass
zbar
tor;
# Override license so that we can build zerotierone without
# having to re-import nixpkgs.
zerotierone = pkgs.zerotierone.overrideAttrs (_old: { meta = { }; });
};
checks = self'.packages.clan.tests;
};
}