Skip to content

Instantly share code, notes, and snippets.

@mlvzk
Last active May 25, 2021 14:23
Show Gist options
  • Save mlvzk/7749304fb592bf00f1ebc0ac89aeca42 to your computer and use it in GitHub Desktop.
Save mlvzk/7749304fb592bf00f1ebc0ac89aeca42 to your computer and use it in GitHub Desktop.
Awestore on NixOS. Ignore the default.nix
{ luaPackages
, runCommand
, fetchFromGitHub
, lib
}: luaPackages.toLuaModule (runCommand "awestore" {
src = fetchFromGitHub {
owner = "K4rakara";
repo = "awestore";
rev = "5509786a1d5bc538dcdde027bd07b35bc29b0df1";
sha256 = "sha256-VuMmEf5bCifXKHerTyFOYW4w4fXA83HM02Oj4VmQOeo=";
};
} ''
mkdir -p $out/share/lua/${luaPackages.lua.luaversion}
cp -r $src/src $out/share/lua/${luaPackages.lua.luaversion}/awestore
'')
# Put this in your overlay
self: super: {
lua = super.lua.override {
packageOverrides = luaself: luaprev: {
awestore = super.callPackage (super.fetchzip {
url = "https://gist.github.com/mlvzk/7749304fb592bf00f1ebc0ac89aeca42/archive/f2ecd9aaf515486acb8eff3a5d134b04f2ffa370.zip";
sha256 = "sha256-I6vzxYAurrk3SyEoVIpq5wb+h89EtDriYjMG0x8hF3M=";
}) { luaPackages = luaself; };
};
};
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment