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: system:
f rec { f rec {
pkgs = nixpkgs.legacyPackages.${system}; pkgs = nixpkgs.legacyPackages.${system};
selfPkgs = self.packages.${system};
inherit system; inherit system;
} }
); );
in 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 ( devShells = forAllSystems (
{ pkgs, system }: { pkgs, selfPkgs, ... }:
{ {
default = pkgs.mkShell { default = pkgs.mkShell {
inputsFrom = [ selfPkgs.default ];
packages = with pkgs; [ packages = with pkgs; [
(pkgs.symlinkJoin { (pkgs.symlinkJoin {
name = "rust-toolchain"; name = "rust-toolchain";
@ -46,9 +71,6 @@
cargo-tarpaulin cargo-tarpaulin
]; ];
}) })
xe
xz
pkg-config
]; ];
RUST_SRC_PATH = "${pkgs.rust.packages.stable.rustPlatform.rustLibSrc}"; RUST_SRC_PATH = "${pkgs.rust.packages.stable.rustPlatform.rustLibSrc}";
}; };