After final improvements to the official formatter implementation,
this commit now performs the first treewide reformat of Nix files using it.
This is part of the implementation of RFC 166.
Only "inactive" files are reformatted, meaning only files that
aren't being touched by any PR with activity in the past 2 months.
This is to avoid conflicts for PRs that might soon be merged.
Later we can do a full treewide reformat to get the rest,
which should not cause as many conflicts.
A CI check has already been running for some time to ensure that new and
already-formatted files are formatted, so the files being reformatted here
should also stay formatted.
This commit was automatically created and can be verified using
nix-build a08b3a4d19.tar.gz \
--argstr baseRev 78e9caf153f5a339bf1d4c000ff6f0a503a369c8
result/bin/apply-formatting $NIXPKGS_PATH
66 lines
1.8 KiB
Nix
66 lines
1.8 KiB
Nix
{
|
|
lib,
|
|
stdenv,
|
|
fetchFromGitLab,
|
|
readline,
|
|
}:
|
|
|
|
stdenv.mkDerivation {
|
|
pname = "picoc";
|
|
version = "2.1-unstable-2018-06-05";
|
|
|
|
src = fetchFromGitLab {
|
|
owner = "zsaleeba";
|
|
repo = "picoc";
|
|
rev = "dc85a51e9211cfb644f0a85ea9546e15dc1141c3";
|
|
hash = "sha256-yWPRbJLT09E7pqqs9E2k48ECoRR2nhcgTgK5pumkrxo=";
|
|
};
|
|
|
|
buildInputs = [ readline ];
|
|
|
|
makeFlags = [ "CC=${stdenv.cc.targetPrefix}cc" ];
|
|
|
|
env.NIX_CFLAGS_COMPILE = toString (
|
|
lib.optionals stdenv.hostPlatform.isDarwin [
|
|
"-Wno-error=implicit-function-declaration"
|
|
]
|
|
);
|
|
|
|
enableParallelBuilding = true;
|
|
|
|
# Tests are currently broken on i686 see
|
|
# https://hydra.nixos.org/build/24003763/nixlog/1
|
|
doCheck = !stdenv.hostPlatform.isi686 && !stdenv.hostPlatform.isAarch64;
|
|
checkTarget = "test";
|
|
|
|
installPhase = ''
|
|
runHook preInstall
|
|
|
|
install -Dm755 picoc $out/bin/picoc
|
|
|
|
mkdir -p $out/include
|
|
install -m644 *.h $out/include
|
|
|
|
runHook postInstall
|
|
'';
|
|
|
|
meta = with lib; {
|
|
description = "Very small C interpreter for scripting";
|
|
mainProgram = "picoc";
|
|
longDescription = ''
|
|
PicoC is a very small C interpreter for scripting. It was originally
|
|
written as a script language for a UAV's on-board flight system. It's
|
|
also very suitable for other robotic, embedded and non-embedded
|
|
applications. The core C source code is around 3500 lines of code. It's
|
|
not intended to be a complete implementation of ISO C but it has all the
|
|
essentials. When compiled it only takes a few k of code space and is also
|
|
very sparing of data space. This means it can work well in small embedded
|
|
devices.
|
|
'';
|
|
homepage = "https://gitlab.com/zsaleeba/picoc";
|
|
downloadPage = "https://code.google.com/p/picoc/downloads/list";
|
|
license = licenses.bsd3;
|
|
platforms = platforms.unix;
|
|
};
|
|
}
|