From 3f34ac0a83d64a172e37df4fbbd03eb07ef0aeea Mon Sep 17 00:00:00 2001 From: Ali Abrar Date: Thu, 31 Aug 2023 19:00:34 -0400 Subject: [PATCH] Take hsluaSrc as argument --- hslua/default.nix | 2 ++ hslua/github.json | 7 +++++++ hslua/thunk.nix | 12 ++++++++++++ 3 files changed, 21 insertions(+) create mode 100644 hslua/default.nix create mode 100644 hslua/github.json create mode 100644 hslua/thunk.nix diff --git a/hslua/default.nix b/hslua/default.nix new file mode 100644 index 0000000..2b4d4ab --- /dev/null +++ b/hslua/default.nix @@ -0,0 +1,2 @@ +# DO NOT HAND-EDIT THIS FILE +import (import ./thunk.nix) \ No newline at end of file diff --git a/hslua/github.json b/hslua/github.json new file mode 100644 index 0000000..2d77898 --- /dev/null +++ b/hslua/github.json @@ -0,0 +1,7 @@ +{ + "owner": "obsidiansystems", + "repo": "hslua", + "private": false, + "rev": "4e163088c6ab198023d45c49c20d66ff2fae7cce", + "sha256": "05r20zk4hzj8q0a087z0w1z6iz4s7nprx74247zpi2s33kvdbbl8" +} diff --git a/hslua/thunk.nix b/hslua/thunk.nix new file mode 100644 index 0000000..20f2d28 --- /dev/null +++ b/hslua/thunk.nix @@ -0,0 +1,12 @@ +# DO NOT HAND-EDIT THIS FILE +let fetch = { private ? false, fetchSubmodules ? false, owner, repo, rev, sha256, ... }: + if !fetchSubmodules && !private then builtins.fetchTarball { + url = "https://github.com/${owner}/${repo}/archive/${rev}.tar.gz"; inherit sha256; + } else (import (builtins.fetchTarball { + url = "https://github.com/NixOS/nixpkgs/archive/3aad50c30c826430b0270fcf8264c8c41b005403.tar.gz"; + sha256 = "0xwqsf08sywd23x0xvw4c4ghq0l28w2ki22h0bdn766i16z9q2gr"; +}) {}).fetchFromGitHub { + inherit owner repo rev sha256 fetchSubmodules private; + }; + json = builtins.fromJSON (builtins.readFile ./github.json); +in fetch json \ No newline at end of file