uboot: (firmwareOdroidC2/C4) don't invoke patch tool, use patches = [] instead
https://github.com/NixOS/nixpkgs/blob/master/pkgs/stdenv/generic/setup.sh#L948 this can do it nicely. Signed-off-by: Anton Arapov <anton@deadbeef.mx>
This commit is contained in:
commit
56de2bcd43
30691 changed files with 3076956 additions and 0 deletions
103
pkgs/development/tools/godot/default.nix
Normal file
103
pkgs/development/tools/godot/default.nix
Normal file
|
|
@ -0,0 +1,103 @@
|
|||
{ stdenv
|
||||
, lib
|
||||
, fetchFromGitHub
|
||||
, scons
|
||||
, pkg-config
|
||||
, udev
|
||||
, libX11
|
||||
, libXcursor
|
||||
, libXinerama
|
||||
, libXrandr
|
||||
, libXrender
|
||||
, libpulseaudio
|
||||
, libXi
|
||||
, libXext
|
||||
, libXfixes
|
||||
, freetype
|
||||
, openssl
|
||||
, alsa-lib
|
||||
, libGLU
|
||||
, zlib
|
||||
, yasm
|
||||
, withUdev ? true
|
||||
}:
|
||||
|
||||
let
|
||||
options = {
|
||||
touch = libXi != null;
|
||||
pulseaudio = false;
|
||||
udev = withUdev;
|
||||
};
|
||||
in
|
||||
stdenv.mkDerivation rec {
|
||||
pname = "godot";
|
||||
version = "3.4.4";
|
||||
|
||||
src = fetchFromGitHub {
|
||||
owner = "godotengine";
|
||||
repo = "godot";
|
||||
rev = "${version}-stable";
|
||||
sha256 = "sha256-3AESLzqozi7Fc80u8Ml3ergZMkIhHy4tNlRe/3FsE6k=";
|
||||
};
|
||||
|
||||
nativeBuildInputs = [ pkg-config ];
|
||||
buildInputs = [
|
||||
scons
|
||||
udev
|
||||
libX11
|
||||
libXcursor
|
||||
libXinerama
|
||||
libXrandr
|
||||
libXrender
|
||||
libXi
|
||||
libXext
|
||||
libXfixes
|
||||
freetype
|
||||
openssl
|
||||
alsa-lib
|
||||
libpulseaudio
|
||||
libGLU
|
||||
zlib
|
||||
yasm
|
||||
];
|
||||
|
||||
patches = [ ./pkg_config_additions.patch ./dont_clobber_environment.patch ];
|
||||
|
||||
enableParallelBuilding = true;
|
||||
|
||||
sconsFlags = "target=release_debug platform=x11";
|
||||
preConfigure = ''
|
||||
sconsFlags+=" ${
|
||||
lib.concatStringsSep " "
|
||||
(lib.mapAttrsToList (k: v: "${k}=${builtins.toJSON v}") options)
|
||||
}"
|
||||
'';
|
||||
|
||||
outputs = [ "out" "dev" "man" ];
|
||||
|
||||
installPhase = ''
|
||||
mkdir -p "$out/bin"
|
||||
cp bin/godot.* $out/bin/godot
|
||||
|
||||
mkdir "$dev"
|
||||
cp -r modules/gdnative/include $dev
|
||||
|
||||
mkdir -p "$man/share/man/man6"
|
||||
cp misc/dist/linux/godot.6 "$man/share/man/man6/"
|
||||
|
||||
mkdir -p "$out"/share/{applications,icons/hicolor/scalable/apps}
|
||||
cp misc/dist/linux/org.godotengine.Godot.desktop "$out/share/applications/"
|
||||
cp icon.svg "$out/share/icons/hicolor/scalable/apps/godot.svg"
|
||||
cp icon.png "$out/share/icons/godot.png"
|
||||
substituteInPlace "$out/share/applications/org.godotengine.Godot.desktop" \
|
||||
--replace "Exec=godot" "Exec=$out/bin/godot"
|
||||
'';
|
||||
|
||||
meta = with lib; {
|
||||
homepage = "https://godotengine.org";
|
||||
description = "Free and Open Source 2D and 3D game engine";
|
||||
license = licenses.mit;
|
||||
platforms = [ "i686-linux" "x86_64-linux" ];
|
||||
maintainers = with maintainers; [ twey ];
|
||||
};
|
||||
}
|
||||
19
pkgs/development/tools/godot/dont_clobber_environment.patch
Normal file
19
pkgs/development/tools/godot/dont_clobber_environment.patch
Normal file
|
|
@ -0,0 +1,19 @@
|
|||
diff --git a/SConstruct b/SConstruct
|
||||
index d138c7b250..c925bf908e 100644
|
||||
--- a/SConstruct
|
||||
+++ b/SConstruct
|
||||
@@ -65,10 +65,10 @@ elif platform_arg == "javascript":
|
||||
# want to have to pull in manually.
|
||||
# Then we prepend PATH to make it take precedence, while preserving SCons' own entries.
|
||||
env_base = Environment(tools=custom_tools)
|
||||
-env_base.PrependENVPath("PATH", os.getenv("PATH"))
|
||||
-env_base.PrependENVPath("PKG_CONFIG_PATH", os.getenv("PKG_CONFIG_PATH"))
|
||||
-if "TERM" in os.environ: # Used for colored output.
|
||||
- env_base["ENV"]["TERM"] = os.environ["TERM"]
|
||||
+for k in ("TERM", "PATH", "PKG_CONFIG_PATH"):
|
||||
+ if (k in os.environ):
|
||||
+ env_base["ENV"][k] = os.environ[k]
|
||||
+
|
||||
|
||||
env_base.disabled_modules = []
|
||||
env_base.use_ptrcall = False
|
||||
17
pkgs/development/tools/godot/export-templates.nix
Normal file
17
pkgs/development/tools/godot/export-templates.nix
Normal file
|
|
@ -0,0 +1,17 @@
|
|||
{ godot, lib }:
|
||||
|
||||
# https://docs.godotengine.org/en/stable/development/compiling/compiling_for_x11.html#building-export-templates
|
||||
godot.overrideAttrs (oldAttrs: rec {
|
||||
pname = "godot-export-templates";
|
||||
sconsFlags = "target=release platform=x11 tools=no";
|
||||
installPhase = ''
|
||||
# The godot export command expects the export templates at
|
||||
# .../share/godot/templates/3.2.3.stable with 3.2.3 being the godot version.
|
||||
mkdir -p "$out/share/godot/templates/${oldAttrs.version}.stable"
|
||||
cp bin/godot.x11.opt.64 $out/share/godot/templates/${oldAttrs.version}.stable/linux_x11_64_release
|
||||
'';
|
||||
outputs = [ "out" ];
|
||||
meta.description =
|
||||
"Free and Open Source 2D and 3D game engine (export templates)";
|
||||
meta.maintainers = with lib.maintainers; [ twey jojosch ];
|
||||
})
|
||||
18
pkgs/development/tools/godot/headless.nix
Normal file
18
pkgs/development/tools/godot/headless.nix
Normal file
|
|
@ -0,0 +1,18 @@
|
|||
{ godot, lib }:
|
||||
godot.overrideAttrs (oldAttrs: rec {
|
||||
pname = "godot-headless";
|
||||
sconsFlags = "target=release_debug platform=server tools=yes";
|
||||
installPhase = ''
|
||||
mkdir -p "$out/bin"
|
||||
cp bin/godot_server.* $out/bin/godot-headless
|
||||
|
||||
mkdir "$dev"
|
||||
cp -r modules/gdnative/include $dev
|
||||
|
||||
mkdir -p "$man/share/man/man6"
|
||||
cp misc/dist/linux/godot.6 "$man/share/man/man6/"
|
||||
'';
|
||||
meta.description =
|
||||
"Free and Open Source 2D and 3D game engine (headless build)";
|
||||
meta.maintainers = with lib.maintainers; [ twey yusdacra ];
|
||||
})
|
||||
32
pkgs/development/tools/godot/pkg_config_additions.patch
Normal file
32
pkgs/development/tools/godot/pkg_config_additions.patch
Normal file
|
|
@ -0,0 +1,32 @@
|
|||
diff --git a/platform/x11/detect.py b/platform/x11/detect.py
|
||||
index 91652aad55..d12389f9f2 100644
|
||||
--- a/platform/x11/detect.py
|
||||
+++ b/platform/x11/detect.py
|
||||
@@ -218,6 +218,11 @@ def configure(env):
|
||||
env.ParseConfig("pkg-config xrender --cflags --libs")
|
||||
env.ParseConfig("pkg-config xi --cflags --libs")
|
||||
|
||||
+ env.ParseConfig("pkg-config xext --cflags --libs")
|
||||
+ env.ParseConfig("pkg-config xfixes --cflags --libs")
|
||||
+ env.ParseConfig("pkg-config glu --cflags --libs")
|
||||
+ env.ParseConfig("pkg-config zlib --cflags --libs")
|
||||
+
|
||||
if env["touch"]:
|
||||
env.Append(CPPDEFINES=["TOUCH_ENABLED"])
|
||||
|
||||
@@ -323,6 +328,7 @@ def configure(env):
|
||||
print("Enabling ALSA")
|
||||
env["alsa"] = True
|
||||
env.Append(CPPDEFINES=["ALSA_ENABLED", "ALSAMIDI_ENABLED"])
|
||||
+ env.ParseConfig("pkg-config alsa --cflags --libs")
|
||||
else:
|
||||
print("ALSA libraries not found, disabling driver")
|
||||
|
||||
@@ -340,6 +346,7 @@ def configure(env):
|
||||
if os.system("pkg-config --exists libudev") == 0: # 0 means found
|
||||
print("Enabling udev support")
|
||||
env.Append(CPPDEFINES=["UDEV_ENABLED"])
|
||||
+ env.ParseConfig("pkg-config libudev --cflags --libs")
|
||||
else:
|
||||
print("libudev development libraries not found, disabling udev support")
|
||||
else:
|
||||
18
pkgs/development/tools/godot/server.nix
Normal file
18
pkgs/development/tools/godot/server.nix
Normal file
|
|
@ -0,0 +1,18 @@
|
|||
{ godot, lib }:
|
||||
godot.overrideAttrs (oldAttrs: rec {
|
||||
pname = "godot-server";
|
||||
sconsFlags = "target=release platform=server tools=no";
|
||||
installPhase = ''
|
||||
mkdir -p "$out/bin"
|
||||
cp bin/godot_server.* $out/bin/godot-server
|
||||
|
||||
mkdir "$dev"
|
||||
cp -r modules/gdnative/include $dev
|
||||
|
||||
mkdir -p "$man/share/man/man6"
|
||||
cp misc/dist/linux/godot.6 "$man/share/man/man6/"
|
||||
'';
|
||||
meta.description =
|
||||
"Free and Open Source 2D and 3D game engine (server build)";
|
||||
meta.maintainers = with lib.maintainers; [ twey yusdacra ];
|
||||
})
|
||||
Loading…
Add table
Add a link
Reference in a new issue