ufh/flake.nix
tezlm a3ca248c59
maintenence (see long commit message)
- update packages
- add nix flake
- add prepared sqlx queries
- fix various compilation errors

(this project is still pretty much dead though)
2024-08-01 02:50:11 -07:00

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;
};
});
}