2023-09-22 13:39:03 +00:00
|
|
|
{ inputs, ... }:
|
2023-08-27 08:21:02 +00:00
|
|
|
{
|
2023-08-03 09:31:56 +00:00
|
|
|
perSystem = { self', pkgs, ... }: {
|
2023-08-08 12:11:04 +00:00
|
|
|
devShells.clan-cli = pkgs.callPackage ./shell.nix {
|
2023-09-28 10:05:19 +00:00
|
|
|
inherit (self'.packages) clan-cli-unwrapped ui-assets nix-unit;
|
2023-07-20 23:08:35 +00:00
|
|
|
};
|
2023-07-26 07:27:48 +00:00
|
|
|
packages = {
|
2023-09-28 10:05:19 +00:00
|
|
|
clan-cli-unwrapped = pkgs.python3.pkgs.callPackage ./default.nix {
|
2023-09-26 15:31:45 +00:00
|
|
|
inherit (self'.packages) ui-assets;
|
2023-09-22 06:39:24 +00:00
|
|
|
inherit (inputs) nixpkgs;
|
2023-07-26 07:27:48 +00:00
|
|
|
};
|
2023-09-28 10:05:19 +00:00
|
|
|
# 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.
|
2023-09-28 12:06:35 +00:00
|
|
|
clan-cli = pkgs.runCommand "clan" { } ''
|
2023-09-28 10:05:19 +00:00
|
|
|
mkdir $out
|
|
|
|
ln -s ${self'.packages.clan-cli-unwrapped}/bin $out
|
|
|
|
'';
|
|
|
|
inherit (self'.packages.clan-cli-unwrapped) clan-openapi;
|
2023-08-08 12:11:04 +00:00
|
|
|
default = self'.packages.clan-cli;
|
2023-07-26 07:27:48 +00:00
|
|
|
};
|
2023-08-02 18:04:16 +00:00
|
|
|
|
2023-09-28 10:05:19 +00:00
|
|
|
checks = self'.packages.clan-cli-unwrapped.tests;
|
2023-07-26 07:27:48 +00:00
|
|
|
};
|
2023-08-03 09:31:56 +00:00
|
|
|
|
2023-07-20 16:07:27 +00:00
|
|
|
}
|