microscheme: refactor, fix build on darwin and cross-compilation
This commit is contained in:
parent
028ebdb0b0
commit
f40849784a
1 changed files with 13 additions and 10 deletions
|
@ -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 ];
|
||||
};
|
||||
}
|
||||
|
|
Loading…
Reference in a new issue