Monorepo for Tangled

spindle/nixery: fix path construction

binaries added via nix-profile are stored in ~/.nix-profile/bin. we now
add this to the PATH during step execution.

Signed-off-by: oppiliappan <me@oppi.li>

authored by

oppiliappan and committed by tangled.org 0fd947f3 802b436b

+4 -1
+3
spindle/engines/nixery/engine.go
··· 313 envs.AddEnv(k, v) 314 } 315 } 316 envs.AddEnv("HOME", homeDir) 317 318 mkExecResp, err := e.docker.ContainerExecCreate(ctx, addl.container, container.ExecOptions{ 319 Cmd: []string{"bash", "-c", step.Command()},
··· 313 envs.AddEnv(k, v) 314 } 315 } 316 + 317 envs.AddEnv("HOME", homeDir) 318 + existingPath := "/usr/local/sbin:/usr/local/bin:/usr/sbin:/usr/bin:/sbin:/bin" 319 + envs.AddEnv("PATH", fmt.Sprintf("%s/.nix-profile/bin:/nix/var/nix/profiles/default/bin:%s", homeDir, existingPath)) 320 321 mkExecResp, err := e.docker.ContainerExecCreate(ctx, addl.container, container.ExecOptions{ 322 Cmd: []string{"bash", "-c", step.Command()},
+1 -1
spindle/engines/nixery/setup_steps.go
··· 37 } 38 39 if len(customPackages) > 0 { 40 - installCmd := "nix --extra-experimental-features nix-command --extra-experimental-features flakes profile install" 41 cmd := fmt.Sprintf("%s %s", installCmd, strings.Join(customPackages, " ")) 42 installStep := Step{ 43 command: cmd,
··· 37 } 38 39 if len(customPackages) > 0 { 40 + installCmd := "nix --extra-experimental-features nix-command --extra-experimental-features flakes profile add" 41 cmd := fmt.Sprintf("%s %s", installCmd, strings.Join(customPackages, " ")) 42 installStep := Step{ 43 command: cmd,