summary refs log tree commit diff
path: root/pkgs/development/compilers/microscheme/default.nix
blob: cfee1b0d86391b0af12a616128ce69a67e52c856 (plain) (blame)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
{ stdenv, fetchzip, vim, avrdude, avrbinutils, avrgcc, avrlibc, makeWrapper }:

stdenv.mkDerivation rec {
  name = "microscheme-${version}";
  version = "0.9.3";

  src = fetchzip {
    name = "${name}-src";
    url = "https://github.com/ryansuchocki/microscheme/archive/v${version}.tar.gz";
    sha256 = "1r3ng4pw1s9yy1h5rafra1rq19d3vmb5pzbpcz1913wz22qdd976";
  };

  # Just a guess
  propagatedBuildInputs = [ avrlibc ];
  buildInputs = [ makeWrapper vim ];

  installPhase = ''
    make install PREFIX=$out

    wrapProgram $out/bin/microscheme \
      --prefix PATH : "${stdenv.lib.makeBinPath [ avrdude avrgcc avrbinutils ]}"
  '';

  meta = with stdenv.lib; {
    homepage = http://microscheme.org;
    description = "A Scheme subset for Atmel microcontrollers";
    longDescription = ''
      Microscheme is a Scheme subset/variant designed for Atmel
      microcontrollers, especially as found on Arduino boards.
    '';
    license = licenses.mit;
    platforms = platforms.linux;
    maintainers = with maintainers; [ ardumont ];
  };
}