Repository: jetpack-io/devbox (go)

Issue:
Cleaning up unused packages from nix store fails
### What happened?

When trying to clean out any unused packages using:

devbox run -- nix store gc

I get the following"

error: experimental Nix feature 'nix-command' is disabled; use '--extra-experimental-features nix-command' to override
Error: error running script "nix" in Devbox: exit status 1


### Steps to reproduce

1.
2.
3.


### Command

run

### devbox.json

```jsonc
{
  "$schema":  "https://raw.githubusercontent.com/jetpack-io/devbox/0.10.1/.sche>
  "packages": ["php@latest"],
  "shell": {
    "init_hook": [
      "echo 'Welcome to devbox!' > /dev/null"
    ],
    "scripts": {
      "test": [
        "echo \"Error: no test specified\" && exit 1"
      ]
    }
  }
}
```


### Devbox version

0.10.1

### Nix version

2.18.1

### What system does this bug occur on?

Linux (x86-64)

### Debug logs

2024/03/28 10:35:03 findProjectDir: path is 
2024/03/28 10:35:03 finding devbox config in dir: /home/platform/devtest
2024/03/28 10:35:03 findProjectDir: path is 
2024/03/28 10:35:03 finding devbox config in dir: /home/platform/devtest
2024/03/28 10:35:03 script: nix
2024/03/28 10:35:03 script args: [store gc]
2024/03/28 10:35:03 findProjectDir: path is 
2024/03/28 10:35:03 finding devbox config in dir: /home/platform/devtest
2024/03/28 10:35:03 current environment PATH is: /home/platform/devtest/.devbox/nix/profile/default/bin:/nix/store/znqwpxy9jlxcgi2ms2hga0ch87bbbr9g-patchelf-0.15.0/bin:/nix/store/zlzz2z48s7ry0hkl55xiqp5a73b4mzrg-gcc-wrapper-12.3.0/bin:/nix/store/0b9bsznqs6pdg42dxcwvrlmarjn2p6a1-gcc-12.3.0/bin:/nix/store/nvh3jgs8pqghnsfzbv28004xkigiw8gc-glibc-2.38-23-bin/bin:/nix/store/vwkvhj69z4qqgmpa2lwm97kabf12p26r-coreutils-9.3/bin:/nix/store/h8d2j0prdf7pnpgyrgkxrrbfwnmxbq6y-binutils-wrapper-2.40/bin:/nix/store/p58l5qmzifl20qmjs3xfpl01f0mqlza2-binutils-2.40/bin:/nix/store/qyzfglbrqb5ck0dgljplin2bvc4995w7-findutils-4.9.0/bin:/nix/store/x6y2i213maj6ibcn0qzgg7graif5qcvi-diffutils-3.10/bin:/nix/store/g5p3ky90xa05ggg5szyb0pbbl2vp7n03-gnused-4.9/bin:/nix/store/p2r51wfg9m3ga7pp7avslpfhfa7w5y83-gnugrep-3.11/bin:/nix/store/cmn958i8qym0qvmvydl23fh3bm3fbhl7-gawk-5.2.2/bin:/nix/store/f5qy259g9b4qh0hwz22z5j5bq3m53cpv-gnutar-1.35/bin:/nix/store/kmr52zpw7wazxywqvzgpdx0vnn9prd3v-gzip-1.13/bin:/nix/store/w1mar48lwkavwy64mvj567lwaqnm2l11-bzip2-1.0.8-bin/bin:/nix/store/9dh2csn531by6b1vr9jv85v4k17xwkid-gnumake-4.4.1/bin:/nix/store/lf0wpjrj8yx4gsmw2s3xfl58ixmqk8qa-bash-5.2-p15/bin:/nix/store/pinwlz7294p37d2sbkdpjildzxii42vv-patch-2.7.6/bin:/nix/store/skrzk0g88jf9rg28labqsyxv7gg357q1-xz-5.4.4-bin/bin:/nix/store/h5pshzq92r2xcv6w1p10cmkar4nyv0xp-file-5.45/bin:/home/platform/devtest/.devbox/virtenv/runx/bin:/home/platform/.nix-profile/bin:/usr/local/sbin:/usr/local/bin:/usr/sbin:/usr/bin:/sbin:/bin:/usr/games:/usr/local/games:/snap/bin
2024/03/28 10:35:03 nix environment PATH is: map[AR:ar AS:as CC:gcc COLORTERM:truecolor CONFIG_SHELL:/nix/store/lf0wpjrj8yx4gsmw2s3xfl58ixmqk8qa-bash-5.2-p15/bin/bash CXX:g++ DBUS_SESSION_BUS_ADDRESS:unix:path=/run/user/1001/bus DEFAULTS_PATH:/usr/share/gconf/ubuntu.default.path DESKTOP_SESSION:ubuntu DEVBOX_CONFIG_DIR:/home/platform/devtest/devbox.d DEVBOX_DEBUG:1 DEVBOX_INIT_PATH:/home/platform/.nix-profile/bin:/usr/local/sbin:/usr/local/bin:/usr/sbin:/usr/bin:/sbin:/bin:/usr/games:/usr/local/games:/snap/bin:/snap/bin DEVBOX_NIX_ENV_PATH_c4cf08c47e7da144d5bc0f4b3fdda287cfaf39cd8c2e797beb3bdc4c3ad278a4:/home/platform/devtest/.devbox/nix/profile/default/bin:/nix/store/znqwpxy9jlxcgi2ms2hga0ch87bbbr9g-patchelf-0.15.0/bin:/nix/store/zlzz2z48s7ry0hkl55xiqp5a73b4mzrg-gcc-wrapper-12.3.0/bin:/nix/store/0b9bsznqs6pdg42dxcwvrlmarjn2p6a1-gcc-12.3.0/bin:/nix/store/nvh3jgs8pqghnsfzbv28004xkigiw8gc-glibc-2.38-23-bin/bin:/nix/store/vwkvhj69z4qqgmpa2lwm97kabf12p26r-coreutils-9.3/bin:/nix/store/h8d2j0prdf7pnpgyrgkxrrbfwnmxbq6y-binutils-wrapper-2.40/bin:/nix/store/p58l5qmzifl20qmjs3xfpl01f0mqlza2-binutils-2.40/bin:/nix/store/qyzfglbrqb5ck0dgljplin2bvc4995w7-findutils-4.9.0/bin:/nix/store/x6y2i213maj6ibcn0qzgg7graif5qcvi-diffutils-3.10/bin:/nix/store/g5p3ky90xa05ggg5szyb0pbbl2vp7n03-gnused-4.9/bin:/nix/store/p2r51wfg9m3ga7pp7avslpfhfa7w5y83-gnugrep-3.11/bin:/nix/store/cmn958i8qym0qvmvydl23fh3bm3fbhl7-gawk-5.2.2/bin:/nix/store/f5qy259g9b4qh0hwz22z5j5bq3m53cpv-gnutar-1.35/bin:/nix/store/kmr52zpw7wazxywqvzgpdx0vnn9prd3v-gzip-1.13/bin:/nix/store/w1mar48lwkavwy64mvj567lwaqnm2l11-bzip2-1.0.8-bin/bin:/nix/store/9dh2csn531by6b1vr9jv85v4k17xwkid-gnumake-4.4.1/bin:/nix/store/lf0wpjrj8yx4gsmw2s3xfl58ixmqk8qa-bash-5.2-p15/bin:/nix/store/pinwlz7294p37d2sbkdpjildzxii42vv-patch-2.7.6/bin:/nix/store/skrzk0g88jf9rg28labqsyxv7gg357q1-xz-5.4.4-bin/bin:/nix/store/h5pshzq92r2xcv6w1p10cmkar4nyv0xp-file-5.45/bin:/home/platform/devtest/.devbox/virtenv/runx/bin DEVBOX_PACKAGES_DIR:/home/platform/devtest/.devbox/nix/profile/default DEVBOX_PATH_STACK:DEVBOX_NIX_ENV_PATH_c4cf08c47e7da144d5bc0f4b3fdda287cfaf39cd8c2e797beb3bdc4c3ad278a4:DEVBOX_INIT_PATH DEVBOX_PROJECT_ROOT:/home/platform/devtest DEVBOX_SYSTEM_BASH:/usr/bin/bash DEVBOX_SYSTEM_SED:/usr/bin/sed DIRENV_DIFF:eJzsWdtyo0iTfhWC3bvfII4CNDEXsiRb8riFGqndbkdHEEVRQElQFFUIEBPz7hsg2ZYP07vT3bt78bcjbENW5peZdchD8adIxdGf4mq8mYsjcbDnbJDmEKQDHmAyOnt_en0e6B-Or0-0GGSIn8udCJwAehI4PYkX4v302p-ON2N_uvDWj-p5Ahga7IM9KfejM0pM8gydIx_J5yyjQQXYIMVBryQchIjvypyKf12IpPNy7IkjETDxQhx36gAXL8TJRByJMYTdo7u8Wlz76_ns9razhuBmwMucoUEaKTXdsq19aIyYZ7XG9SZKTRs3WbGzCyAFgCeSKWsSVc3OuUFH6CDv7zv4f_1LvBCns7tL994_aZkuOmMGSZ6hAU1BGeUsG4SoKhEvu_9B3sjhs9Riudj4j6v0UkgmuJEoyyOcosGrVfu_WMWThcvFvT9b3vVG-tCAkWJDw0JWCFTDCM0AKpER6FEYAs22YAQi3YGhDTVkOVaAAj0IoQF1EGqWDYy_nxr5ODf94jw6HaII7NPyaNnzqrWkqGlzcLZpA2OsZVxLYqDAxLaCIGBOLFFQwgSlkaTIqikrb-TTttVaw-YWOyjJLjXNBhfUBJYeGFnLYimGUKoZoBQxSdVk_S2EEjgBb0nBhzSMDS1sYF2xNANsSzQ6BGoP8b4oqRJ9G3ObFnFCeNQGlWYritHscIxrO4ZSnOIASpqs25KmS_2me4lQ1bsq2Q6d1iiKOKNAS-vMsXYgiFSNakMmwZyhfYlTLjmy_lo6sUN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K8R4wQEqEQvkFxKLsOAARMCkRIyAVcEZTlCFSghLnRAhRCXDa1eMC3cVcznbrrnx-gfJTHPpNEP5D8BDMWSiANBX6uRNwv5oC4ALbkxJnSAgRRSREBGLEBQE1NGflb38JX_eKoqPjX-Gr-J_5vvz6tCcQ-0nf5WCXRK9SEJ92HMxJhOM9O6eFiPLLTmv_5z3aiuUUxKBEr0c3gMWofJf4nsw852X3-5byHvcR57WKc-obqXySILh7fFkQXoI0fUEj5TgMp5iDIEVTRDcM9GPdIc0Qz8nZvBCQdcfgRQfWk0tcocsXR1e8EPN9-XLN_llrd0Q4wXVYF-IxcJ_gaXcou-ezI3ohUoYixG67GP24eGpPfpyXN2Y-Dy3f96O36Cftvh5rnuen2edl2Hn6AjsImrA2WFzXqR4TsGXY1g44ZCpJecR3kXQUkvprgB6ja7uniD6ae-AlysSReLw2OPH99dd_BQAA___N5q0k DIRENV_DIR:-/home/platform/devtest DIRENV_WATCHES:eJyMz0FOhTAQgOG7dE0YCjOdB3uXJu6Ni4FOA6ZQ01Z8ifHurtwQTbzAn_97_jRPUlczGVjTrvAWpYaUd_B6Vi0VWj3OvJjGPCZft13NZNlaGga03JiH-1ZqMVPN7_rV_NVqY1okQlklK_gt63GCxJg-gFhmDeI76ZFUiLQbB5RRqEfHOoReF8JRZ-6QmO28cHCCljBI4PHXr9vtv18_Rq_nnO7ta0nHNejQObxCX74DAAD___JRY6Y= DISPLAY::1 GDMSESSION:ubuntu GNOME_DESKTOP_SESSION_ID:this-is-deprecated GNOME_SHELL_SESSION_MODE:ubuntu GNOME_TERMINAL_SCREEN:/org/gnome/Terminal/screen/38a25ca1_8e47_43d0_9c6e_905fea697f42 GNOME_TERMINAL_SERVICE::1.471 GPG_AGENT_INFO:/run/user/1001/gnupg/S.gpg-agent:0:1 GTK_IM_MODULE:ibus GTK_MODULES:gail:atk-bridge HOME:/home/platform HOST_PATH:/nix/store/z8g2j13cynr8bgiyn70pxixf7862iqxk-php-with-extensions-8.3.4/bin:/nix/store/g791bq4a0qnc2gja43hbjkn0yjknfz1n-composer-2.7.2/bin:/nix/store/vwkvhj69z4qqgmpa2lwm97kabf12p26r-coreutils-9.3/bin:/nix/store/qyzfglbrqb5ck0dgljplin2bvc4995w7-findutils-4.9.0/bin:/nix/store/x6y2i213maj6ibcn0qzgg7graif5qcvi-diffutils-3.10/bin:/nix/store/g5p3ky90xa05ggg5szyb0pbbl2vp7n03-gnused-4.9/bin:/nix/store/p2r51wfg9m3ga7pp7avslpfhfa7w5y83-gnugrep-3.11/bin:/nix/store/cmn958i8qym0qvmvydl23fh3bm3fbhl7-gawk-5.2.2/bin:/nix/store/f5qy259g9b4qh0hwz22z5j5bq3m53cpv-gnutar-1.35/bin:/nix/store/kmr52zpw7wazxywqvzgpdx0vnn9prd3v-gzip-1.13/bin:/nix/store/w1mar48lwkavwy64mvj567lwaqnm2l11-bzip2-1.0.8-bin/bin:/nix/store/9dh2csn531by6b1vr9jv85v4k17xwkid-gnumake-4.4.1/bin:/nix/store/lf0wpjrj8yx4gsmw2s3xfl58ixmqk8qa-bash-5.2-p15/bin:/nix/store/pinwlz7294p37d2sbkdpjildzxii42vv-patch-2.7.6/bin:/nix/store/skrzk0g88jf9rg28labqsyxv7gg357q1-xz-5.4.4-bin/bin:/nix/store/h5pshzq92r2xcv6w1p10cmkar4nyv0xp-file-5.45/bin IN_NIX_SHELL:impure LANG:C.UTF-8 LAUNCHER_PATH:/usr/local/bin/devbox LAUNCHER_VERSION:0.2.1 LD:ld LESSCLOSE:/usr/bin/lesspipe %s %s LESSOPEN:| /usr/bin/lesspipe %s LOGNAME:platform LS_COLORS:rs=0:di=01;34:ln=01;36:mh=00:pi=40;33:so=01;35:do=01;35:bd=40;33;01:cd=40;33;01:or=40;31;01:mi=00:su=37;41:sg=30;43:ca=30;41:tw=30;42:ow=34;42:st=37;44:ex=01;32:*.tar=01;31:*.tgz=01;31:*.arc=01;31:*.arj=01;31:*.taz=01;31:*.lha=01;31:*.lz4=01;31:*.lzh=01;31:*.lzma=01;31:*.tlz=01;31:*.txz=01;31:*.tzo=01;31:*.t7z=01;31:*.zip=01;31:*.z=01;31:*.dz=01;31:*.gz=01;31:*.lrz=01;31:*.lz=01;31:*.lzo=01;31:*.xz=01;31:*.zst=01;31:*.tzst=01;31:*.bz2=01;31:*.bz=01;31:*.tbz=01;31:*.tbz2=01;31:*.tz=01;31:*.deb=01;31:*.rpm=01;31:*.jar=01;31:*.war=01;31:*.ear=01;31:*.sar=01;31:*.rar=01;31:*.alz=01;31:*.ace=01;31:*.zoo=01;31:*.cpio=01;31:*.7z=01;31:*.rz=01;31:*.cab=01;31:*.wim=01;31:*.swm=01;31:*.dwm=01;31:*.esd=01;31:*.jpg=01;35:*.jpeg=01;35:*.mjpg=01;35:*.mjpeg=01;35:*.gif=01;35:*.bmp=01;35:*.pbm=01;35:*.pgm=01;35:*.ppm=01;35:*.tga=01;35:*.xbm=01;35:*.xpm=01;35:*.tif=01;35:*.tiff=01;35:*.png=01;35:*.svg=01;35:*.svgz=01;35:*.mng=01;35:*.pcx=01;35:*.mov=01;35:*.mpg=01;35:*.mpeg=01;35:*.m2v=01;35:*.mkv=01;35:*.webm=01;35:*.webp=01;35:*.ogm=01;35:*.mp4=01;35:*.m4v=01;35:*.mp4v=01;35:*.vob=01;35:*.qt=01;35:*.nuv=01;35:*.wmv=01;35:*.asf=01;35:*.rm=01;35:*.rmvb=01;35:*.flc=01;35:*.avi=01;35:*.fli=01;35:*.flv=01;35:*.gl=01;35:*.dl=01;35:*.xcf=01;35:*.xwd=01;35:*.yuv=01;35:*.cgm=01;35:*.emf=01;35:*.ogv=01;35:*.ogx=01;35:*.aac=00;36:*.au=00;36:*.flac=00;36:*.m4a=00;36:*.mid=00;36:*.midi=00;36:*.mka=00;36:*.mp3=00;36:*.mpc=00;36:*.ogg=00;36:*.ra=00;36:*.wav=00;36:*.oga=00;36:*.opus=00;36:*.spx=00;36:*.xspf=00;36: MANDATORY_PATH:/usr/share/gconf/ubuntu.mandatory.path NIX_BINTOOLS:/nix/store/h8d2j0prdf7pnpgyrgkxrrbfwnmxbq6y-binutils-wrapper-2.40 NIX_BINTOOLS_WRAPPER_TARGET_HOST_x86_64_unknown_linux_gnu:1 NIX_BUILD_CORES:4 NIX_CC:/nix/store/zlzz2z48s7ry0hkl55xiqp5a73b4mzrg-gcc-wrapper-12.3.0 NIX_CC_WRAPPER_TARGET_HOST_x86_64_unknown_linux_gnu:1 NIX_CFLAGS_COMPILE: -frandom-seed=ws4smqz9w7 NIX_ENFORCE_NO_NATIVE:1 NIX_HARDENING_ENABLE:fortify fortify3 stackprotector pic strictoverflow format relro bindnow NIX_LDFLAGS:-rpath /nix/store/ws4smqz9w7p4n1q2a97w37qj7wxa3waq-nix-shell-env/lib  NIX_PROFILES:/nix/var/nix/profiles/default /home/platform/.nix-profile NIX_SSL_CERT_FILE:/etc/ssl/certs/ca-certificates.crt NIX_STORE:/nix/store NM:nm OBJCOPY:objcopy OBJDUMP:objdump OLDPWD: PATH:/nix/store/znqwpxy9jlxcgi2ms2hga0ch87bbbr9g-patchelf-0.15.0/bin:/nix/store/zlzz2z48s7ry0hkl55xiqp5a73b4mzrg-gcc-wrapper-12.3.0/bin:/nix/store/0b9bsznqs6pdg42dxcwvrlmarjn2p6a1-gcc-12.3.0/bin:/nix/store/nvh3jgs8pqghnsfzbv28004xkigiw8gc-glibc-2.38-23-bin/bin:/nix/store/vwkvhj69z4qqgmpa2lwm97kabf12p26r-coreutils-9.3/bin:/nix/store/h8d2j0prdf7pnpgyrgkxrrbfwnmxbq6y-binutils-wrapper-2.40/bin:/nix/store/p58l5qmzifl20qmjs3xfpl01f0mqlza2-binutils-2.40/bin:/nix/store/z8g2j13cynr8bgiyn70pxixf7862iqxk-php-with-extensions-8.3.4/bin:/nix/store/g791bq4a0qnc2gja43hbjkn0yjknfz1n-composer-2.7.2/bin:/nix/store/vwkvhj69z4qqgmpa2lwm97kabf12p26r-coreutils-9.3/bin:/nix/store/qyzfglbrqb5ck0dgljplin2bvc4995w7-findutils-4.9.0/bin:/nix/store/x6y2i213maj6ibcn0qzgg7graif5qcvi-diffutils-3.10/bin:/nix/store/g5p3ky90xa05ggg5szyb0pbbl2vp7n03-gnused-4.9/bin:/nix/store/p2r51wfg9m3ga7pp7avslpfhfa7w5y83-gnugrep-3.11/bin:/nix/store/cmn958i8qym0qvmvydl23fh3bm3fbhl7-gawk-5.2.2/bin:/nix/store/f5qy259g9b4qh0hwz22z5j5bq3m53cpv-gnutar-1.35/bin:/nix/store/kmr52zpw7wazxywqvzgpdx0vnn9prd3v-gzip-1.13/bin:/nix/store/w1mar48lwkavwy64mvj567lwaqnm2l11-bzip2-1.0.8-bin/bin:/nix/store/9dh2csn531by6b1vr9jv85v4k17xwkid-gnumake-4.4.1/bin:/nix/store/lf0wpjrj8yx4gsmw2s3xfl58ixmqk8qa-bash-5.2-p15/bin:/nix/store/pinwlz7294p37d2sbkdpjildzxii42vv-patch-2.7.6/bin:/nix/store/skrzk0g88jf9rg28labqsyxv7gg357q1-xz-5.4.4-bin/bin:/nix/store/h5pshzq92r2xcv6w1p10cmkar4nyv0xp-file-5.45/bin PHPFPM_ERROR_LOG_FILE:/home/platform/devtest/.devbox/virtenv/php/php-fpm.log PHPFPM_PID_FILE:/home/platform/devtest/.devbox/virtenv/php/php-fpm.pid PHPFPM_PORT:8082 PHPRC:/home/platform/devtest/devbox.d/php QT_ACCESSIBILITY:1 QT_IM_MODULE:ibus RANLIB:ranlib READELF:readelf SESSION_MANAGER:local/usnyc3dt-p001:@/tmp/.ICE-unix/3374,unix/usnyc3dt-p001:/tmp/.ICE-unix/3374 SIZE:size SOURCE_DATE_EPOCH:315532800 SSH_AGENT_LAUNCHER:gnome-keyring SSH_AUTH_SOCK:/run/user/1001/keyring/ssh STRINGS:strings STRIP:strip SYSTEMD_EXEC_PID:3399 TERM:xterm-256color USER:platform USERNAME:platform VTE_VERSION:6800 WINDOWPATH:2 XAUTHORITY:/run/user/1001/gdm/Xauthority XDG_CONFIG_DIRS:/etc/xdg/xdg-ubuntu:/etc/xdg XDG_CURRENT_DESKTOP:ubuntu:GNOME XDG_DATA_DIRS:/nix/store/znqwpxy9jlxcgi2ms2hga0ch87bbbr9g-patchelf-0.15.0/share XDG_MENU_PREFIX:gnome- XDG_RUNTIME_DIR:/run/user/1001 XDG_SESSION_CLASS:user XDG_SESSION_DESKTOP:ubuntu XDG_SESSION_TYPE:x11 XMODIFIERS:@im=ibus __DEVBOX_INIT_HOOK_c4cf08c47e7da144d5bc0f4b3fdda287cfaf39cd8c2e797beb3bdc4c3ad278a4: __DEVBOX_SHELLENV_HASH_c4cf08c47e7da144d5bc0f4b3fdda287cfaf39cd8c2e797beb3bdc4c3ad278a4:1ae98c8e54c16237dc9c54cf2555737b82a44d55cc3feccf373ac9e5e37c90e7 __DEVBOX_VERSION_CHECK:1 __ETC_PROFILE_NIX_SOURCED:1 __structuredAttrs: buildInputs:/nix/store/z8g2j13cynr8bgiyn70pxixf7862iqxk-php-with-extensions-8.3.4 /nix/store/g791bq4a0qnc2gja43hbjkn0yjknfz1n-composer-2.7.2 buildPhase:{ echo "------------------------------------------------------------";
  echo " WARNING: the existence of this path is not guaranteed.";
  echo " It is an internal implementation detail for pkgs.mkShell.";
  echo "------------------------------------------------------------";
  echo;
  # Record all build inputs as runtime dependencies
  export;
} >> "$out"
 builder:/nix/store/lf0wpjrj8yx4gsmw2s3xfl58ixmqk8qa-bash-5.2-p15/bin/bash cmakeFlags: configureFlags: depsBuildBuild: depsBuildBuildPropagated: depsBuildTarget: depsBuildTargetPropagated: depsHostHost: depsHostHostPropagated: depsTargetTarget: depsTargetTargetPropagated: doCheck: doInstallCheck: dontAddDisableDepTrack:1 mesonFlags: name:nix-shell-env nativeBuildInputs: out:/nix/store/ws4smqz9w7p4n1q2a97w37qj7wxa3waq-nix-shell-env outputs:out patches: phases:buildPhase preferLocalBuild:1 propagatedBuildInputs: propagatedNativeBuildInputs: shell:/nix/store/lf0wpjrj8yx4gsmw2s3xfl58ixmqk8qa-bash-5.2-p15/bin/bash shellHook: stdenv:/nix/store/bbxdw4rgwwl3gnajri82yidr1nlsfskf-stdenv-linux strictDeps: system:x86_64-linux]
