47 lines
1.1 KiB
Nix
47 lines
1.1 KiB
Nix
{
|
|
description = "Sampad server";
|
|
inputs = {
|
|
utils.url = "github:numtide/flake-utils";
|
|
devshell.url = "github:numtide/devshell";
|
|
naersk.url = "github:nix-community/naersk";
|
|
rust-overlay.url = "github:oxalica/rust-overlay";
|
|
};
|
|
outputs = {
|
|
self,
|
|
nixpkgs,
|
|
utils,
|
|
naersk,
|
|
devshell,
|
|
rust-overlay,
|
|
}:
|
|
utils.lib.eachDefaultSystem (system: let
|
|
pkgs = import nixpkgs {inherit system;};
|
|
naersk-lib = pkgs.callPackage naersk {};
|
|
in {
|
|
defaultPackage = naersk-lib.buildPackage ./.;
|
|
|
|
defaultApp = utils.lib.mkApp {
|
|
drv = self.defaultPackage."${system}";
|
|
};
|
|
devShells.default = let
|
|
pkgs = import nixpkgs {
|
|
inherit system;
|
|
|
|
overlays = [devshell.overlay (import rust-overlay)];
|
|
};
|
|
in
|
|
pkgs.mkShell {
|
|
buildInputs = with pkgs; [
|
|
dhall
|
|
(rust-bin.stable.latest.default.override {
|
|
extensions = ["rls"];
|
|
})
|
|
pkg-config
|
|
libusb
|
|
openssl
|
|
];
|
|
};
|
|
formatter = pkgs.alejandra;
|
|
});
|
|
}
|