Oxidized bindings for the Nix package manager!!
Find a file
John Ericson a04e903a7d flake.lock: Update
Flake lock file updates:

• Updated input 'flake-parts':
    'github:hercules-ci/flake-parts/4524271976b625a4a605beefd893f270620fd751?narHash=sha256-%2BuWLQZccFHwqpGqr2Yt5VsW/PbeJVTn9Dk6SHWhNRPw%3D' (2025-09-01)
  → 'github:hercules-ci/flake-parts/2cccadc7357c0ba201788ae99c4dfa90728ef5e0?narHash=sha256-LlLt2Jo/gMNYAwOgdRQBrsRoOz7BPRkzvNaI/fzXi2Q%3D' (2025-11-21)
• Updated input 'flake-parts/nixpkgs-lib':
    'github:nix-community/nixpkgs.lib/a73b9c743612e4244d865a2fdee11865283c04e6?narHash=sha256-x2rJ%2BOvzq0sCMpgfgGaaqgBSwY%2BLST%2BWbZ6TytnT9Rk%3D' (2025-08-10)
  → 'github:nix-community/nixpkgs.lib/719359f4562934ae99f5443f20aa06c2ffff91fc?narHash=sha256-b0yj6kfvO8ApcSE%2BQmA6mUfu8IYG6/uU28OFn4PaC8M%3D' (2025-10-29)
• Updated input 'nix':
    'github:NixOS/nix/5f42e5ebb797433e3db3cfbc81f9cc3139903636?narHash=sha256-esRP6gaYG8d3gLkfr306HBgWYe2jEfHIJq6A1W/pdYw%3D' (2025-12-05)
  → 'github:NixOS/nix/525755dadc153c68e5ada8d287ab19af26383fff?narHash=sha256-oMSKV0NFQpfwYQ4wcIIDuH%2B0AwCQl%2BbYRgPznx38i8k%3D' (2025-12-06)
• Updated input 'nix-cargo-integration':
    'github:yusdacra/nix-cargo-integration/529758e12981b62d6977a7bc61c86e19c3e11594?narHash=sha256-v3MasfpOtYUV4MzG5JGRS4JIo3lccjBzH9qZi7zQzSM%3D' (2025-09-01)
  → 'github:yusdacra/nix-cargo-integration/0feff946314851edc88b9c783ad7d2dccd49abcc?narHash=sha256-S5k0HAxjq2sbf5BC5DOly66joE08HfiyEJD8v2U3yLc%3D' (2025-12-06)
• Updated input 'nix-cargo-integration/crane':
    'github:ipetkov/crane/5b03654ce046b5167e7b0bccbd8244cb56c16f0e?narHash=sha256-/mumx8AQ5xFuCJqxCIOFCHTVlxHkMT21idpbgbm/TIE%3D' (2024-09-26)
  → 'github:ipetkov/crane/95d528a5f54eaba0d12102249ce42f4d01f4e364?narHash=sha256-NU5WaEdfwF6i8faJ2Yh%2BjcK9vVFrofLcwlD/mP65JrI%3D' (2025-09-25)
• Updated input 'nix-cargo-integration/dream2nix':
    'github:nix-community/dream2nix/fbec3263cb4895ac86ee9506cdc4e6919a1a2214?narHash=sha256-nrDovydywSKRbWim9Ynmgj8SBm8LK3DI2WuhIqzOHYI%3D' (2025-08-12)
  → 'github:nix-community/dream2nix/ee20942e4524d3458a91108716c847a2d4299d2e?narHash=sha256-4OlkDA0yJyqt5iTX9NqtHNghvkWNzYqmtX7FxDmEXt4%3D' (2025-11-24)
• Updated input 'nix-cargo-integration/mk-naked-shell':
    'github:yusdacra/mk-naked-shell/7612f828dd6f22b7fb332cc69440e839d7ffe6bd?narHash=sha256-3XlJrwlR0nBiREnuogoa5i1b4%2Bw/XPe0z8bbrJASw0g%3D' (2023-04-12)
  → 'github:90-008/mk-naked-shell/7612f828dd6f22b7fb332cc69440e839d7ffe6bd?narHash=sha256-3XlJrwlR0nBiREnuogoa5i1b4%2Bw/XPe0z8bbrJASw0g%3D' (2023-04-12)
• Updated input 'nix-cargo-integration/parts':
    'github:hercules-ci/flake-parts/af66ad14b28a127c5c0f3bbb298218fc63528a18?narHash=sha256-pHYj8gUBapuUzKV/kN/tR3Zvqc7o6gdFB9XKXIp1SQ8%3D' (2025-08-06)
  → 'github:hercules-ci/flake-parts/2cccadc7357c0ba201788ae99c4dfa90728ef5e0?narHash=sha256-LlLt2Jo/gMNYAwOgdRQBrsRoOz7BPRkzvNaI/fzXi2Q%3D' (2025-11-21)
