sampad/flake.nix

35 lines
998 B
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 ./.;
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" ];
})];
};
});
}