From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from eggs.gnu.org ([209.51.188.92]:32843) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1gwCvr-0005tM-TN for guix-patches@gnu.org; Tue, 19 Feb 2019 16:28:04 -0500 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1gwCvr-0004K7-27 for guix-patches@gnu.org; Tue, 19 Feb 2019 16:28:03 -0500 Received: from debbugs.gnu.org ([209.51.188.43]:56388) by eggs.gnu.org with esmtps (TLS1.0:RSA_AES_128_CBC_SHA1:16) (Exim 4.71) (envelope-from ) id 1gwCvq-0004Jz-NA for guix-patches@gnu.org; Tue, 19 Feb 2019 16:28:02 -0500 Received: from Debian-debbugs by debbugs.gnu.org with local (Exim 4.84_2) (envelope-from ) id 1gwCvq-0004h8-AZ for guix-patches@gnu.org; Tue, 19 Feb 2019 16:28:02 -0500 Subject: [bug#34576] Calibre: Add icon and desktop file to Calibre Resent-Message-ID: References: From: Ricardo Wurmus In-reply-to: Date: Tue, 19 Feb 2019 22:26:35 +0100 Message-ID: <875ztfv59w.fsf@elephly.net> MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: quoted-printable List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: guix-patches-bounces+kyle=kyleam.com@gnu.org Sender: "Guix-patches" To: pkill9@runbox.com Cc: 34576@debbugs.gnu.org Hi pkill9, > + (add-after 'install 'install-icon > + (lambda* (#:key outputs #:allow-other-keys) > + (let* ((out (assoc-ref outputs "out"))) > + (install-file "imgsrc/calibre.svg" > + (string-append out > + "/share/icons/hicolor/scalab= le/apps"))) > + #t)) You can do without =E2=80=9Clet*=E2=80=9D here. > + (add-after 'install-icon 'install-desktop-file > + (lambda* (#:key outputs #:allow-other-keys) > + (let ((out (assoc-ref outputs "out"))) > + (mkdir-p (string-append out "/share/applications")) > + (with-output-to-file > + (string-append out "/share/applications/calibre.deskt= op") > + (lambda _ > + (format #t > + "[Desktop Entry]~@ > + Name=3DCalibre~@ > + Comment=3DE-book organiser and reader~@ > + Exec=3D~a/bin/calibre~@ > + TryExec=3D~@*~a/bin/calibre~@ > + Icon=3Dcalibre~@ > + Categories=3DOffice~@ > + Type=3DApplication~%" > + out))) > + #t))) Does upstream not provide a desktop file? I=E2=80=99d rather see this subm= itted to upstream. Have you contacted the developers about this? Secondly, the indentation is odd. I=E2=80=99d write it like this: (format #t "\ [Desktop Entry]~@ Name=3D=E2=80=A6 Comment=3D=E2=80=A6 =E2=80=A6 Type=3DApplication~%" out) -- Ricardo