a-keys-path: init at 0.7.1

Signed-off-by: phanirithvij <phanirithvij2000@gmail.com>
Co-authored-by: Gaétan Lepage <33058747+GaetanLepage@users.noreply.github.com>

+145
+24
pkgs/by-name/a-/a-keys-path/export_presets.cfg
··· 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
+121
pkgs/by-name/a-/a-keys-path/package.nix
··· 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 + writableTmpDirAsHomeHook, 22 + }: 23 + stdenv.mkDerivation (finalAttrs: { 24 + pname = "a-keys-path"; 25 + version = "0.7.1"; 26 + 27 + src = fetchFromGitHub { 28 + owner = "geegaz"; 29 + repo = "A-Key-s-Path"; 30 + tag = "v${finalAttrs.version}"; 31 + hash = "sha256-i9INPB883/0fmtZgJpVpsA/7Q51DHOMWvkLF9hKE6gQ="; 32 + }; 33 + 34 + nativeBuildInputs = [ 35 + autoPatchelfHook 36 + copyDesktopItems 37 + godot3-headless 38 + 39 + # Cannot create file '/homeless-shelter/.config/godot/projects/...' 40 + writableTmpDirAsHomeHook 41 + ]; 42 + 43 + buildInputs = [ 44 + libX11 45 + libXcursor 46 + libXext 47 + libXi 48 + libXinerama 49 + libXrandr 50 + libXrender 51 + libglvnd 52 + ]; 53 + 54 + desktopItem = makeDesktopItem { 55 + name = "a-keys-path"; 56 + exec = "a-keys-path"; 57 + icon = "a-keys-path"; 58 + desktopName = "a-keys-path"; 59 + comment = "A game where you build your way with your keys"; 60 + genericName = "A Key's Path"; 61 + categories = [ "Game" ]; 62 + }; 63 + 64 + buildPhase = '' 65 + runHook preBuild 66 + 67 + # Link the export-templates to the expected location. The --export commands 68 + # expects the template-file at .../templates/3.2.3.stable/linux_x11_64_release 69 + # with 3.2.3 being the version of godot. 70 + mkdir -p $HOME/.local/share/godot 71 + ln -s ${godot3-export-templates}/share/godot/templates $HOME/.local/share/godot 72 + 73 + # export_presets.cfg copied here as it is .gitignored in source 74 + # created by godot editor (godot3 -e) Project > Export... and add Linux 75 + cp ${./export_presets.cfg} export_presets.cfg 76 + 77 + mkdir -p $out/share/a-keys-path 78 + godot3-headless --export "Linux" $out/share/a-keys-path/a-keys-path 79 + 80 + runHook postBuild 81 + ''; 82 + 83 + installPhase = '' 84 + runHook preInstall 85 + 86 + mkdir -p $out/bin 87 + ln -s $out/share/a-keys-path/a-keys-path $out/bin 88 + 89 + # Patch binaries. 90 + interpreter=$(cat $NIX_CC/nix-support/dynamic-linker) 91 + patchelf \ 92 + --set-interpreter $interpreter \ 93 + --set-rpath ${lib.makeLibraryPath finalAttrs.buildInputs} \ 94 + $out/share/a-keys-path/a-keys-path 95 + 96 + mkdir -p $out/share/pixmaps 97 + cp icon.png $out/share/pixmaps/a-keys-path.png 98 + 99 + install -Dm644 ${finalAttrs.desktopItem}/share/applications/a-keys-path.desktop \ 100 + $out/share/applications/a-keys-path.desktop 101 + 102 + runHook postInstall 103 + ''; 104 + 105 + runtimeDependencies = map lib.getLib [ 106 + alsa-lib 107 + ]; 108 + 109 + meta = { 110 + homepage = "https://geegaz.itch.io/out-of-controls"; 111 + description = "Short puzzle-platformer game made with Godot, running on GLES 2.0"; 112 + mainProgram = "a-keys-path"; 113 + license = with lib.licenses; [ 114 + gpl3Only 115 + cc-by-sa-40 116 + cc0 117 + ]; 118 + platforms = [ "x86_64-linux" ]; 119 + maintainers = with lib.maintainers; [ phanirithvij ]; 120 + }; 121 + })