74 lines
1.5 KiB
Nix
Executable File
74 lines
1.5 KiB
Nix
Executable File
{
|
|
inputs = {
|
|
nixpkgs = {
|
|
type = "github";
|
|
owner = "karaolidis";
|
|
repo = "nixpkgs";
|
|
ref = "integration";
|
|
};
|
|
|
|
flake-utils = {
|
|
type = "github";
|
|
owner = "numtide";
|
|
repo = "flake-utils";
|
|
ref = "main";
|
|
};
|
|
|
|
treefmt-nix = {
|
|
type = "github";
|
|
owner = "numtide";
|
|
repo = "treefmt-nix";
|
|
ref = "main";
|
|
|
|
inputs.nixpkgs.follows = "nixpkgs";
|
|
};
|
|
};
|
|
|
|
outputs =
|
|
{ self, nixpkgs, ... }@inputs:
|
|
inputs.flake-utils.lib.eachDefaultSystem (
|
|
system:
|
|
let
|
|
pkgs = nixpkgs.legacyPackages.${system};
|
|
treefmt = inputs.treefmt-nix.lib.evalModule pkgs ./treefmt.nix;
|
|
in
|
|
{
|
|
packages.default = pkgs.rustPlatform.buildRustPackage {
|
|
pname = "glyph";
|
|
version = "0.1.0";
|
|
src = ./.;
|
|
cargoLock = {
|
|
lockFile = ./Cargo.lock;
|
|
};
|
|
|
|
SQLX_OFFLINE = true;
|
|
|
|
nativeBuildInputs = with pkgs; [
|
|
pkg-config
|
|
];
|
|
|
|
buildInputs = with pkgs; [
|
|
fuse3
|
|
];
|
|
};
|
|
|
|
devShells.default = pkgs.mkShell {
|
|
packages = with pkgs; [
|
|
cargo
|
|
rustc
|
|
rustfmt
|
|
clippy
|
|
cargo-udeps
|
|
cargo-outdated
|
|
sqlx-cli
|
|
fuse3
|
|
pkg-config
|
|
];
|
|
};
|
|
|
|
formatter = treefmt.config.build.wrapper;
|
|
checks.formatting = treefmt.config.build.check self;
|
|
}
|
|
);
|
|
}
|