From d9dfd892bfd410afad5722363c9f297ad4075175 Mon Sep 17 00:00:00 2001
From: =?UTF-8?q?J=C3=B6rg=20Thalheim?= <joerg@thalheim.io>
Date: Thu, 19 Nov 2020 23:36:52 +0100
Subject: [PATCH] mic92: improve tinc cross-compiling

---
 krebs/3modules/tinc.nix | 6 ++++--
 1 file changed, 4 insertions(+), 2 deletions(-)

diff --git a/krebs/3modules/tinc.nix b/krebs/3modules/tinc.nix
index 0f5e1aa83..4252c8d3b 100644
--- a/krebs/3modules/tinc.nix
+++ b/krebs/3modules/tinc.nix
@@ -112,13 +112,15 @@ let
 
         hostsArchive = mkOption {
           type = types.package;
-          default = pkgs.runCommand "retiolum-hosts.tar.bz2" {} ''
+          default = pkgs.runCommand "retiolum-hosts.tar.bz2" {
+            nativeBuildInputs = [ pkgs.gnutar pkgs.coreutils ];
+          } ''
             cp \
                 --no-preserve=mode \
                 --recursive \
                 ${tinc.config.hostsPackage} \
                 hosts
-            ${pkgs.gnutar}/bin/tar -cjf $out hosts
+            tar -cjf $out hosts
           '';
           readOnly = true;
         };