Files
nixos-config/nixpkgs/blockbench-5.nix
2025-10-22 09:03:18 +09:00

32 lines
872 B
Nix
Raw Blame History

This file contains ambiguous Unicode characters

This file contains Unicode characters that might be confused with other characters. If you think that this is intentional, you can safely ignore this warning. Use the Escape button to reveal them.

{ pkgs ? import <nixpkgs> { } }:
with pkgs;
stdenv.mkDerivation rec {
pname = "blockbench";
version = "5.0.2";
src = fetchurl {
url =
"https://github.com/JannisX11/blockbench/releases/download/v${version}/Blockbench_${version}.AppImage";
sha256 = "e4e1edc6df725c54a675e201f3366c4245f36b6f558bf9b68b0f66f00e360b58";
};
nativeBuildInputs = [ makeWrapper ];
unpackPhase = "true"; # AppImage, we wont unpack fully
installPhase = ''
mkdir -p $out/bin
cp ${src} $out/bin/blockbench
chmod +x $out/bin/blockbench
wrapProgram $out/bin/blockbench \
--prefix PATH : "${pkgs.nodejs}/bin" \
--set BLOCKBENCH_APPIMAGE "$out/bin/blockbench"
'';
meta = with lib; {
description = "Blockbench 3D model editor (low-poly / Minecraft style)";
homepage = "https://blockbench.net/";
license = licenses.gpl3;
};
}