GitXplorerGitXplorer
m

nix-devbox-utils

public
1 stars
0 forks
0 issues

Commits

List of commits on branch master.

No commits found

There are no commits on branch master.

README

The README file for this repository.

nix-devbox-utils

What does it do?

nix-devbox-utils makes your devbox.lock usable from your existing nix code. Its imported packages can then be used as part of other derivations.

Usage

{
  description = "A flake re-exporting all packages from a devbox.lock file";

  inputs.nix-devbox-utils.url = "github:mrene/nix-devbox-utils";

  outputs = { self, nixpkgs, nix-devbox-utils }: 
  {
    packages.x86_64-linux = let
      pkgs = nixpkgs.legacyPackages.x86_64-linux;

      # Import the devbox lock file
      # This returns { packages = { "${name}" = derivation; ... }; all-packages = derivation; }
      box = nix-devbox-utils.lib.mkDevbox {
        inherit pkgs;
        devbox = ./devbox.json;
        lockFile = ./devbox.lock;
      };
    in 
      box.packages // { all = box.all-packages; };
  };
}