StartRNR/flake.nix

39 lines
1.1 KiB
Nix
Raw Normal View History

2023-08-26 03:37:24 -04:00
{
inputs = {
2023-08-26 17:44:04 -04:00
nixpkgs.url = "github:NixOS/nixpkgs/nixpkgs-unstable";
2023-08-26 03:37:24 -04:00
flake-utils.url = "github:numtide/flake-utils";
2023-08-26 17:44:04 -04:00
crane.url = "github:ipetkov/crane";
crane.inputs = {
nixpkgs.follows = "nixpkgs";
flake-utils.follows = "flake-utils";
};
2023-08-26 03:37:24 -04:00
};
2023-08-26 17:44:04 -04:00
outputs = { self, nixpkgs, crane, flake-utils, ... }:
2023-08-26 03:37:24 -04:00
flake-utils.lib.eachDefaultSystem (system:
let pkgs = import nixpkgs { inherit system; };
2023-08-26 17:44:04 -04:00
craneLib = crane.lib.${system};
2023-08-26 03:37:24 -04:00
in {
2023-08-26 17:44:04 -04:00
packages.ggelo = craneLib.buildPackage {
2023-08-26 03:37:24 -04:00
pname = "ggelo";
version = "0.1.0";
src = ./.;
cargoBuildFlags = "-p cli";
2023-08-26 16:46:22 -04:00
nativeBuildInputs = [ pkgs.pkg-config ];
PKG_CONFIG_PATH = "${pkgs.openssl.dev}/lib/pkgconfig";
2023-08-26 17:44:04 -04:00
doCheck = true;
2023-08-26 03:37:24 -04:00
};
packages.default = self.packages.${system}.ggelo;
2023-08-26 17:44:04 -04:00
checks.default = self.packages.${system}.ggelo;
2023-08-26 03:37:24 -04:00
devShells.default = pkgs.mkShell {
packages = with pkgs; [ rustc cargo pkg-config 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
};
});
}