flakes/godot-spine/flake.nix

38 lines
1.2 KiB
Nix
Raw Normal View History

2024-02-14 23:58:14 +00:00
{
outputs = { self, nixpkgs }: let
pkgs = import nixpkgs {
system = "x86_64-linux";
};
binary-zip = pkgs.fetchurl {
url = "https://spine-godot.s3.eu-central-1.amazonaws.com/4.1/4.2.1-stable/godot-editor-linux-mono.zip";
hash = "sha256-ZIPlTbm7CIoITGwL2QwTYm3DW7s7n3dubPjf35l3CWw=";
};
binary-zip-nomono = pkgs.fetchurl {
url = "https://spine-godot.s3.eu-central-1.amazonaws.com/4.1/4.2.1-stable/godot-editor-linux.zip";
hash = "sha256-lJBnS5dpH20Ud2u7tLDngDlxwUTR6iMbsoZ+4fYl9Hc=";
};
in {
packages.x86_64-linux.godot-spine = pkgs.runCommand "godot-spine" {} ''
binary=godot-4.1-4.2.1-stable-mono
mkdir -p $out/bin
${pkgs.unzip}/bin/unzip ${binary-zip}
cp -r GodotSharp/ $out/bin/
cp $binary $out/bin/godot-spine
chmod +x $out/bin/godot-spine
'';
packages.x86_64-linux.godot-spine-nomono = pkgs.runCommand "godot-spine-nomono" {} ''
binary=godot-4.1-4.2.1-stable
mkdir -p $out/bin
${pkgs.unzip}/bin/unzip ${binary-zip-nomono}
cp $binary $out/bin/godot-spine-nomono
chmod +x $out/bin/godot-spine-nomono
'';
};
}