From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from mp0 ([2001:41d0:2:4a6f::]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits)) by ms11 with LMTPS id 2MlpHBc89l8LIQAA0tVLHw (envelope-from ) for ; Wed, 06 Jan 2021 22:39:19 +0000 Received: from aspmx1.migadu.com ([2001:41d0:2:4a6f::]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits)) by mp0 with LMTPS id uBM/GBc89l94TAAA1q6Kng (envelope-from ) for ; Wed, 06 Jan 2021 22:39:19 +0000 Received: from lists.gnu.org (lists.gnu.org [209.51.188.17]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by aspmx1.migadu.com (Postfix) with ESMTPS id 980239403CD for ; Wed, 6 Jan 2021 22:39:18 +0000 (UTC) Received: from localhost ([::1]:56128 helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1kxHSX-00021K-JI for larch@yhetil.org; Wed, 06 Jan 2021 17:39:17 -0500 Received: from eggs.gnu.org ([2001:470:142:3::10]:41038) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1kxHSJ-000218-0G for bug-guix@gnu.org; Wed, 06 Jan 2021 17:39:03 -0500 Received: from debbugs.gnu.org ([209.51.188.43]:34268) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.90_1) (envelope-from ) id 1kxHSI-0000eJ-Lq for bug-guix@gnu.org; Wed, 06 Jan 2021 17:39:02 -0500 Received: from Debian-debbugs by debbugs.gnu.org with local (Exim 4.84_2) (envelope-from ) id 1kxHSI-0005lN-Jr for bug-guix@gnu.org; Wed, 06 Jan 2021 17:39:02 -0500 X-Loop: help-debbugs@gnu.org Subject: bug#45706: vscodium Resent-From: Leo Prikler Original-Sender: "Debbugs-submit" Resent-CC: bug-guix@gnu.org Resent-Date: Wed, 06 Jan 2021 22:39:02 +0000 Resent-Message-ID: Resent-Sender: help-debbugs@gnu.org X-GNU-PR-Message: followup 45706 X-GNU-PR-Package: guix X-GNU-PR-Keywords: To: Hamzeh Nasajpour Received: via spool by 45706-submit@debbugs.gnu.org id=B45706.160997274122146 (code B ref 45706); Wed, 06 Jan 2021 22:39:02 +0000 Received: (at 45706) by debbugs.gnu.org; 6 Jan 2021 22:39:01 +0000 Received: from localhost ([127.0.0.1]:45814 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1kxHSG-0005l8-UC for submit@debbugs.gnu.org; Wed, 06 Jan 2021 17:39:01 -0500 Received: from mailrelay.tugraz.at ([129.27.2.202]:19287) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1kxHSE-0005kx-4B for 45706@debbugs.gnu.org; Wed, 06 Jan 2021 17:38:59 -0500 Received: from nijino.local (217-149-174-13.nat.highway.telekom.at [217.149.174.13]) by mailrelay.tugraz.at (Postfix) with ESMTPSA id 4DB4663vXrz1LLyW; Wed, 6 Jan 2021 23:38:54 +0100 (CET) DKIM-Filter: OpenDKIM Filter v2.11.0 mailrelay.tugraz.at 4DB4663vXrz1LLyW DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=tugraz.at; s=mailrelay; t=1609972734; bh=ZGoy0oWe0BZ1/eJuFMuRLOoVJyCGxpu1srYZlRmb1uc=; h=Subject:From:To:Cc:Date:In-Reply-To:References:From; b=ZhqKIHMygwyzw1IZQ6IZ/vE0KQbfltaIlWccmNUsVc/WfOvj2p72knDHvCuT3LdmX 6jFj4eOFAvDmGtZ0EDLiSBxb6wlDqgns9hqSKSq8nZrot1ocy+0x6EnDf1EG7pzaGs J4CBqFaL4cH0myNf5hVkD7I0bl0oYMtu3dKNzgwc= Message-ID: From: Leo Prikler Date: Wed, 06 Jan 2021 23:38:53 +0100 In-Reply-To: <21b57d16-d87b-408f-ad9d-7be207072676@www.fastmail.com> References: <21b57d16-d87b-408f-ad9d-7be207072676@www.fastmail.com> Content-Type: text/plain; charset="UTF-8" User-Agent: Evolution 3.34.2 MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-TUG-Backscatter-control: bt4lQm5Tva3SBgCuw0EnZw X-Spam-Scanner: SpamAssassin 3.003001 X-Spam-Score-relay: -1.9 X-Scanned-By: MIMEDefang 2.74 on 129.27.10.116 X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.18 Precedence: list X-BeenThere: bug-guix@gnu.org List-Id: Bug reports for GNU Guix List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Cc: 45706@debbugs.gnu.org Errors-To: bug-guix-bounces+larch=yhetil.org@gnu.org Sender: "bug-Guix" X-Migadu-Flow: FLOW_IN X-Migadu-Spam-Score: -1.24 Authentication-Results: aspmx1.migadu.com; dkim=fail (headers rsa verify failed) header.d=tugraz.at header.s=mailrelay header.b=ZhqKIHMy; dmarc=fail reason="SPF not aligned (relaxed)" header.from=student.tugraz.at (policy=none); spf=pass (aspmx1.migadu.com: domain of bug-guix-bounces@gnu.org designates 209.51.188.17 as permitted sender) smtp.mailfrom=bug-guix-bounces@gnu.org X-Migadu-Queue-Id: 980239403CD X-Spam-Score: -1.24 X-Migadu-Scanner: scn0.migadu.com X-TUID: qeO1dODlW0Bn Hello Hamzeh, Am Donnerstag, den 07.01.2021, 00:19 +0330 schrieb Hamzeh Nasajpour: > Hello, > > I want to package the `vscode` in guix. Actually I packaged it, but I > faced with some issues that I think the package definition needs some > modifications. > > I installed it and I get this error: > ``` > $ codium --verbose > Cannot upload crash dump: cannot exec /usr/bin/wget > Unexpected crash report id length > Failed to get crash dump id. > Report Id: > [1338:1217/162312.625705:ERROR:sandbox_linux.cc(374)] > InitializeSandbox() called with multiple threads in process gpu- > process. > Cannot upload crash dump: cannot exec /usr/bin/wget > Unexpected crash report id length > Failed to get crash dump id. > Report Id: > > $ codium --verbose --disable-gpu > Cannot upload crash dump: cannot exec /usr/bin/wget > Unexpected crash report id length > Failed to get crash dump id. > Report Id: > Cannot upload crash dump: cannot exec /usr/bin/wget > Unexpected crash report id length > Failed to get crash dump id. > Report Id: > ``` You probably want to patch the reference to /usr/bin/wget using substitute*. That being said, I'm not sure whether that will fix the original issue. > While I can run it with `--help` and `--version` options: > ``` > $ codium --version > 1.51.1 > e5a624b788d92b8d34d1392e4c4d9789406efe8f > x64 > > $ codium --help > VSCodium 1.51.1 > > Usage: codium [options][paths...] > > To read from stdin, append '-' (e.g. 'ps aux | grep code | codium -') > > Options > -d --diff Compare two files with each > other. > -a --add Add folder(s) to the last active > window. > -g --goto Open a file at the path on the > specified line and character position. > -n --new-window Force to open a new window. > -r --reuse-window Force to open a file or folder in > an already opened window. > --folder-uri Opens a window with given folder > uri(s) > --file-uri Opens a window with given file > uri(s) > -w --wait Wait for the files to be closed > before returning. > --locale The locale to use (e.g. en-US or > zh-TW). > --user-data-dir Specifies the directory that user > data is kept in. Can be used to open multiple distinct instances of > Code. > -h --help Print usage. > > ... > ``` > > The package definition is here: > ``` > (define-module (px packages programming) > #:use-module ((guix licenses) #:prefix license:) > #:use-module (guix download) > #:use-module (guix packages) > #:use-module (guix utils) > #:use-module (guix build-system trivial) > #:use-module (gnu packages bash) > #:use-module (gnu packages bootstrap) > #:use-module (gnu packages commencement) > #:use-module (gnu packages compression) > #:use-module (gnu packages cups) > #:use-module (gnu packages elf) > #:use-module (gnu packages fontutils) > #:use-module (gnu packages gl) > #:use-module (gnu packages base) > #:use-module (gnu packages gcc) > #:use-module (gnu packages glib) > #:use-module (gnu packages gtk) > #:use-module (gnu packages linux) > #:use-module (gnu packages nss) > #:use-module (gnu packages xdisorg) > #:use-module (gnu packages xml) > #:use-module (gnu packages xorg)) > > (define-public vscodium > (package > (name "vscodium") > (version "1.51.1") > (source (origin > (method url-fetch) > (uri " > https://github.com/VSCodium/vscodium/releases/download/1.51.1/VSCodium-linux-x64-1.51.1.tar.gz > ") > (sha256 > (base32 > "0hn4pqmabz3qf3bbqnn1fz7fcgzdkp2lwr2yzgmx8hhh3cff8bnb" > )))) > (build-system trivial-build-system) > (arguments > `(#:modules ((guix build utils)) > #:builder (begin > (use-modules (guix build utils) > (srfi srfi-26)) > (let* ((source (assoc-ref %build-inputs > "source")) > (alsa-lib (assoc-ref %build-inputs "alsa- > lib")) > (at-spi2-atk (assoc-ref %build-inputs "at- > spi2-atk")) > (at-spi2-core(assoc-ref %build-inputs "at- > spi2-core")) > (atk (assoc-ref %build-inputs > "atk")) > (bash (assoc-ref %build-inputs > "bash")) > (cairo (assoc-ref %build-inputs > "cairo")) > (coreutils (assoc-ref %build-inputs > "coreutils")) > (cups (assoc-ref %build-inputs > "cups")) > (dbus (assoc-ref %build-inputs > "dbus")) > (expat (assoc-ref %build-inputs > "expat")) > (fontconfig (assoc-ref %build-inputs > "fontconfig")) > (gcc (assoc-ref %build-inputs > "gcc")) > (ar (assoc-ref %build-inputs "gcc- > toolchain")) > (gdk-pixbuf (assoc-ref %build-inputs "gdk- > pixbuf")) > (glib (assoc-ref %build-inputs > "glib")) > (gzip (assoc-ref %build-inputs > "gzip")) > (gtk (assoc-ref %build-inputs > "gtk+")) > (pango (assoc-ref %build-inputs > "pango")) > (patchelf (assoc-ref %build-inputs > "patchelf")) > (tar (assoc-ref %build-inputs > "tar")) > (xz (assoc-ref %build-inputs "xz")) > (libdrm (assoc-ref %build-inputs > "libdrm")) > (libx11 (assoc-ref %build-inputs > "libx11")) > (libxcb (assoc-ref %build-inputs > "libxcb")) > (libxcursor (assoc-ref %build-inputs > "libxcursor")) > (libxcomposite (assoc-ref %build-inputs > "libxcomposite")) > (libxdamage (assoc-ref %build-inputs > "libxdamage")) > (libxext (assoc-ref %build-inputs > "libxext")) > (libxfixes (assoc-ref %build-inputs > "libxfixes")) > (libxi (assoc-ref %build-inputs > "libxi")) > (libxrandr (assoc-ref %build-inputs > "libxrandr")) > (libxrender (assoc-ref %build-inputs > "libxrender")) > (libxss (assoc-ref %build-inputs > "libxscrnsaver")) > (libxtst (assoc-ref %build-inputs > "libxtst")) > (libnss (assoc-ref %build-inputs > "nss")) > (libnspr (assoc-ref %build-inputs > "nspr")) > (ld-so (string-append (assoc-ref > %build-inputs "glibc") > ,(glibc-dynamic-linker))) > (mesa (assoc-ref %build-inputs > "mesa")) > (bin-dir (string-append %output "/bin")) > (lib-dir (string-append %output > "/lib/vscode")) > (codium-exec(string-append %output > "/lib/vscode/codium"))) > (mkdir-p bin-dir) > (setenv "PATH" (string-append > (string-append > ar "/bin:") > (string-append > bash "/bin:") > (string-append > coreutils "/bin:") > (string-append > gzip "/bin:") > (string-append > patchelf "/bin:") > (string-append > tar "/bin:") > (string-append > xz "/bin:"))) > (invoke "tar" "xvf" source) > (invoke "mkdir" "-p" lib-dir) > (invoke "mkdir" "-p" bin-dir) > (copy-recursively "." lib-dir) > (substitute* (string-append lib-dir > "/bin/codium") > (("ELECTRON=" all) (string-append > "VSCODE_PATH='" lib-dir "'\nELECTRON="))) > (invoke "ln" "-s" (string-append lib-dir > "/bin/codium") bin-dir) > (invoke "patchelf" "--set-interpreter" ld-so > codium-exec) > > ; (substitute* > '("usr/share/applications/codium.desktop") > ; (("Exec=/usr/share/codium/codium") > (string-append "Exec=" %output "/bin/codium"))) > ; (substitute* '("usr/share/applications/codium- > url-handler.desktop") > ; (("Exec=/usr/share/codium/codium") > (string-append "Exec=" %output "/bin/codium"))) > ; (invoke "cp" > "usr/share/codium/resources/app/resources/linux/code.png" (string- > append %output "/share/pixmaps/code.png")) > (invoke "cat" (string-append bin-dir "/codium")) That is not a very usable package definition at all. Please try to build things from source instead of relying on patchelf-based hacks. > (wrap-program codium-exec > `("FONTCONFIG_PATH" ":" prefix > (,(string-append fontconfig "/etc/fonts")))) > (wrap-program codium-exec > `("LD_LIBRARY_PATH" ":" prefix > (,(string-append alsa-lib "/lib")))) > (wrap-program codium-exec > `("LD_LIBRARY_PATH" ":" prefix > (,(string-append at-spi2-core "/lib")))) > (wrap-program codium-exec > `("LD_LIBRARY_PATH" ":" prefix > (,(string-append at-spi2-atk "/lib")))) > (wrap-program codium-exec > `("LD_LIBRARY_PATH" ":" prefix > (,(string-append atk "/lib")))) > (wrap-program codium-exec > `("LD_LIBRARY_PATH" ":" prefix > (,(string-append dbus "/lib")))) > (wrap-program codium-exec > `("LD_LIBRARY_PATH" ":" prefix > (,(string-append cairo "/lib")))) > (wrap-program codium-exec > `("LD_LIBRARY_PATH" ":" prefix > (,(string-append cups "/lib")))) > (wrap-program codium-exec > `("LD_LIBRARY_PATH" ":" prefix > (,(string-append expat "/lib")))) > (wrap-program codium-exec > `("LD_LIBRARY_PATH" ":" prefix > (,(string-append gcc "/lib")))) > (wrap-program codium-exec > `("LD_LIBRARY_PATH" ":" prefix > (,(string-append glib "/lib")))) > (wrap-program codium-exec > `("LD_LIBRARY_PATH" ":" prefix > (,(string-append gdk-pixbuf "/lib")))) > (wrap-program codium-exec > `("LD_LIBRARY_PATH" ":" prefix > (,(string-append gtk "/lib")))) > (wrap-program codium-exec > `("LD_LIBRARY_PATH" ":" prefix > (,(string-append libdrm "/lib")))) > (wrap-program codium-exec > `("LD_LIBRARY_PATH" ":" prefix > (,(string-append libx11 "/lib")))) > (wrap-program codium-exec > `("LD_LIBRARY_PATH" ":" prefix > (,(string-append libxcb "/lib")))) > (wrap-program codium-exec > `("LD_LIBRARY_PATH" ":" prefix > (,(string-append libxcomposite "/lib")))) > (wrap-program codium-exec > `("LD_LIBRARY_PATH" ":" prefix > (,(string-append libxcursor "/lib")))) > (wrap-program codium-exec > `("LD_LIBRARY_PATH" ":" prefix > (,(string-append libxdamage "/lib")))) > (wrap-program codium-exec > `("LD_LIBRARY_PATH" ":" prefix > (,(string-append libxext "/lib")))) > (wrap-program codium-exec > `("LD_LIBRARY_PATH" ":" prefix > (,(string-append libxfixes "/lib")))) > (wrap-program codium-exec > `("LD_LIBRARY_PATH" ":" prefix > (,(string-append libxi "/lib")))) > (wrap-program codium-exec > `("LD_LIBRARY_PATH" ":" prefix > (,(string-append libxrandr "/lib")))) > (wrap-program codium-exec > `("LD_LIBRARY_PATH" ":" prefix > (,(string-append libxrender "/lib")))) > (wrap-program codium-exec > `("LD_LIBRARY_PATH" ":" prefix > (,(string-append libxtst "/lib")))) > (wrap-program codium-exec > `("LD_LIBRARY_PATH" ":" prefix > (,(string-append libxss "/lib")))) > (wrap-program codium-exec > `("LD_LIBRARY_PATH" ":" prefix > (,(string-append libnss "/lib/nss")))) > (wrap-program codium-exec > `("LD_LIBRARY_PATH" ":" prefix > (,(string-append libnspr "/lib")))) > (wrap-program codium-exec > `("LD_LIBRARY_PATH" ":" prefix > (,(string-append mesa "/lib")))) > (wrap-program codium-exec > `("LD_LIBRARY_PATH" ":" prefix > (,(string-append pango "/lib")))) > #t)))) You should actually be able to do all this in a single wrap-program. > (native-inputs `(("alsa-lib" ,alsa-lib) > ("at-spi2-atk" ,at-spi2-atk) > ("coreutils" ,coreutils) > ("cairo" ,cairo) > ("cups" ,cups) > ("dbus" ,dbus) > ("expat" ,expat) > ("fontconfig" ,fontconfig) > ("gcc" ,gcc "lib") > ("gcc-toolchain" ,gcc-toolchain) > ("glib" ,glib) > ("gdk-pixbuf" ,gdk-pixbuf) > ("gtk+" ,gtk+) > ("glibc" ,glibc) > ("libdrm" ,libdrm) > ("libxcb" ,libxcb) > ("libxcursor" ,libxcursor) > ("libx11" ,libx11) > ("libxcomposite" ,libxcomposite) > ("libxdamage" ,libxdamage) > ("libxext" ,libxext) > ("libxfixes" ,libxfixes) > ("libxi" ,libxi) > ("libxrandr" ,libxrandr) > ("libxrender" ,libxrender) > ("libxscrnsaver" ,libxscrnsaver) > ("libxtst" ,libxtst) > ("mesa" ,mesa) > ("gzip" ,gzip) > ("pango" ,pango) > ("patchelf" ,patchelf) > ("nss" ,nss) > ("nspr" ,nspr) > ("tar" ,tar) > ("xz" ,xz))) A lot of those native-inputs should probably be regular inputs. > (inputs `(("bash" ,bash) > ("zlib" ,zlib))) > (home-page "https://github.com/VSCodium/vscodium") > (synopsis "Free/Libre Open Source Software Binaries of VSCode") > (description > "Free/Libre Open Source Software Binaries of VSCode.") Free blobs are still blobs. Just like with the Linux kernel or Chromium, you will have to download the original source, then apply whatever patches VSCodium applies (if any) and build VSCodium using the patched source. See any package, that uses computed origins. > (license license:expat))) > ``` > > Do you have any idea? Please help, I need this IDE urgently :) I'm not sure how urgent "urgently" is, but in my opinion you don't need a package description to figure out the correct set of arguments towards patchelf. That said, if you do have the chance to invest time into a proper definition, you should really try to build from source. As far as getting this into Guix itself is concerned, I fear that Microsoft's heavy branding might make it hard to comply with the FSDG. IIUC VSCodium undoes some of the branding, but I have no idea how thorough they are. Regards, Leo