commit
2ad7b248e6
@ -1,23 +0,0 @@ |
||||
{ system ? builtins.currentSystem, |
||||
config ? {}, |
||||
pkgs ? import ../.. { inherit system config; } |
||||
}: |
||||
|
||||
with import ../lib/testing-python.nix { inherit system pkgs; }; |
||||
|
||||
let |
||||
output = runInMachine { |
||||
drv = pkgs.hello; |
||||
machine = { ... }: { /* services.sshd.enable = true; */ }; |
||||
}; |
||||
|
||||
test = pkgs.runCommand "verify-output" { inherit output; } '' |
||||
if [ ! -e "$output/bin/hello" ]; then |
||||
echo "Derivation built using runInMachine produced incorrect output:" >&2 |
||||
ls -laR "$output" >&2 |
||||
exit 1 |
||||
fi |
||||
"$output/bin/hello" > "$out" |
||||
''; |
||||
|
||||
in test // { inherit test; } # To emulate behaviour of makeTest |
@ -0,0 +1,24 @@ |
||||
{ cmake, fetchFromGitHub, lib, rustPlatform }: |
||||
|
||||
rustPlatform.buildRustPackage rec { |
||||
pname = "lunatic"; |
||||
version = "0.6.2"; |
||||
|
||||
src = fetchFromGitHub { |
||||
owner = "lunatic-solutions"; |
||||
repo = pname; |
||||
rev = "v${version}"; |
||||
sha256 = "1dz8v19jw9v55p3mz4932v6z24ihp6wk238n4d4lx9xj91mf3g6r"; |
||||
}; |
||||
|
||||
cargoSha256 = "1rkxl27l6ydmcq3flc6qbnd7zmpkfmyc86b8q4pi7dwhqnd5g70g"; |
||||
|
||||
nativeBuildInputs = [ cmake ]; |
||||
|
||||
meta = with lib; { |
||||
description = "An Erlang inspired runtime for WebAssembly"; |
||||
homepage = "https://lunatic.solutions"; |
||||
license = with licenses; [ mit /* or */ asl20 ]; |
||||
maintainers = with maintainers; [ figsoda ]; |
||||
}; |
||||
} |
@ -0,0 +1,41 @@ |
||||
{ stdenvNoCC, lib, fetchFromGitHub, bats }: |
||||
|
||||
let version = "0.4.1"; |
||||
in stdenvNoCC.mkDerivation { |
||||
pname = "bash-preexec"; |
||||
inherit version; |
||||
|
||||
src = fetchFromGitHub { |
||||
owner = "rcaloras"; |
||||
repo = "bash-preexec"; |
||||
rev = version; |
||||
sha256 = "062iigps285628p710i7vh7kmgra5gahq9qiwj7rxir167lg0ggw"; |
||||
}; |
||||
|
||||
checkInputs = [ bats ]; |
||||
|
||||
dontConfigure = true; |
||||
doCheck = true; |
||||
dontBuild = true; |
||||
|
||||
patchPhase = '' |
||||
# Needed since the tests expect that HISTCONTROL is set. |
||||
sed -i '/setup()/a HISTCONTROL=""' test/bash-preexec.bats |
||||
''; |
||||
|
||||
checkPhase = '' |
||||
bats test |
||||
''; |
||||
|
||||
installPhase = '' |
||||
install -Dm755 $src/bash-preexec.sh $out/share/bash/bash-preexec.sh |
||||
''; |
||||
|
||||
meta = with lib; { |
||||
description = "preexec and precmd functions for Bash just like Zsh"; |
||||
license = licenses.mit; |
||||
homepage = "https://github.com/rcaloras/bash-preexec"; |
||||
maintainers = [ maintainers.hawkw maintainers.rycee ]; |
||||
platforms = platforms.unix; |
||||
}; |
||||
} |
@ -1,100 +1,127 @@ |
||||
diff -ru PySDL2-0.9.7-old/sdl2/dll.py PySDL2-0.9.7/sdl2/dll.py
|
||||
--- PySDL2-0.9.7-old/sdl2/dll.py 2020-02-15 09:36:29.000000000 +0100
|
||||
+++ PySDL2-0.9.7/sdl2/dll.py 2020-09-23 20:24:09.365497270 +0200
|
||||
@@ -94,15 +94,16 @@
|
||||
"""Function wrapper around the different DLL functions. Do not use or
|
||||
instantiate this one directly from your user code.
|
||||
"""
|
||||
- def __init__(self, libinfo, libnames, path=None):
|
||||
+ def __init__(self, libinfo, libfile):
|
||||
self._dll = None
|
||||
self._libname = libinfo
|
||||
self._version = None
|
||||
- foundlibs = _findlib(libnames, path)
|
||||
- dllmsg = "PYSDL2_DLL_PATH: %s" % (os.getenv("PYSDL2_DLL_PATH") or "unset")
|
||||
- if len(foundlibs) == 0:
|
||||
- raise RuntimeError("could not find any library for %s (%s)" %
|
||||
- (libinfo, dllmsg))
|
||||
+ #foundlibs = _findlib(libnames, path)
|
||||
+ #dllmsg = "PYSDL2_DLL_PATH: %s" % (os.getenv("PYSDL2_DLL_PATH") or "unset")
|
||||
+ #if len(foundlibs) == 0:
|
||||
+ # raise RuntimeError("could not find any library for %s (%s)" %
|
||||
+ # (libinfo, dllmsg))
|
||||
+ foundlibs = [ libfile ]
|
||||
for libfile in foundlibs:
|
||||
try:
|
||||
self._dll = CDLL(libfile)
|
||||
@@ -117,9 +118,9 @@
|
||||
if self._dll is None:
|
||||
raise RuntimeError("found %s, but it's not usable for the library %s" %
|
||||
(foundlibs, libinfo))
|
||||
- if path is not None and sys.platform in ("win32",) and \
|
||||
- path in self._libfile:
|
||||
- os.environ["PATH"] = "%s;%s" % (path, os.environ["PATH"])
|
||||
+ #if path is not None and sys.platform in ("win32",) and \
|
||||
+ # path in self._libfile:
|
||||
+ # os.environ["PATH"] = "%s;%s" % (path, os.environ["PATH"])
|
||||
|
||||
def bind_function(self, funcname, args=None, returns=None, added=None):
|
||||
"""Binds the passed argument and return value types to the specified
|
||||
@@ -220,7 +221,7 @@
|
||||
return
|
||||
|
||||
try:
|
||||
- dll = DLL("SDL2", ["SDL2", "SDL2-2.0"], os.getenv("PYSDL2_DLL_PATH"))
|
||||
+ dll = DLL("SDL2", "@sdl2@")
|
||||
except RuntimeError as exc:
|
||||
raise ImportError(exc)
|
||||
|
||||
diff -ru PySDL2-0.9.7-old/sdl2/sdlgfx.py PySDL2-0.9.7/sdl2/sdlgfx.py
|
||||
--- PySDL2-0.9.7-old/sdl2/sdlgfx.py 2020-02-02 11:07:00.000000000 +0100
|
||||
+++ PySDL2-0.9.7/sdl2/sdlgfx.py 2020-09-23 20:23:56.997419129 +0200
|
||||
@@ -39,8 +39,7 @@
|
||||
]
|
||||
|
||||
try:
|
||||
- dll = DLL("SDL2_gfx", ["SDL2_gfx", "SDL2_gfx-1.0"],
|
||||
- os.getenv("PYSDL2_DLL_PATH"))
|
||||
+ dll = DLL("SDL2_gfx", "@sdl2_gfx@")
|
||||
except RuntimeError as exc:
|
||||
raise ImportError(exc)
|
||||
|
||||
diff -ru PySDL2-0.9.7-old/sdl2/sdlimage.py PySDL2-0.9.7/sdl2/sdlimage.py
|
||||
--- PySDL2-0.9.7-old/sdl2/sdlimage.py 2020-02-02 11:07:00.000000000 +0100
|
||||
+++ PySDL2-0.9.7/sdl2/sdlimage.py 2020-09-23 20:23:50.085375658 +0200
|
||||
@@ -27,8 +27,7 @@
|
||||
]
|
||||
|
||||
try:
|
||||
- dll = DLL("SDL2_image", ["SDL2_image", "SDL2_image-2.0"],
|
||||
- os.getenv("PYSDL2_DLL_PATH"))
|
||||
+ dll = DLL("SDL2_image", "@sdl2_image@")
|
||||
except RuntimeError as exc:
|
||||
raise ImportError(exc)
|
||||
|
||||
diff -ru PySDL2-0.9.7-old/sdl2/sdlmixer.py PySDL2-0.9.7/sdl2/sdlmixer.py
|
||||
--- PySDL2-0.9.7-old/sdl2/sdlmixer.py 2020-02-02 11:07:00.000000000 +0100
|
||||
+++ PySDL2-0.9.7/sdl2/sdlmixer.py 2020-09-23 20:23:46.117350771 +0200
|
||||
@@ -53,8 +53,7 @@
|
||||
]
|
||||
|
||||
try:
|
||||
- dll = DLL("SDL2_mixer", ["SDL2_mixer", "SDL2_mixer-2.0"],
|
||||
- os.getenv("PYSDL2_DLL_PATH"))
|
||||
+ dll = DLL("SDL2_mixer", "@sdl2_mixer@")
|
||||
except RuntimeError as exc:
|
||||
raise ImportError(exc)
|
||||
|
||||
diff -ru PySDL2-0.9.7-old/sdl2/sdlttf.py PySDL2-0.9.7/sdl2/sdlttf.py
|
||||
--- PySDL2-0.9.7-old/sdl2/sdlttf.py 2020-02-02 11:07:00.000000000 +0100
|
||||
+++ PySDL2-0.9.7/sdl2/sdlttf.py 2020-09-23 20:23:40.069312931 +0200
|
||||
@@ -39,8 +39,7 @@
|
||||
]
|
||||
|
||||
try:
|
||||
- dll = DLL("SDL2_ttf", ["SDL2_ttf", "SDL2_ttf-2.0"],
|
||||
- os.getenv("PYSDL2_DLL_PATH"))
|
||||
+ dll = DLL("SDL2_ttf", "@sdl2_ttf@")
|
||||
except RuntimeError as exc:
|
||||
raise ImportError(exc)
|
||||
|
||||
diff --git a/sdl2/dll.py b/sdl2/dll.py
|
||||
index 6e30259..12e1f7d 100644
|
||||
--- a/sdl2/dll.py
|
||||
+++ b/sdl2/dll.py
|
||||
@@ -145,7 +145,7 @@ class DLL(object):
|
||||
"""Function wrapper around the different DLL functions. Do not use or
|
||||
instantiate this one directly from your user code.
|
||||
"""
|
||||
- def __init__(self, libinfo, libnames, path=None):
|
||||
+ def __init__(self, libinfo, libfile):
|
||||
self._dll = None
|
||||
self._deps = None
|
||||
self._libname = libinfo
|
||||
@@ -157,11 +157,12 @@ class DLL(object):
|
||||
"SDL2_image": 2001,
|
||||
"SDL2_gfx": 1003
|
||||
}
|
||||
- foundlibs = _findlib(libnames, path)
|
||||
- dllmsg = "PYSDL2_DLL_PATH: %s" % (os.getenv("PYSDL2_DLL_PATH") or "unset")
|
||||
- if len(foundlibs) == 0:
|
||||
- raise RuntimeError("could not find any library for %s (%s)" %
|
||||
- (libinfo, dllmsg))
|
||||
+ #foundlibs = _findlib(libnames, path)
|
||||
+ #dllmsg = "PYSDL2_DLL_PATH: %s" % (os.getenv("PYSDL2_DLL_PATH") or "unset")
|
||||
+ #if len(foundlibs) == 0:
|
||||
+ # raise RuntimeError("could not find any library for %s (%s)" %
|
||||
+ # (libinfo, dllmsg))
|
||||
+ foundlibs = [ libfile ]
|
||||
for libfile in foundlibs:
|
||||
try:
|
||||
self._dll = CDLL(libfile)
|
||||
@@ -185,19 +186,19 @@ class DLL(object):
|
||||
(foundlibs, libinfo))
|
||||
if _using_ms_store_python():
|
||||
self._deps = _preload_deps(libinfo, self._libfile)
|
||||
- if path is not None and sys.platform in ("win32",) and \
|
||||
- path in self._libfile:
|
||||
- os.environ["PATH"] = "%s;%s" % (path, os.environ["PATH"])
|
||||
+ #if path is not None and sys.platform in ("win32",) and \
|
||||
+ # path in self._libfile:
|
||||
+ # os.environ["PATH"] = "%s;%s" % (path, os.environ["PATH"])
|
||||
|
||||
def bind_function(self, funcname, args=None, returns=None, added=None):
|
||||
"""Binds the passed argument and return value types to the specified
|
||||
function. If the version of the loaded library is older than the
|
||||
version where the function was added, an informative exception will
|
||||
be raised if the bound function is called.
|
||||
|
||||
Args:
|
||||
funcname (str): The name of the function to bind.
|
||||
args (List or None, optional): The data types of the C function's
|
||||
arguments. Should be 'None' if function takes no arguments.
|
||||
returns (optional): The return type of the bound C function. Should
|
||||
be 'None' if function returns 'void'.
|
||||
@@ -288,7 +289,7 @@ def nullfunc(*args):
|
||||
return
|
||||
|
||||
try:
|
||||
- dll = DLL("SDL2", ["SDL2", "SDL2-2.0", "SDL2-2.0.0"], os.getenv("PYSDL2_DLL_PATH"))
|
||||
+ dll = DLL("SDL2", "@sdl2@")
|
||||
except RuntimeError as exc:
|
||||
raise ImportError(exc)
|
||||
|
||||
diff --git a/sdl2/sdlgfx.py b/sdl2/sdlgfx.py
|
||||
index 090752e..a8a7488 100644
|
||||
--- a/sdl2/sdlgfx.py
|
||||
+++ b/sdl2/sdlgfx.py
|
||||
@@ -50,8 +50,7 @@ __all__ = [
|
||||
|
||||
|
||||
try:
|
||||
- dll = DLL("SDL2_gfx", ["SDL2_gfx", "SDL2_gfx-1.0"],
|
||||
- os.getenv("PYSDL2_DLL_PATH"))
|
||||
+ dll = DLL("SDL2_gfx", "@sdl2_gfx@")
|
||||
except RuntimeError as exc:
|
||||
raise ImportError(exc)
|
||||
|
||||
diff --git a/sdl2/sdlimage.py b/sdl2/sdlimage.py
|
||||
index a6884e8..95d96df 100644
|
||||
--- a/sdl2/sdlimage.py
|
||||
+++ b/sdl2/sdlimage.py
|
||||
@@ -32,15 +32,14 @@ __all__ = [
|
||||
"IMG_LoadXCF_RW", "IMG_LoadWEBP_RW", "IMG_LoadXPM_RW",
|
||||
"IMG_LoadXV_RW", "IMG_ReadXPMFromArray",
|
||||
"IMG_GetError", "IMG_SetError", "IMG_SaveJPG", "IMG_SaveJPG_RW",
|
||||
-
|
||||
+
|
||||
# Python Functions
|
||||
"get_dll_file"
|
||||
]
|
||||
|
||||
|
||||
try:
|
||||
- dll = DLL("SDL2_image", ["SDL2_image", "SDL2_image-2.0"],
|
||||
- os.getenv("PYSDL2_DLL_PATH"))
|
||||
+ dll = DLL("SDL2_image", "@sdl2_image@")
|
||||
except RuntimeError as exc:
|
||||
raise ImportError(exc)
|
||||
|
||||
diff --git a/sdl2/sdlmixer.py b/sdl2/sdlmixer.py
|
||||
index 9ad9b85..1c36289 100644
|
||||
--- a/sdl2/sdlmixer.py
|
||||
+++ b/sdl2/sdlmixer.py
|
||||
@@ -76,8 +76,7 @@ __all__ = [
|
||||
]
|
||||
|
||||
try:
|
||||
- dll = DLL("SDL2_mixer", ["SDL2_mixer", "SDL2_mixer-2.0"],
|
||||
- os.getenv("PYSDL2_DLL_PATH"))
|
||||
+ dll = DLL("SDL2_mixer", "@sdl2_mixer@")
|
||||
except RuntimeError as exc:
|
||||
raise ImportError(exc)
|
||||
|
||||
diff --git a/sdl2/sdlttf.py b/sdl2/sdlttf.py
|
||||
index 9c2d951..bd5a16a 100644
|
||||
--- a/sdl2/sdlttf.py
|
||||
+++ b/sdl2/sdlttf.py
|
||||
@@ -54,8 +54,7 @@ __all__ = [
|
||||
|
||||
|
||||
try:
|
||||
- dll = DLL("SDL2_ttf", ["SDL2_ttf", "SDL2_ttf-2.0"],
|
||||
- os.getenv("PYSDL2_DLL_PATH"))
|
||||
+ dll = DLL("SDL2_ttf", "@sdl2_ttf@")
|
||||
except RuntimeError as exc:
|
||||
raise ImportError(exc)
|
||||
|
||||
|
@ -1,11 +1,11 @@ |
||||
generic: { |
||||
v50 = generic { |
||||
version = "5.0.12"; |
||||
sha256 = "1gxlsmvz3m3dm4qqgx5qg5zjs680salah17mdzm3m27w8srg13i5"; |
||||
version = "5.0.15"; |
||||
sha256 = "1q9xwixzdj3w9qmarpp8xbkjphsz4m185br8g6i9f96676hrw5ww"; |
||||
}; |
||||
|
||||
v40 = generic { |
||||
version = "4.0.31"; |
||||
sha256 = "1jfawwwqzd9bsywsn4qc7d1j2a4i8d92xg16k0f3y34pbmfm4603"; |
||||
version = "4.0.33"; |
||||
sha256 = "05pdqiql6xv1l7cn2piydsfjiaw6np0rbl1n5wg7bc7r4ikiyp4v"; |
||||
}; |
||||
} |
||||
|
Loading…
Reference in new issue