mirror of
https://code.tvl.fyi/depot.git:/tools/nixery.git
synced 2025-03-15 06:01:51 +00:00
chore(build): Allow passing in a specific commit hash when building
Required for builds where the full repository isn't available (e.g. from a tarball).
This commit is contained in:
parent
f208dc9740
commit
e85b7260b5
|
@ -15,7 +15,8 @@
|
||||||
{ pkgs ? import ./nixpkgs-pin.nix
|
{ pkgs ? import ./nixpkgs-pin.nix
|
||||||
, preLaunch ? ""
|
, preLaunch ? ""
|
||||||
, extraPackages ? []
|
, extraPackages ? []
|
||||||
, maxLayers ? 20 }:
|
, maxLayers ? 20
|
||||||
|
, commitHash ? null }@args:
|
||||||
|
|
||||||
with pkgs;
|
with pkgs;
|
||||||
|
|
||||||
|
@ -25,7 +26,7 @@ let
|
||||||
# Current Nixery commit - this is used as the Nixery version in
|
# Current Nixery commit - this is used as the Nixery version in
|
||||||
# builds to distinguish errors between deployed versions, see
|
# builds to distinguish errors between deployed versions, see
|
||||||
# server/logs.go for details.
|
# server/logs.go for details.
|
||||||
nixery-commit-hash = pkgs.lib.commitIdFromGitRepo ./.git;
|
nixery-commit-hash = args.commitHash or pkgs.lib.commitIdFromGitRepo ./.git;
|
||||||
|
|
||||||
# Go implementation of the Nixery server which implements the
|
# Go implementation of the Nixery server which implements the
|
||||||
# container registry interface.
|
# container registry interface.
|
||||||
|
|
Loading…
Reference in New Issue
Block a user