mirror of
https://github.com/coder/coder.git
synced 2026-09-24 15:04:27 +08:00
chore: add build targets to nix flake (#13186)
* chore: add build targets to nix flake Enables `nix build github:coder/coder#main`! * Fix all packages * Add back pnpm * Update flake.nix Co-authored-by: Asher <ash@coder.com> * Remove yarn * fmt --------- Co-authored-by: Asher <ash@coder.com>
This commit is contained in:
@@ -43,6 +43,9 @@ SCRIPT="${BASH_SOURCE[1]:-${BASH_SOURCE[0]}}"
|
||||
SCRIPT_DIR="$(realpath "$(dirname "$SCRIPT")")"
|
||||
|
||||
function project_root {
|
||||
# Nix sets $src in derivations!
|
||||
[[ -n "${src:-}" ]] && echo "$src" && return
|
||||
|
||||
# Try to use `git rev-parse --show-toplevel` to find the project root.
|
||||
# If this directory is not a git repository, this command will fail.
|
||||
git rev-parse --show-toplevel 2>/dev/null && return
|
||||
|
||||
Reference in New Issue
Block a user