nixpkgs mirror (for testing) github.com/NixOS/nixpkgs
nix
at fix-function-merge 58 lines 1.8 kB view raw
1{ lib, stdenv, fetchFromGitLab, readline }: 2 3stdenv.mkDerivation { 4 pname = "picoc"; 5 version = "2.1-unstable-2018-06-05"; 6 7 src = fetchFromGitLab { 8 owner = "zsaleeba"; 9 repo = "picoc"; 10 rev = "dc85a51e9211cfb644f0a85ea9546e15dc1141c3"; 11 hash = "sha256-yWPRbJLT09E7pqqs9E2k48ECoRR2nhcgTgK5pumkrxo="; 12 }; 13 14 buildInputs = [ readline ]; 15 16 makeFlags = [ "CC=${stdenv.cc.targetPrefix}cc" ]; 17 18 env.NIX_CFLAGS_COMPILE = toString (lib.optionals stdenv.isDarwin [ 19 "-Wno-error=implicit-function-declaration" 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 = !stdenv.isi686 && !stdenv.isAarch64; 27 checkTarget = "test"; 28 29 installPhase = '' 30 runHook preInstall 31 32 install -Dm755 picoc $out/bin/picoc 33 34 mkdir -p $out/include 35 install -m644 *.h $out/include 36 37 runHook postInstall 38 ''; 39 40 meta = with lib; { 41 description = "Very small C interpreter for scripting"; 42 mainProgram = "picoc"; 43 longDescription = '' 44 PicoC is a very small C interpreter for scripting. It was originally 45 written as a script language for a UAV's on-board flight system. It's 46 also very suitable for other robotic, embedded and non-embedded 47 applications. The core C source code is around 3500 lines of code. It's 48 not intended to be a complete implementation of ISO C but it has all the 49 essentials. When compiled it only takes a few k of code space and is also 50 very sparing of data space. This means it can work well in small embedded 51 devices. 52 ''; 53 homepage = "https://gitlab.com/zsaleeba/picoc"; 54 downloadPage = "https://code.google.com/p/picoc/downloads/list"; 55 license = licenses.bsd3; 56 platforms = platforms.unix; 57 }; 58}