-
-
Notifications
You must be signed in to change notification settings - Fork 14.8k
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
1 parent
c2869ad
commit a09ddb1
Showing
1 changed file
with
47 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,47 @@ | ||
{ | ||
appimageTools, | ||
lib, | ||
requireFile, | ||
makeWrapper, | ||
}: | ||
|
||
appimageTools.wrapType2 rec { | ||
pname = "cider-2"; | ||
version = "2.5.0"; | ||
|
||
src = requireFile { | ||
name = "Cider-linux-appimage-x64.AppImage"; | ||
url = "https://cidercollective.itch.io/cider"; | ||
sha256 = "1nm35psq9ddii2c15kb03ifcn43fimvc4yzb4cpm1gqsiz4w21qz"; | ||
}; | ||
|
||
nativeBuildInputs = [ makeWrapper ]; | ||
|
||
extraInstallCommands = | ||
let | ||
contents = appimageTools.extract { | ||
inherit version src; | ||
# HACK: this looks for a ${pname}.desktop, where `cider-2.desktop` doesn't exist | ||
pname = "cider"; | ||
}; | ||
in | ||
'' | ||
wrapProgram $out/bin/${pname} \ | ||
--add-flags "\''${NIXOS_OZONE_WL:+\''${WAYLAND_DISPLAY:+--ozone-platform-hint=auto --enable-features=WaylandWindowDecorations}}" \ | ||
--add-flags "--no-sandbox --disable-gpu-sandbox" # Cider 2 does not start up properly without these from my preliminary testing | ||
install -m 444 -D ${contents}/cider.desktop $out/share/applications/${pname}.desktop | ||
substituteInPlace $out/share/applications/${pname}.desktop \ | ||
--replace-warn 'Exec=AppRun --no-sandbox' 'Exec=${pname}' | ||
cp -r ${contents}/usr/share/icons $out/share | ||
''; | ||
|
||
meta = with lib; { | ||
description = "Cider is a powerful music player that allows you listen to your favorite tracks with style"; | ||
homepage = "https://cider.sh"; | ||
license = licenses.unfree; | ||
mainProgram = pname; | ||
maintainers = [ maintainers.itsvic-dev ]; | ||
platforms = [ "x86_64-linux" ]; | ||
}; | ||
} |