2024/03/28 10:35:03 PATH after plugins and config is: /home/platform/devtest/.devbox/nix/profile/default/bin:/nix/store/znqwpxy9jlxcgi2ms2hga0ch87bbbr9g-patchelf-0.15.0/bin:/nix/store/zlzz2z48s7ry0hkl55xiqp5a73b4mzrg-gcc-wrapper-12.3.0/bin:/nix/store/0b9bsznqs6pdg42dxcwvrlmarjn2p6a1-gcc-12.3.0/bin:/nix/store/nvh3jgs8pqghnsfzbv28004xkigiw8gc-glibc-2.38-23-bin/bin:/nix/store/vwkvhj69z4qqgmpa2lwm97kabf12p26r-coreutils-9.3/bin:/nix/store/h8d2j0prdf7pnpgyrgkxrrbfwnmxbq6y-binutils-wrapper-2.40/bin:/nix/store/p58l5qmzifl20qmjs3xfpl01f0mqlza2-binutils-2.40/bin:/nix/store/z8g2j13cynr8bgiyn70pxixf7862iqxk-php-with-extensions-8.3.4/bin:/nix/store/g791bq4a0qnc2gja43hbjkn0yjknfz1n-composer-2.7.2/bin:/nix/store/qyzfglbrqb5ck0dgljplin2bvc4995w7-findutils-4.9.0/bin:/nix/store/x6y2i213maj6ibcn0qzgg7graif5qcvi-diffutils-3.10/bin:/nix/store/g5p3ky90xa05ggg5szyb0pbbl2vp7n03-gnused-4.9/bin:/nix/store/p2r51wfg9m3ga7pp7avslpfhfa7w5y83-gnugrep-3.11/bin:/nix/store/cmn958i8qym0qvmvydl23fh3bm3fbhl7-gawk-5.2.2/bin:/nix/store/f5qy259g9b4qh0hwz22z5j5bq3m53cpv-gnutar-1.35/bin:/nix/store/kmr52zpw7wazxywqvzgpdx0vnn9prd3v-gzip-1.13/bin:/nix/store/w1mar48lwkavwy64mvj567lwaqnm2l11-bzip2-1.0.8-bin/bin:/nix/store/9dh2csn531by6b1vr9jv85v4k17xwkid-gnumake-4.4.1/bin:/nix/store/lf0wpjrj8yx4gsmw2s3xfl58ixmqk8qa-bash-5.2-p15/bin:/nix/store/pinwlz7294p37d2sbkdpjildzxii42vv-patch-2.7.6/bin:/nix/store/skrzk0g88jf9rg28labqsyxv7gg357q1-xz-5.4.4-bin/bin:/nix/store/h5pshzq92r2xcv6w1p10cmkar4nyv0xp-file-5.45/bin
2024/03/28 10:35:03 returning false for path /nix/store/z8g2j13cynr8bgiyn70pxixf7862iqxk-php-with-extensions-8.3.4/bin and input /nix/store/z8g2j13cynr8bgiyn70pxixf7862iqxk-php-with-extensions-8.3.4
2024/03/28 10:35:03 returning false for path /nix/store/g791bq4a0qnc2gja43hbjkn0yjknfz1n-composer-2.7.2/bin and input /nix/store/g791bq4a0qnc2gja43hbjkn0yjknfz1n-composer-2.7.2
2024/03/28 10:35:03 PATH after filtering with buildInputs ([/nix/store/z8g2j13cynr8bgiyn70pxixf7862iqxk-php-with-extensions-8.3.4 /nix/store/g791bq4a0qnc2gja43hbjkn0yjknfz1n-composer-2.7.2]) is: /home/platform/devtest/.devbox/nix/profile/default/bin:/nix/store/znqwpxy9jlxcgi2ms2hga0ch87bbbr9g-patchelf-0.15.0/bin:/nix/store/zlzz2z48s7ry0hkl55xiqp5a73b4mzrg-gcc-wrapper-12.3.0/bin:/nix/store/0b9bsznqs6pdg42dxcwvrlmarjn2p6a1-gcc-12.3.0/bin:/nix/store/nvh3jgs8pqghnsfzbv28004xkigiw8gc-glibc-2.38-23-bin/bin:/nix/store/vwkvhj69z4qqgmpa2lwm97kabf12p26r-coreutils-9.3/bin:/nix/store/h8d2j0prdf7pnpgyrgkxrrbfwnmxbq6y-binutils-wrapper-2.40/bin:/nix/store/p58l5qmzifl20qmjs3xfpl01f0mqlza2-binutils-2.40/bin:/nix/store/qyzfglbrqb5ck0dgljplin2bvc4995w7-findutils-4.9.0/bin:/nix/store/x6y2i213maj6ibcn0qzgg7graif5qcvi-diffutils-3.10/bin:/nix/store/g5p3ky90xa05ggg5szyb0pbbl2vp7n03-gnused-4.9/bin:/nix/store/p2r51wfg9m3ga7pp7avslpfhfa7w5y83-gnugrep-3.11/bin:/nix/store/cmn958i8qym0qvmvydl23fh3bm3fbhl7-gawk-5.2.2/bin:/nix/store/f5qy259g9b4qh0hwz22z5j5bq3m53cpv-gnutar-1.35/bin:/nix/store/kmr52zpw7wazxywqvzgpdx0vnn9prd3v-gzip-1.13/bin:/nix/store/w1mar48lwkavwy64mvj567lwaqnm2l11-bzip2-1.0.8-bin/bin:/nix/store/9dh2csn531by6b1vr9jv85v4k17xwkid-gnumake-4.4.1/bin:/nix/store/lf0wpjrj8yx4gsmw2s3xfl58ixmqk8qa-bash-5.2-p15/bin:/nix/store/pinwlz7294p37d2sbkdpjildzxii42vv-patch-2.7.6/bin:/nix/store/skrzk0g88jf9rg28labqsyxv7gg357q1-xz-5.4.4-bin/bin:/nix/store/h5pshzq92r2xcv6w1p10cmkar4nyv0xp-file-5.45/bin
2024/03/28 10:35:03 New path stack is: DEVBOX_NIX_ENV_PATH_c4cf08c47e7da144d5bc0f4b3fdda287cfaf39cd8c2e797beb3bdc4c3ad278a4:DEVBOX_INIT_PATH
2024/03/28 10:35:03 computed environment PATH is: /home/platform/devtest/.devbox/nix/profile/default/bin:/nix/store/znqwpxy9jlxcgi2ms2hga0ch87bbbr9g-patchelf-0.15.0/bin:/nix/store/zlzz2z48s7ry0hkl55xiqp5a73b4mzrg-gcc-wrapper-12.3.0/bin:/nix/store/0b9bsznqs6pdg42dxcwvrlmarjn2p6a1-gcc-12.3.0/bin:/nix/store/nvh3jgs8pqghnsfzbv28004xkigiw8gc-glibc-2.38-23-bin/bin:/nix/store/vwkvhj69z4qqgmpa2lwm97kabf12p26r-coreutils-9.3/bin:/nix/store/h8d2j0prdf7pnpgyrgkxrrbfwnmxbq6y-binutils-wrapper-2.40/bin:/nix/store/p58l5qmzifl20qmjs3xfpl01f0mqlza2-binutils-2.40/bin:/nix/store/qyzfglbrqb5ck0dgljplin2bvc4995w7-findutils-4.9.0/bin:/nix/store/x6y2i213maj6ibcn0qzgg7graif5qcvi-diffutils-3.10/bin:/nix/store/g5p3ky90xa05ggg5szyb0pbbl2vp7n03-gnused-4.9/bin:/nix/store/p2r51wfg9m3ga7pp7avslpfhfa7w5y83-gnugrep-3.11/bin:/nix/store/cmn958i8qym0qvmvydl23fh3bm3fbhl7-gawk-5.2.2/bin:/nix/store/f5qy259g9b4qh0hwz22z5j5bq3m53cpv-gnutar-1.35/bin:/nix/store/kmr52zpw7wazxywqvzgpdx0vnn9prd3v-gzip-1.13/bin:/nix/store/w1mar48lwkavwy64mvj567lwaqnm2l11-bzip2-1.0.8-bin/bin:/nix/store/9dh2csn531by6b1vr9jv85v4k17xwkid-gnumake-4.4.1/bin:/nix/store/lf0wpjrj8yx4gsmw2s3xfl58ixmqk8qa-bash-5.2-p15/bin:/nix/store/pinwlz7294p37d2sbkdpjildzxii42vv-patch-2.7.6/bin:/nix/store/skrzk0g88jf9rg28labqsyxv7gg357q1-xz-5.4.4-bin/bin:/nix/store/h5pshzq92r2xcv6w1p10cmkar4nyv0xp-file-5.45/bin:/home/platform/devtest/.devbox/virtenv/runx/bin:/home/platform/.nix-profile/bin:/usr/local/sbin:/usr/local/bin:/usr/sbin:/usr/bin:/sbin:/bin:/usr/games:/usr/local/games:/snap/bin
2024/03/28 10:35:03 Executing: [/nix/store/lf0wpjrj8yx4gsmw2s3xfl58ixmqk8qa-bash-5.2-p15/bin/sh -c /home/platform/devtest/.devbox/gen/scripts/.cmd.sh]
error: experimental Nix feature 'nix-command' is disabled; use '--extra-experimental-features nix-command' to override
Error: error running script "nix" in Devbox: exit status 1

