wrapnix

package
v0.0.0-...-b872246 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Oct 14, 2023 License: Apache-2.0 Imports: 14 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func CreateDevboxSymlinkIfPossible

func CreateDevboxSymlinkIfPossible() error

CreateDevboxSymlinkIfPossible creates a symlink to the devbox binary.

Needed because:

  1. The bin-wrappers cannot invoke devbox via the Launcher. The Launcher script invokes some coreutils commands that may themselves be installed by devbox and so be bin-wrappers. This causes an infinite loop.

    So, the bin-wrappers need to directly invoke the devbox binary.

  2. The devbox binary's path will change when devbox is updated. Hence using absolute paths to the devbox binaries in the bin-wrappers will result in bin-wrappers invoking older devbox binaries.

    So, the bin-wrappers need to use a symlink to the latest devbox binary. This symlink is updated when devbox is updated.

func CreateWrappers

func CreateWrappers(ctx context.Context, args CreateWrappersArgs) error

CreateWrappers creates wrappers for all the executables in nix paths

Types

type CreateWrappersArgs

type CreateWrappersArgs struct {
	NixBins         []string
	ShellEnvHash    string
	ShellEnvHashKey string
	ProjectDir      string
}

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL