This initializes a very simple AGit helper script. Usage: ``` agit create ``` or ``` agit c ``` To create a new AGit Pr. Integrate Pulling from an AGit remote. Gitea doesn't expose an AGit endpoint in the api, or the `tea` cli. This makes pulling not feasible, since there is no robust way to query the AGit topic, which is the ref that need to be pulled. One possible solution currently could be scraping the gitea instructions for forking a pull request on an AGit PR.
51 lines
1.4 KiB
Nix
51 lines
1.4 KiB
Nix
{ inputs, ... }:
|
|
{
|
|
perSystem =
|
|
{
|
|
pkgs,
|
|
self',
|
|
config,
|
|
...
|
|
}:
|
|
let
|
|
writers = pkgs.callPackage ./pkgs/builders/script-writers.nix { };
|
|
|
|
ansiEscapes = {
|
|
reset = ''\033[0m'';
|
|
green = ''\033[32m'';
|
|
};
|
|
|
|
# A python program to switch between dev-shells
|
|
# usage: select-shell shell-name
|
|
# the currently enabled dev-shell gets stored in ./.direnv/selected-shell
|
|
select-shell = writers.writePython3Bin "select-shell" {
|
|
flakeIgnore = [ "E501" ];
|
|
} ./pkgs/scripts/select-shell.py;
|
|
in
|
|
{
|
|
devShells.default = pkgs.mkShell {
|
|
name = "clan";
|
|
packages = [
|
|
select-shell
|
|
pkgs.nix-unit
|
|
pkgs.tea
|
|
pkgs.nix
|
|
self'.packages.tea-create-pr
|
|
self'.packages.merge-after-ci
|
|
self'.packages.pending-reviews
|
|
self'.packages.agit
|
|
# treefmt with config defined in ./flake-parts/formatting.nix
|
|
config.treefmt.build.wrapper
|
|
];
|
|
shellHook = ''
|
|
echo -e "${ansiEscapes.green}switch to another dev-shell using: select-shell${ansiEscapes.reset}"
|
|
export PRJ_ROOT=$(git rev-parse --show-toplevel)
|
|
|
|
# vendoring / needed for impure tests
|
|
ln -sfT ${self'.packages.clan-cli.nixpkgs} "$PRJ_ROOT/pkgs/clan-cli/clan_lib/nixpkgs"
|
|
ln -sfT ${inputs.nix-select} "$PRJ_ROOT/pkgs/clan-cli/clan_lib/select"
|
|
'';
|
|
};
|
|
};
|
|
}
|