Commit c7e0f6b9 authored by Adam Joseph's avatar Adam Joseph Committed by Adam Joseph
Browse files

treewide: s_targetPlatform_hostPlatform_ in non-compiler packages

stdenv.targetPlatform really shouldn't be used by software that
doesn't generate or manipulate binaries.  I reviewed all uses of
targetPlatform outside of pkgs/development/compilers and pkgs/stdenv
and replaced those which weren't involved in something which fits
these criteria.
parent 6a689e72
Loading
Loading
Loading
Loading
+2 −2
Original line number Diff line number Diff line
@@ -10,7 +10,7 @@ stdenv.mkDerivation (finalAttrs: {
  };

  buildInputs = [ sndio ]
    ++ lib.optional (!stdenv.isDarwin && !stdenv.targetPlatform.isBSD)
    ++ lib.optional (!stdenv.isDarwin && !stdenv.hostPlatform.isBSD)
    libbsd;

  outputs = [ "out" "man" ];
@@ -18,7 +18,7 @@ stdenv.mkDerivation (finalAttrs: {
  preBuild = ''
    makeFlagsArray+=("PREFIX=$out")
  '' + lib.optionalString
    (!stdenv.isDarwin && !stdenv.targetPlatform.isBSD) ''
    (!stdenv.isDarwin && !stdenv.hostPlatform.isBSD) ''
      makeFlagsArray+=(LDADD="-lsndio -lbsd")

      # Fix warning about implicit declaration of function 'strlcpy'
+1 −1
Original line number Diff line number Diff line
@@ -78,7 +78,7 @@ stdenv.mkDerivation rec {
  '' + lib.optionalString stdenv.isLinux ''
    substituteInPlace libraries/lib-files/FileNames.cpp \
      --replace /usr/include/linux/magic.h ${linuxHeaders}/include/linux/magic.h
  '' + lib.optionalString (stdenv.isDarwin && lib.versionOlder stdenv.targetPlatform.darwinMinVersion "11.0") ''
  '' + lib.optionalString (stdenv.isDarwin && lib.versionOlder stdenv.hostPlatform.darwinMinVersion "11.0") ''
    sed -z -i "s/NSAppearanceName.*systemAppearance//" src/AudacityApp.mm
  '';

+1 −1
Original line number Diff line number Diff line
@@ -88,7 +88,7 @@ rustPlatform.buildRustPackage {
  postBuild = ''
    make -C docs \
      DEB_VERSION=${version} DEB_VERSION_UPSTREAM=${version} \
      RUSTC_TARGET=${stdenv.targetPlatform.config} \
      RUSTC_TARGET=${stdenv.hostPlatform.config} \
      BUILD_MODE=release \
      proxmox-backup-client.1 pxar.1
  '';
+1 −1
Original line number Diff line number Diff line
@@ -65,7 +65,7 @@ self: let
      });

      xeft = super.xeft.overrideAttrs (old: let
        libExt = pkgs.stdenv.targetPlatform.extensions.sharedLibrary;
        libExt = pkgs.stdenv.hostPlatform.extensions.sharedLibrary;
      in {
        dontUnpack = false;

+2 −2
Original line number Diff line number Diff line
@@ -118,7 +118,7 @@ self: let
      });

      jinx = super.jinx.overrideAttrs (old: let
        libExt = pkgs.stdenv.targetPlatform.extensions.sharedLibrary;
        libExt = pkgs.stdenv.hostPlatform.extensions.sharedLibrary;
      in {
        dontUnpack = false;

@@ -159,7 +159,7 @@ self: let
      );

      xeft = super.xeft.overrideAttrs (old: let
        libExt = pkgs.stdenv.targetPlatform.extensions.sharedLibrary;
        libExt = pkgs.stdenv.hostPlatform.extensions.sharedLibrary;
      in {
        dontUnpack = false;

Loading