♻️ appImage -> derivation
Signed-off-by: Xaiya Schumin <d.schumin@proton.me>
This commit is contained in:
@@ -1,28 +1,63 @@
|
|||||||
{
|
{
|
||||||
lib,
|
lib,
|
||||||
stdenv,
|
|
||||||
fetchurl,
|
fetchurl,
|
||||||
appimageTools,
|
stdenv,
|
||||||
makeDesktopItem,
|
autoPatchelfHook,
|
||||||
|
|
||||||
|
wayland,
|
||||||
|
libGL,
|
||||||
|
|
||||||
|
zlib,
|
||||||
|
fontconfig,
|
||||||
|
freetype,
|
||||||
|
|
||||||
|
krb5,
|
||||||
|
e2fsprogs,
|
||||||
|
|
||||||
|
libgpg-error,
|
||||||
}:
|
}:
|
||||||
appimageTools.wrapType2 rec {
|
|
||||||
pname = "discord-music-presence";
|
stdenv.mkDerivation rec {
|
||||||
|
pname = "musicpresence";
|
||||||
version = "2.3.5";
|
version = "2.3.5";
|
||||||
|
|
||||||
src = fetchurl {
|
src = fetchurl {
|
||||||
url = "https://github.com/ungive/discord-music-presence/releases/download/v${version}/musicpresence-${version}-linux-x86_64.AppImage";
|
url = "https://github.com/ungive/discord-music-presence/releases/download/v${version}/${pname}-${version}-linux-x86_64.tar.gz";
|
||||||
hash = "sha256-M7oDxVevspA3SGuHktS8ChQAYopgIqypiVlzyE4uyqI=";
|
hash = "sha256-BDgM1SfyEXC0oW+J33mYKwqRrvZX3cy/X9k7Yuk4kS8=";
|
||||||
};
|
};
|
||||||
|
|
||||||
extraInstallCommands =
|
nativeBuildInputs = [
|
||||||
let
|
autoPatchelfHook
|
||||||
contents = appimageTools.extract { inherit pname version src; };
|
];
|
||||||
in
|
|
||||||
''
|
buildInputs = [
|
||||||
install -m 444 -D ${contents}/musicpresence.desktop -t $out/share/applications
|
stdenv.cc.cc
|
||||||
substituteInPlace $out/share/applications/musicpresence.desktop \
|
|
||||||
--replace-fail Exec=musicpresence Exec=$out/bin/${pname}
|
wayland
|
||||||
cp -r ${contents}/usr/share/icons $out/share
|
libGL
|
||||||
|
|
||||||
|
zlib
|
||||||
|
fontconfig
|
||||||
|
freetype
|
||||||
|
|
||||||
|
e2fsprogs
|
||||||
|
krb5
|
||||||
|
|
||||||
|
libgpg-error
|
||||||
|
];
|
||||||
|
|
||||||
|
installPhase = ''
|
||||||
|
runHook preInstall
|
||||||
|
mkdir -p $out/bin $out/share
|
||||||
|
|
||||||
|
cp -r usr/* $out
|
||||||
|
|
||||||
|
install -m 444 -D usr/share/applications/${pname}.desktop -t $out/share/applications
|
||||||
|
|
||||||
|
substituteInPlace $out/share/applications/${pname}.desktop \
|
||||||
|
--replace-fail Exec=${pname} Exec=$out/bin/${pname}
|
||||||
|
|
||||||
|
runHook postInstall
|
||||||
'';
|
'';
|
||||||
|
|
||||||
meta = {
|
meta = {
|
||||||
@@ -30,6 +65,6 @@ appimageTools.wrapType2 rec {
|
|||||||
homepage = "https://github.com/ungive/discord-music-presence";
|
homepage = "https://github.com/ungive/discord-music-presence";
|
||||||
license = lib.licenses.unfreeRedistributable;
|
license = lib.licenses.unfreeRedistributable;
|
||||||
maintainers = with lib.maintainers; [ ];
|
maintainers = with lib.maintainers; [ ];
|
||||||
mainProgram = "discord-music-presence";
|
mainProgram = "musicpresence";
|
||||||
};
|
};
|
||||||
}
|
}
|
||||||
Reference in New Issue
Block a user