From 238c26cea9a4e74949eccb43f4ac538a0ab150a5 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Bj=C3=B8rn=20Forsman?= Date: Mon, 1 Apr 2013 15:28:05 +0200 Subject: [PATCH] lighttpd: fix build warnings The build complains about missing "file" and "which" commands, so add them as build inputs. "file" is used by the autotools configure script to tweak what -m flag (if any) to pass to the linker when it asks it for shared library support. Here is an example of -m values for GNU ld: Supported emulations: elf_x86_64 elf32_x86_64 elf_i386 i386linux elf_l1om elf_k1om "which" is used in the build phase to look for svnversion and git, to build a version stamp. Since we build from a release tarball (and don't pass svn or git as inputs either), this check fails and falls back to the version number in the tarball. There is one build warning left, but I think this is normal on NixOS: /tmp/nix-build-lighttpd-1.4.32.drv-0/lighttpd-1.4.32/libtool: line 1085: ldconfig: command not found --- pkgs/servers/http/lighttpd/default.nix | 8 ++++++-- 1 file changed, 6 insertions(+), 2 deletions(-) diff --git a/pkgs/servers/http/lighttpd/default.nix b/pkgs/servers/http/lighttpd/default.nix index 8a3c26f63307..66bc45de9423 100644 --- a/pkgs/servers/http/lighttpd/default.nix +++ b/pkgs/servers/http/lighttpd/default.nix @@ -1,4 +1,4 @@ -{ stdenv, fetchurl, pcre, libxml2, zlib, attr, bzip2 }: +{ stdenv, fetchurl, pcre, libxml2, zlib, attr, bzip2, which, file }: stdenv.mkDerivation { name = "lighttpd-1.4.32"; @@ -8,7 +8,11 @@ stdenv.mkDerivation { sha256 = "1hgd9bi4mrak732h57na89lqg58b1kkchnddij9gawffd40ghs0k"; }; - buildInputs = [ pcre libxml2 zlib attr bzip2 ]; + buildInputs = [ pcre libxml2 zlib attr bzip2 which file ]; + + preConfigure = '' + sed -i "s:/usr/bin/file:${file}/bin/file:g" configure + ''; meta = { description = "Lightweight high-performance web server";