git.iko.soy/typeable/nixpkgs
on master help sign in
Add microscheme derivation

(A Scheme subset for Atmel microcontrollers.) Use of the actual git HEAD because the actual tarball compiles but segfault at runtime. Upload the BLINK.ms sample on arduino board (/dev/ttyACM0): ```sh $ sudo ./result/bin/microscheme -m UNO -d /dev/ttyACM0 -auc ~/repo/perso/microscheme/examples/BLINK.ms Microscheme 0.8, (C) Ryan Suchocki >> Treeshaker: After 4 rounds: 84 globals purged! 22 bytes will be reserved. >> 18 lines compiled OK >> Assembling... >> Uploading... avrdude: AVR device initialized and ready to accept instructions Reading | ################################################## | 100% 0.00s avrdude: Device signature = 0x1e950f avrdude: reading input file "/home/tony/repo/perso/microscheme/examples/BLINK.hex" avrdude: writing flash (2080 bytes): Writing | ################################################## | 100% 0.35s avrdude: 2080 bytes of flash written avrdude: safemode: Fuses OK (E:00, H:00, L:00) avrdude done. Thank you. >> Cleaning Up... >> Finished. ```

commit172d78923b8213af39ceb0198d6766d2fc311120 authorAntoine R. Dumont <antoine.romain.dumont@gmail.com> dateSun 15 Feb 2015, 00:32 (12 years ago) parent9b81fa2
3 files changed+44
lib/maintainers.nix+1 pkgs/development/compilers/microscheme/default.nix+41 pkgs/top-level/all-packages.nix+2
lib/maintainers.nix+1
@@ -17,6 +17,7 @@
1717 AndersonTorres = "Anderson Torres <torres.anderson.85@gmail.com>";
1818 andres = "Andres Loeh <ksnixos@andres-loeh.de>";
1919 antono = "Antono Vasiljev <self@antono.info>";
20+ ardumont = "Antoine R. Dumont <eniotna.t@gmail.com>";
2021 aristid = "Aristid Breitkreuz <aristidb@gmail.com>";
2122 arobyn = "Alexei Robyn <shados@shados.net>";
2223 asppsa = "Alastair Pharo <asppsa@gmail.com>";
pkgs/development/compilers/microscheme/default.nixnew file+41
@@ -0,0 +1,41 @@
1+{ stdenv, fetchgit, vim, avrdude, avrgcclibc, makeWrapper }:
2+
3+stdenv.mkDerivation rec {
4+ name = "microscheme-${version}";
5+ version = "2015-02-04";
6+
7+ # externalize url/rev/sha256 to permit easier override
8+ rev = "2f14781034a67adc081a22728fbf47a632f4484e";
9+ sha256 = "15bdlmchzbhxj262r2fj78wm4c4hfrap4kyzv8n5b624svszr0zd";
10+ url = https://github.com/ryansuchocki/microscheme.git;
11+
12+ src = fetchgit {
13+ inherit rev;
14+ inherit sha256;
15+ inherit url;
16+ };
17+
18+ buildInputs = [ makeWrapper vim ];
19+
20+ installPhase = ''
21+ mkdir -p $out/bin && make install PREFIX=$out
22+
23+ mkdir -p $out/share/microscheme/
24+ cp -r examples/ $out/share/microscheme
25+
26+ wrapProgram $out/bin/microscheme \
27+ --prefix PATH : "${avrdude}/bin:${avrgcclibc}/bin"
28+ '';
29+
30+ meta = with stdenv.lib; {
31+ homepage = http://microscheme.org;
32+ description = "A Scheme subset for Atmel microcontrollers";
33+ longDescription = ''
34+ Microscheme is a Scheme subset/variant designed for Atmel
35+ microcontrollers, especially as found on Arduino boards.
36+ '';
37+ license = licenses.mit;
38+ platforms = platforms.linux;
39+ maintainers = with maintainers; [ ardumont ];
40+ };
41+}
pkgs/top-level/all-packages.nix+2
@@ -3720,6 +3720,8 @@ let
37203720
37213721 mercury = callPackage ../development/compilers/mercury { };
37223722
3723+ microscheme = callPackage ../development/compilers/microscheme { };
3724+
37233725 mitscheme = callPackage ../development/compilers/mit-scheme { };
37243726
37253727 mlton = callPackage ../development/compilers/mlton { };