Merge pull request #112679 from ronthecookie/pkg-blockbench

blockbench-electron: init at 3.7.5
This commit is contained in:
Lassulus 2021-03-07 17:12:54 +01:00 committed by GitHub
commit e93cc0e9c6
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
3 changed files with 60 additions and 0 deletions

View file

@ -8147,6 +8147,16 @@
githubId = 1312525;
name = "Rongcui Dong";
};
ronthecookie = {
name = "Ron B";
email = "me@ronthecookie.me";
github = "ronthecookie";
githubId = 2526321;
keys = [{
longkeyid = "rsa2048/0x6F5B32DE5E5FA80C";
fingerprint = "4B2C DDA5 FA35 642D 956D 7294 6F5B 32DE 5E5F A80C";
}];
};
roosemberth = {
email = "roosembert.palacios+nixpkgs@gmail.com";
github = "roosemberth";

View file

@ -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" ];
};
}

View file

@ -1131,6 +1131,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 { };