From c1db8a0cfebdf77066776728854c3bf0f32df09c Mon Sep 17 00:00:00 2001 From: "Ifiok Jr." Date: Fri, 11 Jul 2025 08:09:37 +0100 Subject: [PATCH] scooter: compile only `scooter` MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit I was seeing the following error when installing `scooter` after installing `lsp-ai`. This change specifies the bin `scooter`. ```bash ➜ nix profile add nixpkgs#scooter error: An existing package already provides the following file: /nix/store/lzqlq6jrb4rlx6si51xrg3blgcvpn0d9-lsp-ai-0.7.1/bin/xtask This is the conflicting file from the new package: /nix/store/nminr7pl0zd9ikr2xbdbx74lilwcm3bk-scooter-0.5.3/bin/xtask To remove the existing package: nix profile remove lsp-ai The new package can also be added next to the existing one by assigning a different priority. The conflicting packages have a priority of 5. To prioritise the new package: nix profile add flake:nixpkgs#legacyPackages.aarch64-darwin.scooter --priority 4 To prioritise the existing package: nix profile add flake:nixpkgs#legacyPackages.aarch64-darwin.scooter --priority 6 ``` --- pkgs/by-name/sc/scooter/package.nix | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/pkgs/by-name/sc/scooter/package.nix b/pkgs/by-name/sc/scooter/package.nix index cac351608edf..59e0d7975a78 100644 --- a/pkgs/by-name/sc/scooter/package.nix +++ b/pkgs/by-name/sc/scooter/package.nix @@ -18,6 +18,12 @@ rustPlatform.buildRustPackage rec { useFetchCargoVendor = true; cargoHash = "sha256-kPweKXAitvODNoKTr2iB+qM9qMWGoKEQCxpkgrpnewY="; + # Ensure that only the `scooter` package is built (excluding `xtask`) + cargoBuildFlags = [ + "--package" + "scooter" + ]; + # Many tests require filesystem writes which fail in Nix sandbox doCheck = false;