nixpkgs mirror (for testing) github.com/NixOS/nixpkgs
nix
fork

Configure Feed

Select the types of activity you want to include in your feed.

Assertion throws err message on fail in buildLuaPackage

authored by

wyvie and committed by
Domen Kožar
111b5aa3 164e68c7

+19 -19
+19 -18
pkgs/development/lua-modules/generic/default.nix
··· 2 2 3 3 { buildInputs ? [], disabled ? false, ... } @ attrs: 4 4 5 - assert !disabled; 5 + if disabled then 6 + throw "${attrs.name} not supported by interpreter lua-${lua.luaversion}" 7 + else 8 + lua.stdenv.mkDerivation ({ 6 9 7 - lua.stdenv.mkDerivation ({ 8 - 9 - preBuild = '' 10 - makeFlagsArray=( 11 - PREFIX=$out 12 - LUA_LIBDIR="$out/lib/lua/${lua.luaversion}" 13 - LUA_INC="-I${lua}/include"); 14 - ''; 15 - } 16 - // 17 - attrs 18 - // 19 - { 20 - name = "lua${lua.luaversion}-" + attrs.name; 21 - buildInputs = buildInputs ++ [ lua ]; 22 - } 23 - ) 10 + preBuild = '' 11 + makeFlagsArray=( 12 + PREFIX=$out 13 + LUA_LIBDIR="$out/lib/lua/${lua.luaversion}" 14 + LUA_INC="-I${lua}/include"); 15 + ''; 16 + } 17 + // 18 + attrs 19 + // 20 + { 21 + name = "lua${lua.luaversion}-" + attrs.name; 22 + buildInputs = buildInputs ++ [ lua ]; 23 + } 24 + )
-1
pkgs/top-level/lua-packages.nix
··· 8 8 {fetchurl, stdenv, lua}: 9 9 10 10 let self = _self; _self = with self; { 11 - 12 11 inherit (stdenv.lib) maintainers; 13 12 14 13 #define build lua package function