Clone of https://github.com/NixOS/nixpkgs.git (to stress-test knotserver)
at devShellTools-shell 47 lines 1.4 kB view raw
1{ 2 lib, 3 fetchurl, 4 appimageTools, 5 gconf, 6 imagemagick, 7}: 8 9let 10 pname = "mendeley"; 11 version = "2.136.0"; 12 13 executableName = "${pname}-reference-manager"; 14 15 src = fetchurl { 16 url = "https://static.mendeley.com/bin/desktop/mendeley-reference-manager-${version}-x86_64.AppImage"; 17 hash = "sha256-NAH4BwWEdI1WFWgPJIPbWkpkN/qxR2+8NwGtdCeohbA="; 18 }; 19 20 appimageContents = appimageTools.extractType2 { 21 inherit pname version src; 22 }; 23in 24appimageTools.wrapType2 { 25 inherit pname version src; 26 27 extraInstallCommands = '' 28 mv $out/bin/$pname $out/bin/${executableName} 29 install -m 444 -D ${appimageContents}/${executableName}.desktop $out/share/applications/${executableName}.desktop 30 ${imagemagick}/bin/convert ${appimageContents}/${executableName}.png -resize 512x512 ${pname}_512.png 31 install -m 444 -D ${pname}_512.png $out/share/icons/hicolor/512x512/apps/${executableName}.png 32 33 substituteInPlace $out/share/applications/${executableName}.desktop \ 34 --replace 'Exec=AppRun' 'Exec=${executableName}' 35 ''; 36 37 meta = with lib; { 38 homepage = "https://www.mendeley.com"; 39 description = "Reference manager and academic social network"; 40 sourceProvenance = with sourceTypes; [ binaryNativeCode ]; 41 license = licenses.unfree; 42 platforms = [ "x86_64-linux" ]; 43 maintainers = with maintainers; [ atila ]; 44 mainProgram = "mendeley-reference-manager"; 45 }; 46 47}