2023-08-26 03:37:24 -04:00
|
|
|
{
|
|
|
|
inputs = {
|
|
|
|
nixpkgs.url = "github:NixOS/nixpkgs";
|
|
|
|
flake-utils.url = "github:numtide/flake-utils";
|
|
|
|
};
|
|
|
|
|
|
|
|
outputs = inputs@{ self, nixpkgs, flake-utils, ... }:
|
|
|
|
flake-utils.lib.eachDefaultSystem (system:
|
|
|
|
let pkgs = import nixpkgs { inherit system; };
|
|
|
|
in {
|
|
|
|
packages.ggelo = pkgs.rustPlatform.buildRustPackage {
|
|
|
|
pname = "ggelo";
|
|
|
|
version = "0.1.0";
|
|
|
|
src = ./.;
|
|
|
|
cargoBuildFlags = "-p cli";
|
|
|
|
cargoLock.lockFile = ./Cargo.lock;
|
2023-08-26 16:46:22 -04:00
|
|
|
|
|
|
|
nativeBuildInputs = [ pkgs.pkg-config ];
|
|
|
|
PKG_CONFIG_PATH = "${pkgs.openssl.dev}/lib/pkgconfig";
|
2023-08-26 03:37:24 -04:00
|
|
|
};
|
|
|
|
|
|
|
|
packages.default = self.packages.${system}.ggelo;
|
|
|
|
|
|
|
|
devShells.default = pkgs.mkShell {
|
|
|
|
inputsFrom = [ self.packages.${system}.ggelo ];
|
|
|
|
packages = [ pkgs.rust-analyzer ];
|
2023-08-26 16:46:22 -04:00
|
|
|
|
|
|
|
PKG_CONFIG_PATH = "${pkgs.openssl.dev}/lib/pkgconfig";
|
2023-08-26 03:37:24 -04:00
|
|
|
};
|
|
|
|
});
|
|
|
|
}
|