Skip to content

Commit

Permalink
libiconv: Don't use stdenv ? cross
Browse files Browse the repository at this point in the history
  • Loading branch information
hSloan authored and Ericson2314 committed Jun 28, 2017
1 parent 5a21bb6 commit db0af50
Showing 1 changed file with 5 additions and 3 deletions.
8 changes: 5 additions & 3 deletions pkgs/development/libraries/libiconv/default.nix
@@ -1,6 +1,8 @@
{ fetchurl, stdenv, lib }:
{ fetchurl, stdenv, lib
, buildPlatform, hostPlatform
}:

assert !stdenv.isLinux || stdenv ? cross; # TODO: improve on cross
assert !stdenv.isLinux || hostPlatform != buildPlatform; # TODO: improve on cross

stdenv.mkDerivation rec {
name = "libiconv-${version}";
Expand All @@ -17,7 +19,7 @@ stdenv.mkDerivation rec {
];

postPatch =
lib.optionalString ((stdenv ? cross && stdenv.cross.libc == "msvcrt") || stdenv.cc.nativeLibc)
lib.optionalString ((hostPlatform != buildPlatform && hostPlatform.libc == "msvcrt") || stdenv.cc.nativeLibc)

This comment has been minimized.

Copy link
@matthewbauer

matthewbauer Jun 22, 2018

Member

Shouldn't this be targetPlatform.libc? I don't think Nix supports Mingw (yet).

This comment has been minimized.

Copy link
@vcunat

vcunat Jun 22, 2018

Member

Standard linux->mingw cross is with hostPlatform being mingw, I believe. I certainly did that two years ago, but our cross-framework has seen significant changes since then...

This comment has been minimized.

Copy link
@Ericson2314

Ericson2314 Jun 23, 2018

Member

Nah it's host. Nix did and does again support mingw somewhat. @angerman is working on it.

This comment has been minimized.

Copy link
@angerman

angerman Jun 24, 2018

Contributor

I have macOS -> mingw working with a custom gcc from mingw + winpthreads, as well as linux -> mingw with stock gcc (sans support for full c++11 threading stuff obviously).

''
sed '/^_GL_WARN_ON_USE (gets/d' -i srclib/stdio.in.h
'';
Expand Down

0 comments on commit db0af50

Please sign in to comment.