2024/03/28 10:35:03 
ExecutionID:3593ae1b84ae47bbb5f4a0685c31c315
error running script "nix" in Devbox: exit status 1
go.jetpack.io/devbox/internal/boxcli.runScriptCmd
	go.jetpack.io/devbox/internal/boxcli/run.go:114
go.jetpack.io/devbox/internal/boxcli.runCmd.func1
	go.jetpack.io/devbox/internal/boxcli/run.go:43
github.com/spf13/cobra.(*Command).execute
	github.com/spf13/cobra@v1.8.0/command.go:983
github.com/spf13/cobra.(*Command).ExecuteC
	github.com/spf13/cobra@v1.8.0/command.go:1115
github.com/spf13/cobra.(*Command).Execute
	github.com/spf13/cobra@v1.8.0/command.go:1039
go.jetpack.io/devbox/internal/boxcli/midcobra.(*midcobraExecutable).Execute
	go.jetpack.io/devbox/internal/boxcli/midcobra/midcobra.go:61
go.jetpack.io/devbox/internal/boxcli.Execute
	go.jetpack.io/devbox/internal/boxcli/root.go:114
go.jetpack.io/devbox/internal/boxcli.Main
	go.jetpack.io/devbox/internal/boxcli/root.go:137
main.main
	./main.go:11
