add nix pkg

This commit is contained in:
notohh 2024-06-01 11:55:58 -04:00
parent 7c77bbd62b
commit de4b32b0d5
Signed by: notohh
GPG key ID: BD47506D475EE86D

View file

@ -20,6 +20,26 @@
overlays = [fenix.overlays.default];
});
in {
packages = eachSystem (system: let
pkgs = nixpkgs.legacyPackages.${system};
inherit ((builtins.fromTOML (builtins.readFile ./Cargo.toml)).package) version;
in {
default = pkgsFor.${system}.rustPlatform.buildRustPackage {
pname = "forex";
version = "${version}";
src = self;
cargoLock = {
lockFile = ./Cargo.lock;
};
nativeBuildInputs = with pkgs; [pkg-config];
buildInputs = with pkgs; [openssl];
doCheck = false;
};
});
checks = eachSystem (system: {
pre-commit-check = pre-commit-hooks.lib.${system}.run {
src = ./.;
@ -42,6 +62,7 @@
alejandra
pkg-config
openssl
cargo-modules
(fenix.packages.${system}.complete.withComponents [
"cargo"
"clippy"