nixpkgs mirror (for testing) github.com/NixOS/nixpkgs
nix
at devShellTools-shell 48 lines 1.6 kB view raw
1{ 2 stdenv, 3 fetchFromGitHub, 4 lib, 5 zlib, 6}: 7 8stdenv.mkDerivation (finalAttrs: { 9 pname = "blink"; 10 version = "1.1.0"; 11 12 src = fetchFromGitHub { 13 owner = "jart"; 14 repo = "blink"; 15 rev = finalAttrs.version; 16 hash = "sha256-4wgDftXOYm2fMP+/aTRljDi38EzbbwAJlQkuxjAMl3I="; 17 }; 18 19 buildInputs = [ zlib ]; 20 21 # Do not include --enable-static and --disable-shared flags during static compilation 22 dontAddStaticConfigureFlags = true; 23 24 # Don't add --build and --host flags as they are not supported 25 configurePlatforms = lib.optionals stdenv.hostPlatform.isStatic [ ]; 26 27 # ./configure script expects --static not standard --enable-static 28 configureFlags = lib.optional stdenv.hostPlatform.isStatic "--static"; 29 30 # 'make check' requires internet connection 31 doCheck = true; 32 checkTarget = "test"; 33 34 meta = { 35 description = "Tiniest x86-64-linux emulator"; 36 longDescription = '' 37 blink is a virtual machine that runs x86-64-linux programs on different operating systems and hardware architectures. It's designed to do the same thing as the qemu-x86_64 command, except that 38 - blink is much smaller in size than qemu-x86_64 39 - blink will run your Linux binaries on any POSIX platform, whereas qemu-x86_64 only supports Linux 40 - blink goes 2x faster than qemu-x86_64 on some benchmarks, such as SSE integer / floating point math. Blink is also faster at running ephemeral programs such as compilers 41 ''; 42 43 homepage = "https://github.com/jart/blink"; 44 license = lib.licenses.isc; 45 maintainers = with lib.maintainers; [ t4ccer ]; 46 platforms = lib.platforms.all; 47 }; 48})