add nix package

This commit is contained in:
Vinzenz Schroeter 2025-09-28 23:07:29 +02:00
parent 27ffbaa080
commit 421522d963

View file

@ -24,15 +24,40 @@
system:
f rec {
pkgs = nixpkgs.legacyPackages.${system};
selfPkgs = self.packages.${system};
inherit system;
}
);
in
{
packages = forAllSystems (
{ pkgs, selfPkgs, ... }:
{
servicepoint-binding-uniffi = pkgs.rustPlatform.buildRustPackage {
pname = "servicepoint-binding-uniffi";
version = "0.13.1";
src = ./.;
cargoDeps = pkgs.rustPlatform.importCargoLock { lockFile = ./Cargo.lock; };
nativeBuildInputs = with pkgs; [
pkg-config
];
buildInputs = with pkgs; [
xe
xz
];
};
default = selfPkgs.servicepoint-binding-uniffi;
}
);
devShells = forAllSystems (
{ pkgs, system }:
{ pkgs, selfPkgs, ... }:
{
default = pkgs.mkShell {
inputsFrom = [ selfPkgs.default ];
packages = with pkgs; [
(pkgs.symlinkJoin {
name = "rust-toolchain";
@ -46,9 +71,6 @@
cargo-tarpaulin
];
})
xe
xz
pkg-config
];
RUST_SRC_PATH = "${pkgs.rust.packages.stable.rustPlatform.rustLibSrc}";
};