Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
34 changes: 34 additions & 0 deletions default.nix
Original file line number Diff line number Diff line change
@@ -0,0 +1,34 @@
{
lib,
rustPlatform,
pkg-config,
dbus,
openssl,
}:
rustPlatform.buildRustPackage {
pname = "iron_heart";
version = "0.1.0";

src = ./.;

cargoLock = {
lockFile = ./Cargo.lock;
};

nativeBuildInputs = [
pkg-config
openssl
];

buildInputs = [
dbus
openssl
];

meta = with lib; {
description = "A BLE Heart Rate Monitor bridge for Social VR, OBS, Data Logging, and more!";
homepage = "https://github.com/nullstalgia/iron-heart";
license = licenses.mit;
maintainers = [];
};
}
96 changes: 96 additions & 0 deletions flake.lock

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

42 changes: 42 additions & 0 deletions flake.nix
Original file line number Diff line number Diff line change
@@ -0,0 +1,42 @@
{
description = "A BLE Heart Rate Monitor bridge for Social VR, OBS, Data Logging, and more! ";

inputs = {
nixpkgs.url = "github:NixOS/nixpkgs/nixos-unstable";
flake-utils.url = "github:numtide/flake-utils";

rust-overlay.url = "github:oxalica/rust-overlay";
};

outputs = {
self,
nixpkgs,
flake-utils,
rust-overlay,
}:
flake-utils.lib.eachDefaultSystem (
system: let
pkgs = import nixpkgs {
inherit system;
overlays = [rust-overlay.overlays.default];
};
in {
packages = rec {
iron_heart = pkgs.callPackage ./default.nix {};
default = iron_heart;
};

devShells.default = pkgs.mkShell rec {
nativeBuildInputs = with pkgs; [
rust-bin.stable.latest.default
pkg-config
dbus
openssl
rustup # for jetbrains IDE
];

LD_LIBRARY_PATH = pkgs.lib.makeLibraryPath nativeBuildInputs;
};
}
);
}