• Updated input 'nix-cargo-integration/rust-overlay':
    'github:oxalica/rust-overlay/b29e5365120f344fe7161f14fc9e272fcc41ee56?narHash=sha256-z/Iy4qvcMqzhA2IAAg71Sw4BrMwbBHvCS90ZoPLsnIk%3D' (2025-09-01)
  → 'github:oxalica/rust-overlay/086fd19a68e80fcc8a298e9df4674982e4c498a6?narHash=sha256-FIJtt3Zil89/hLy9i7f0R2xXcJDPc3CeqiiCLfsFV0Y%3D' (2025-12-06)
• Updated input 'nix-cargo-integration/treefmt':
    'github:numtide/treefmt-nix/1aabc6c05ccbcbf4a635fb7a90400e44282f61c4?narHash=sha256-F1oFfV51AE259I85av%2BMAia221XwMHCOtZCMcZLK2Jk%3D' (2025-08-31)
  → 'github:numtide/treefmt-nix/5b4ee75aeefd1e2d5a1cc43cf6ba65eba75e83e4?narHash=sha256-AlEObg0syDl%2BSpi4LsZIBrjw%2BsnSVU4T8MOeuZJUJjM%3D' (2025-11-12)
• Updated input 'nixpkgs':
    'github:NixOS/nixpkgs/d7600c775f877cd87b4f5a831c28aa94137377aa?narHash=sha256-tlOn88coG5fzdyqz6R93SQL5Gpq%2Bm/DsWpekNFhqPQk%3D' (2025-08-30)
  → 'github:NixOS/nixpkgs/f61125a668a320878494449750330ca58b78c557?narHash=sha256-BmPWzogsG2GsXZtlT%2BMTcAWeDK5hkbGRZTeZNW42fwA%3D' (2025-12-05)
2025-12-06 15:10:49 -05:00
.vscode dev: Recommend against clangd vscode extension 2025-10-04 02:31:17 +02:00
dev maint: Move treefmt to dev partition 2025-12-06 12:04:26 +01:00
doc/hacking maint: Move to /rust/* to / 2025-10-26 23:29:13 +01:00
nix-bindings-bindgen-raw maint: Move to /rust/* to / 2025-10-26 23:29:13 +01:00
nix-bindings-expr Format, and keep formatted 2025-12-05 16:55:09 -05:00
nix-bindings-fetchers maint: Move to /rust/* to / 2025-10-26 23:29:13 +01:00
nix-bindings-flake Format, and keep formatted 2025-12-05 16:55:09 -05:00
nix-bindings-store Clone for Derivation 2025-12-06 13:42:24 -05:00
nix-bindings-util fix(nix-bindings-rust): fix aarch64 abi support 2025-12-06 13:58:00 -05:00
.envrc feat: Rust skeleton 2025-09-30 17:57:50 +02:00
.gitignore feat: Rust skeleton 2025-09-30 17:57:50 +02:00
bindgen-gcc.sh maint: Move to /rust/* to / 2025-10-26 23:29:13 +01:00
Cargo.lock maint: Move to /rust/* to / 2025-10-26 23:29:13 +01:00
Cargo.toml maint: Move to /rust/* to / 2025-10-26 23:29:13 +01:00
flake.lock flake.lock: Update 2025-12-06 15:10:49 -05:00
flake.nix Work around dead code analysis bug 2025-12-06 15:10:49 -05:00
LICENSE License as LGPL-2.1 2025-10-04 02:31:16 +02:00
nci.nix Format, and keep formatted 2025-12-05 16:55:09 -05:00
README.md feat: Expose module for setting up the build and test environment. 2025-10-27 14:52:48 +01:00

nix_bindings_* crates

Use the Nix C API from Rust.

Build with nix-cargo-integration

The development environment and building with Nix are taken care of by nix-cargo-integration (options).

The dependency on Nix is taken care of with the nix-bindings-rust flake-parts module.

Example usage:

{
  outputs =
    inputs@{ self, flake-parts, ... }:
    flake-parts.lib.mkFlake { inherit inputs; }
    {
      imports = [
        inputs.nix-cargo-integration.flakeModule
        inputs.nix-bindings-rust.modules.flake.default
      ];

      perSystem = { config, pkgs, ... }: {
        # optional:
        nix-bindings-rust.nixPackage = pkgs.nix;

        nci.projects."myproject" = {
          depsDrvConfig = {
            imports = [ config.nix-bindings-rust.nciBuildConfig ];
          };
        };
      };
    };
}

Hacking

The following will open a shell with dependencies, and install pre-commit for automatic formatting.

$ nix develop

VSCode

rust-analyzer

If the rust-analyzer extension fails, make sure the devShell was loaded into VSCode via Nix Env Selector or direnv.