2024-12-16 02:28:13 -05:00
|
|
|
{
|
|
|
|
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";
|
|
|
|
};
|
|
|
|
};
|
2024-12-20 21:35:43 -05:00
|
|
|
outputs = {
|
|
|
|
self,
|
|
|
|
nixpkgs,
|
|
|
|
flake-utils,
|
|
|
|
fenix,
|
|
|
|
}:
|
2024-12-16 02:28:13 -05:00
|
|
|
flake-utils.lib.eachDefaultSystem
|
2024-12-20 21:35:43 -05:00
|
|
|
(
|
|
|
|
system: let
|
|
|
|
overlays = [fenix.overlays.default];
|
|
|
|
pkgs = import nixpkgs {
|
|
|
|
inherit system overlays;
|
|
|
|
};
|
|
|
|
in
|
|
|
|
with pkgs; {
|
2024-12-16 02:28:13 -05:00
|
|
|
devShells.default = mkShell {
|
|
|
|
buildInputs = [
|
|
|
|
pkgs.fenix.stable.completeToolchain
|
|
|
|
pkg-config
|
|
|
|
openssl
|
|
|
|
];
|
|
|
|
};
|
2024-12-20 21:35:43 -05:00
|
|
|
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 ""
|
|
|
|
# };
|
|
|
|
# }
|
2024-12-16 02:28:13 -05:00
|
|
|
}
|
2024-12-20 21:35:43 -05:00
|
|
|
);
|
2024-12-16 02:28:13 -05:00
|
|
|
}
|