Commit e1e2f27c authored by Artturin's avatar Artturin
Browse files

luaPackages.buildLuarocksPackage: Get the final derivation picked by

mkDerivation instead of using the raw list

```
   … while evaluating attribute 'propagatedBuildInputs' of derivation 'wrap-lua-hook'
     at /home/art/nixgits/my-nixpkgs/pkgs/stdenv/generic/make-derivation.nix:600:13:
      599|             depsHostHostPropagated = elemAt (elemAt propagatedDependencies 1) 0;
      600|             propagatedBuildInputs = elemAt (elemAt propagatedDependencies 1) 1;
         |             ^
      601|             depsTargetTargetPropagated = elemAt (elemAt propagatedDependencies 2) 0;
   … while calling the 'getAttr' builtin
     at «nix-internal»/derivation-internal.nix:50:17:
       49|     value = commonAttrs // {
       50|       outPath = builtins.getAttr outputName strict;
         |                 ^
       51|       drvPath = strict.drvPath;
   … while calling the 'derivationStrict' builtin
     at «nix-internal»/derivation-internal.nix:37:12:
       36|
       37|   strict = derivationStrict drvAttrs;
         |            ^
       38|
   … while evaluating derivation 'make-shell-wrapper-hook'
     whose name attribute is located at /home/art/nixgits/my-nixpkgs/pkgs/stdenv/generic/make-derivation.nix:541:13
   … while evaluating attribute 'shell' of derivation 'make-shell-wrapper-hook'
     at /home/art/nixgits/my-nixpkgs/pkgs/top-level/all-packages.nix:716:7:
      715|       # targetPackages.runtimeShell only exists when pkgs == targetPackages (when targetPackages is not  __raw)
      716|       shell =
         |       ^
      717|         if targetPackages ? runtimeShell then
   … while calling the 'throw' builtin
     at /home/art/nixgits/my-nixpkgs/pkgs/top-level/all-packages.nix:720:11:
      719|         else
      720|           throw "makeWrapper/makeShellWrapper must be in nativeBuildInputs";
         |           ^
      721|     };
   error: makeWrapper/makeShellWrapper must be in nativeBuildInputs
```
parent b596934b
Loading
Loading
Loading
Loading
+2 −2
Original line number Diff line number Diff line
@@ -142,7 +142,7 @@ let
        luarocksConfig =
          let
            externalDepsGenerated = lib.filter (drv: !drv ? luaModule) (
              self.nativeBuildInputs ++ self.propagatedBuildInputs ++ self.buildInputs
              self.finalPackage.nativeBuildInputs ++ self.propagatedBuildInputs ++ self.buildInputs
            );

            generatedConfig = luaLib.generateLuarocksConfig {
@@ -157,7 +157,7 @@ let
              # closure, as it doesn't have a rock tree :)
              # luaLib.hasLuaModule
              requiredLuaRocks = lib.filter luaLib.hasLuaModule (
                lua.pkgs.requiredLuaModules (self.nativeBuildInputs ++ self.propagatedBuildInputs)
                lua.pkgs.requiredLuaModules (self.finalPackage.nativeBuildInputs ++ self.propagatedBuildInputs)
              );
            };