From 5d24808a67b7bf72667d772a3bb41d66518d7401 Mon Sep 17 00:00:00 2001 From: Henrik Lissner Date: Tue, 16 Mar 2021 12:36:15 -0400 Subject: [PATCH] Add packages/fennel.nix --- packages/fennel.nix | 32 ++++++++++++++++++++++++++++++++ 1 file changed, 32 insertions(+) create mode 100644 packages/fennel.nix diff --git a/packages/fennel.nix b/packages/fennel.nix new file mode 100644 index 00000000..62edb657 --- /dev/null +++ b/packages/fennel.nix @@ -0,0 +1,32 @@ +{ lib, stdenv, luajit, my, ... }: + +let name = "fennel"; + version = "0.8.1"; +in stdenv.mkDerivation { + inherit name version; + + src = fetchTarball { + url = "https://fennel-lang.org/downloads/${name}-${version}.tar.gz"; + sha256 = "0hzxnsgq4yqsvzkndplcllvq3j8cw45npqyrqa2ww8jv5abr183i"; + }; + + buildInputs = [ + luajit + ]; + + phases = "installPhase"; + installPhase = '' + mkdir -p $out/bin + cp $src/fennel $out/bin/fennel + chmod +x $out/bin/fennel + sed -i 's%^#!/usr/bin/env lua$%#!${luajit}/bin/lua%' $out/bin/fennel + ''; + + meta = { + homepage = "https://github.com/bakpakin/Fennel"; + description = "Lua Lisp Language"; + license = lib.licenses.mit; + platforms = [ "x86_64-linux" ]; + maintainers = []; + }; +}