Merge pull request #113369 from siraben/microscheme-xcompile

This commit is contained in:
Sandro 2021-02-17 13:35:00 +01:00 committed by GitHub
commit f2a3e7cc94
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

@ -1,21 +1,24 @@
{ lib, stdenv, fetchzip, vim, makeWrapper }:
{ lib, stdenv, fetchFromGitHub, makeWrapper, unixtools }:
stdenv.mkDerivation rec {
pname = "microscheme";
version = "0.9.3";
src = fetchzip {
name = "${pname}-${version}-src";
url = "https://github.com/ryansuchocki/microscheme/archive/v${version}.tar.gz";
sha256 = "1r3ng4pw1s9yy1h5rafra1rq19d3vmb5pzbpcz1913wz22qdd976";
src = fetchFromGitHub {
owner = "ryansuchocki";
repo = "microscheme";
rev = "v${version}";
sha256 = "5qTWsBCfj5DCZ3f9W1bdo6WAc1DZqVxg8D7pwC95duQ=";
};
buildInputs = [ makeWrapper vim ];
installPhase = ''
make install PREFIX=$out
postPatch = ''
substituteInPlace makefile --replace gcc ${stdenv.cc.targetPrefix}cc
'';
nativeBuildInputs = [ makeWrapper unixtools.xxd ];
makeFlags = [ "PREFIX=${placeholder "out"}" ];
meta = with lib; {
homepage = "http://microscheme.org";
description = "A Scheme subset for Atmel microcontrollers";
@ -24,7 +27,7 @@ stdenv.mkDerivation rec {
microcontrollers, especially as found on Arduino boards.
'';
license = licenses.mit;
platforms = platforms.linux;
platforms = platforms.all;
maintainers = with maintainers; [ ardumont ];
};
}