mirror of
https://codeberg.org/icewind/mitemp-prometheus.git
synced 2026-06-04 17:44:12 +02:00
flake update
This commit is contained in:
parent
cedb67af89
commit
cc5ac92510
5 changed files with 35 additions and 24 deletions
37
nix/package.nix
Normal file
37
nix/package.nix
Normal file
|
|
@ -0,0 +1,37 @@
|
|||
{
|
||||
stdenv,
|
||||
rustPlatform,
|
||||
lib,
|
||||
pkg-config,
|
||||
dbus,
|
||||
}: let
|
||||
inherit (lib.sources) sourceByRegex;
|
||||
inherit (builtins) fromTOML readFile;
|
||||
src = sourceByRegex ../. ["Cargo.*" "(src)(/.*)?"];
|
||||
cargoToml = (fromTOML (readFile ../Cargo.toml)).package;
|
||||
in
|
||||
rustPlatform.buildRustPackage rec {
|
||||
pname = cargoToml.name;
|
||||
|
||||
inherit src;
|
||||
inherit (cargoToml) version;
|
||||
|
||||
buildInputs = [
|
||||
dbus
|
||||
];
|
||||
|
||||
nativeBuildInputs = [
|
||||
pkg-config
|
||||
];
|
||||
|
||||
preInstall = ''
|
||||
mkdir -p $out/share/dbus-1/system.d
|
||||
cp ${../dbus-bluetooth.xml} $out/share/dbus-1/system.d/dbus-bluetooth.conf
|
||||
'';
|
||||
|
||||
cargoLock = {
|
||||
lockFile = ../Cargo.lock;
|
||||
};
|
||||
|
||||
meta.mainProgram = "mitemp-prometheus";
|
||||
}
|
||||
Loading…
Add table
Add a link
Reference in a new issue