blob: 2496c8cece4b55716d16c842d83a31148ca8f713 (
plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
|
{
appimageTools,
dieHook,
lib,
makeWrapper,
requireFile,
}:
appimageTools.wrapType2 rec {
pname = "cider2";
version = "2.4.1";
src = requireFile rec {
name = "Cider-linux-appimage-x64.AppImage";
sha256 = "1ds7grjr52ssf1q0sm9jk7hxhskfxj6b5pzrmibliglhbzblflx7";
message = ''
Starting from Cider 2, Cider is no longer open source.
In order to install Cider 2, you must first obtain the
AppImage from Cider Collective's itch.io page:
https://cidercollective.itch.io/cider
Once you have downloaded the file, please use the following
commands and re-run the installation:
nix-prefetch-url file://\$PWD/${name}
Alternatively, you can use the following command to download the
file directly:
nix-prefetch-url --name ${name} <ITCH_IO_DOWNLOAD_URL>
'';
};
extraInstallCommands =
let contents = appimageTools.extract { inherit pname version src; };
in ''
source "${dieHook}/nix-support/setup-hook"
source "${makeWrapper}/nix-support/setup-hook"
wrapProgram $out/bin/${pname} \
--add-flags "\''${NIXOS_OZONE_WL:+\''${WAYLAND_DISPLAY:+--ozone-platform-hint=auto --enable-features=WaylandWindowDecorations}}"
install -m 444 -D ${contents}/cider.desktop -t $out/share/applications
substituteInPlace $out/share/applications/cider.desktop \
--replace-warn 'Exec=AppRun' 'Exec=${pname}'
cp -r ${contents}/usr/share/icons $out/share
# We introduce a dependency on the source file so that it need not be redownloaded every time
echo ${src} >> "$out/share/workspace_dependencies.pin"
'';
meta = with lib; {
description = "New look into listening and enjoying Apple Music in style and performance";
homepage = "https://cidercollective.itch.io/cider";
hydraPlatforms = [ ];
license = licenses.unfree;
mainProgram = "cider2";
maintainers = with maintainers; [ sefidel ];
platforms = [ "x86_64-linux" ];
sourceProvenance = with sourceTypes; [ binaryNativeCode ];
};
}
|