runtime.main
	runtime/proc.go:271
runtime.goexit
	runtime/asm_amd64.s:1695


Pull request description:
[docs] FAQ: add --experimental to nix store gc
## Summary

Fixes #1938

This is more nix beginner friendly

## How was it tested?

will run the command locally (but takes time, so over lunch break)
`devbox run -- nix store gc --extra-experimental-features nix-command`






Patch:
diff --git a/docs/app/docs/faq.md b/docs/app/docs/faq.md
index c77d3d8c..0b782ca4 100644
--- a/docs/app/docs/faq.md
+++ b/docs/app/docs/faq.md
@@ -15,7 +15,7 @@ ## Where does Devbox install my packages?
 
 ## How do I clean up unused packages from the Nix Store?
 
-You can use `devbox run -- nix store gc` to automatically clean up packages that are no longer needed for your projects.
+You can use `devbox run -- nix store gc --extra-experimental-features nix-command` to automatically clean up packages that are no longer needed for your projects.
 
 ## Does Devbox require Docker or Containers to work?
 
diff --git a/internal/devbox/devbox.go b/internal/devbox/devbox.go
index 4ddbbf1a..1c8c4a02 100644
--- a/internal/devbox/devbox.go
+++ b/internal/devbox/devbox.go
@@ -282,7 +282,7 @@ func (d *Devbox) RunScript(ctx context.Context, cmdName string, cmdArgs []string
 		env["DEVBOX_RUN_CMD"] = strings.Join(append([]string{cmdName}, cmdArgs...), " ")
 	}
 
