mirror of
https://github.com/librephoenix/nixos-config
synced 2025-01-19 07:05:51 +05:30
Better implementation for blockbench override
This commit is contained in:
parent
f9f6716a38
commit
6e969b64da
|
@ -5,20 +5,19 @@
|
|||
(self: super:
|
||||
{
|
||||
blockbench-electron =
|
||||
let
|
||||
inherit (pkgs) fetchurl stdenv appimageTools makeWrapper electron_22;
|
||||
in
|
||||
super.blockbench-electron.overrideAttrs (oldAttrs: rec {
|
||||
pname = "blockbench-electron";
|
||||
alias = "blockbench";
|
||||
version = "4.8.1";
|
||||
src = fetchurl {
|
||||
|
||||
src = super.fetchurl {
|
||||
inherit pname version;
|
||||
url = "https://github.com/JannisX11/blockbench/releases/download/v${version}/Blockbench_${version}.AppImage";
|
||||
sha256 = "sha256-CE2wDOt1WBcYmPs4sEyZ3LYvKLequFZH0B3huMYHlwA=";
|
||||
name = "${pname}-${version}.AppImage";
|
||||
};
|
||||
|
||||
appimageContents = appimageTools.extractType2 {
|
||||
appimageContents = super.appimageTools.extractType2 {
|
||||
inherit pname version;
|
||||
name = "${pname}-${version}";
|
||||
inherit src;
|
||||
|
@ -28,7 +27,7 @@
|
|||
dontConfigure = true;
|
||||
dontBuild = true;
|
||||
|
||||
nativeBuildInputs = [ makeWrapper ];
|
||||
nativeBuildInputs = [ super.makeWrapper ];
|
||||
|
||||
installPhase = ''
|
||||
runHook preInstall
|
||||
|
@ -42,9 +41,13 @@
|
|||
'';
|
||||
|
||||
postFixup = ''
|
||||
makeWrapper ${electron_22}/bin/electron $out/bin/${pname} \
|
||||
makeWrapper ${super.electron_22}/bin/electron $out/bin/${pname} \
|
||||
--add-flags $out/share/${pname}/resources/app.asar \
|
||||
--prefix LD_LIBRARY_PATH : "${lib.makeLibraryPath [ stdenv.cc.cc ]}"
|
||||
--prefix LD_LIBRARY_PATH : "${lib.makeLibraryPath [ super.stdenv.cc.cc ]}"
|
||||
|
||||
makeWrapper ${super.electron_22}/bin/electron $out/bin/${alias} \
|
||||
--add-flags $out/share/${pname}/resources/app.asar \
|
||||
--prefix LD_LIBRARY_PATH : "${lib.makeLibraryPath [ super.stdenv.cc.cc ]}"
|
||||
'';
|
||||
});
|
||||
}
|
||||
|
|
Loading…
Reference in a new issue