nixpkgs/pkgs/by-name/nu/nuclear/package.nix

Ignoring revisions in .git-blame-ignore-revs. Click here to bypass and see the normal blame view.

40 lines
1.3 KiB
Nix
Raw Normal View History

2024-07-28 13:52:22 +01:00
{
appimageTools,
lib,
fetchurl,
2023-08-14 12:15:44 +01:00
}:
let
2020-11-02 16:33:03 +00:00
pname = "nuclear";
2024-09-25 22:57:44 +01:00
version = "0.6.39";
2020-11-02 16:33:03 +00:00
src = fetchurl {
2024-07-28 14:13:48 +01:00
# Nuclear currenntly only publishes AppImage releases for x86_64, which is hardcoded in
# the package name. We also hardcode the host arch in the release name, but should upstream
# provide more arches, we should use stdenv.hostPlatform to determine the arch and choose
# source URL accordingly.
url = "https://github.com/nukeop/nuclear/releases/download/v${version}/${pname}-v${version}-x86_64.AppImage";
2024-09-25 22:57:44 +01:00
hash = "sha256-X5IQ9NlFTFTEYDhuCyrzkPGmvNK66nCSdbmJZxObkBo=";
2020-11-02 16:33:03 +00:00
};
2023-08-14 12:15:44 +01:00
appimageContents = appimageTools.extract { inherit pname version src; };
2023-07-27 08:49:14 +01:00
in
2023-08-14 12:15:44 +01:00
appimageTools.wrapType2 {
inherit pname version src;
2020-11-02 16:33:03 +00:00
2023-08-14 12:15:44 +01:00
extraInstallCommands = ''
install -m 444 -D ${appimageContents}/${pname}.desktop -t $out/share/applications
substituteInPlace $out/share/applications/${pname}.desktop \
2024-07-28 13:52:22 +01:00
--replace-fail 'Exec=AppRun' 'Exec=${pname}'
2023-08-14 12:15:44 +01:00
cp -r ${appimageContents}/usr/share/icons $out/share
'';
2024-07-28 13:52:22 +01:00
meta = {
2023-08-14 12:15:44 +01:00
description = "Streaming music player that finds free music for you";
homepage = "https://nuclear.js.org/";
2024-07-28 13:52:22 +01:00
license = lib.licenses.agpl3Plus;
maintainers = [ lib.maintainers.NotAShelf ];
2023-08-14 12:15:44 +01:00
platforms = [ "x86_64-linux" ];
mainProgram = "nuclear";
};
}