mirror of
https://codeberg.org/icewind/ptouch-api.git
synced 2026-06-03 10:54:07 +02:00
26 lines
584 B
Nix
26 lines
584 B
Nix
{
|
|
rustPlatform,
|
|
pkg-config,
|
|
lib,
|
|
}: let
|
|
inherit (lib.sources) sourceByRegex;
|
|
inherit (builtins) fromTOML readFile;
|
|
src = sourceByRegex ../. ["Cargo.*" "(src|web)(/.*)?" ".*\.rules"];
|
|
version = (fromTOML (readFile ../Cargo.toml)).package.version;
|
|
in
|
|
rustPlatform.buildRustPackage rec {
|
|
pname = "ptouch-remote";
|
|
|
|
inherit src version;
|
|
|
|
cargoLock = {
|
|
lockFile = ../Cargo.lock;
|
|
};
|
|
|
|
postInstall = ''
|
|
mkdir -p $out/lib/udev/rules.d/
|
|
cp ./51-ptouch-remote.rules $out/lib/udev/rules.d/
|
|
'';
|
|
|
|
meta.mainProgram = "ptouch-remote";
|
|
}
|