From 34da7e2ce2ca92bdeb73d8257e2ca145a0fc45a5 Mon Sep 17 00:00:00 2001 From: John Ericson Date: Sun, 29 Jul 2018 16:48:24 -0400 Subject: treewide: Remove stdenv.isCross I *want* cross-specific overrides to be verbose, so I rather not have this shorthand. This makes the syntactic overhead more proportional to the maintainence cost. Hopefully this pushes people towards fewer conditionals and more abstractions. --- .../tools/build-managers/meson/default.nix | 19 ++++++++++--------- 1 file changed, 10 insertions(+), 9 deletions(-) (limited to 'pkgs/development/tools/build-managers/meson') diff --git a/pkgs/development/tools/build-managers/meson/default.nix b/pkgs/development/tools/build-managers/meson/default.nix index 3cb906d50edf..ca53c4d8c535 100644 --- a/pkgs/development/tools/build-managers/meson/default.nix +++ b/pkgs/development/tools/build-managers/meson/default.nix @@ -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; -- cgit 1.4.1