Repository navigation
Closed
Closed
Copy link
Labels
0.kind: bugSomething is broken2.status: stalehttps://github.com/NixOS/nixpkgs/blob/master/.github/STALE-BOT.md
Description
Nixpkgs version
- Unstable (25.05)
Describe the bug
Hey, I'm trying to use nix to develop swift programs, however running tests doesn't seem work. I saw that there is a patch to disable index store applied to swiftpm and a mention that checks are disabled due to the libIndexStore.so requirement. What would be needed to add support for swift-test?
Steps to reproduce
{
inputs = {
nixpkgs.url = "github:nixos/nixpkgs?ref=nixos-unstable";
};
outputs =
{ nixpkgs, ... }@inputs:
let
systems = [
"x86_64-linux"
"aarch64-linux"
];
eachSystem = fn: nixpkgs.lib.genAttrs systems (system: fn (inputs // { inherit system; }));
in
{
devShells = eachSystem (
{ nixpkgs, system, ... }:
let
pkgs = import nixpkgs { inherit system; };
in
{
default = pkgs.mkShell.override { stdenv = pkgs.swift.stdenv; } {
packages = with pkgs; [
swift
swiftpm
swiftPackages.XCTest
];
LD_LIBRARY_PATH = "${pkgs.swiftPackages.Dispatch}/lib";
};
}
);
};
}nix develop . --command bash -c "swift package init && swift test"Expected behaviour
swift tests running
Screenshots
No response
Relevant log output
warning: 'swift-example': Warning: supplying the --target argument to a nix-wrapped compiler may not work correctly - cc-wrapper is currently not designed with multi-target
compilers in mind. You may want to use an un-wrapped compiler instead.
Building for debugging...
error: open("/nix/store/0jxc9ngpcybbfcl3vd8vfhfdvjql7pzv-swift-5.8-lib/lib/libIndexStore.so: cannot open shared object file: No such file or directory")
[0/6] Wrapping AST for swift-exampleTests for debugging
error: fatalErrorAdditional context
No response
System metadata
- system:
"aarch64-linux" - host os:
Linux 6.12.4-asahi, NixOS, 25.05 (Warbler), 25.05.20250121.9e4d519 - multi-user?:
yes - sandbox:
yes - version:
nix-env (Nix) 2.24.11 - nixpkgs:
/nix/store/irknf7niks2djxz4csh7sr44wwrs082y-source
Notify maintainers
@dduan @stephank @trepetti @Trundle
Note for maintainers: Please tag this issue in your pull request description. (i.e. Resolves #ISSUE.)
I assert that this issue is relevant for Nixpkgs
- I assert that this is a bug and not a support request.
- I assert that this is not a duplicate of an existing issue.
- I assert that I have read the NixOS Code of Conduct and agree to abide by it.
Is this issue important to you?
Add a 👍 reaction to issues you find important.
Reacted by Yiannis Marangos, Uzair Aftab, Samuel Kuehnhold and Daniel Woffinden
Metadata
Metadata
Assignees
Labels
0.kind: bugSomething is broken2.status: stalehttps://github.com/NixOS/nixpkgs/blob/master/.github/STALE-BOT.md
Activity
Correct the Swift lane: it works, and the way it fails is the point
feat(languages): declarative language descriptors; Swift and Kotlin o…
reckenrode commentedon Sep 29, 2026
Fixed by Fixed by #557896.