mirror of https://github.com/grafana/loki
Refactor nix to make it easier to import into other projects (#7635)
**What this PR does / why we need it**: This makes it easier for projects that depend on Loki (like enterprise logs) to more easily import the Loki nix flake in order to use the overlays and configurations it contains. It also removes the `build-vars.nix` because it was super annoying without really getting us much.pull/7695/head
parent
20d801a09d
commit
683efa0f4d
@ -1,10 +0,0 @@ |
||||
# DO NOT EDIT, this file is auto-generated by |
||||
# generate-build-vars.sh for purposes of getting around |
||||
# the dependency our build has on the .git folder, which is |
||||
# not copied to the nix store when building. |
||||
# Branch should match the branch you're building on, so |
||||
# changes to this file should not be comitted to main. |
||||
# See the README for more details. |
||||
{ |
||||
gitBranch = "main"; |
||||
} |
@ -1,19 +0,0 @@ |
||||
#!/bin/bash |
||||
|
||||
current_dir=$(cd "$(dirname "$0")" && pwd) |
||||
root_dir=$(cd "${current_dir}/.." && pwd) |
||||
|
||||
pushd "${root_dir}" >/dev/null || exit 1 |
||||
cat <<NIX >"${current_dir}/build-vars.nix" |
||||
# DO NOT EDIT, this file is auto-generated by |
||||
# generate-build-vars.sh for purposes of getting around |
||||
# the dependency our build has on the .git folder, which is |
||||
# not copied to the nix store when building. |
||||
# Branch should match the branch you're building on, so |
||||
# changes to this file should not be comitted to main. |
||||
# See the README for more details. |
||||
{ |
||||
gitBranch = "$(git rev-parse --abbrev-ref HEAD)"; |
||||
} |
||||
NIX |
||||
popd >/dev/null || exit 1 |
Loading…
Reference in new issue