summary refs log tree commit diff
path: root/pkgs/stdenv/cross/default.nix
diff options
context:
space:
mode:
authorAdam Joseph <adam@westernsemico.com>2022-06-06 11:26:46 -0700
committerAdam Joseph <adam@westernsemico.com>2022-06-06 11:26:46 -0700
commit10030672ab9ab4cd961e414b7026f78d94c6ecc9 (patch)
treefec81894b67808c57ed2e2800d6109e2ee671f51 /pkgs/stdenv/cross/default.nix
parent8fae407ba476cce1f83adbe21eae781216d5e228 (diff)
downloadnixpkgs-10030672ab9ab4cd961e414b7026f78d94c6ecc9.tar
nixpkgs-10030672ab9ab4cd961e414b7026f78d94c6ecc9.tar.gz
nixpkgs-10030672ab9ab4cd961e414b7026f78d94c6ecc9.tar.bz2
nixpkgs-10030672ab9ab4cd961e414b7026f78d94c6ecc9.tar.lz
nixpkgs-10030672ab9ab4cd961e414b7026f78d94c6ecc9.tar.xz
nixpkgs-10030672ab9ab4cd961e414b7026f78d94c6ecc9.tar.zst
nixpkgs-10030672ab9ab4cd961e414b7026f78d94c6ecc9.zip
stdenv/cross: remove now-redundant `file` nativeBuildInput on mingw
Since 97c43828fb7e016b4ee8fe434bc4d5e0b8a8b4be the `file` package has
been part of stdenv, and no longer needs to be listed explicitly as a
build input.  Let's remove the platform-specific inclusion for mingw64
as suggested by @mehmooda:

  https://github.com/NixOS/nixpkgs/pull/168413#issuecomment-1147370500

I traced the line removed by this commit through the `git blame`; it
was initially added in this commit (and then shuffled around a few
dozen times by refactorings):

  https://github.com/NixOS/nixpkgs/commit/8b292a1b355e8e7f6e7a2cf439ab777bdae30422

The commit message indicates that `libpng-1.6.20` was current at the
time.  Although there are [libpng
archives](https://github.com/glennrp/libpng) available in git form,
the older versions don't have their autoconfery vendored in, so I
can't link to them.  Fortunately the relevant bit hasn't changed since
then:

https://github.com/glennrp/libpng/blob/a37d4836519517bdce6cb9d956092321eca3e73b/configure#L5575

```
mingw* | pw32*)
  # Base MSYS/MinGW do not provide the 'file' command needed by
  # func_win32_libid shell function, so use a weaker test based on 'objdump',
  # unless we find 'file', for example because we are cross-compiling.
  if ( file / ) >/dev/null 2>&1; then
    lt_cv_deplibs_check_method='file_magic ^x86 archive import|^x86 DLL'
    lt_cv_file_magic_cmd='func_win32_libid'
  else
    # Keep this pattern in sync with the one in func_win32_libid.
    lt_cv_deplibs_check_method='file_magic file format (pei*-i386(.*architecture: i386)?|pe-arm-wince|pe-x86-64)'
    lt_cv_file_magic_cmd='$OBJDUMP -f'
  fi
  ;;
```
Diffstat (limited to 'pkgs/stdenv/cross/default.nix')
-rw-r--r--pkgs/stdenv/cross/default.nix3
1 files changed, 0 insertions, 3 deletions
diff --git a/pkgs/stdenv/cross/default.nix b/pkgs/stdenv/cross/default.nix
index e01ac74599a..bf410ec0a68 100644
--- a/pkgs/stdenv/cross/default.nix
+++ b/pkgs/stdenv/cross/default.nix
@@ -83,9 +83,6 @@ in lib.init bootStages ++ [
              (let f = p: !p.isx86 || builtins.elem p.libc [ "musl" "wasilibc" "relibc" ] || p.isiOS || p.isGenode;
                in f hostPlatform && !(f buildPlatform) )
              buildPackages.updateAutotoolsGnuConfigScriptsHook
-           # without proper `file` command, libtool sometimes fails
-           # to recognize 64-bit DLLs
-        ++ lib.optional (hostPlatform.config == "x86_64-w64-mingw32") buildPackages.file
         ;
     }));
   })