From 8cb4f5b7020d69b07729f74bcf97a2875e777d98 Mon Sep 17 00:00:00 2001 From: Alyssa Ross Date: Sat, 14 Sep 2024 11:08:13 +0200 Subject: [PATCH] wrapQemuBinfmtP: don't use pkgsStatic There's no reason to bring in a whole cross toolchain just to build a zero-dependency C program. --- pkgs/applications/virtualization/qemu/binfmt-p-wrapper.nix | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/pkgs/applications/virtualization/qemu/binfmt-p-wrapper.nix b/pkgs/applications/virtualization/qemu/binfmt-p-wrapper.nix index fada14569299b..71aba0a1d6160 100644 --- a/pkgs/applications/virtualization/qemu/binfmt-p-wrapper.nix +++ b/pkgs/applications/virtualization/qemu/binfmt-p-wrapper.nix @@ -5,11 +5,11 @@ # The wrapper has to be static so LD_* environment variables # cannot affect the execution of the wrapper itself. -{ lib, stdenv, pkgsStatic, enableDebug ? false }: +{ lib, stdenv, enableDebug ? false }: name: emulator: -pkgsStatic.stdenv.mkDerivation { +stdenv.mkDerivation { inherit name; src = ./binfmt-p-wrapper.c; @@ -17,6 +17,8 @@ pkgsStatic.stdenv.mkDerivation { dontUnpack = true; dontInstall = true; + buildInputs = [ stdenv.cc.libc.static or null ]; + buildPhase = '' runHook preBuild