mirror of
https://codeberg.org/icewind/ptouch-api.git
synced 2026-06-03 19:04:08 +02:00
initial version
This commit is contained in:
parent
ddc5849ed6
commit
e37160b717
11 changed files with 2800 additions and 3 deletions
26
nix/package.nix
Normal file
26
nix/package.nix
Normal file
|
|
@ -0,0 +1,26 @@
|
|||
{
|
||||
rustPlatform,
|
||||
pkg-config,
|
||||
lib,
|
||||
}: let
|
||||
inherit (lib.sources) sourceByRegex;
|
||||
inherit (builtins) fromTOML readFile;
|
||||
src = sourceByRegex ../. ["Cargo.*" "(src)(/.*)?" ".*\.rules"];
|
||||
version = (fromTOML (readFile ../Cargo.toml)).package.version;
|
||||
in
|
||||
rustPlatform.buildRustPackage rec {
|
||||
pname = "ptouch-api";
|
||||
|
||||
inherit src version;
|
||||
|
||||
cargoLock = {
|
||||
lockFile = ../Cargo.lock;
|
||||
};
|
||||
|
||||
postInstall = ''
|
||||
mkdir -p $out/lib/udev/rules.d/
|
||||
cp ./51-ptouch-api.rules $out/lib/udev/rules.d/
|
||||
'';
|
||||
|
||||
meta.mainProgram = "ptouch-api";
|
||||
}
|
||||
Loading…
Add table
Add a link
Reference in a new issue