From e755a8a27d5c33d87a5742817c373028d35443e9 Mon Sep 17 00:00:00 2001 From: John Ericson Date: Sat, 25 Nov 2017 13:43:57 -0500 Subject: treewide: Use `targetPrefix` instead of `prefix` for platform name prefixes Certain tools, e.g. compilers, are customarily prefixed with the name of their target platform so that multiple builds can be used at once without clobbering each other on the PATH. I was using identifiers named `prefix` for this purpose, but that conflicts with the standard use of `prefix` to mean the directory where something is installed. To avoid conflict and confusion, I renamed those to `targetPrefix`. --- pkgs/os-specific/darwin/cctools/port.nix | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) (limited to 'pkgs/os-specific/darwin/cctools/port.nix') diff --git a/pkgs/os-specific/darwin/cctools/port.nix b/pkgs/os-specific/darwin/cctools/port.nix index e08e7833983..bcca11d66b1 100644 --- a/pkgs/os-specific/darwin/cctools/port.nix +++ b/pkgs/os-specific/darwin/cctools/port.nix @@ -5,9 +5,9 @@ }: let - # The prefix prepended to binary names to allow multiple binuntils on the + # The targetPrefix prepended to binary names to allow multiple binuntils on the # PATH to both be usable. - prefix = stdenv.lib.optionalString + targetPrefix = stdenv.lib.optionalString (targetPlatform != hostPlatform) "${targetPlatform.config}-"; in @@ -19,7 +19,7 @@ assert (!hostPlatform.isDarwin) -> (maloader != null && xctoolchain != null); let baseParams = rec { - name = "${prefix}cctools-port-${version}"; + name = "${targetPrefix}cctools-port-${version}"; version = "895"; src = fetchFromGitHub { @@ -49,7 +49,7 @@ let enableParallelBuilding = true; - # TODO(@Ericson2314): Always pass "--target" and always prefix. + # TODO(@Ericson2314): Always pass "--target" and always targetPrefix. configurePlatforms = [ "build" "host" ] ++ stdenv.lib.optional (targetPlatform != hostPlatform) "target"; configureFlags = stdenv.lib.optionals (!stdenv.isDarwin) [ "CXXFLAGS=-I${libcxx}/include/c++/v1" @@ -113,7 +113,7 @@ let ''; passthru = { - inherit prefix; + inherit targetPrefix; }; meta = { -- cgit 1.4.1