Merge pull request #44367 from obsidiansystems/no-stdenv-is-cross

treewide: Remove stdenv.isCross
This commit is contained in:
John Ericson
2018-08-02 16:36:01 -04:00
committed by GitHub
7 changed files with 48 additions and 34 deletions

View File

@@ -1,7 +1,6 @@
{ lib, python3Packages, stdenv, targetPlatform, writeTextDir, substituteAll }: let
targetPrefix = lib.optionalString stdenv.isCross
(targetPlatform.config + "-");
in python3Packages.buildPythonApplication rec {
{ lib, python3Packages, stdenv, targetPlatform, writeTextDir, substituteAll }:
python3Packages.buildPythonApplication rec {
version = "0.46.1";
pname = "meson";
@@ -48,10 +47,10 @@ in python3Packages.buildPythonApplication rec {
crossFile = writeTextDir "cross-file.conf" ''
[binaries]
c = '${targetPrefix}cc'
cpp = '${targetPrefix}c++'
ar = '${targetPrefix}ar'
strip = '${targetPrefix}strip'
c = '${stdenv.cc.targetPrefix}cc'
cpp = '${stdenv.cc.targetPrefix}c++'
ar = '${stdenv.cc.bintools.targetPrefix}ar'
strip = '${stdenv.cc.bintools.targetPrefix}strip'
pkgconfig = 'pkg-config'
[properties]
@@ -69,7 +68,9 @@ in python3Packages.buildPythonApplication rec {
# checkInputs = [ ninja pkgconfig ];
# checkPhase = "python ./run_project_tests.py";
inherit (stdenv) cc isCross;
inherit (stdenv) cc;
isCross = stdenv.buildPlatform != stdenv.hostPlatform;
meta = with lib; {
homepage = http://mesonbuild.com;