-
-
Notifications
You must be signed in to change notification settings - Fork 14k
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
mihomo-party: init at 1.4.5 (#345189)
- Loading branch information
Showing
1 changed file
with
79 additions
and
0 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,79 @@ | ||
{ | ||
lib, | ||
stdenv, | ||
fetchurl, | ||
dpkg, | ||
wrapGAppsHook3, | ||
autoPatchelfHook, | ||
nss, | ||
nspr, | ||
alsa-lib, | ||
openssl, | ||
webkitgtk, | ||
udev, | ||
libayatana-appindicator, | ||
libGL, | ||
}: | ||
let | ||
pname = "mihomo-party"; | ||
version = "1.4.5"; | ||
src = fetchurl { | ||
url = "https://github.com/mihomo-party-org/mihomo-party/releases/download/v${version}/mihomo-party-linux-${version}-amd64.deb"; | ||
hash = "sha256-O332nt2kgpDGY84S78Tx2PGUw1Pyj80ab2ZE3woYm4Y="; | ||
}; | ||
in | ||
stdenv.mkDerivation { | ||
inherit pname version src; | ||
|
||
nativeBuildInputs = [ | ||
dpkg | ||
wrapGAppsHook3 | ||
autoPatchelfHook | ||
]; | ||
|
||
buildInputs = [ | ||
nss | ||
nspr | ||
alsa-lib | ||
openssl | ||
webkitgtk | ||
stdenv.cc.cc.lib | ||
]; | ||
|
||
runtimeDependencies = map lib.getLib [ | ||
udev | ||
libayatana-appindicator | ||
]; | ||
|
||
installPhase = '' | ||
runHook preInstall | ||
mkdir $out | ||
cp -r opt/mihomo-party usr/share $out | ||
substituteInPlace $out/share/applications/mihomo-party.desktop \ | ||
--replace-fail "/opt/mihomo-party/mihomo-party" "mihomo-party" | ||
runHook postInstall | ||
''; | ||
|
||
preFixup = '' | ||
mkdir $out/bin | ||
makeWrapper $out/mihomo-party/mihomo-party $out/bin/mihomo-party \ | ||
--prefix LD_LIBRARY_PATH : "${ | ||
lib.makeLibraryPath [ | ||
libGL | ||
] | ||
}" | ||
''; | ||
|
||
meta = { | ||
description = "Another Mihomo GUI"; | ||
homepage = "https://github.com/mihomo-party-org/mihomo-party"; | ||
mainProgram = "mihomo-party"; | ||
platforms = with lib.platforms; linux ++ darwin; | ||
broken = !(stdenv.hostPlatform.isLinux && stdenv.hostPlatform.isx86_64); | ||
license = lib.licenses.gpl3Plus; | ||
sourceProvenance = with lib.sourceTypes; [ binaryNativeCode ]; | ||
maintainers = with lib.maintainers; [ aucub ]; | ||
}; | ||
} |