-	return nix.RunScript(d.projectDir, cmdWithArgs, env)
+	return nix.RunScript(d.projectDir, strings.Join(cmdWithArgs, " "), env)
 }
 
 // Install ensures that all the packages in the config are installed
diff --git a/internal/devbox/shellrc.tmpl b/internal/devbox/shellrc.tmpl
index 44b4780d..6f0e5f52 100644
--- a/internal/devbox/shellrc.tmpl
+++ b/internal/devbox/shellrc.tmpl
@@ -56,7 +56,7 @@ working_dir="$(pwd)"
 cd "{{ .ProjectDir }}" || exit
 
 # Source the hooks file, which contains the project's init hooks and plugin hooks.
-. "{{ .HooksFilePath }}"
+. {{ .HooksFilePath }}
 
 cd "$working_dir" || exit
 
diff --git a/internal/devbox/shellrc_fish.tmpl b/internal/devbox/shellrc_fish.tmpl
index 26ecfb7e..a50b3fb2 100644
--- a/internal/devbox/shellrc_fish.tmpl
+++ b/internal/devbox/shellrc_fish.tmpl
@@ -59,7 +59,7 @@ set workingDir (pwd)
 cd "{{ .ProjectDir }}" || exit
 
 # Source the hooks file, which contains the project's init hooks and plugin hooks.
