Skip to content

NixOS #6

Description

@Paizo-dev

Hi John,

I've been testing OkShell on NixOS and noticed a few technical omissions in the current Nix derivation that prevent the project from building "out of the box."

To improve reproducibility and fix the build process for Nix users, the following changes are required in package.nix:

  1. Missing System Dependencies

The current derivation is missing several system libraries required by the Rust crates:

systemd (libudev): Required by libudev-sys. Without it, pkg-config fails to find libudev.pc.

alsa-lib: Required by alsa-sys for audio/notification features.

libclang: The clang-sys crate needs libclang and the LIBCLANG_PATH environment variable to be explicitly set in the Nix environment to find C headers.
  1. Doctest Failures in okshell-gamma

The doctests for okshell-gamma (specifically in crates/okshell-gamma/src/service.rs) are currently failing because glib is not being properly linked during the Cargo test phase within the Nix sandbox.

Recommended Changes

I suggest updating the buildInputs and environment configuration as follows:

buildInputs = [

... existing dependencies ...

pkgs.systemd
pkgs.alsa-lib
pkgs.llvmPackages.libclang.lib
pkgs.glib
];

Required for bindgen/clang-sys

LIBCLANG_PATH = "${pkgs.llvmPackages.libclang.lib}/lib";

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions