blockbench-electron: init at 3.7.5

This commit is contained in:
Ron B 2021-02-12 10:41:35 +02:00
parent f8714c2596
commit c48b1b3956
No known key found for this signature in database
GPG Key ID: 6F5B32DE5E5FA80C
2 changed files with 50 additions and 0 deletions

@ -0,0 +1,48 @@
{ lib, stdenv, fetchurl, appimageTools, makeWrapper, electron_8 }:
stdenv.mkDerivation rec {
pname = "blockbench-electron";
version = "3.7.5";
src = fetchurl {
url = "https://github.com/JannisX11/blockbench/releases/download/v${version}/Blockbench_${version}.AppImage";
sha256 = "0qqklhncd4khqmgp7jg7wap2rzkrg8b6dflmz0wmm5zxxp5vcy1c";
name = "${pname}-${version}.AppImage";
};
appimageContents = appimageTools.extractType2 {
name = "${pname}-${version}";
inherit src;
};
dontUnpack = true;
dontConfigure = true;
dontBuild = true;
nativeBuildInputs = [ makeWrapper ];
installPhase = ''
runHook preInstall
mkdir -p $out/bin $out/share/${pname} $out/share/applications
cp -a ${appimageContents}/{locales,resources} $out/share/${pname}
cp -a ${appimageContents}/blockbench.desktop $out/share/applications/${pname}.desktop
cp -a ${appimageContents}/usr/share/icons $out/share
substituteInPlace $out/share/applications/${pname}.desktop \
--replace 'Exec=AppRun' 'Exec=${pname}'
runHook postInstall
'';
postFixup = ''
makeWrapper ${electron_8}/bin/electron $out/bin/${pname} \
--add-flags $out/share/${pname}/resources/app.asar \
--prefix LD_LIBRARY_PATH : "${lib.makeLibraryPath [ stdenv.cc.cc ]}"
'';
meta = with lib; {
description = "A boxy 3D model editor powered by Electron";
homepage = "https://blockbench.net/";
license = licenses.gpl3Only;
maintainers = [ maintainers.ronthecookie ];
platforms = [ "x86_64-linux" ];
};
}

@ -1112,6 +1112,8 @@ in
bitwarden_rs-vault = callPackage ../tools/security/bitwarden_rs/vault.nix { };
blockbench-electron = callPackage ../applications/graphics/blockbench-electron { };
bmap-tools = callPackage ../tools/misc/bmap-tools { };
bonnmotion = callPackage ../development/tools/misc/bonnmotion { };