From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from eggs.gnu.org ([209.51.188.92]:46569) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1gwKKh-0000NZ-HK for guix-patches@gnu.org; Wed, 20 Feb 2019 00:22:13 -0500 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1gwK63-0006FO-ED for guix-patches@gnu.org; Wed, 20 Feb 2019 00:07:04 -0500 Received: from debbugs.gnu.org ([209.51.188.43]:56284) by eggs.gnu.org with esmtps (TLS1.0:RSA_AES_128_CBC_SHA1:16) (Exim 4.71) (envelope-from ) id 1gwK62-0006F9-U3 for guix-patches@gnu.org; Wed, 20 Feb 2019 00:07:03 -0500 Received: from Debian-debbugs by debbugs.gnu.org with local (Exim 4.84_2) (envelope-from ) id 1gwK62-0004Lw-HI for guix-patches@gnu.org; Wed, 20 Feb 2019 00:07:02 -0500 Subject: [bug#34576] Calibre: Add icon and desktop file to Calibre References: Resent-Message-ID: MIME-Version: 1.0 From: Date: Wed, 20 Feb 2019 05:06:30 +0000 (GMT) In-Reply-To: <875ztfv59w.fsf@elephly.net> Content-Type: multipart/mixed; boundary="----------=_1550639190-25000-9" Message-Id: 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: Ricardo Wurmus Cc: 34576 <34576@debbugs.gnu.org> This is a multi-part message in MIME format... ------------=_1550639190-25000-9 Content-Type: text/plain; charset="utf-8" Content-Disposition: inline Content-Transfer-Encoding: quoted-printable I've attached a patch with the 'let' removed from the icon install phase, b= ut I haven't changed the indentation of the desktop file because when I did= that it added a blank line at the beginning of the desktop file and create= d a large indentation before '[Desktop Entry]'. I moved 'out' to be next to= the last line of the desktop file output. > Secondly, the indentation is odd. I=E2=80=99d write it like this: >=20 > (format #t "\ > [Desktop Entry]~@ > Name=3D=E2=80=A6 > Comment=3D=E2=80=A6 > =E2=80=A6 > Type=3DApplication~%" out) >=20 >=20 > -- I used the xonotic package definition as a reference for thi part, and emac= s' `indent-region` indents it like this. I don't know how it should look. I= 've attached a patch for now. On Tue, 19 Feb 2019 22:26:35 +0100, Ricardo Wurmus wro= te: >=20 > Hi pkill9, >=20 > > + (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/scal= able/apps"))) > > + #t)) >=20 > You can do without =E2=80=9Clet*=E2=80=9D here. >=20 > > + (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.des= ktop") > > + (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))) >=20 > Does upstream not provide a desktop file? I=E2=80=99d rather see this su= bmitted > to upstream. Have you contacted the developers about this? >=20 > Secondly, the indentation is odd. I=E2=80=99d write it like this: >=20 > (format #t "\ > [Desktop Entry]~@ > Name=3D=E2=80=A6 > Comment=3D=E2=80=A6 > =E2=80=A6 > Type=3DApplication~%" out) >=20 >=20 > -- > Ricardo ------------=_1550639190-25000-9 Content-Type: text/x-patch; name="=?UTF-8?Q?0001-gnu-calibre-Add-desktop-file-and-icon.patch?=" Content-Disposition: attachment; filename="=?UTF-8?Q?0001-gnu-calibre-Add-desktop-file-and-icon.patch?=" Content-Transfer-Encoding: base64 Content-ID: <865e5a812b713a7cafd4a6efb5410c2e> RnJvbSAxNGI3YWFjZWM4MTFkZDhmYmJjN2Q4Nzg0NmRjNDcyMmIxMzUyMmM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dy1vdGhlci1rZXlzKQorICAgICAgICAgICAgIChpbnN0YWxs LWZpbGUgImltZ3NyYy9jYWxpYnJlLnN2ZyIKKyAgICAgICAgICAgICAgICAg ICAgICAgICAgICAgKHN0cmluZy1hcHBlbmQgKGFzc29jLXJlZiBvdXRwdXRz ICJvdXQiKQorICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAg ICAgICAgICAiL3NoYXJlL2ljb25zL2hpY29sb3Ivc2NhbGFibGUvYXBwcyIp KQorICAgICAgICAgICAgICN0KSkKKyAgICAgICAgIChhZGQtYWZ0ZXIgJ2lu c3RhbGwtaWNvbiAnaW5zdGFsbC1kZXNrdG9wLWZpbGUKKyAgICAgICAgICAg KGxhbWJkYSogKCM6a2V5IG91dHB1dHMgIzphbGxvdy1vdGhlci1rZXlzKQor ICAgICAgICAgICAgIChsZXQgKChvdXQgKGFzc29jLXJlZiBvdXRwdXRzICJv dXQiKSkpCisgICAgICAgICAgICAgICAobWtkaXItcCAoc3RyaW5nLWFwcGVu ZCBvdXQgIi9zaGFyZS9hcHBsaWNhdGlvbnMiKSkKKyAgICAgICAgICAgICAg ICh3aXRoLW91dHB1dC10by1maWxlCisgICAgICAgICAgICAgICAgICAgKHN0 cmluZy1hcHBlbmQgb3V0ICIvc2hhcmUvYXBwbGljYXRpb25zL2NhbGlicmUu ZGVza3RvcCIpCisgICAgICAgICAgICAgICAgIChsYW1iZGEgXworICAgICAg ICAgICAgICAgICAgIChmb3JtYXQgI3QKKyAgICAgICAgICAgICAgICAgICAg ICAgICAgICJbRGVza3RvcCBFbnRyeV1+QAorICAgICAgICAgICAgICAgIE5h bWU9Q2FsaWJyZX5ACisgICAgICAgICAgICAgICAgQ29tbWVudD1FLWJvb2sg b3JnYW5pc2VyIGFuZCByZWFkZXJ+QAorICAgICAgICAgICAgICAgIEV4ZWM9 fmEvYmluL2NhbGlicmV+QAorICAgICAgICAgICAgICAgIFRyeUV4ZWM9fkAq fmEvYmluL2NhbGlicmV+QAorICAgICAgICAgICAgICAgIEljb249Y2FsaWJy ZX5ACisgICAgICAgICAgICAgICAgQ2F0ZWdvcmllcz1PZmZpY2V+QAorICAg ICAgICAgICAgICAgIFR5cGU9QXBwbGljYXRpb25+JSIgb3V0KSkpKQorICAg ICAgICAgICAgICN0KSkKKyAgICAgICAgIChhZGQtYWZ0ZXIgJ2luc3RhbGwt ZGVza3RvcC1maWxlICdpbnN0YWxsLWZvbnQtbGliZXJhdGlvbgogICAgICAg ICAgICAobGFtYmRhKiAoIzprZXkgaW5wdXRzIG91dHB1dHMgIzphbGxvdy1v dGhlci1rZXlzKQogICAgICAgICAgICAgIChmb3ItZWFjaCAobGFtYmRhIChm aWxlKQogICAgICAgICAgICAgICAgICAgICAgICAgIChpbnN0YWxsLWZpbGUg ZmlsZSAoc3RyaW5nLWFwcGVuZAotLSAKMi4yMC4xCgo= ------------=_1550639190-25000-9--