From a0a64394bb1b4651fccec98ef83e4ae8405788e7 Mon Sep 17 00:00:00 2001 From: Christine Dodrill Date: Sat, 1 Feb 2020 21:45:59 +0000 Subject: [PATCH] nix --- .envrc | 1 + default.nix | 23 +++++++++++++++++++++++ shell.nix | 8 ++++++++ 3 files changed, 32 insertions(+) create mode 100644 .envrc create mode 100644 default.nix create mode 100644 shell.nix diff --git a/.envrc b/.envrc new file mode 100644 index 0000000..be81fed --- /dev/null +++ b/.envrc @@ -0,0 +1 @@ +eval "$(lorri direnv)" \ No newline at end of file diff --git a/default.nix b/default.nix new file mode 100644 index 0000000..56edc24 --- /dev/null +++ b/default.nix @@ -0,0 +1,23 @@ +{ pkgs ? import { } +, stdenv ? pkgs.stdenv +, fetchurl ? pkgs.fetchurl +, buildLuarocksPackage ? pkgs.lua53Packages.buildLuarocksPackage +, luaOlder ? pkgs.luaPackages.luaOlder +, luaAtLeast ? pkgs.luaPackages.luaAtLeast, ... }: +with pkgs; +buildLuarocksPackage { + pname = "ln"; + version = "0.2.0"; + src = fetchurl { + url = "https://luarocks.org/manifests/xe/ln-0.2.0-1.src.rock"; + sha256 = "0ff0139d8fkyp35csfs75b1jn9q37v5y35wzml82ff35k0sgwkam"; + }; + propagatedBuildInputs = [ lua5_3 ]; + disabled = (luaOlder "5.2") || (luaAtLeast "5.4"); + + meta = { + homepage = "https://tulpa.dev/cadey/lua-ln"; + }; + + buildInputs = [ luaPackages.dkjson ]; +} diff --git a/shell.nix b/shell.nix new file mode 100644 index 0000000..bb8531e --- /dev/null +++ b/shell.nix @@ -0,0 +1,8 @@ +let + pkgs = import {}; +in +pkgs.mkShell { + buildInputs = [ + (pkgs.luajit.withPackages(ps: with ps; [ busted dkjson ])) + ]; +}