From 026469e09b781e420acf25fb65808a15e16ecdd2 Mon Sep 17 00:00:00 2001 From: Danila Fedorin Date: Sat, 15 Feb 2020 23:59:41 -0800 Subject: [PATCH] Add pegasus package --- pegasus/default.nix | 24 ++++++++++++++++++++++++ 1 file changed, 24 insertions(+) create mode 100644 pegasus/default.nix diff --git a/pegasus/default.nix b/pegasus/default.nix new file mode 100644 index 0000000..cd2b4e2 --- /dev/null +++ b/pegasus/default.nix @@ -0,0 +1,24 @@ +{ stdenv, crystal, fetchFromGitHub }: + +let + version = "0489d47b191ecf8501787355b948801506e7c70f"; + src = fetchFromGitHub { + owner = "DanilaFe"; + repo = "pegasus"; + rev = version; + sha256 = "097m7l16byis07xlg97wn5hdsz9k6c3h1ybzd2i7xhkj24kx230s"; + }; +in + crystal.buildCrystalPackage { + pname = "pegasus"; + inherit version; + inherit src; + + crystalBinaries.pegasus.src = "src/pegasus.cr"; + crystalBinaries.pegasus-dot.src = "src/tools/dot/pegasus_dot.cr"; + crystalBinaries.pegasus-sim.src = "src/tools/sim/pegasus_sim.cr"; + crystalBinaries.pegasus-c.src = "src/generators/c/pegasus_c.cr"; + crystalBinaries.pegasus-csem.src = "src/generators/csem/pegasus_csem.cr"; + crystalBinaries.pegasus-crystal.src = "src/generators/crystal/pegasus_crystal.cr"; + crystalBinaries.pegasus-crystalsem.src = "src/generators/crystalsem/pegasus_crystalsem.cr"; + }