diff --git a/pkgs/development/compilers/gnatboot/default.nix b/pkgs/development/compilers/gnatboot/default.nix index d97298d0238..c68c4fd4ba0 100644 --- a/pkgs/development/compilers/gnatboot/default.nix +++ b/pkgs/development/compilers/gnatboot/default.nix @@ -1,15 +1,19 @@ { lib, stdenv, fetchurl }: +if stdenv.hostPlatform != stdenv.targetPlatform +then builtins.throw "gnatboot can't cross-compile" +else + stdenv.mkDerivation { pname = "gentoo-gnatboot"; version = "4.1"; - src = if stdenv.system == "i686-linux" then + src = if stdenv.hostPlatform.system == "i686-linux" then fetchurl { url = mirror://gentoo/distfiles/gnatboot-4.1-i386.tar.bz2; sha256 = "0665zk71598204bf521vw68i5y6ccqarq9fcxsqp7ccgycb4lysr"; } - else if stdenv.system == "x86_64-linux" then + else if stdenv.hostPlatform.system == "x86_64-linux" then fetchurl { url = mirror://gentoo/distfiles/gnatboot-4.1-amd64.tar.bz2; sha256 = "1li4d52lmbnfs6llcshlbqyik2q2q4bvpir0f7n38nagp0h6j0d4";