Merge pull request #44065 from Ericson2314/no-crossAttrs-master

treewide: Remove some crossAttrs
This commit is contained in:
John Ericson 2018-07-24 18:30:14 -04:00 committed by GitHub
commit d4f5ee8199
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
6 changed files with 45 additions and 44 deletions

View File

@ -15,17 +15,16 @@ stdenv.mkDerivation rec {
nativeBuildInputs = [ cmake ];
doCheck = true;
doCheck = stdenv.buildPlatform == stdenv.hostPlatform;
checkTarget = "test";
enableParallelBuilding = true;
crossAttrs = {
cmakeFlags = "-DBuildTests=OFF";
doCheck = false;
} // stdenv.lib.optionalAttrs (hostPlatform.libc == "msvcrt") {
cmakeFlags = "-DBuildTests=OFF -DCMAKE_SYSTEM_NAME=Windows";
};
cmakeFlags = [
"-DBuildTests=${if doCheck then "ON" else "OFF"}"
] ++ stdenv.lib.optionals (hostPlatform.libc == "msvcrt") [
"-DCMAKE_SYSTEM_NAME=Windows"
];
meta = with stdenv.lib; {
description = "Header only C++ library for the JSON file format";

View File

@ -1,20 +1,31 @@
{stdenv, fetchurl, SDL, SDL_mixer, SDL_net, libGLU_combined}:
{ stdenv, fetchurl, SDL, SDL_mixer, SDL_net
, libGLU_combined ? assert false; null
, useOpenGL ? stdenv.hostPlatform == stdenv.buildPlatform
}:
stdenv.mkDerivation {
stdenv.mkDerivation rec {
name = "prboom-2.5.0";
src = fetchurl {
url = mirror://sourceforge/prboom/prboom-2.5.0.tar.gz;
sha256 = "1bjb04q8dk232956k30qlpq6q0hxb904yh1nflr87jcc1x3iqv12";
};
buildInputs = [ SDL SDL_mixer SDL_net libGLU_combined ];
crossAttrs = {
propagatedBuildInputs = [ SDL.crossDrv SDL_mixer.crossDrv SDL_net.crossDrv ];
configureFlags = "--disable-gl --disable-cpu-opt --without-x --disable-sdltest
ac_cv_type_uid_t=yes ac_cv_type_gid_t=yes";
buildInputs = [ SDL SDL_mixer SDL_net ]
++ stdenv.lib.optional useOpenGL libGLU_combined;
postInstall = ''
mv $out/games/ $out/bin
'';
};
doCheck = stdenv.hostPlatform == stdenv.buildPlatform;
configureFlags = [
(stdenv.lib.enableFeature useOpenGL "gl")
(stdenv.lib.enableFeature doCheck "sdltest")
] ++ stdenv.lib.optionals (stdenv.hostPlatform != stdenv.buildPlatform) [
"--disable-cpu-opt"
"--without-x"
"ac_cv_type_uid_t=yes"
"ac_cv_type_gid_t=yes"
];
postInstall = stdenv.lib.optionalString (stdenv.hostPlatform != stdenv.buildPlatform) ''
mv $out/games/ $out/bin
'';
}

View File

@ -20,22 +20,16 @@ stdenv.mkDerivation rec {
enableParallelBuilding = true;
configurePlatforms = [ "host" ];
configureFlags = [
"--enable-c++11"
"--enable-release"
];
crossAttrs = {
preConfigure = ''
# Remove the --build flag set by the gcc cross wrapper setup
# hook
export configureFlags="--host=${hostPlatform.config}"
'';
postConfigure = ''
# They use 'install -s', that calls the native strip instead of the cross
sed -i 's/-c -s/-c/' ports.mk;
'';
};
# They use 'install -s', that calls the native strip instead of the cross
postConfigure = ''
sed -i "s/-c -s/-c -s --strip-program=''${STRIP@Q}" ports.mk
'';
meta = with stdenv.lib; {
description = "Program to run certain classic graphical point-and-click adventure games (such as Monkey Island)";

View File

@ -52,7 +52,8 @@ stdenv.mkDerivation ({
done
'';
crossAttrs.dontPatchShebangs = true;
# Not needed after https://github.com/NixOS/nixpkgs/pull/43833
dontPatchShebangs = stdenv.hostPlatform != stdenv.buildPlatform;
meta = {
description = "The GNU Hurd, GNU project's replacement for the Unix kernel";

View File

@ -21,13 +21,11 @@ stdenv.mkDerivation {
doCheck = true;
crossAttrs = {
postInstall =
# Fix the shebang to point to the cross-built shell.
'' sed -i "$out/bin/mig" \
-e 's|^#!/.*|#!${bash.crossDrv}/bin/sh|g'
'';
};
# Fix the shebang to point to the cross-built shell. Won't be needed
# after #43833.
postInstall = ''
sed -i "$out/bin/mig" -e 's|^#!/.*|#!${bash}/bin/sh|g'
'';
meta = {
description = "GNU MIG, the Mach interface generator";

View File

@ -17,13 +17,11 @@ stdenv.mkDerivation {
QTDIR = qt48;
crossAttrs = {
# cmakeFlags = "-DWIN32=1 -DCMAKE_SYSTEM_NAME=Windows -DCMAKE_RC_COMPILER=${stdenv.cc.targetPrefix}windres";
QTDIR = qt48.crossDrv;
preBuild = ''
export NIX_CROSS_CFLAGS_COMPILE=-fpermissive
'';
};
# cmakeFlags = "-DWIN32=1 -DCMAKE_SYSTEM_NAME=Windows -DCMAKE_RC_COMPILER=${stdenv.cc.targetPrefix}windres";
preBuild = stdenv.lib.optionalString (stdenv.hostPlatform != stdenv.buildPlatform) ''
export NIX_CROSS_CFLAGS_COMPILE=-fpermissive
'';
meta = {
homepage = http://qt-project.org/wiki/jom;