Nix-Cider2/default.nix

34 lines
1.0 KiB
Nix

{ pkgs ? import <nixpkgs> { system = builtins.currentSystem; }
, appimageTools ? pkgs.appimageTools
, lib ? pkgs.lib
, fetchurl ? pkgs.fetchurl
}:
appimageTools.wrapType2 rec {
pname = "cider";
version = "2.3.1";
src = fetchurl {
url = "file://${./Cider-${version}.AppImage}";
sha256 = "3728de04fa9c56a8a5e3db39bdfae8781166e49d26016c8b7b01ae235b61f4a6";
};
extraInstallCommands =
let contents = appimageTools.extract { inherit pname version src; };
in ''
mv $out/bin/${pname}-${version} $out/bin/${pname}
install -m 444 -D ${contents}/${pname}.desktop -t $out/share/applications
substituteInPlace $out/share/applications/${pname}.desktop \
--replace 'Exec=AppRun' 'Exec=${pname}'
cp -r ${contents}/usr/share/icons $out/share
'';
meta = with lib; {
description = "A new look into listening and enjoying Apple Music in style and performance.";
homepage = "https://cider.sh/";
maintainers = [ maintainers.nicolaivds ];
platforms = [ "x86_64-linux" ];
};
}