default.nix (974B)
1 { lib, stdenv, fetchFromGitHub, fetchurl }: 2 3 let 4 testdata = import ./testdata.nix { inherit fetchurl; }; 5 in 6 stdenv.mkDerivation (finalAttrs: { 7 pname = "blink"; 8 version = "2023-01-06"; 9 10 src = fetchFromGitHub { 11 owner = "jart"; 12 repo = "blink"; 13 rev = "312fbb3a1bd868de5763a2ebe6a6a199ad7c164a"; 14 hash = "sha256-Yjpd8+R8QlH3L8IoVOX7xbANvc8vUwVhDmC7Vzyh+oM="; 15 }; 16 17 postPatch = '' 18 substituteInPlace third_party/cosmo/cosmo.mk --replace "curl" "#curl" 19 ''; 20 21 postInstall = '' 22 mkdir -p $out/bin 23 install -Dm755 o//blink/{blink,blinkenlights} $out/bin 24 ''; 25 26 doCheck = true; 27 28 preCheck = lib.concatMapStringsSep "\n" (data: '' 29 ln -s ${data} third_party/cosmo/2/${data.name} 30 '') testdata; 31 32 meta = with lib; { 33 description = "tiniest x86-64-linux emulator"; 34 inherit (finalAttrs.src.meta) homepage; 35 license = licenses.isc; 36 maintainers = [ maintainers.sikmir ]; 37 platforms = platforms.linux; 38 skip.ci = true; 39 }; 40 })