Fix udev rule building

This commit is contained in:
GHOSCHT 2024-02-03 22:53:47 +01:00
parent f84671520b
commit 595cef5aa7
Signed by: ghoscht
GPG key ID: 2C2C1C62A5388E82
2 changed files with 5 additions and 3 deletions

View file

@ -39,9 +39,11 @@
inherit (cargoToml.package) name version;
src = ./.;
cargoLock.lockFile = ./Cargo.lock;
buildInputs = nonRustDeps;
nativeBuildInputs = nonRustDeps;
postInstall = ''
mkdir -p $out/etc/udev/rules.d/
echo ${udev-rule} > $out/etc/udev/rules.d/70-heliox.rules
mkdir -p $out/etc/udev/rules.d
echo "${udev-rule}" > $out/etc/udev/rules.d/70-heliox.rules
'';
};

View file

@ -10,7 +10,7 @@ struct Args {
fn main() {
let args = Args::parse();
let mut port = serialport::new("/dev/ttyUSB0", 115_200)
let mut port = serialport::new("/dev/heliox", 115_200)
.timeout(Duration::from_millis(10))
.open()
.expect("Failed to open port");