Skip to content
Closed
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion nixos/lib/make-ext4-fs.nix
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,7 @@
pkgs.stdenv.mkDerivation {
name = "ext4-fs.img";

buildInputs = with pkgs; [e2fsprogs libfaketime perl];
nativeBuildInputs = with pkgs; [e2fsprogs libfaketime perl];

# For obtaining the closure of `storePaths'.
exportReferencesGraph =
Expand Down
2 changes: 1 addition & 1 deletion nixos/lib/make-squashfs.nix
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@
stdenv.mkDerivation {
name = "squashfs.img";

buildInputs = [perl squashfsTools];
nativeBuildInputs = [perl squashfsTools];

# For obtaining the closure of `storeContents'.
exportReferencesGraph =
Expand Down
4 changes: 2 additions & 2 deletions nixos/modules/security/wrappers/default.nix
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,7 @@ let
hardeningEnable = [ "pie" ];
installPhase = ''
mkdir -p $out/bin
gcc -Wall -O2 -DWRAPPER_DIR=\"${parentWrapperDir}\" \
$CC -Wall -O2 -DWRAPPER_DIR=\"${parentWrapperDir}\" \
-lcap-ng -lcap ${./wrapper.c} -o $out/bin/security-wrapper
'';
};
Expand Down Expand Up @@ -79,7 +79,7 @@ let
({ owner = "root";
group = "root";
} // s)
else if
else if
(s ? "setuid" && s.setuid) ||
(s ? "setgid" && s.setgid) ||
(s ? "permissions")
Expand Down
8 changes: 6 additions & 2 deletions pkgs/applications/networking/browsers/w3m/default.nix
Original file line number Diff line number Diff line change
Expand Up @@ -53,8 +53,12 @@ stdenv.mkDerivation rec {

hardeningDisable = [ "format" ];

configureFlags = "--with-ssl=${openssl.dev} --with-gc=${boehmgc.dev}"
+ optionalString graphicsSupport " --enable-image=${optionalString x11Support "x11,"}fb";
configureFlags =
[ "--with-ssl=${openssl.dev}" "--with-gc=${boehmgc.dev}" ]
++ optionals (stdenv.buildPlatform != stdenv.hostPlatform) [
"ac_cv_func_setpgrp_void=yes"
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

While we're checking things. I found I needed a lot less of these configure test overrides than @bgamari, so maybe pull this out initially?

]
++ optional graphicsSupport "--enable-image=${optionalString x11Support "x11,"}fb";

preConfigure = ''
substituteInPlace ./configure --replace "/lib /usr/lib /usr/local/lib /usr/ucblib /usr/ccslib /usr/ccs/lib /lib64 /usr/lib64" /no-such-path
Expand Down
2 changes: 1 addition & 1 deletion pkgs/development/libraries/glibc/common.nix
Original file line number Diff line number Diff line change
Expand Up @@ -228,6 +228,6 @@ stdenv.mkDerivation ({

# To avoid a dependency on the build system 'bash'.
preFixup = ''
rm $bin/bin/{ldd,tzselect,catchsegv,xtrace}
rm -f $bin/bin/{ldd,tzselect,catchsegv,xtrace}
'';
})
4 changes: 2 additions & 2 deletions pkgs/development/libraries/glibc/locales.nix
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@
https://sourceware.org/git/?p=glibc.git;a=blob;f=localedata/SUPPORTED
*/

{ stdenv, callPackage, writeText
{ stdenv, buildPackages, callPackage, writeText
, allLocales ? true, locales ? [ "en_US.UTF-8/UTF-8" ]
}:

Expand All @@ -26,7 +26,7 @@ callPackage ./common.nix { inherit stdenv; } {
# $TMPDIR/nix/store/...-glibc-.../lib/locale/locale-archive.
buildPhase =
''
mkdir -p $TMPDIR/"${stdenv.cc.libc.out}/lib/locale"
mkdir -p $TMPDIR/"${buildPackages.stdenv.cc.libc.out}/lib/locale"

# Hack to allow building of the locales (needed since glibc-2.12)
sed -i -e 's,^$(rtld-prefix) $(common-objpfx)locale/localedef,localedef --prefix='$TMPDIR',' ../glibc-2*/localedata/Makefile
Expand Down
5 changes: 4 additions & 1 deletion pkgs/development/libraries/libomxil-bellagio/default.nix
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,10 @@ stdenv.mkDerivation rec {
url = "mirror://sourceforge/omxil/omxil/Bellagio%20${version}/${name}.tar.gz";
sha256 = "0k6p6h4npn8p1qlgq6z3jbfld6n1bqswzvxzndki937gr0lhfg2r";
};


configureFlags =
stdenv.lib.optionals (stdenv.hostPlatform != stdenv.buildPlatform) [ "ac_cv_func_malloc_0_nonnull=yes" ];
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Same might not be needed


patches = [ ./fedora-fixes.patch ];

meta = with stdenv.lib; {
Expand Down
2 changes: 1 addition & 1 deletion pkgs/development/libraries/pixman/default.nix
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,7 @@ stdenv.mkDerivation rec {

configureFlags = stdenv.lib.optional stdenv.isArm "--disable-arm-iwmmxt";

doCheck = true;
doCheck = stdenv.hostPlatform == stdenv.buildPlatform;
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Again stdenv should be changed to cope with this.

Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Should it? It's not clear to me that stdenv should dictate this.


postInstall = glib.flattenInclude;

Expand Down
2 changes: 1 addition & 1 deletion pkgs/development/libraries/uthash/default.nix
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,7 @@ stdenv.mkDerivation rec {

buildInputs = stdenv.lib.optional doCheck perl;

doCheck = true;
doCheck = stdenv.buildPlatform == stdenv.hostPlatform;
checkTarget = "-C tests/";

installPhase = ''
Expand Down
5 changes: 3 additions & 2 deletions pkgs/development/perl-modules/generic/default.nix
Original file line number Diff line number Diff line change
Expand Up @@ -2,11 +2,12 @@ perl:

{ buildInputs ? [], name, ... } @ attrs:

perl.stdenv.mkDerivation (
with perl.stdenv;
mkDerivation (
{
outputs = [ "out" "devdoc" ];

doCheck = true;
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Again for stdenv to handle.

doCheck = hostPlatform == buildPlatform;

checkTarget = "test";

Expand Down
3 changes: 2 additions & 1 deletion pkgs/os-specific/linux/cpupower/default.nix
Original file line number Diff line number Diff line change
Expand Up @@ -5,6 +5,7 @@ stdenv.mkDerivation {

src = kernel.src;

nativeBuildInputs = [ gettext ];
buildInputs = [ coreutils pciutils gettext ];
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Gettext need not be build input, I'd think?


configurePhase = ''
Expand All @@ -15,7 +16,7 @@ stdenv.mkDerivation {
'';

buildPhase = ''
make
make CROSS=${stdenv.cc.targetPrefix}
'';

installPhase = ''
Expand Down
2 changes: 1 addition & 1 deletion pkgs/os-specific/linux/mdadm/default.nix
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,7 @@ stdenv.mkDerivation rec {

# This is to avoid self-references, which causes the initrd to explode
# in size and in turn prevents mdraid systems from booting.
allowedReferences = [ stdenv.glibc.out ];
allowedReferences = [ stdenv.cc.libc.out ];

patches = [ ./no-self-references.patch ];

Expand Down
4 changes: 2 additions & 2 deletions pkgs/tools/misc/ms-sys/default.nix
Original file line number Diff line number Diff line change
Expand Up @@ -3,13 +3,13 @@
stdenv.mkDerivation rec {
name = "ms-sys-${version}";
version = "2.5.3";

src = fetchurl {
url = "mirror://sourceforge/ms-sys/${name}.tar.gz";
sha256 = "0mijf82cbji4laip6hiy3l5ka5mzq5sivjvyv7wxnc2fd3v7hgp0";
};

buildInputs = [ gettext ];
nativeBuildInputs = [ gettext ];

enableParallelBuilding = true;

Expand Down
2 changes: 1 addition & 1 deletion pkgs/tools/misc/parted/default.nix
Original file line number Diff line number Diff line change
Expand Up @@ -31,7 +31,7 @@ stdenv.mkDerivation rec {

# Tests were previously failing due to Hydra running builds as uid 0.
# That should hopefully be fixed now.
doCheck = true;
doCheck = stdenv.buildPlatform == stdenv.hostPlatform;

preCheck =
stdenv.lib.optionalString doCheck
Expand Down
1 change: 1 addition & 0 deletions pkgs/tools/system/ddrescue/default.nix
Original file line number Diff line number Diff line change
Expand Up @@ -16,6 +16,7 @@ stdenv.mkDerivation rec {
nativeBuildInputs = [ lzip ];

doCheck = hostPlatform == buildPlatform;
configureFlags = [ "CXX=${stdenv.cc.targetPrefix}c++" ];

meta = with stdenv.lib; {
description = "GNU ddrescue, a data recovery tool";
Expand Down