Author: viric
Date: Mon Apr 25 15:41:32 2011
New Revision: 26971
URL: https://svn.nixos.org/websvn/nix/?rev=26971&sc=1

Log:
Making openssh cross-build. And making linux-pam almost cross-build, I think.

This allows me to put sftp-server in the nanonote and use it through dropbear.

Modified:
   nixpkgs/trunk/pkgs/os-specific/linux/pam/default.nix
   nixpkgs/trunk/pkgs/tools/networking/openssh/default.nix

Modified: nixpkgs/trunk/pkgs/os-specific/linux/pam/default.nix
==============================================================================
--- nixpkgs/trunk/pkgs/os-specific/linux/pam/default.nix        Mon Apr 25 
15:04:56 2011        (r26970)
+++ nixpkgs/trunk/pkgs/os-specific/linux/pam/default.nix        Mon Apr 25 
15:41:32 2011        (r26971)
@@ -8,11 +8,17 @@
     sha256 = "015r3xdkjpqwcv4lvxavq0nybdpxhfjycqpzbx8agqd5sywkx3b0";
   };
 
-  buildInputs = [ flex cracklib ]
+  buildNativeInputs = [ flex ];
+  buildInputs = [ cracklib ]
     ++ stdenv.lib.optional
       (stdenv.system != "armv5tel-linux" && stdenv.system != "mips64-linux")
       libxcrypt;
 
+  crossAttrs = {
+    # Skip libxcrypt cross-building, as it fails for mips and armv5tel
+    propagatedBuildInputs = [ flex.hostDrv cracklib.hostDrv ];
+  };
+
   postInstall = ''
     mv -v $out/sbin/unix_chkpwd{,.orig}
     ln -sv /var/setuid-wrappers/unix_chkpwd $out/sbin/unix_chkpwd

Modified: nixpkgs/trunk/pkgs/tools/networking/openssh/default.nix
==============================================================================
--- nixpkgs/trunk/pkgs/tools/networking/openssh/default.nix     Mon Apr 25 
15:04:56 2011        (r26970)
+++ nixpkgs/trunk/pkgs/tools/networking/openssh/default.nix     Mon Apr 25 
15:41:32 2011        (r26971)
@@ -28,12 +28,16 @@
     
   patches = [ ./locale_archive.patch ];
 
-  buildInputs = [ zlib openssl perl libedit pkgconfig pam ];
+  buildNativeInptus = [ perl ];
+  buildInputs = [ zlib openssl libedit pkgconfig pam ];
 
+  # I set --disable-strip because later we strip anyway. And it fails to strip
+  # properly when cross building.
   configureFlags =
     ''
       --with-mantype=man
       --with-libedit=yes
+      --disable-strip
       ${if pam != null then "--with-pam" else "--without-pam"}
       ${if etcDir != null then "--sysconfdir=${etcDir}" else ""}
     '';
_______________________________________________
nix-commits mailing list
nix-comm...@cs.uu.nl
http://mail.cs.uu.nl/mailman/listinfo/nix-commits

Reply via email to