add rust package to flake
This commit is contained in:
parent
5f0f9999fc
commit
75c85c2ee4
1 changed files with 14 additions and 11 deletions
25
flake.nix
25
flake.nix
|
|
@ -7,20 +7,23 @@
|
|||
outputs = { self, nixpkgs, ... }@inputs:
|
||||
let
|
||||
system = "x86_64-linux";
|
||||
pkgs = nixpkgs.legacyPackages.${system};
|
||||
in
|
||||
{
|
||||
devShells.${system}.default = pkgs.mkShell
|
||||
{
|
||||
pkgs = nixpkgs.legacyPackages.${system};
|
||||
common = {
|
||||
buildInputs = [ pkgs.openssl ];
|
||||
nativeBuildInputs = [ pkgs.pkg-config ];
|
||||
};
|
||||
in {
|
||||
devShells.${system}.default = pkgs.mkShell ({
|
||||
packages = with pkgs; [
|
||||
rustc
|
||||
cargo
|
||||
];
|
||||
buildInputs = with pkgs; [
|
||||
openssl
|
||||
];
|
||||
nativeBuildInputs = [ pkgs.pkg-config ];
|
||||
# env.RUST_SRC_PATH = "${pkgs.rust.packages.stable.rustPlatform.rust}";
|
||||
};
|
||||
} // common);
|
||||
|
||||
packages.${system}.default = pkgs.rustPlatform.buildRustPackage ({
|
||||
name = "icomidal";
|
||||
src = ./.;
|
||||
cargoHash = "sha256-vaMAQmDT2ZCZTbI9Kp/5MOTbe1a1DFqTKlcQqvR4vxA=";
|
||||
} // common);
|
||||
};
|
||||
}
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue