35 lines
998 B
Nix
35 lines
998 B
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}";
|
||
|
};
|
||
|
devShell =
|
||
|
let pkgs = import nixpkgs {
|
||
|
inherit system;
|
||
|
|
||
|
overlays = [ devshell.overlay (import rust-overlay)];
|
||
|
};
|
||
|
in
|
||
|
pkgs.devshell.mkShell {
|
||
|
packages = with pkgs; [ dhall (rust-bin.stable.latest.default.override {
|
||
|
extensions = [ "rls" ];
|
||
|
})];
|
||
|
};
|
||
|
});
|
||
|
}
|