Skip to content

Commit

Permalink
Merge pull request #36 from Sntx626/main
Browse files Browse the repository at this point in the history
Introduce nix tooling for reproducable dev envirionments
  • Loading branch information
dezoito authored Aug 4, 2024
2 parents 89c62a6 + 29e4849 commit a903cde
Show file tree
Hide file tree
Showing 3 changed files with 108 additions and 0 deletions.
61 changes: 61 additions & 0 deletions flake.lock

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

25 changes: 25 additions & 0 deletions flake.nix
Original file line number Diff line number Diff line change
@@ -0,0 +1,25 @@
{
description = "A multi-platform desktop application to evaluate and compare LLM models, written in Rust and React.";

inputs = {
nixpkgs.url = "github:NixOS/nixpkgs/nixpkgs-unstable";
flake-utils.url = "github:numtide/flake-utils";
};

outputs =
{ nixpkgs, flake-utils, ... }:
flake-utils.lib.eachSystem
[
"aarch64-linux"
"x86_64-linux"
]
(
system:
let
pkgs = import nixpkgs { inherit system; };
in
{
devShells.default = import ./nix/shell.nix { inherit pkgs; };
}
);
}
22 changes: 22 additions & 0 deletions nix/shell.nix
Original file line number Diff line number Diff line change
@@ -0,0 +1,22 @@
{
pkgs ? import <nixpkgs> { },
}:
let
inherit (pkgs) lib;
in
pkgs.mkShell rec {
CARGO_PROFILE_RELEASE_DEBUG = true;
LD_LIBRARY_PATH = lib.makeLibraryPath nativeBuildInputs;
RUST_BACKTRACE = "full";

nativeBuildInputs = with pkgs; [
bun
cargo
gcc
gnome.libsoup
nixfmt-rfc-style
pkg-config
rustc
webkitgtk
];
}

0 comments on commit a903cde

Please sign in to comment.