From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from mp11.migadu.com ([2001:41d0:2:bcc0::]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits)) by ms5.migadu.com with LMTPS id UPa3KSqrnWMFrQAAbAwnHQ (envelope-from ) for ; Sat, 17 Dec 2022 12:42:34 +0100 Received: from aspmx1.migadu.com ([2001:41d0:2:bcc0::]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits)) by mp11.migadu.com with LMTPS id cB/TKSqrnWNuGgEA9RJhRA (envelope-from ) for ; Sat, 17 Dec 2022 12:42:34 +0100 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 865C646A02 for ; Sat, 17 Dec 2022 12:42:34 +0100 (CET) Received: from localhost ([::1] helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1p6VZu-00017h-88; Sat, 17 Dec 2022 06:42:06 -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 1p6VZr-00015z-BQ for guix-patches@gnu.org; Sat, 17 Dec 2022 06:42: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 1p6VZr-0007xT-2Y for guix-patches@gnu.org; Sat, 17 Dec 2022 06:42:03 -0500 Received: from Debian-debbugs by debbugs.gnu.org with local (Exim 4.84_2) (envelope-from ) id 1p6VZq-0003NM-VT for guix-patches@gnu.org; Sat, 17 Dec 2022 06:42:02 -0500 X-Loop: help-debbugs@gnu.org Subject: [bug#59688] [PATCH] gnu: Add zls References: <87k03da8a6.fsf@disroot.org> In-Reply-To: <87k03da8a6.fsf@disroot.org> Resent-From: Maya Tomasek Original-Sender: "Debbugs-submit" Resent-CC: guix-patches@gnu.org Resent-Date: Sat, 17 Dec 2022 11:42:02 +0000 Resent-Message-ID: Resent-Sender: help-debbugs@gnu.org X-GNU-PR-Message: followup 59688 X-GNU-PR-Package: guix-patches X-GNU-PR-Keywords: patch To: 59688@debbugs.gnu.org Cc: Maya Tomasek Received: via spool by 59688-submit@debbugs.gnu.org id=B59688.167127731912956 (code B ref 59688); Sat, 17 Dec 2022 11:42:02 +0000 Received: (at 59688) by debbugs.gnu.org; 17 Dec 2022 11:41:59 +0000 Received: from localhost ([127.0.0.1]:55413 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1p6VZm-0003Mu-Op for submit@debbugs.gnu.org; Sat, 17 Dec 2022 06:41:59 -0500 Received: from knopi.disroot.org ([178.21.23.139]:46432) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1p6VZh-0003Mo-4r for 59688@debbugs.gnu.org; Sat, 17 Dec 2022 06:41:56 -0500 Received: from localhost (localhost [127.0.0.1]) by disroot.org (Postfix) with ESMTP id BE327412FC; Sat, 17 Dec 2022 12:41:51 +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 inCO2TorOwAy; Sat, 17 Dec 2022 12:41:50 +0100 (CET) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=disroot.org; s=mail; t=1671277310; bh=/8y6aubCwGlc4vsS61q+UDn3qJKcXbFmcPaPFdrwiJA=; h=From:To:Cc:Subject:Date; b=Hy7rX1DKohCHYyVqgKBPastBwbSEIEcbHKNUymSZPNL0E006PCVQU+G1Gk0dC6PMp eeyVGwvd9yMUL9PAi64p1MHTJBjQRBAm7cLLPi07qLbVoeDG3ftHjQfg61Mme6Bt5w SC2bHNLg6oLTlbtbBW1a/9Z5uKFWhh5e5vIk1VRtZtppcCNXv+GgftskTyeJzOBbvl tvNNYoNvKCI9XA45xANTNU2SXUafQi21fujVqYvy8fg9c7jun4vzfWigCLIOVD+1Dz hFlxknFZTwEjnS6E1AeetqDcpfFxzl0waKnLYE7bzIbJsD0gxOKEJ8a+412RLljDMd 11WTsXu4FOu0A== Date: Sat, 17 Dec 2022 12:41:48 +0100 Message-Id: <20221217114148.21781-1-maya.tomasek@disroot.org> MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit 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: Maya Tomasek X-ACL-Warn: , Maya Tomasek via Guix-patches From: Maya Tomasek via Guix-patches via Errors-To: guix-patches-bounces+larch=yhetil.org@gnu.org Sender: guix-patches-bounces+larch=yhetil.org@gnu.org X-Migadu-Country: US X-Migadu-Flow: FLOW_IN ARC-Seal: i=1; s=key1; d=yhetil.org; t=1671277354; a=rsa-sha256; cv=none; b=lZ1owxSWNwOCojVZ3daX3ttz1xD2aNm/UfQ8dUEylxeKmi17aiKFEQaHqc9JvAEsFxXZra iJbaQ11LEDk3jZGK+BHaL+K4t6PeZRgQMiXUKJJCyxaVPcQ8bB1BZb6/2xi5GirRdXd7a8 ITkmg/G+Ie73DJKWP0l4QKUF+j92f+8H3EBVrPUsVVBUM5tQBzKsfa9AIDCk2pFN1zUhnW QocS+GR09UTxYZqCZ2SKUDfAd82rj92JwG44vzxT2pbVphd94r/gUClaWyzx68oXBUvRsR ERtQUsQMLYbySHoSZngdq1h4H/2rvBfuwon1cbQ1rls7OHahQRb3Uo+v9pEfew== ARC-Authentication-Results: i=1; aspmx1.migadu.com; dkim=fail ("headers rsa verify failed") header.d=disroot.org header.s=mail header.b=Hy7rX1DK; spf=pass (aspmx1.migadu.com: domain of "guix-patches-bounces+larch=yhetil.org@gnu.org" designates 209.51.188.17 as permitted sender) smtp.mailfrom="guix-patches-bounces+larch=yhetil.org@gnu.org"; dmarc=pass (policy=none) header.from=gnu.org ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=yhetil.org; s=key1; t=1671277354; h=from:from:sender:sender:reply-to:reply-to:subject:subject:date:date: message-id:message-id:to:to:cc:cc:mime-version:mime-version: content-type:content-type: content-transfer-encoding:content-transfer-encoding:resent-cc: resent-from:resent-sender:resent-message-id:in-reply-to:in-reply-to: references:references:list-id:list-help:list-unsubscribe: list-subscribe:list-post:dkim-signature; bh=YL7HSpyFj5iqHJSzNXt8ippwfyAdfSWGW1LO52e3ddA=; b=OxzjTl8xxIBkFuF16+7nCNYmjuz6XmAjIIXf+MSLEHoEhg2vPzfK7ycMErcTjKzoWiPYhG TE/GLZYsiosprqXOH5okVE9/Aa7PCJgrPrS1gIMee/x5qz127sfVO86PWbk8yzR33C21x4 m2lWB55WR7OtiyJ350vGXOcGxV4TMvefVpeYAu/5Xxy6Fox8Im/NCFGGqOO8gb/pUVRBlU DCTdthWOttmsnU915eLn35pVxmUhLSF7D+ikud0LBpK5jrXIPzhONawU+Su3CAsWPmu54Z KpWnjJgxR0KgNYU7iWBFCw/YuJbtnl3vxbwWsnA10hYe1iZzKXqnN4YjQxJVAw== X-Migadu-Spam-Score: -1.97 X-Spam-Score: -1.97 X-Migadu-Queue-Id: 865C646A02 Authentication-Results: aspmx1.migadu.com; dkim=fail ("headers rsa verify failed") header.d=disroot.org header.s=mail header.b=Hy7rX1DK; spf=pass (aspmx1.migadu.com: domain of "guix-patches-bounces+larch=yhetil.org@gnu.org" designates 209.51.188.17 as permitted sender) smtp.mailfrom="guix-patches-bounces+larch=yhetil.org@gnu.org"; dmarc=pass (policy=none) header.from=gnu.org X-Migadu-Scanner: scn1.migadu.com X-TUID: J35/8ooZBtIh From: Maya Tomasek --- gnu/local.mk | 1 + gnu/packages/zig-xyz.scm | 68 ++++++++++++++++++++++++++++++++++++++++ 2 files changed, 69 insertions(+) create mode 100644 gnu/packages/zig-xyz.scm diff --git a/gnu/local.mk b/gnu/local.mk index 9120d7a263..ad47fcd216 100644 --- a/gnu/local.mk +++ b/gnu/local.mk @@ -641,6 +641,7 @@ GNU_SYSTEM_MODULES = \ %D%/packages/xorg.scm \ %D%/packages/xfce.scm \ %D%/packages/zig.scm \ + %D%/packages/zig-xyz.scm \ %D%/packages/zile.scm \ %D%/packages/zwave.scm \ \ diff --git a/gnu/packages/zig-xyz.scm b/gnu/packages/zig-xyz.scm new file mode 100644 index 0000000000..131d200ec7 --- /dev/null +++ b/gnu/packages/zig-xyz.scm @@ -0,0 +1,68 @@ +;;; 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 implementing the Language Server Protocol (LSP) for the @code{zig} programming language.") + (home-page "https://github.com/zigtools/zls") + (license license:expat))) -- 2.38.1