From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from mp0.migadu.com ([2001:41d0:403:58f0::]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits)) by ms8.migadu.com with LMTPS id cE+RCRJJ22VTGwEAqHPOHw:P1 (envelope-from ) for ; Sun, 25 Feb 2024 15:05:06 +0100 Received: from aspmx1.migadu.com ([2001:41d0:403:58f0::]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits)) by mp0.migadu.com with LMTPS id cE+RCRJJ22VTGwEAqHPOHw (envelope-from ) for ; Sun, 25 Feb 2024 15:05:06 +0100 X-Envelope-To: larch@yhetil.org Authentication-Results: aspmx1.migadu.com; dkim=pass header.d=wolfsden.cz header.s=mail header.b=pUtcAQ6q; dkim=pass header.d=wolfsden.cz header.s=mail header.b=pUtcAQ6q; spf=pass (aspmx1.migadu.com: domain of "help-guix-bounces+larch=yhetil.org@gnu.org" designates 209.51.188.17 as permitted sender) smtp.mailfrom="help-guix-bounces+larch=yhetil.org@gnu.org"; dmarc=pass (policy=none) header.from=wolfsden.cz ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=yhetil.org; s=key1; t=1708869906; h=from:from:sender:sender:reply-to:subject:subject:date:date: message-id:message-id:to:to:cc:cc:mime-version:mime-version: content-type:content-type:in-reply-to:in-reply-to: references:references:list-id:list-help:list-unsubscribe: list-subscribe:list-post:dkim-signature; bh=aZnFpbwnWjbMX8thzNh4Q2RuCTCx/mMv6QXvcWFWSh0=; b=msPe4gRvs7fHm7dj7VQ9HG+EiQgpjAw+rHEjmcnMw3SwVJCjSmjuV+/ffXW8gSMTFIbKDJ sQ+InLeoKW/W7YXOxZkWyUN/X029tFdQItuhuJF0qpfJSz1MmxxDiM4MKFhqc/7ZyVwMbB ttpc3Dv0hzzWSMEjKYwRMTYFIKTju+pH2kcsbNPkDKrjjri3YragyT4BJkH8igWJhhTw7Q BlOs+2t/uacugBPVxMz4kQ57u4WN9LWECLoJ67ENSpNV0mOdAHbE+Mje+sfB9TvpVri4a3 FPj8pZvVLf6oovuUTxiTM+mhFP53TY0aES14k/49yq1zuBgjer3q3FCAjXjqgA== ARC-Authentication-Results: i=1; aspmx1.migadu.com; dkim=pass header.d=wolfsden.cz header.s=mail header.b=pUtcAQ6q; dkim=pass header.d=wolfsden.cz header.s=mail header.b=pUtcAQ6q; spf=pass (aspmx1.migadu.com: domain of "help-guix-bounces+larch=yhetil.org@gnu.org" designates 209.51.188.17 as permitted sender) smtp.mailfrom="help-guix-bounces+larch=yhetil.org@gnu.org"; dmarc=pass (policy=none) header.from=wolfsden.cz ARC-Seal: i=1; s=key1; d=yhetil.org; t=1708869906; a=rsa-sha256; cv=none; b=XqfkJXwIIxkUXd4M5a4AKbITPCs0x1+TlFFc9sHe9vAOxbB09Bk/FkDrK3+lTJaht1plDm pJ+vU6f2rL7Xo3d4O0JeVMf6A7CIqkOgaMhp7VvjI7u62Hqr3T/+y0lyp55+SytYD8btQm XfA0zWJy1nckhi+gtTlB3WH9Qmys6LC6FsNl0kO4ptrmDKZaUumXon91CsFqfp+owpsY7l uBnYWgjsWueAzPc0qEAZ8u2Cc/jdGK7aeGTSmCQKiXuL1KIh/vINsjqyph/WooYF3pqgWP Hw9qO8eEpaoR5h+15cNR7SYauWQPUXveDiYmd5fVjWoRlf90rkNw74BCu8S58w== 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 DDDD3471C9 for ; Sun, 25 Feb 2024 15:05:05 +0100 (CET) Received: from localhost ([::1] helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1reF7E-00053x-Dh; Sun, 25 Feb 2024 09:04:28 -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 <~@wolfsden.cz>) id 1reF7D-00053n-Cc for help-guix@gnu.org; Sun, 25 Feb 2024 09:04:27 -0500 Received: from wolfsden.cz ([37.205.8.62]) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from <~@wolfsden.cz>) id 1reF7A-0001X0-QO for help-guix@gnu.org; Sun, 25 Feb 2024 09:04:27 -0500 Received: by wolfsden.cz (Postfix, from userid 104) id DB5CB27114E; Sun, 25 Feb 2024 14:04:21 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=wolfsden.cz; s=mail; t=1708869861; bh=MLxpkQmnDCtC8Lbi3uQPfL9VxeBWPha+uN0S9vnf2KU=; h=Date:From:To:Cc:Subject:References:In-Reply-To; b=pUtcAQ6qojCeo6t2+gAvbDCMy8vfcIqSLAmNcSHGUyzN2nfX7pjDgEf6MJmNhNhT0 OLoUYuFIoQMlyoGKl/DucDUtfsimAQMEq95A76p2NgMYUfBnS8iLBVqE2oj9AA5pRa SfoeQ/myd9gHhsd2kAXYuhL2KQenNo8+fMWiYbNIXDr17s530sn0faOyCztjCigN3C XcskQo7SxIzI9uOroHJAwCntBDkiA9Mly2Z+KVYNhoM3iRW/LyeHRkZqzLiVySkzhS 2EAsz7hMoNoxLTWQm5mhyjo2+zHjNp8E9Jho67c+cq0WkrTBDnGPFxMlOZiM1+zSCc fxmtUF5laIdd5z+DqS3RmMBj84EH31bOh0GW3ao8pP4Sfp7sNakK9LmVUokk97667z 7hdf4gHdo4vvMQLwLWqN01IR4qMI1hOqsBBZwUm5LlmdydP7QvHRj50cO9YENlQXSv f1XeiT1/F9MZO6EydB5SXzwaqMsJppePdsKvZIGBk+n1oEAf8W5nMPSn6C4a+P8mK3 c4Z5hCnTp81xn5OEOm6J4BqBHo9U+YbDRLblX5lNBE+z2ymNJDijgiiEspZZzGwKVH j+k99g7YzYUNVMtIdYenmJltsn7CMs4ubX95/jKnY92H3mw/90rPmA5RWKIJAfnDyi 0kVdehAfMfljWK6iv9/BSjz8= Received: from localhost (unknown [193.32.127.144]) by wolfsden.cz (Postfix) with ESMTPSA id 02B98272410; Sun, 25 Feb 2024 14:04:20 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=wolfsden.cz; s=mail; t=1708869861; bh=MLxpkQmnDCtC8Lbi3uQPfL9VxeBWPha+uN0S9vnf2KU=; h=Date:From:To:Cc:Subject:References:In-Reply-To; b=pUtcAQ6qojCeo6t2+gAvbDCMy8vfcIqSLAmNcSHGUyzN2nfX7pjDgEf6MJmNhNhT0 OLoUYuFIoQMlyoGKl/DucDUtfsimAQMEq95A76p2NgMYUfBnS8iLBVqE2oj9AA5pRa SfoeQ/myd9gHhsd2kAXYuhL2KQenNo8+fMWiYbNIXDr17s530sn0faOyCztjCigN3C XcskQo7SxIzI9uOroHJAwCntBDkiA9Mly2Z+KVYNhoM3iRW/LyeHRkZqzLiVySkzhS 2EAsz7hMoNoxLTWQm5mhyjo2+zHjNp8E9Jho67c+cq0WkrTBDnGPFxMlOZiM1+zSCc fxmtUF5laIdd5z+DqS3RmMBj84EH31bOh0GW3ao8pP4Sfp7sNakK9LmVUokk97667z 7hdf4gHdo4vvMQLwLWqN01IR4qMI1hOqsBBZwUm5LlmdydP7QvHRj50cO9YENlQXSv f1XeiT1/F9MZO6EydB5SXzwaqMsJppePdsKvZIGBk+n1oEAf8W5nMPSn6C4a+P8mK3 c4Z5hCnTp81xn5OEOm6J4BqBHo9U+YbDRLblX5lNBE+z2ymNJDijgiiEspZZzGwKVH j+k99g7YzYUNVMtIdYenmJltsn7CMs4ubX95/jKnY92H3mw/90rPmA5RWKIJAfnDyi 0kVdehAfMfljWK6iv9/BSjz8= Date: Sun, 25 Feb 2024 15:04:20 +0100 From: Tomas Volf <~@wolfsden.cz> To: Marc Coquand Cc: help-guix@gnu.org Subject: Re: Changing the prefix for this libpg_query package Message-ID: Mail-Followup-To: Marc Coquand , help-guix@gnu.org References: MIME-Version: 1.0 Content-Type: multipart/signed; micalg=pgp-sha512; protocol="application/pgp-signature"; boundary="xpxSz5EKQZbuYp4u" Content-Disposition: inline In-Reply-To: Received-SPF: pass client-ip=37.205.8.62; envelope-from=~@wolfsden.cz; helo=wolfsden.cz 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_PASS=-0.001, SPF_PASS=-0.001, T_SCC_BODY_TEXT_LINE=-0.01 autolearn=ham autolearn_force=no X-Spam_action: no action X-BeenThere: help-guix@gnu.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: help-guix-bounces+larch=yhetil.org@gnu.org Sender: help-guix-bounces+larch=yhetil.org@gnu.org X-Migadu-Country: US X-Migadu-Flow: FLOW_IN X-Migadu-Spam-Score: -11.45 X-Spam-Score: -11.45 X-Migadu-Queue-Id: DDDD3471C9 X-Migadu-Scanner: mx11.migadu.com X-TUID: /nT4fgdRAqLq --xpxSz5EKQZbuYp4u Content-Type: text/plain; charset=iso-8859-1 Content-Disposition: inline Content-Transfer-Encoding: quoted-printable On 2024-02-20 13:46:24 -0600, Marc Coquand wrote: > Hey everyone! > > I am new to Guix, guile, make and trying to create a package. > > I have a functioning patch, attached, but it is not writing to the correct > location. > > Currently, it is writing to out/usr/local/, which makes sense, because I = can > see in the makefile for libpg_query the following on line 311 of its make= file: > > prefix =3D /usr/local > libdir =3D $(prefix)/lib > includedir =3D $(prefix)/include > > I know I need to change the prefix to be the guix out directory, but I > am not sure how I can substitute these lines. As you can see in the patch > I attached, I tried to set it as a build flag. However, this did not work. > > Any helpers on how to resolve this? :) > > Sincerely, > Marc > > --- > gnu/packages/libpg_query.scm | 63 ++++++++++++++++++++++++++++++++++++ > 1 file changed, 63 insertions(+) > create mode 100644 gnu/packages/libpg_query.scm > > diff --git a/gnu/packages/libpg_query.scm b/gnu/packages/libpg_query.scm > new file mode 100644 > index 0000000000..353762554b > --- /dev/null > +++ b/gnu/packages/libpg_query.scm > @@ -0,0 +1,63 @@ > +;;; GNU Guix --- Functional package management for GNU > +;;; Copyright =A9 2024 Marc Coquand > +;;; > +;;; 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 libpg_query) > + #:use-module (gnu packages) > + #:use-module (gnu packages base) > + #:use-module (gnu packages commencement) > + #:use-module (guix packages) > + #:use-module (guix utils) > + #:use-module (guix download) > + #:use-module (guix build-system gnu) > + #:use-module ((guix licenses) #:prefix license:) > + ) > + > +(define-public libpg-query > + (package > + (name "libpg-query") > + (version "16-5.1.0") > + (source > + (origin > + (method url-fetch) > + (uri (string-append > + "https://github.com/pganalyze/libpg_query/archive/refs/tags= /" > + version ".tar.gz")) > + (sha256 > + (base32 "1xvdcnqxrvb90kcndxmspnm07p8clnq160rbfsy6djd17mbmpwii"))= )) > + (build-system gnu-build-system) > + (arguments > + `(#:make-flags (list "build" (string-append "prefix=3D" (assoc-ref = %outputs "out"))) > + > + #:phases (modify-phases %standard-phases > + (delete 'configure) > + (delete 'check) > + (add-before 'build 'set-additional-paths > + (lambda* (#:key inputs #:allow-other-keys) > + (setenv "CC" "gcc"))) > + (replace 'install > + (lambda* (#:key outputs #:allow-other-keys) > + (setenv "DESTDIR" > + (string-append (assoc-ref %outputs "out") = "/")) > + (invoke "make" "install")))))) So, I am just guessing here, but maybe you need to use the prefix=3D... als= o in here? Since you are directly invoking make install, I would expect the #:make-flags to not be in effect here. The 'install phase in gnu-build-sys= tem you are replacing looks like this: (define* (install #:key (make-flags '()) #:allow-other-keys) (apply invoke "make" "install" make-flags)) > + (inputs (list tar which gcc-toolchain)) > + (home-page "https://github.com/pganalyze/libpg_query") > + (synopsis > + "C library for accessing the PostgreSQL parser outside of the serve= r environment") > + (description > + "C library for accessing the PostgreSQL parser outside of the serve= r. This library uses the actual PostgreSQL server source to parse SQL quer= ies and return the internal PostgreSQL parse tree.") > + (license license:bsd-3))) > > base-commit: fdbf4192f5eaa7fdb5e6e2e98ada0726c8104824 > -- > 2.43.2 > > Have a nice day, Tomas Volf -- There are only two hard things in Computer Science: cache invalidation, naming things and off-by-one errors. --xpxSz5EKQZbuYp4u Content-Type: application/pgp-signature; name="signature.asc" -----BEGIN PGP SIGNATURE----- iQIzBAEBCgAdFiEEt4NJs4wUfTYpiGikL7/ufbZ/wakFAmXbSOQACgkQL7/ufbZ/ walumQ/+Pf5vumeEDhC+hevi/rVf2G4iJFUpDBT+G+ZWrge2mpCiLwmFPVjNKjFE krcDFohfz1pMcOMXiP5iXfWO0CNB2EFEN5NifTrJx8GSyGs5dZO242GXh8OGltts q1tywvemQpbAm9eTyaJtQX5bJUpQydPJx99GuStlHICheZPKcbFel44fQbYsdbKF 6wnnPTKoQK9Lxf7Nz8aq4XutOj8xikNZA7ALTUZ9eipcMhDWO9UmkePiT6ZlUfck 0IOGvxpScCiEoAfC7KsfZYiWUamdOSFtzBzCoT4H7KMXyv8ZNbH/bFYcNyn/Bl09 MfWyBYhkMxSX8l6I3RvE0OfXfTBSB768POE8GfNCGbUI7gOGSoQ4sQga/1W6XyMt NAD8G30C+C5a2UvBe2bGsARxTa+HGylxP28WsXX9340qTEtPvIAIz+7T6o8IaxGC nF7udG3IfllMDK5ZKb3xuBHS1W7cB9KwDkwArSI/3Qjk9r1SWEW5Lg8Imk0ZkBNH d3kl8Z9772lIx0HUepY0FDeLPS45217oPhEns1/RqNcMW2wmSbl18f2dMTnHSjiE 8f/9wEJTDvSdPRs96Y+Lpjv7c/TJzXqOVxqP6DRj4246ipI3iO+oZdDFEc/0O+9/ cuAqg14sczhF5fjqlUs97AYXX1PHZ0pi0ajd2oQaWDeE23eyCl8= =C4j5 -----END PGP SIGNATURE----- --xpxSz5EKQZbuYp4u--