From patchwork Tue Nov 29 19:08:01 2022 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 8bit X-Patchwork-Submitter: "vasilii.smirnov--- via Guix-patches\" via" X-Patchwork-Id: 44962 Return-Path: X-Original-To: patchwork@mira.cbaines.net Delivered-To: patchwork@mira.cbaines.net Received: by mira.cbaines.net (Postfix, from userid 113) id E0DF627BBEC; Tue, 29 Nov 2022 19:09:09 +0000 (GMT) X-Spam-Checker-Version: SpamAssassin 3.4.6 (2021-04-09) on mira.cbaines.net X-Spam-Level: X-Spam-Status: No, score=-3.7 required=5.0 tests=BAYES_00,DKIM_INVALID, DKIM_SIGNED,MAILING_LIST_MULTI,RCVD_IN_MSPIKE_H2,SPF_HELO_PASS, URIBL_BLOCKED autolearn=ham autolearn_force=no version=3.4.6 Received: from lists.gnu.org (lists.gnu.org [209.51.188.17]) by mira.cbaines.net (Postfix) with ESMTPS id D930327BBE9 for ; Tue, 29 Nov 2022 19:09:08 +0000 (GMT) Received: from localhost ([::1] helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1p05yb-00059s-5p; Tue, 29 Nov 2022 14:09:05 -0500 Received: from eggs.gnu.org ([2001:470:142:3::10]) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1p05yZ-00059F-9J for guix-patches@gnu.org; Tue, 29 Nov 2022 14:09:03 -0500 Received: from debbugs.gnu.org ([209.51.188.43]) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.90_1) (envelope-from ) id 1p05yZ-0008CS-0l for guix-patches@gnu.org; Tue, 29 Nov 2022 14:09:03 -0500 Received: from Debian-debbugs by debbugs.gnu.org with local (Exim 4.84_2) (envelope-from ) id 1p05yY-0005kk-Bc for guix-patches@gnu.org; Tue, 29 Nov 2022 14:09:02 -0500 X-Loop: help-debbugs@gnu.org Subject: [bug#59688] [PATCH] gnu: Add zls Resent-From: =?utf-8?b?TcOhamEgVG9tw6HFoWVr?= Original-Sender: "Debbugs-submit" Resent-CC: guix-patches@gnu.org Resent-Date: Tue, 29 Nov 2022 19:09:02 +0000 Resent-Message-ID: Resent-Sender: help-debbugs@gnu.org X-GNU-PR-Message: report 59688 X-GNU-PR-Package: guix-patches X-GNU-PR-Keywords: patch To: 59688@debbugs.gnu.org X-Debbugs-Original-To: guix-patches@gnu.org Received: via spool by submit@debbugs.gnu.org id=B.166974889522104 (code B ref -1); Tue, 29 Nov 2022 19:09:02 +0000 Received: (at submit) by debbugs.gnu.org; 29 Nov 2022 19:08:15 +0000 Received: from localhost ([127.0.0.1]:55753 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1p05xm-0005kS-Jw for submit@debbugs.gnu.org; Tue, 29 Nov 2022 14:08:14 -0500 Received: from lists.gnu.org ([209.51.188.17]:44584) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1p05xl-0005kM-Mv for submit@debbugs.gnu.org; Tue, 29 Nov 2022 14:08:14 -0500 Received: from eggs.gnu.org ([2001:470:142:3::10]) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1p05xl-0004N9-Hz for guix-patches@gnu.org; Tue, 29 Nov 2022 14:08:13 -0500 Received: from knopi.disroot.org ([178.21.23.139]) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1p05xi-00084W-LV for guix-patches@gnu.org; Tue, 29 Nov 2022 14:08:13 -0500 Received: from localhost (localhost [127.0.0.1]) by disroot.org (Postfix) with ESMTP id 46EAC41539 for ; Tue, 29 Nov 2022 20:08:07 +0100 (CET) X-Virus-Scanned: SPAM Filter at disroot.org Received: from knopi.disroot.org ([127.0.0.1]) by localhost (disroot.org [127.0.0.1]) (amavisd-new, port 10024) with ESMTP id HC6czSN2YrQg for ; Tue, 29 Nov 2022 20:08:05 +0100 (CET) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=disroot.org; s=mail; t=1669748885; bh=3c1q+9BdS2FgPbMtesK33OtbRkn5J0x8jcjrCo5v45I=; h=From:To:Subject:Date:From; b=dBkMX9Wb8AJB2v05NEcD9MrXYW09ytypsUH9tVgE70CtFjQGt3Znp1Jo0bhS6S5FV f9TutJpWqESGdgaB0DL4TX+VVt6J8Ty75J+YEOOB0e4ztMzq4EXZ1XUbQEUdZK7ZdB POYPYulY5sIC27Y0zRFny7y12OfIIbNXXG1Tj8Ij/ZxF/3uqEonP5MZByUFbu2g4Xi 7uLGAdHvs6kWsESARnBqOlnZX2eLW4fNbJ6LGIDVsoNO3p+ldSqLP8zC/2gd0GIF/n iDFVQLNpk1rPeRa5vLDDcNOEoyktqOoQHtyGWZbjEACuW2xMMLFHMUzE/jKoJXGvpJ akwO2RhlBNQIw== Date: Tue, 29 Nov 2022 20:08:01 +0100 Message-ID: <87k03da8a6.fsf@disroot.org> MIME-Version: 1.0 Received-SPF: pass client-ip=178.21.23.139; envelope-from=maya.tomasek@disroot.org; helo=knopi.disroot.org X-Spam_score_int: -20 X-Spam_score: -2.1 X-Spam_bar: -- X-Spam_report: (-2.1 / 5.0 requ) BAYES_00=-1.9, DKIM_SIGNED=0.1, DKIM_VALID=-0.1, DKIM_VALID_AU=-0.1, DKIM_VALID_EF=-0.1, SPF_HELO_NONE=0.001, SPF_PASS=-0.001 autolearn=ham autolearn_force=no X-Spam_action: no action X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.18 Precedence: list X-BeenThere: guix-patches@gnu.org List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Reply-to: =?utf-8?b?TcOhamEgVG9tw6HFoWVr?= X-ACL-Warn: , =?utf-8?q?M=C3=A1ja_Tom=C3=A1=C5=A1ek_via_Guix-patches?= X-Patchwork-Original-From: guix-patches--- via From: "vasilii.smirnov--- via Guix-patches\" via" Errors-To: guix-patches-bounces+patchwork=mira.cbaines.net@gnu.org Sender: guix-patches-bounces+patchwork=mira.cbaines.net@gnu.org X-getmail-retrieved-from-mailbox: Patches Hi, this is a patch that adds the zls - zig language server. It is not currently the most recent version, as the project follows versions of zig itself, which is in guix one version behind. (as zig became self hosted) Kind regards, Maya --- gnu/packages/zig-xyz.scm | 70 ++++++++++++++++++++++++++++++++++++++++ 1 file changed, 70 insertions(+) create mode 100644 gnu/packages/zig-xyz.scm diff --git a/gnu/packages/zig-xyz.scm b/gnu/packages/zig-xyz.scm new file mode 100644 index 0000000000..ff778003cb --- /dev/null +++ b/gnu/packages/zig-xyz.scm @@ -0,0 +1,70 @@ +;;; GNU Guix --- Functional package management for GNU +;;; Copyright © 2022 Maya Tomasek +;;; +;;; This file is part of GNU Guix. +;;; +;;; GNU Guix is free software; you can redistribute it and/or modify it +;;; under the terms of the GNU General Public License as published by +;;; the Free Software Foundation; either version 3 of the License, or (at +;;; your option) any later version. +;;; +;;; GNU Guix is distributed in the hope that it will be useful, but +;;; WITHOUT ANY WARRANTY; without even the implied warranty of +;;; MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the +;;; GNU General Public License for more details. +;;; +;;; You should have received a copy of the GNU General Public License +;;; along with GNU Guix. If not, see . + +(define-module (gnu packages zig-xyz) + #:use-module (guix packages) + #:use-module (guix git-download) + #:use-module ((guix licenses) #:prefix license:) + #:use-module (guix build-system gnu) + #:use-module (guix gexp) + #:use-module (gnu packages) + #:use-module (gnu packages zig) + #:use-module (gnu packages python)) + +(define-public zig-zls + (package + (name "zig-zls") + (version "0.9.0") + (source (origin + (method git-fetch) + (uri (git-reference + (url "https://github.com/zigtools/zls") + (commit version) + (recursive? #t))) + (sha256 + (base32 "1hhs7dz9rpshfd1a7x5swmix2rmh53vsqskh3mzqlrj2lgb3cnii")))) + (build-system gnu-build-system) + (inputs (list zig python)) + (arguments + (list + #:modules '((guix build gnu-build-system) + (guix build utils)) + #:phases + #~(modify-phases %standard-phases + (delete 'configure) + (replace 'build + (lambda* (#:key outputs #:allow-other-keys) + (let ((out (assoc-ref outputs "out")) + (zig (string-append #$zig "/bin/zig"))) + ;; zig defaults it's cache dir to subdir of $HOME, which is not defined in the build environment + (setenv "ZIG_GLOBAL_CACHE_DIR" + (string-append (getcwd) "/zig-cache")) + ;; invoke the install target of the build command + (invoke zig "build" "install" "-Drelease-safe" "--prefix" out)))) + (delete 'install) + (replace 'check + (lambda _ + (let ((zig (string-append #$zig "/bin/zig"))) + ;; run the test target + (invoke zig "build" "test"))))))) + (synopsis "Zig language server") + (description "Zig Language Server is a language server for the @code{zig} programming language.") + (home-page "https://github.com/zigtools/zls") + (license license:expat))) + +zig-zls -- 2.38.1