pytrainer: unpin python 3.10
[NixPkgs.git] / pkgs / development / lua-modules / magick.patch
blob41b5ed98c7f0c5e8da32e6378f1373387b5ea97f
1 diff --git a/magick/wand/lib.lua b/magick/wand/lib.lua
2 index 21940a0..0d103dc 100644
3 --- a/magick/wand/lib.lua
4 +++ b/magick/wand/lib.lua
5 @@ -134,15 +134,6 @@ get_filters = function()
6 local prefixes = {
7 "/usr/include/ImageMagick",
8 "/usr/local/include/ImageMagick",
9 - unpack((function()
10 - local _accum_0 = { }
11 - local _len_0 = 1
12 - for p in get_flags():gmatch("-I([^%s]+)") do
13 - _accum_0[_len_0] = p
14 - _len_0 = _len_0 + 1
15 - end
16 - return _accum_0
17 - end)())
19 for _index_0 = 1, #prefixes do
20 local p = prefixes[_index_0]
21 @@ -204,12 +195,7 @@ try_to_load = function(...)
22 break
23 end
24 end
25 - if pcall(function()
26 - out = ffi.load(name)
27 - end) then
28 - return out
29 - end
30 - _continue_0 = true
31 + return ffi.load(name)
32 until true
33 if not _continue_0 then
34 break
35 @@ -217,17 +203,7 @@ try_to_load = function(...)
36 end
37 return error("Failed to load ImageMagick (" .. tostring(...) .. ")")
38 end
39 -lib = try_to_load("MagickWand", function()
40 - local lname = get_flags():match("-l(MagickWand[^%s]*)")
41 - local suffix
42 - if ffi.os == "OSX" then
43 - suffix = ".dylib"
44 - elseif ffi.os == "Windows" then
45 - suffix = ".dll"
46 - else
47 - suffix = ".so"
48 - end
49 - return lname and "lib" .. lname .. suffix
50 +lib = try_to_load("@nix_wand@", function()
51 end)
52 return {
53 lib = lib,