Compare commits

..

No commits in common. "44ef4bb6d707c46af1bed6244f17a16f26f246c1" and "1169d9f1d294268f699e9c4e088cb1d97d6c36ce" have entirely different histories.

3 changed files with 13 additions and 45 deletions

8
flake.lock generated
View file

@ -2,16 +2,16 @@
"nodes": { "nodes": {
"nixpkgs": { "nixpkgs": {
"locked": { "locked": {
"lastModified": 1758791193, "lastModified": 1739357830,
"narHash": "sha256-F8WmEwFoHsnix7rt290R0rFXNJiMbClMZyIC/e+HYf0=", "narHash": "sha256-9xim3nJJUFbVbJCz48UP4fGRStVW5nv4VdbimbKxJ3I=",
"owner": "nixos", "owner": "nixos",
"repo": "nixpkgs", "repo": "nixpkgs",
"rev": "25e53aa156d47bad5082ff7618f5feb1f5e02d01", "rev": "0ff09db9d034a04acd4e8908820ba0b410d7a33a",
"type": "github" "type": "github"
}, },
"original": { "original": {
"owner": "nixos", "owner": "nixos",
"ref": "nixos-25.05", "ref": "nixos-24.11",
"repo": "nixpkgs", "repo": "nixpkgs",
"type": "github" "type": "github"
} }

View file

@ -2,11 +2,11 @@
description = "Flake for the servicepoint library."; description = "Flake for the servicepoint library.";
inputs = { inputs = {
nixpkgs.url = "github:nixos/nixpkgs/nixos-25.05"; nixpkgs.url = "github:nixos/nixpkgs/nixos-24.11";
}; };
outputs = outputs =
{ inputs@{
self, self,
nixpkgs, nixpkgs,
}: }:
@ -24,45 +24,15 @@
system: system:
f rec { f rec {
pkgs = nixpkgs.legacyPackages.${system}; pkgs = nixpkgs.legacyPackages.${system};
selfPkgs = self.packages.${system};
inherit system; inherit system;
} }
); );
in in
{ rec {
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
];
postInstall = ''
mkdir -p $out/lib/pkgconfig
sed "s:\$out:$out:g" ${./servicepoint-binding-uniffi.pc.in} | sed "s:\$version:$version:g" > $out/lib/pkgconfig/servicepoint-binding-uniffi.pc
'';
};
default = selfPkgs.servicepoint-binding-uniffi;
}
);
devShells = forAllSystems ( devShells = forAllSystems (
{ pkgs, selfPkgs, ... }: { pkgs, system }:
{ {
default = pkgs.mkShell { default = pkgs.mkShell rec {
inputsFrom = [ selfPkgs.default ];
packages = with pkgs; [ packages = with pkgs; [
(pkgs.symlinkJoin { (pkgs.symlinkJoin {
name = "rust-toolchain"; name = "rust-toolchain";
@ -76,12 +46,15 @@
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}";
}; };
} }
); );
formatter = forAllSystems ({ pkgs, ... }: pkgs.nixfmt-tree); formatter = forAllSystems ({ pkgs, ... }: pkgs.nixfmt-rfc-style);
}; };
} }

View file

@ -1,5 +0,0 @@
Name: servicepoint-binding-uniffi
Description: UniFFI bindings for the servicepoint library
Version: $version
URL: https://git.berlin.ccc.de/servicepoint/servicepoint-binding-uniffi
Libs: -L$out/lib -lservicepoint_binding_uniffi