nixpkgs mirror (for testing) github.com/NixOS/nixpkgs
nix
at netboot-syslinux-multiplatform 54 lines 1.7 kB view raw
1{ lib, stdenv, fetchFromGitHub, readline }: 2 3stdenv.mkDerivation rec { 4 pname = "picoc"; 5 version = "2015-05-04"; 6 7 src = fetchFromGitHub { 8 sha256 = "01w3jwl0vn9fsmh7p20ad4nl9ljzgfn576yvncd9pk9frx3pd8y4"; 9 rev = "4555e8456f020554bcac50751fbb9b36c7d8c13b"; 10 repo = "picoc"; 11 owner = "zsaleeba"; 12 }; 13 14 buildInputs = [ readline ]; 15 16 makeFlags = [ "CC=${stdenv.cc.targetPrefix}cc" ]; 17 18 postPatch = '' 19 substituteInPlace Makefile --replace '`svnversion -n`' "${version}" 20 ''; 21 22 enableParallelBuilding = true; 23 24 # Tests are currently broken on i686 see 25 # https://hydra.nixos.org/build/24003763/nixlog/1 26 doCheck = if stdenv.isi686 then false else true; 27 checkTarget = "test"; 28 29 installPhase = '' 30 install -Dm755 picoc $out/bin/picoc 31 32 mkdir -p $out/include 33 install -m644 *.h $out/include 34 ''; 35 36 meta = with lib; { 37 broken = (stdenv.isLinux && stdenv.isAarch64); 38 description = "Very small C interpreter for scripting"; 39 longDescription = '' 40 PicoC is a very small C interpreter for scripting. It was originally 41 written as a script language for a UAV's on-board flight system. It's 42 also very suitable for other robotic, embedded and non-embedded 43 applications. The core C source code is around 3500 lines of code. It's 44 not intended to be a complete implementation of ISO C but it has all the 45 essentials. When compiled it only takes a few k of code space and is also 46 very sparing of data space. This means it can work well in small embedded 47 devices. 48 ''; 49 homepage = "https://github.com/zsaleeba/picoc"; 50 downloadPage = "https://code.google.com/p/picoc/downloads/list"; 51 license = licenses.bsd3; 52 platforms = platforms.unix; 53 }; 54}