add rust package to flake

This commit is contained in:
Joeri Exelmans 2025-09-23 13:40:56 +02:00
parent 5f0f9999fc
commit 75c85c2ee4

View file

@ -7,20 +7,23 @@
outputs = { self, nixpkgs, ... }@inputs: outputs = { self, nixpkgs, ... }@inputs:
let let
system = "x86_64-linux"; system = "x86_64-linux";
pkgs = nixpkgs.legacyPackages.${system}; pkgs = nixpkgs.legacyPackages.${system};
in common = {
{ buildInputs = [ pkgs.openssl ];
devShells.${system}.default = pkgs.mkShell nativeBuildInputs = [ pkgs.pkg-config ];
{ };
in {
devShells.${system}.default = pkgs.mkShell ({
packages = with pkgs; [ packages = with pkgs; [
rustc rustc
cargo cargo
]; ];
buildInputs = with pkgs; [ } // common);
openssl
]; packages.${system}.default = pkgs.rustPlatform.buildRustPackage ({
nativeBuildInputs = [ pkgs.pkg-config ]; name = "icomidal";
# env.RUST_SRC_PATH = "${pkgs.rust.packages.stable.rustPlatform.rust}"; src = ./.;
}; cargoHash = "sha256-vaMAQmDT2ZCZTbI9Kp/5MOTbe1a1DFqTKlcQqvR4vxA=";
} // common);
}; };
} }