about summary refs log tree commit diff
path: root/tools/nixery
diff options
context:
space:
mode:
authorVincent Ambo <tazjin@google.com>2019-08-03T23·48+0100
committerVincent Ambo <github@tazj.in>2019-08-04T00·41+0100
commita0d7d693d373569b61597440537bedb1f1384450 (patch)
treefef413615e214e2477a96069164b7dda815e7274 /tools/nixery
parent20103640fa6ab0678c72d3ba8a3ddc29ac264973 (diff)
feat(build): Support additional pre-launch commands in image
This makes it possible for users to hook basically arbitrary things
into the Nixery container image.
Diffstat (limited to 'tools/nixery')
-rw-r--r--tools/nixery/default.nix5
1 files changed, 4 insertions, 1 deletions
diff --git a/tools/nixery/default.nix b/tools/nixery/default.nix
index 8a7ce8b34453..7c7ad0b6c0eb 100644
--- a/tools/nixery/default.nix
+++ b/tools/nixery/default.nix
@@ -11,7 +11,8 @@
 # WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
 # See the License for the specific language governing permissions and
 # limitations under the License.
-{ pkgs ? import <nixpkgs> {} }:
+{ pkgs ? import <nixpkgs> {}
+, preLaunch ? "" }:
 
 with pkgs;
 
@@ -88,6 +89,8 @@ rec {
       mkdir -p /etc/nix
       echo 'sandbox = false' >> /etc/nix/nix.conf
 
+      ${preLaunch}
+
       exec ${nixery-bin}/bin/nixery
     '';
   in dockerTools.buildLayeredImage {