mendeley: 2.80.1 -> 2.105.0, add version to drv name

This commit is contained in:
Peder Bergebakken Sundt 2023-11-22 11:31:03 +01:00 committed by Emery Hemingway
parent 4a07a64355
commit 4f78f5b277

View File

@ -6,27 +6,27 @@
}:
let
name = "mendeley";
version = "2.80.1";
pname = "mendeley";
version = "2.105.0";
executableName = "${name}-reference-manager";
executableName = "${pname}-reference-manager";
src = fetchurl {
url = "https://static.mendeley.com/bin/desktop/mendeley-reference-manager-2.80.1-x86_64.AppImage";
sha256 = "sha256-uqmu7Yf4tXDlNGkeEZut4m339S6ZNKhAmej+epKLB/8=";
url = "https://static.mendeley.com/bin/desktop/mendeley-reference-manager-${version}-x86_64.AppImage";
hash = "sha256-vs430WLApRu+Xw2gYgriOD0jsQqTW+qhI1g4r67W9aM=";
};
appimageContents = appimageTools.extractType2 {
inherit name src;
inherit pname version src;
};
in appimageTools.wrapType2 rec {
inherit name src;
in appimageTools.wrapType2 {
inherit pname version src;
extraInstallCommands = ''
mv $out/bin/${name} $out/bin/${executableName}
mv $out/bin/$name $out/bin/${executableName}
install -m 444 -D ${appimageContents}/${executableName}.desktop $out/share/applications/${executableName}.desktop
${imagemagick}/bin/convert ${appimageContents}/${executableName}.png -resize 512x512 ${name}_512.png
install -m 444 -D ${name}_512.png $out/share/icons/hicolor/512x512/apps/${executableName}.png
${imagemagick}/bin/convert ${appimageContents}/${executableName}.png -resize 512x512 ${pname}_512.png
install -m 444 -D ${pname}_512.png $out/share/icons/hicolor/512x512/apps/${executableName}.png
substituteInPlace $out/share/applications/${executableName}.desktop \
--replace 'Exec=AppRun' 'Exec=${executableName}'