tezlm
a3ca248c59
- update packages - add nix flake - add prepared sqlx queries - fix various compilation errors (this project is still pretty much dead though)
37 lines
1.1 KiB
Nix
37 lines
1.1 KiB
Nix
{
|
|
inputs = {
|
|
naersk.url = "github:nix-community/naersk/master";
|
|
nixpkgs.url = "github:NixOS/nixpkgs/nixpkgs-unstable";
|
|
utils.url = "github:numtide/flake-utils";
|
|
rust-overlay.url = "github:oxalica/rust-overlay";
|
|
};
|
|
|
|
outputs = { self, nixpkgs, utils, naersk, rust-overlay }:
|
|
utils.lib.eachDefaultSystem (system:
|
|
let
|
|
pkgs = (import nixpkgs) {
|
|
inherit system;
|
|
overlays = [ (import rust-overlay) ];
|
|
};
|
|
naersk-lib = pkgs.callPackage naersk { };
|
|
nativeBuildInputs = with pkgs; [
|
|
pkg-config fuse3
|
|
(rust-bin.selectLatestNightlyWith
|
|
(toolchain: toolchain.default.override {
|
|
extensions = [ "rust-src" "clippy" ];
|
|
}))
|
|
];
|
|
in
|
|
{
|
|
defaultPackage = naersk-lib.buildPackage {
|
|
src = ./.;
|
|
inherit nativeBuildInputs;
|
|
};
|
|
devShell = with pkgs; mkShell {
|
|
RUST_SRC_PATH = rustPlatform.rustLibSrc;
|
|
buildInputs = [ cargo rustc rustfmt pre-commit rustPackages.clippy sqlx-cli ];
|
|
inherit nativeBuildInputs;
|
|
};
|
|
});
|
|
}
|
|
|