clan-core/pkgs/clan-cli/flake-module.nix

26 lines
824 B
Nix
Raw Normal View History

2023-09-22 13:39:03 +00:00
{ inputs, ... }:
{
2023-08-03 09:31:56 +00:00
perSystem = { self', pkgs, ... }: {
devShells.clan-cli = pkgs.callPackage ./shell.nix {
inherit (self'.packages) clan-cli-unwrapped ui-assets nix-unit;
2023-07-20 23:08:35 +00:00
};
packages = {
clan-cli-unwrapped = pkgs.python3.pkgs.callPackage ./default.nix {
inherit (self'.packages) ui-assets;
inherit (inputs) nixpkgs;
};
# Don't leak python packages into a devshell.
# It can be very confusing if you `nix run` than than load the cli from the devshell instead.
clan-cli = pkgs.runCommand "clan-cli" { } ''
mkdir $out
ln -s ${self'.packages.clan-cli-unwrapped}/bin $out
'';
inherit (self'.packages.clan-cli-unwrapped) clan-openapi;
default = self'.packages.clan-cli;
};
2023-09-22 13:39:03 +00:00
checks = self'.packages.clan-cli.tests;
};
2023-08-03 09:31:56 +00:00
}