| 1 |
{
|
| 2 |
description = "git-btw - A minimal git web interface";
|
| 3 |
inputs = {
|
| 4 |
nixpkgs.url = "github:NixOS/nixpkgs/nixos-unstable";
|
| 5 |
};
|
| 6 |
outputs = {
|
| 7 |
self,
|
| 8 |
nixpkgs,
|
| 9 |
}: let
|
| 10 |
systems = ["x86_64-linux" "aarch64-linux"];
|
| 11 |
|
| 12 |
forAllSystems = fn: nixpkgs.lib.genAttrs systems (system: fn nixpkgs.legacyPackages.${system});
|
| 13 |
in {
|
| 14 |
devShells = forAllSystems (pkgs: {
|
| 15 |
default = pkgs.mkShell {
|
| 16 |
packages = [
|
| 17 |
pkgs.php
|
| 18 |
pkgs.just
|
| 19 |
];
|
| 20 |
shellHook = ''
|
| 21 |
export PS1="(git-btw) $PS1"
|
| 22 |
echo ""
|
| 23 |
echo " git-btw dev server"
|
| 24 |
echo " ------------------"
|
| 25 |
echo " just dev - start php server on localhost:8888"
|
| 26 |
echo " just dev 3000 - start on custom port"
|
| 27 |
echo ""
|
| 28 |
echo " GIT_ROOT defaults to ./test-repos"
|
| 29 |
echo " Create test repos: just init-test-repos"
|
| 30 |
echo ""
|
| 31 |
'';
|
| 32 |
};
|
| 33 |
});
|
| 34 |
|
| 35 |
formatter = forAllSystems (pkgs: pkgs.alejandra);
|
| 36 |
};
|
| 37 |
}
|