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
3 changes: 3 additions & 0 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -27,3 +27,6 @@ apm_modules/
AGENTS.md
CLAUDE.md
GEMINI.md

## git worktrees kept inside the project directory
.worktrees/
18 changes: 18 additions & 0 deletions flake.lock

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

17 changes: 15 additions & 2 deletions flake.nix
Original file line number Diff line number Diff line change
@@ -1,19 +1,32 @@
{
description = "Rust-first USB Android software KVM backed by scrcpy";

outputs = inputs:
outputs = inputs: let
# Nixpkgs 26.11 dropped x86_64-darwin; 26.05-darwin is the last branch
# that still supports (and caches) it, so use that there.
isX86Darwin = system: system == "x86_64-darwin";
in
inputs.flake-parts.lib.mkFlake {inherit inputs;} {
systems = import inputs.systems;
imports = [
(inputs.import-tree ./flake)
./modules
];
perSystem = {system, ...}: {
_module.args.pkgs =
if isX86Darwin system
then inputs."nixpkgs-2605".legacyPackages.${system}
else inputs.nixpkgs.legacyPackages.${system};
};
};

inputs = {
nixpkgs.url = "github:nixos/nixpkgs/nixpkgs-unstable";
"nixpkgs-2605".url = "github:NixOS/nixpkgs/nixpkgs-26.05-darwin";
flake-parts.url = "github:hercules-ci/flake-parts";
systems.url = "github:nix-systems/default";
# nix-systems/default dropped x86_64-darwin in c29398b5; pin the last
# revision that still lists it so lock bumps keep x86_64-darwin outputs.
systems.url = "github:nix-systems/default/da67096a3b9bf56a91d16901293e51ba5b49a27e";
devshell = {
url = "github:numtide/devshell";
inputs.nixpkgs.follows = "nixpkgs";
Expand Down
7 changes: 6 additions & 1 deletion flake/devshells.nix
Original file line number Diff line number Diff line change
Expand Up @@ -21,10 +21,15 @@
};
packages =
lib.attrsets.attrValues {
# apm-cli isn't in nixpkgs-26.05-darwin (x86_64-darwin);
# run the same PyPI release ephemerally via uv there.
apm-cli =
pkgs.apm-cli or (pkgs.writeShellScriptBin "apm" ''
exec ${pkgs.uv}/bin/uv tool run --from apm-cli apm "$@"
'');
inherit
(pkgs)
android-tools
apm-cli
cargo
clippy
pkg-config
Expand Down
Loading