-source "{{ .HooksFilePath }}"
+source {{ .HooksFilePath }}
 
 cd "$workingDir" || exit
 
diff --git a/internal/nix/nix.go b/internal/nix/nix.go
index 47075019..0f858d17 100644
--- a/internal/nix/nix.go
+++ b/internal/nix/nix.go
@@ -19,7 +19,6 @@
 	"go.jetpack.io/devbox/internal/boxcli/featureflag"
 	"go.jetpack.io/devbox/internal/boxcli/usererr"
 	"go.jetpack.io/devbox/internal/redact"
-	"go.jetpack.io/devbox/nix/flake"
 
 	"go.jetpack.io/devbox/internal/debug"
 )
@@ -70,19 +69,15 @@ func (*Nix) PrintDevEnv(ctx context.Context, args *PrintDevEnvArgs) (*PrintDevEn
 		return nil, errors.WithStack(err)
 	}
 
-	flakeRef, err := flake.ParseRef("path:" + flakeDirResolved)
-	if err != nil {
-		return nil, err
-	}
-
 	if len(data) == 0 {
 		cmd := exec.CommandContext(
 			ctx,
-			"nix", "print-dev-env", flakeRef.String(),
+			"nix", "print-dev-env",
+			"path:"+flakeDirResolved,
 		)
 		cmd.Args = append(cmd.Args, ExperimentalFlags()...)
 		cmd.Args = append(cmd.Args, "--json")
-		debug.Log("Running print-dev-env cmd: %s\n\n\n", cmd)
+		debug.Log("Running print-dev-env cmd: %s\n", cmd)
 		data, err = cmd.Output()
 		if insecure, insecureErr := IsExitErrorInsecurePackage(err, "" /*pkgName*/, "" /*installable*/); insecure {
 			return nil, insecureErr
diff --git a/internal/nix/run.go b/internal/nix/run.go
index 34010731..81028081 100644
--- a/internal/nix/run.go
+++ b/internal/nix/run.go
@@ -8,15 +8,14 @@
 	"fmt"
 	"os"
 	"os/exec"
-	"strings"
 
 	"go.jetpack.io/devbox/internal/boxcli/usererr"
 	"go.jetpack.io/devbox/internal/cmdutil"
 	"go.jetpack.io/devbox/internal/debug"
 )
 
-func RunScript(projectDir string, cmdWithArgs []string, env map[string]string) error {
-	if len(cmdWithArgs) == 0 {
+func RunScript(projectDir, cmdWithArgs string, env map[string]string) error {
+	if cmdWithArgs == "" {
 		return errors.New("attempted to run an empty command or script")
 	}
 
@@ -25,13 +24,9 @@ func RunScript(projectDir string, cmdWithArgs []string, env map[string]string) e
 		envPairs = append(envPairs, fmt.Sprintf("%s=%s", k, v))
 	}
 
-	// Wrap in quotations since the command's path may contain spaces.
-	cmdWithArgs[0] = "\"" + cmdWithArgs[0] + "\""
-	cmdWithArgsStr := strings.Join(cmdWithArgs, " ")
-
 	// Try to find sh in the PATH, if not, default to a well known absolute path.
 	shPath := cmdutil.GetPathOrDefault("sh", "/bin/sh")
-	cmd := exec.Command(shPath, "-c", cmdWithArgsStr)
+	cmd := exec.Command(shPath, "-c", cmdWithArgs)
 	cmd.Env = envPairs
 	cmd.Dir = projectDir
 	cmd.Stdin = os.Stdin
diff --git a/internal/shellgen/tmpl/init-hook-wrapper.tmpl b/internal/shellgen/tmpl/init-hook-wrapper.tmpl
index 3da5fddd..abe3d4ce 100644
--- a/internal/shellgen/tmpl/init-hook-wrapper.tmpl
+++ b/internal/shellgen/tmpl/init-hook-wrapper.tmpl
@@ -5,5 +5,5 @@ Code here should be fish and POSIX compatible. That's why we use export to
 remove the value
 */ -}}
 export {{ .InitHookHash }}=true
-. "{{ .RawHooksFile }}"
+. {{ .RawHooksFile }}
 export {{ .InitHookHash }}=""
diff --git a/internal/shellgen/tmpl/script-wrapper.tmpl b/internal/shellgen/tmpl/script-wrapper.tmpl
index d048c083..f6b04721 100644
--- a/internal/shellgen/tmpl/script-wrapper.tmpl
+++ b/internal/shellgen/tmpl/script-wrapper.tmpl
@@ -9,7 +9,7 @@
 
 if [ -z "${{ .InitHookHash }}" ]; then
     {{/* init hooks will export InitHookHash ensuring no recursive sourcing*/ -}}
-    . "{{ .InitHookPath }}"
+    . {{ .InitHookPath }}
 fi
 
 {{ .Body }}


Test patch:
diff --git a/internal/devbox/testdata/shellrc/basic/shellrc.golden b/internal/devbox/testdata/shellrc/basic/shellrc.golden
index 19e5813c..9e110a4a 100644
--- a/internal/devbox/testdata/shellrc/basic/shellrc.golden
+++ b/internal/devbox/testdata/shellrc/basic/shellrc.golden
@@ -21,7 +21,7 @@ working_dir="$(pwd)"
 cd "/path/to/projectDir" || exit
 
 # Source the hooks file, which contains the project's init hooks and plugin hooks.
-. "/path/to/projectDir/.devbox/gen/scripts/.hooks.sh"
+. /path/to/projectDir/.devbox/gen/scripts/.hooks.sh
 
 cd "$working_dir" || exit
 
diff --git a/internal/devbox/testdata/shellrc/noshellrc/shellrc.golden b/internal/devbox/testdata/shellrc/noshellrc/shellrc.golden
index f21ece85..e7ac3d7b 100644
--- a/internal/devbox/testdata/shellrc/noshellrc/shellrc.golden
+++ b/internal/devbox/testdata/shellrc/noshellrc/shellrc.golden
@@ -15,7 +15,7 @@ working_dir="$(pwd)"
 cd "/path/to/projectDir" || exit
 
 # Source the hooks file, which contains the project's init hooks and plugin hooks.
-. "/path/to/projectDir/.devbox/gen/scripts/.hooks.sh"
+. /path/to/projectDir/.devbox/gen/scripts/.hooks.sh
 
 cd "$working_dir" || exit