On the my version of NixOS, I was able to get a working mksdcard
by issuing: nix-env -i android-sdk-24.1.2
after doing a nix-channel --update
[root@nixos:~]# /root/.nix-profile/bin/mksdcard
mksdcard: create a blank FAT32 image to be used with the Android emulator
usage: mksdcard [-l label] <size> <file>
if <size> is a simple integer, it specifies a size in bytes
if <size> is an integer followed by 'K', it specifies a size in KiB
if <size> is an integer followed by 'M', it specifies a size in MiB
if <size> is an integer followed by 'G', it specifies a size in GiB
Minimum size is 9M. The Android emulator cannot use smaller images.
Maximum size is 1099511627264 bytes, 1073741823K, 1048575M or 1023G
From Basic Package Management: "Nixpkgs is automatically added to your list of “subscribed” channels when you install Nix."
However, if you've removed the subscription or would rather "install an older version of [the] package than the one provided by the current contents of the channel" or if the android sdk package "has been removed from the channel" you can follow the One-Click Installation Procedure:
You can go to
http://hydra.nixos.org/jobset/nixpkgs/trunk/channel/latest and click
on any link for the individual packages for your platform. The first
time you do this, your browser will ask what to do with
application/nix-package files. You should open them with
/nix/bin/nix-install-package. This will open a window that asks you to
confirm that you want to install the package. When you answer Y, the
package and all its dependencies will be installed. This is a binary
deployment mechanism — you get packages pre-compiled for the selected
platform type.
In this case, you'd be interested in x86_64 android-studio
My System info for reference
[root@nixos:~]# uname -a
Linux nixos 3.18.20 #1-NixOS SMP Thu Jan 1 00:00:01 UTC 1970 x86_64 GNU/Linux
[root@nixos:~]# cat /etc/issue
<<< Welcome to NixOS 15.09.10.4a1c7fd (\m) - \l >>>
ld
? Usually you'd just haveld
link 32-bit libraries/objects. What are trying to do with the "32-bit runtime linker" that you are not able to do now?/lib64/ld-linux-x86-64.so.2
for 64-bit executables and/lib/ld-linux.so.2
for 32-bit. I confirmed this by compiling a sample C program with and without-m32
and then runningldd
on it.