Skip to content

Commit

Permalink
godotpcktool: init at 2.1
Browse files Browse the repository at this point in the history
  • Loading branch information
Ambossmann committed Jan 14, 2025
1 parent 13d23de commit 2ff8089
Showing 1 changed file with 52 additions and 0 deletions.
52 changes: 52 additions & 0 deletions pkgs/by-name/go/godotpcktool/package.nix
Original file line number Diff line number Diff line change
@@ -0,0 +1,52 @@
{
lib,
stdenv,
fetchFromGitHub,
nix-update-script,
cmake,
cxxopts,
nlohmann_json,
}:
stdenv.mkDerivation rec {
pname = "godotpcktool";
version = "2.1";

src = fetchFromGitHub {
owner = "hhyyrylainen";
repo = "GodotPckTool";
rev = "v${version}";
hash = "sha256-NFCPzd/4EEstXTUNdv4j8L8jZVtjwt/oemH4zOJBU2s=";
};

md5Src = fetchFromGitHub {
owner = "CommanderBubble";
repo = "MD5";
rev = "552ad5a446a6b22c21e8c7856cfe967e10d5b364";
hash = "sha256-zc8DAuTrPxHGfs+FkYhZozgWblRl+JhcKH7TvuUq3ho=";
};

nativeBuildInputs = [
cmake
cxxopts
];

buildInputs = [ nlohmann_json ];

# Replace third_party/MD5 with the correct source similiar to how the Arch package does it
# (https://aur.archlinux.org/cgit/aur.git/tree/PKGBUILD?h=godotpcktool)
preConfigure = ''
rmdir third_party/MD5
cp -r ${md5Src} third_party/MD5
'';

passthru.updateScript = nix-update-script { };

meta = {
description = "Standalone tool for extracting and creating Godot .pck files";
homepage = "https://github.com/hhyyrylainen/GodotPckTool";
license = lib.licenses.mit;
maintainers = with lib.maintainers; [ ambossmann ];
mainProgram = "godotpcktool";
platforms = lib.platforms.all;
};
}

0 comments on commit 2ff8089

Please sign in to comment.