From 6471203be63bb5dd7716aa9841014f7e9105d452 Mon Sep 17 00:00:00 2001 From: Alexander Foremny Date: Mon, 8 Apr 2024 12:56:26 +0200 Subject: fix: send inputs via messages instead of input It appears as if lightyear inputs are supposed to be keys that are being held down. This abstraction does not fit well with our inputs, which are one-time actions. In particular, I've found inputs being missed. We hope to improve upon this, by sending inputs as lightyear messages via a reliable, oredered channel. --- shell.nix | 20 +++++++++++++++++++- 1 file changed, 19 insertions(+), 1 deletion(-) (limited to 'shell.nix') diff --git a/shell.nix b/shell.nix index c70c2eb..7e73840 100644 --- a/shell.nix +++ b/shell.nix @@ -1,11 +1,29 @@ -{ pkgs ? import (import ./nix/sources.nix).nixpkgs { } }: +{ pkgs ? import (import ./nix/sources.nix).nixpkgs { + overlays = [ + (self: super: { + "format" = pkgs.writers.writeDashBin "format" '' + set -efu + cd ${self.lib.escapeShellArg (toString ./.)} + find src -iname '*.rs' -exec ${pkgs.rustfmt}/bin/rustfmt '{}' \; + ''; + "watch" = pkgs.writers.writeDashBin "watch" '' + set -efu + cd ${self.lib.escapeShellArg (toString ./.)} + find src -iname '*.rs' | entr -rs 'clear; cargo check' + ''; + }) + ]; + } +}: let inherit (pkgs) lib; in pkgs.mkShell rec { nativeBuildInputs = [ pkgs.cargo + pkgs.format pkgs.pkg-config pkgs.rustc pkgs.rustfmt + pkgs.watch ]; buildInputs = [ pkgs.alsa-lib -- cgit v1.2.3