Merge pull request #307966 from donovanglover/picoc

picoc: 2015-05-04 -> 2.1-unstable-2018-06-05
This commit is contained in:
Weijia Wang 2024-05-04 15:22:21 +02:00 committed by GitHub
commit b8f096091b
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194

View File

@ -1,40 +1,43 @@
{ lib, stdenv, fetchFromGitHub, readline }: { lib, stdenv, fetchFromGitLab, readline }:
stdenv.mkDerivation rec { stdenv.mkDerivation {
pname = "picoc"; pname = "picoc";
version = "2015-05-04"; version = "2.1-unstable-2018-06-05";
src = fetchFromGitHub { src = fetchFromGitLab {
sha256 = "01w3jwl0vn9fsmh7p20ad4nl9ljzgfn576yvncd9pk9frx3pd8y4";
rev = "4555e8456f020554bcac50751fbb9b36c7d8c13b";
repo = "picoc";
owner = "zsaleeba"; owner = "zsaleeba";
repo = "picoc";
rev = "dc85a51e9211cfb644f0a85ea9546e15dc1141c3";
hash = "sha256-yWPRbJLT09E7pqqs9E2k48ECoRR2nhcgTgK5pumkrxo=";
}; };
buildInputs = [ readline ]; buildInputs = [ readline ];
makeFlags = [ "CC=${stdenv.cc.targetPrefix}cc" ]; makeFlags = [ "CC=${stdenv.cc.targetPrefix}cc" ];
postPatch = '' env.NIX_CFLAGS_COMPILE = toString (lib.optionals stdenv.isDarwin [
substituteInPlace Makefile --replace '`svnversion -n`' "${version}" "-Wno-error=implicit-function-declaration"
''; ]);
enableParallelBuilding = true; enableParallelBuilding = true;
# Tests are currently broken on i686 see # Tests are currently broken on i686 see
# https://hydra.nixos.org/build/24003763/nixlog/1 # https://hydra.nixos.org/build/24003763/nixlog/1
doCheck = if stdenv.isi686 then false else true; doCheck = !stdenv.isi686 && !stdenv.isAarch64;
checkTarget = "test"; checkTarget = "test";
installPhase = '' installPhase = ''
runHook preInstall
install -Dm755 picoc $out/bin/picoc install -Dm755 picoc $out/bin/picoc
mkdir -p $out/include mkdir -p $out/include
install -m644 *.h $out/include install -m644 *.h $out/include
runHook postInstall
''; '';
meta = with lib; { meta = with lib; {
broken = (stdenv.isLinux && stdenv.isAarch64);
description = "Very small C interpreter for scripting"; description = "Very small C interpreter for scripting";
mainProgram = "picoc"; mainProgram = "picoc";
longDescription = '' longDescription = ''
@ -47,7 +50,7 @@ stdenv.mkDerivation rec {
very sparing of data space. This means it can work well in small embedded very sparing of data space. This means it can work well in small embedded
devices. devices.
''; '';
homepage = "https://github.com/zsaleeba/picoc"; homepage = "https://gitlab.com/zsaleeba/picoc";
downloadPage = "https://code.google.com/p/picoc/downloads/list"; downloadPage = "https://code.google.com/p/picoc/downloads/list";
license = licenses.bsd3; license = licenses.bsd3;
platforms = platforms.unix; platforms = platforms.unix;