sampad/flake.nix

47 lines
1.1 KiB
Nix
Raw Normal View History

2022-07-05 12:00:07 +01:00
{
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 ./.;
2022-07-05 12:00:07 +01:00
defaultApp = utils.lib.mkApp {
drv = self.defaultPackage."${system}";
};
devShells.default = let
pkgs = import nixpkgs {
2022-07-05 12:00:07 +01:00
inherit system;
overlays = [devshell.overlay (import rust-overlay)];
2022-07-05 12:00:07 +01:00
};
in
pkgs.mkShell {
buildInputs = with pkgs; [
dhall
(rust-bin.stable.latest.default.override {
extensions = ["rls"];
})
pkg-config
libusb
openssl
];
2022-07-05 12:00:07 +01:00
};
formatter = pkgs.alejandra;
});
2022-07-05 12:00:07 +01:00
}