Make aider ready?
This commit is contained in:
parent
f1b25b4e44
commit
2612543973
4 changed files with 70 additions and 37 deletions
1
.gitignore
vendored
1
.gitignore
vendored
|
@ -30,3 +30,4 @@ llamafile.git
|
|||
/.direnv/
|
||||
*/dist/
|
||||
|
||||
.aider*
|
||||
|
|
26
.nix/default.nix
Normal file
26
.nix/default.nix
Normal file
|
@ -0,0 +1,26 @@
|
|||
{
|
||||
pkgs,
|
||||
lib,
|
||||
config,
|
||||
...
|
||||
}: let
|
||||
# list paths
|
||||
pkgs-paths-list = lib.fileset.toList (lib.fileset.fromSource (lib.sources.sourceFilesBySuffices ./. [".nix"]));
|
||||
# no default.nix
|
||||
filtered-paths-list = builtins.filter (path: builtins.baseNameOf path != "default.nix") pkgs-paths-list;
|
||||
# filename-extension parsed out
|
||||
pkgs-paths =
|
||||
builtins.map
|
||||
(path: {
|
||||
name = lib.strings.removeSuffix ".nix" (builtins.baseNameOf path);
|
||||
path = path;
|
||||
})
|
||||
filtered-paths-list;
|
||||
# import each path
|
||||
imported-pkgs = lib.attrsets.mergeAttrsList (builtins.map
|
||||
(pkg: {
|
||||
"${pkg.name}" = pkgs.callPackage pkg.path {};
|
||||
})
|
||||
pkgs-paths);
|
||||
in
|
||||
imported-pkgs
|
|
@ -25,12 +25,12 @@ mod html_elements {
|
|||
}
|
||||
}
|
||||
|
||||
struct TestController {}
|
||||
struct TestaController {}
|
||||
|
||||
#[controller(
|
||||
state = AppState
|
||||
)]
|
||||
impl TestController {
|
||||
impl TestaController {
|
||||
#[route(GET "/")]
|
||||
async fn index(State(_): State<AppState>) -> impl IntoResponse {
|
||||
maud! {
|
||||
|
@ -85,6 +85,9 @@ impl TestController {
|
|||
|
||||
maud! {
|
||||
h1 { "Item" }
|
||||
div {
|
||||
|
||||
}
|
||||
p {
|
||||
(format!("{id:?} {amount:?} {offset:?} {state:?}"))
|
||||
}
|
||||
|
@ -202,7 +205,7 @@ async fn main() {
|
|||
let listener = tokio::net::TcpListener::bind("0.0.0.0:8000").await.unwrap();
|
||||
|
||||
let router: axum::Router = axum::Router::new()
|
||||
.merge(TestController::into_router(app_state.clone()))
|
||||
.merge(TestaController::into_router(app_state.clone()))
|
||||
.merge(DistController::into_router(app_state.clone()))
|
||||
.fallback_service(get(handle_404))
|
||||
.method_not_allowed_fallback(handle_405)
|
||||
|
|
13
flake.nix
13
flake.nix
|
@ -67,18 +67,19 @@
|
|||
});
|
||||
})
|
||||
];
|
||||
pkgs = import nixpkgs {
|
||||
inherit system overlays;
|
||||
config = {
|
||||
allowUnfree = true;
|
||||
rocmSupport = true;
|
||||
};
|
||||
pkgs = import nixpkgs {
|
||||
inherit system overlays config;
|
||||
};
|
||||
customNodeModules = pkgs.npmlock2nix.v2.node_modules {
|
||||
src = ./.;
|
||||
nodejs = pkgs.nodejs_22;
|
||||
};
|
||||
buildInputs = with pkgs; [
|
||||
aider-chat
|
||||
harfbuzz
|
||||
openssl
|
||||
pango
|
||||
|
@ -107,12 +108,13 @@
|
|||
"gfx1102"
|
||||
"gfx1103"
|
||||
];
|
||||
lib = pkgs.lib;
|
||||
in
|
||||
{
|
||||
apps.devshell = self.outputs.devShells.${system}.default.flakeApp;
|
||||
packages = {
|
||||
cargo-leptos = pkgs.callPackage ./.nix/cargo-leptos.nix { };
|
||||
# llama-cpp = pkgs.callPackage "${llama-cpp}/.devops/nix/scope.nix" { };
|
||||
packages =
|
||||
(import ./.nix { inherit pkgs lib config; })
|
||||
// {
|
||||
myllamacpp = with pkgs;
|
||||
llamaPackages.llama-cpp.overrideDerivation (oldAttrs: {
|
||||
# speeds up builts by only building for a needed rocmTargets...
|
||||
|
@ -145,6 +147,7 @@
|
|||
customNodeModules
|
||||
customRustToolchain
|
||||
self.packages.${system}.myllamacpp
|
||||
aider-chat
|
||||
bacon
|
||||
binaryen
|
||||
cacert
|
||||
|
|
Loading…
Add table
Reference in a new issue