Skip to content
Open
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
60 changes: 45 additions & 15 deletions flake.nix
Original file line number Diff line number Diff line change
Expand Up @@ -21,26 +21,56 @@
forAllSystems = f: nixpkgs.lib.genAttrs allSystems (system: f {
pkgs = import nixpkgs { inherit system; };
});

beadsRustVersion = "0.1.19";
beadsRustHashes = {
"x86_64-linux" = "sha256-61a0IeR+NI56GDJdIQlxeiQ3wqNneAe1gUPzAz5oTMw=";
"x86_64-darwin" = "sha256-98srAx9fRr7NDbzVjIs4za7KONicVgPkZEimSaZ85/w=";
"aarch64-darwin" = "sha256-p8cZ6+c4LUSMU1Cvz+lus6NfYYTWFilCD2Jt2G+PGSg=";
};
beadsRustTargets = {
"x86_64-linux" = "linux_amd64";
"x86_64-darwin" = "darwin_amd64";
"aarch64-darwin" = "darwin_arm64";
};
in
{
# Development environment output
devShells = forAllSystems ({ pkgs }: {
default = pkgs.mkShell {
# The Nix packages provided in the environment
packages = with pkgs; [
devShells = nixpkgs.lib.genAttrs allSystems (system:
let
pkgs = import nixpkgs { inherit system; };
beads-rust = pkgs.stdenv.mkDerivation {
pname = "beads-rust";
version = beadsRustVersion;
src = pkgs.fetchurl {
url = "https://github.com/Dicklesworthstone/beads_rust/releases/download/v${beadsRustVersion}/br-v${beadsRustVersion}-${beadsRustTargets.${system}}.tar.gz";
hash = beadsRustHashes.${system};
Comment on lines +46 to +47

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

P1 Badge Add aarch64-linux mapping for beads-rust download

allSystems still includes aarch64-linux, but beadsRustTargets and beadsRustHashes do not define that key while the download URL and hash are indexed with ${system} directly. When an ARM Linux user evaluates devShells.aarch64-linux.default, Nix will fail with a missing attribute error, so nix develop is broken on a platform this flake claims to support.

Useful? React with 👍 / 👎.

};
sourceRoot = ".";
installPhase = ''
mkdir -p $out/bin
cp br $out/bin/
chmod +x $out/bin/br
'';
meta = {
description = "AI-supervised issue tracker (Rust rewrite)";
homepage = "https://github.com/Dicklesworthstone/beads_rust";
license = pkgs.lib.licenses.mit;
};
};
in {
default = pkgs.mkShell {
# The Nix packages provided in the environment
packages = with pkgs; [
bun
nixpkgs-fmt
go
];
beads-rust
];

shellHook = ''
if ! command -v bd &> /dev/null; then
echo "Installing beads (bd) for AI agent task tracking..."
go install github.com/steveyegge/beads/cmd/bd@latest
fi
echo " Beads: $(bd --version 2>/dev/null || echo 'run: go install github.com/steveyegge/beads/cmd/bd@latest')"
'';
};
});
shellHook = ''
echo " Beads: $(br --version)"
'';
};
});
};
}