Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 2 additions & 2 deletions Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -34,8 +34,8 @@ build:
### Test suite ############################################
.PHONY: test
test: build
npm install
npm test
pnpm install
pnpm test


### Formatting ############################################
Expand Down
10 changes: 5 additions & 5 deletions Readme.md
Original file line number Diff line number Diff line change
Expand Up @@ -157,21 +157,21 @@ For more details, see the [Flex recording and replay](tools/flex-recording-and-r

Recorded data can be replayed for debugging purposes.

For default settings: `npm run replay`
For default settings: `pnpm run replay`

To replay an other recording: `npm run replay -- rec/senso/simple.dat`
To replay an other recording: `pnpm run replay -- rec/senso/simple.dat`

To change the replay speed: `npm run replay -- --speed=0.5 rec/senso/simple.dat`
To change the replay speed: `pnpm run replay -- --speed=0.5 rec/senso/simple.dat`

To run without looping: `npm run replay -- --once`
To run without looping: `pnpm run replay -- --once`

#### Senso replay

The Senso replayer will appear as a Senso network device, so both driver and replayer should be running at the same time.

#### Senso Flex replay

The Senso Flex replayer (`npm run replay-flex`) supports the same parameters as the Senso replayer and also allows to fake device metadata.
The Senso Flex replayer (`pnpm run replay-flex`) supports the same parameters as the Senso replayer and also allows to fake device metadata.

Driver must be running and built with the `debug` tag, which is the default if
you run `make build` and/or `make run`.
Expand Down
27 changes: 5 additions & 22 deletions flake.lock

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

12 changes: 3 additions & 9 deletions flake.nix
Original file line number Diff line number Diff line change
Expand Up @@ -4,31 +4,25 @@
and a development shell for Linux and macOS.
'';
inputs = {
nixpkgs.url = "github:nixos/nixpkgs/24.11";
# only used for crossBuilding on darwin, since 24.11 is broken
nixpkgs2505.url = "github:nixos/nixpkgs/25.05";
nixpkgs.url = "github:nixos/nixpkgs/26.05";
flake-utils.url = "github:numtide/flake-utils";
};

outputs = { self, nixpkgs, nixpkgs2505, flake-utils }:
outputs = { self, nixpkgs, flake-utils }:
flake-utils.lib.eachDefaultSystem (system:
let
pkgs = import nixpkgs { inherit system; };

crossBuild = import ./nix/crossBuild.nix {
inherit pkgs;
};

crossBuildDarwin = import ./nix/crossBuild.nix {
pkgs = import nixpkgs2505 { inherit system; };
};
in
{
devShells = {
crossBuild = {
inherit (crossBuild) x86_64-linux;
inherit (crossBuild) x86_64-windows;
inherit (crossBuildDarwin) darwin;
inherit (crossBuild) darwin;
};
default = import ./nix/devShell.nix {
inherit pkgs;
Expand Down
2 changes: 2 additions & 0 deletions nix/crossBuild.nix
Original file line number Diff line number Diff line change
Expand Up @@ -48,6 +48,8 @@ in
cc = muslPkgs.gcc;
static-pcsclite = muslPkgs.pcsclite.overrideAttrs (attrs: {
mesonFlags = attrs.mesonFlags ++ [ (pkgs.lib.mesonOption "default_library" "static") ];
# 'doc' output is skipped in musl builds, because doxygen tool is absent
outputs = builtins.filter (output_name: output_name != "doc") attrs.outputs;
});
in
mkCrossBuildShell {
Expand Down
7 changes: 4 additions & 3 deletions nix/devShell.nix
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,9 @@ mkShell
gcc

# test dependencies
nodejs
nodejs_24
# `install` causes warnings and is finally killed by OS on macOS CI runners with pnpm v11.4.0
pnpm_10
socat

# Required for building go dependencies
Expand All @@ -17,6 +19,5 @@ mkShell
flex
pkg-config
]
++ lib.optional stdenv.isLinux pcsclite
++ lib.optional stdenv.isDarwin pkgs.darwin.apple_sdk.frameworks.PCSC;
++ lib.optional stdenv.isLinux pcsclite;
}
Loading
Loading