[Nix-dev] Re: [Nix-commits] SVN commit: nix - 21935 - ludo - in nixpkgs/trunk/pkgs: tools/misc/coreutils top-level

Lluís Batlle viriketo at gmail.com
Sat May 22 18:17:57 CEST 2010


hello,
i touched coreutils in stdenv-updates for it to crossbuild.maybe you
can take a look at it.otherwise we may end up with a difficult merge!
:)


2010/5/21, Ludovic Courts <ludo at gnu.org>:
> Author: ludo
> Date: 2010-05-21 13:46:54 +0000 (Fri, 21 May 2010)
> New Revision: 21935
>
> You can view the changes in this commit at:
>    https://svn.nixos.org/viewvc/nix?rev=21935&view=rev
>
> Modified:
>    nixpkgs/trunk/pkgs/tools/misc/coreutils/default.nix
>    nixpkgs/trunk/pkgs/top-level/all-packages.nix
>
> Log:
> Add cross Coreutils.
>
> Changes:
>
> Modified: nixpkgs/trunk/pkgs/tools/misc/coreutils/default.nix
> ===================================================================
> --- nixpkgs/trunk/pkgs/tools/misc/coreutils/default.nix	2010-05-21 13:46:46
> UTC (rev 21934)
> +++ nixpkgs/trunk/pkgs/tools/misc/coreutils/default.nix	2010-05-21 13:46:54
> UTC (rev 21935)
> @@ -1,6 +1,10 @@
> -{stdenv, fetchurl, aclSupport ? false, acl, perl, gmp}:
> +{ stdenv, fetchurl, aclSupport ? false, acl ? null, perl, gmp ? null
> +, cross ? null, gccCross ? null }:
>
> -stdenv.mkDerivation rec {
> +assert aclSupport -> acl != null;
> +assert cross != null -> gccCross != null;
> +
> +stdenv.mkDerivation (rec {
>    name = "coreutils-8.4";
>
>    src = fetchurl {
> @@ -8,13 +12,17 @@
>      sha256 = "0zq11lykc7hfs9nsdnb8gqk354l82hswqj38607mvwj3b0zqvc4b";
>    };
>
> -  buildInputs = [ perl gmp ] ++ stdenv.lib.optional aclSupport acl;
> +  buildNativeInputs = [ perl ];
> +  buildInputs =
> +       stdenv.lib.optional (gmp != null) gmp
> +    ++ stdenv.lib.optional aclSupport acl
> +    ++ stdenv.lib.optional (gccCross != null) gccCross;
>
>    # The tests are known broken on Cygwin
>    # (http://thread.gmane.org/gmane.comp.gnu.core-utils.bugs/19025),
>    # Darwin (http://thread.gmane.org/gmane.comp.gnu.core-utils.bugs/19351),
>    # and {Open,Free}BSD.
> -  doCheck = (stdenv ? glibc);
> +  doCheck = (stdenv ? glibc) && (cross == null);
>
>    meta = {
>      homepage = http://www.gnu.org/software/coreutils/;
> @@ -32,3 +40,9 @@
>      maintainers = [ stdenv.lib.maintainers.ludo ];
>    };
>  }
> +
> +//
> +
> +(if cross != null
> + then { crossConfig = cross.config; }
> + else { }))
>
> Modified: nixpkgs/trunk/pkgs/top-level/all-packages.nix
> ===================================================================
> --- nixpkgs/trunk/pkgs/top-level/all-packages.nix	2010-05-21 13:46:46 UTC
> (rev 21934)
> +++ nixpkgs/trunk/pkgs/top-level/all-packages.nix	2010-05-21 13:46:54 UTC
> (rev 21935)
> @@ -546,7 +546,9 @@
>        else import ../tools/misc/coreutils)
>      {
>        inherit fetchurl stdenv acl perl gmp;
> -      aclSupport = stdenv.isLinux;
> +
> +      # TODO: Add ACL support for cross-Linux.
> +      aclSupport = (crossSystem == null) && stdenv.isLinux;
>      };
>
>    coreutils = useFromStdenv "coreutils" coreutils_real;
>
> _______________________________________________
> nix-commits mailing list
> nix-commits at cs.uu.nl
> http://mail.cs.uu.nl/mailman/listinfo/nix-commits
>



More information about the nix-dev mailing list