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

@@ -6,13 +6,11 @@
, installShellFiles
, zerotierone
, bubblewrap
, self
}:
let
pyproject = builtins.fromTOML (builtins.readFile ./pyproject.toml);
name = pyproject.project.name;
# Override license so that we can build zerotierone without
# having to re-import nixpkgs.
zerotierone' = zerotierone.overrideAttrs (_old: { meta = { }; });
src = lib.cleanSource ./.;
@@ -49,7 +47,7 @@ let
passthru.devDependencies = devDependencies;
makeWrapperArgs = [
"--set CLAN_NIXPKGS ${pkgs.path}"
"--set CLAN_FLAKE ${self}"
];
postInstall = ''
@@ -73,7 +71,7 @@ let
clan-pytest = runCommand "${name}-tests"
{
nativeBuildInputs = [ zerotierone' bubblewrap ];
nativeBuildInputs = [ zerotierone bubblewrap ];
} ''
cp -r ${src} ./src
chmod +w -R ./src