From 6f35ca3f2adc88e9251a6dc934f5e811effb5322 Mon Sep 17 00:00:00 2001 From: Evar Smith Date: Wed, 14 Feb 2024 18:58:14 -0500 Subject: [PATCH] godot-spine: add flake --- godot-spine/flake.lock | 25 +++++++++++++++++++++++++ godot-spine/flake.nix | 38 ++++++++++++++++++++++++++++++++++++++ 2 files changed, 63 insertions(+) create mode 100644 godot-spine/flake.lock create mode 100644 godot-spine/flake.nix diff --git a/godot-spine/flake.lock b/godot-spine/flake.lock new file mode 100644 index 0000000..bc08244 --- /dev/null +++ b/godot-spine/flake.lock @@ -0,0 +1,25 @@ +{ + "nodes": { + "nixpkgs": { + "locked": { + "lastModified": 1706925685, + "narHash": "sha256-hVInjWMmgH4yZgA4ZtbgJM1qEAel72SYhP5nOWX4UIM=", + "owner": "NixOS", + "repo": "nixpkgs", + "rev": "79a13f1437e149dc7be2d1290c74d378dad60814", + "type": "github" + }, + "original": { + "id": "nixpkgs", + "type": "indirect" + } + }, + "root": { + "inputs": { + "nixpkgs": "nixpkgs" + } + } + }, + "root": "root", + "version": 7 +} diff --git a/godot-spine/flake.nix b/godot-spine/flake.nix new file mode 100644 index 0000000..6964c46 --- /dev/null +++ b/godot-spine/flake.nix @@ -0,0 +1,38 @@ +{ + 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 + ''; + }; +} \ No newline at end of file