smo-server/flake.nix

53 lines
1.4 KiB
Nix

{
inputs = {
nixpkgs.url = "github:NixOS/nixpkgs/nixos-unstable";
flake-utils.url = "github:numtide/flake-utils";
fenix = {
url = "github:nix-community/fenix";
inputs.nixpkgs.follows = "nixpkgs";
};
};
outputs = {
self,
nixpkgs,
flake-utils,
fenix,
}:
flake-utils.lib.eachDefaultSystem
(
system: let
overlays = [fenix.overlays.default];
pkgs = import nixpkgs {
inherit system overlays;
};
in
with pkgs; {
devShells.default = mkShell {
buildInputs = [
pkgs.fenix.stable.completeToolchain
pkg-config
openssl
];
};
formatter = pkgs.alejandra;
packages.default = rustPlatform.buildRustPackage {
name = "smo-server";
src = ./.;
nativeBuildInputs = [pkg-config cmake];
buildInputs = [openssl];
cargoDeps = rustPlatform.importCargoLock {
lockFile = ./Cargo.lock;
outputHashes = {
"newtype-enum-0.1.0" = "sha256-DBFSgtuwn51U3nvSxa0SQZKEHniC4UFVBHIeQjkXAvw=";
};
};
};
# nixosModules.default = { config }: with pkgs.lib {
# options.services.smo-server = {
# enable = mkEnableOption ""
# };
# }
}
);
}