luarocks: wrap propagatedBuildInputs in PATH

so that luarocks-nix can add nurl too
This commit is contained in:
Matthieu C. 2024-04-21 19:03:34 +02:00
parent 9e22d74930
commit 986612811d
2 changed files with 12 additions and 6 deletions

View File

@ -1,14 +1,11 @@
{ lib
, stdenv
, fetchFromGitHub
, fetchpatch
, curl
, makeWrapper
, which
, unzip
, lua
, file
, nix-prefetch-git
# for 'luarocks pack'
, zip
, nix-update-script
@ -81,8 +78,7 @@ stdenv.mkDerivation (finalAttrs: {
--suffix LUA_PATH ";" "$(echo "$out"/share/lua/*/)?/init.lua" \
--suffix LUA_CPATH ";" "$(echo "$out"/lib/lua/*/)?.so" \
--suffix LUA_CPATH ";" "$(echo "$out"/share/lua/*/)?/init.lua" \
--suffix PATH : ${lib.makeBinPath ([ unzip ] ++
lib.optionals (finalAttrs.pname == "luarocks-nix") [ file nix-prefetch-git ])}
--suffix PATH : ${lib.makeBinPath finalAttrs.propagatedBuildInputs}
}
done
'';

View File

@ -1,4 +1,9 @@
{ luarocks, fetchFromGitHub, unstableGitUpdater }:
{ luarocks
, fetchFromGitHub
, unstableGitUpdater
, nurl
, file
}:
luarocks.overrideAttrs (old: {
pname = "luarocks-nix";
@ -11,6 +16,11 @@ luarocks.overrideAttrs (old: {
sha256 = "sha256-dqFFYehBgK0RqH0/1GtZXq7XLGCcc3Kfadq8ICYNCWk=";
};
propagatedBuildInputs = old.propagatedBuildInputs ++ [
file
nurl
];
patches = [ ];
passthru = {