Merge pull request #26884 from obsidiansystems/purge-stdenv-cross

Purge stdenv cross
This commit is contained in:
John Ericson
2017-06-28 21:39:16 -04:00
committed by GitHub
83 changed files with 305 additions and 344 deletions

View File

@@ -15,10 +15,6 @@ stdenv.mkDerivation rec {
buildInputs = [ libuuid lzo zlib acl ];
crossAttrs = {
makeFlags = "CC=${stdenv.cross.config}-gcc";
};
meta = {
description = "Tools for MTD filesystems";
license = stdenv.lib.licenses.gpl2Plus;

View File

@@ -1,4 +1,6 @@
{ stdenv, fetchurl, libpng, static ? false }:
{ stdenv, fetchurl, libpng, static ? false
, buildPlatform, hostPlatform
}:
# This package comes with its own copy of zlib, libpng and pngxtern
@@ -15,20 +17,16 @@ stdenv.mkDerivation rec {
buildInputs = [ libpng ];
LDFLAGS = optional static "-static";
configureFlags = "--with-system-zlib --with-system-libpng";
configureFlags = [
"--with-system-zlib"
"--with-system-libpng"
] ++ stdenv.lib.optionals (hostPlatform != buildPlatform) [
#"-prefix=$out"
];
crossAttrs = {
CC="${stdenv.cross.config}-gcc";
LD="${stdenv.cross.config}-gcc";
AR="${stdenv.cross.config}-ar";
RANLIB="${stdenv.cross.config}-ranlib";
configurePhase = ''
./configure -prefix="$out" --with-system-zlib --with-system-libpng
'';
postInstall = optional (stdenv.cross.libc == "msvcrt") ''
mv "$out"/bin/optipng "$out"/bin/optipng.exe
'';
};
postInstall = if hostPlatform != buildPlatform && hostPlatform.isWindows then ''
mv "$out"/bin/optipng{,.exe}
'' else null;
meta = with stdenv.lib; {
homepage = http://optipng.sourceforge.net/;

View File

@@ -1,4 +1,6 @@
{ stdenv, fetchurl, libpcap, enableStatic ? false }:
{ stdenv, fetchurl, libpcap, enableStatic ? false
, hostPlatform
}:
stdenv.mkDerivation rec {
name = "tcpdump-${version}";
@@ -15,7 +17,7 @@ stdenv.mkDerivation rec {
crossAttrs = {
LDFLAGS = if enableStatic then "-static" else "";
configureFlags = [ "ac_cv_linux_vers=2" ] ++ (stdenv.lib.optional
(stdenv.cross.platform.kernelMajor == "2.4") "--disable-ipv6");
(hostPlatform.platform.kernelMajor == "2.4") "--disable-ipv6");
};
meta = {

View File

@@ -2,6 +2,7 @@
, pkgconfig, boehmgc, perlPackages, libsodium, aws-sdk-cpp, brotli, readline
, autoreconfHook, autoconf-archive, bison, flex, libxml2, libxslt, docbook5, docbook5_xsl
, libseccomp, busybox
, hostPlatform
, storeDir ? "/nix/store"
, stateDir ? "/nix/var"
, confDir ? "/etc"
@@ -95,8 +96,8 @@ let
--disable-init-state
--enable-gc
'' + stdenv.lib.optionalString (
stdenv.cross ? nix && stdenv.cross.nix ? system
) ''--with-system=${stdenv.cross.nix.system}'';
hostPlatform ? nix && hostPlatform.nix ? system
) ''--with-system=${hostPlatform.nix.system}'';
doInstallCheck = false;
};

View File

@@ -10,10 +10,6 @@ stdenv.mkDerivation {
sed -i 's@/usr/bin/install@install@g ; s/gcc/cc/g' Makefile
'';
crossAttrs = {
makeFlags = "CC=${stdenv.cross.config}-gcc";
};
src = fetchurl {
url = http://vicerveza.homeunix.net/~viric/soft/tm/tm-0.4.1.tar.gz;
sha256 = "3b389bc03b6964ad5ffa57a344b891fdbcf7c9b2604adda723a863f83657c4a0";

View File

@@ -1,5 +1,6 @@
{stdenv, fetchurl,
sendmailPath ? "/run/wrappers/bin/sendmail" }:
{ stdenv, fetchurl
, sendmailPath ? "/run/wrappers/bin/sendmail"
}:
stdenv.mkDerivation rec {
@@ -7,10 +8,6 @@ stdenv.mkDerivation rec {
installPhase=''make install "PREFIX=$out"'';
crossAttrs = {
makeFlags = "CC=${stdenv.cross.config}-gcc";
};
patchPhase = ''
sed -i s,/usr/sbin/sendmail,${sendmailPath}, mail.c ts.1
'';

View File

@@ -1,4 +1,6 @@
{ stdenv, fetchFromGitHub, cmake, libxslt }:
{ stdenv, fetchFromGitHub, cmake, libxslt
, hostPlatform
}:
stdenv.mkDerivation rec {
name = "html-tidy-${version}";
@@ -14,7 +16,7 @@ stdenv.mkDerivation rec {
nativeBuildInputs = [ cmake libxslt/*manpage*/ ];
cmakeFlags = stdenv.lib.optional
(stdenv.cross.libc or null == "msvcrt") "-DCMAKE_SYSTEM_NAME=Windows";
(hostPlatform.libc or null == "msvcrt") "-DCMAKE_SYSTEM_NAME=Windows";
# ATM bin/tidy is statically linked, as upstream provides no other option yet.
# https://github.com/htacg/tidy-html5/issues/326#issuecomment-160322107

View File

@@ -1,4 +1,4 @@
{stdenv, fetchurl}:
{ stdenv, fetchurl }:
stdenv.mkDerivation {
name = "replace-2.24";
@@ -10,10 +10,6 @@ stdenv.mkDerivation {
makeFlags = "TREE=\$(out) MANTREE=\$(TREE)/share/man";
crossAttrs = {
makeFlags = "TREE=\$(out) MANTREE=\$(TREE)/share/man CC=${stdenv.cross.config}-gcc";
};
preBuild = ''
sed -e "s@/bin/mv@$(type -P mv)@" -i replace.h
'';