add nix pkg
This commit is contained in:
parent
7c77bbd62b
commit
de4b32b0d5
1 changed files with 21 additions and 0 deletions
21
flake.nix
21
flake.nix
|
@ -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"
|
||||
|
|
Loading…
Reference in a new issue