diff --git a/maintainers/maintainer-list.nix b/maintainers/maintainer-list.nix index 56d1cfb0ee62..6f7a3e442622 100644 --- a/maintainers/maintainer-list.nix +++ b/maintainers/maintainer-list.nix @@ -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"; diff --git a/pkgs/applications/graphics/blockbench-electron/default.nix b/pkgs/applications/graphics/blockbench-electron/default.nix new file mode 100644 index 000000000000..174733a4fdc1 --- /dev/null +++ b/pkgs/applications/graphics/blockbench-electron/default.nix @@ -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" ]; + }; +} diff --git a/pkgs/top-level/all-packages.nix b/pkgs/top-level/all-packages.nix index c0c508820e7e..7c25c3b8adb8 100644 --- a/pkgs/top-level/all-packages.nix +++ b/pkgs/top-level/all-packages.nix @@ -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 { };