Skip to content

Commit 0f1b47c

Browse files
committed
a-keys-path: init at 0.7.1
Signed-off-by: phanirithvij <[email protected]>
1 parent e6b98fa commit 0f1b47c

File tree

2 files changed

+144
-0
lines changed

2 files changed

+144
-0
lines changed
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,24 @@
1+
[preset.0]
2+
3+
name="Linux"
4+
platform="Linux/X11"
5+
runnable=true
6+
custom_features=""
7+
export_filter="all_resources"
8+
include_filter=""
9+
exclude_filter=""
10+
export_path=""
11+
script_export_mode=1
12+
script_encryption_key=""
13+
14+
[preset.0.options]
15+
16+
custom_template/debug=""
17+
custom_template/release=""
18+
binary_format/64_bits=true
19+
binary_format/embed_pck=false
20+
texture_format/bptc=false
21+
texture_format/s3tc=true
22+
texture_format/etc=false
23+
texture_format/etc2=false
24+
texture_format/no_bptc_fallbacks=true
+120
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,120 @@
1+
# copied from oh-my-git/package.nix by @jojosch (Johannes Schleifenbaum)
2+
# added in nixos/nixpkgs#119642
3+
{
4+
lib,
5+
autoPatchelfHook,
6+
copyDesktopItems,
7+
fetchFromGitHub,
8+
makeDesktopItem,
9+
stdenv,
10+
alsa-lib,
11+
godot3-export-templates,
12+
godot3-headless,
13+
libX11,
14+
libXcursor,
15+
libXext,
16+
libXi,
17+
libXinerama,
18+
libXrandr,
19+
libXrender,
20+
libglvnd,
21+
}:
22+
stdenv.mkDerivation (finalAttrs: {
23+
pname = "a-keys-path";
24+
version = "0.7.1";
25+
26+
src = fetchFromGitHub {
27+
owner = "geegaz";
28+
repo = "A-Key-s-Path";
29+
tag = "v${finalAttrs.version}";
30+
hash = "sha256-i9INPB883/0fmtZgJpVpsA/7Q51DHOMWvkLF9hKE6gQ=";
31+
};
32+
33+
nativeBuildInputs = [
34+
autoPatchelfHook
35+
copyDesktopItems
36+
godot3-headless
37+
];
38+
39+
buildInputs = [
40+
libX11
41+
libXcursor
42+
libXext
43+
libXi
44+
libXinerama
45+
libXrandr
46+
libXrender
47+
libglvnd
48+
];
49+
50+
desktopItem = makeDesktopItem {
51+
name = "a-keys-path";
52+
exec = "a-keys-path";
53+
icon = "a-keys-path";
54+
desktopName = "a-keys-path";
55+
comment = "A game where you build your way with your keys";
56+
genericName = "A Key's Path";
57+
categories = [ "Game" ];
58+
};
59+
60+
buildPhase = ''
61+
runHook preBuild
62+
63+
# Cannot create file '/homeless-shelter/.config/godot/projects/...'
64+
export HOME=$TMPDIR
65+
66+
# Link the export-templates to the expected location. The --export commands
67+
# expects the template-file at .../templates/3.2.3.stable/linux_x11_64_release
68+
# with 3.2.3 being the version of godot.
69+
mkdir -p $HOME/.local/share/godot
70+
ln -s ${godot3-export-templates}/share/godot/templates $HOME/.local/share/godot
71+
72+
# export_presets.cfg copied here as it is .gitignored in source
73+
# created by godot editor (godot3 -e) Project > Export... and add Linux
74+
cp ${./export_presets.cfg} export_presets.cfg
75+
76+
mkdir -p $out/share/a-keys-path
77+
godot3-headless --export "Linux" $out/share/a-keys-path/a-keys-path
78+
79+
runHook postBuild
80+
'';
81+
82+
installPhase = ''
83+
runHook preInstall
84+
85+
mkdir -p $out/bin
86+
ln -s $out/share/a-keys-path/a-keys-path $out/bin
87+
88+
# Patch binaries.
89+
interpreter=$(cat $NIX_CC/nix-support/dynamic-linker)
90+
patchelf \
91+
--set-interpreter $interpreter \
92+
--set-rpath ${lib.makeLibraryPath finalAttrs.buildInputs} \
93+
$out/share/a-keys-path/a-keys-path
94+
95+
mkdir -p $out/share/pixmaps
96+
cp icon.png $out/share/pixmaps/a-keys-path.png
97+
98+
install -Dm644 ${finalAttrs.desktopItem}/share/applications/a-keys-path.desktop \
99+
$out/share/applications/a-keys-path.desktop
100+
101+
runHook postInstall
102+
'';
103+
104+
runtimeDependencies = map lib.getLib [
105+
alsa-lib
106+
];
107+
108+
meta = {
109+
homepage = "https://geegaz.itch.io/out-of-controls";
110+
description = "Short puzzle-platformer game made with Godot, running on GLES 2.0";
111+
mainProgram = "a-keys-path";
112+
license = with lib.licenses; [
113+
gpl3Only
114+
cc-by-sa-40
115+
cc0
116+
];
117+
platforms = [ "x86_64-linux" ];
118+
maintainers = with lib.maintainers; [ phanirithvij ];
119+
};
120+
})

0 commit comments

Comments
 (0)