From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from mp0.migadu.com ([2001:41d0:303:e224::]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits)) by ms8.migadu.com with LMTPS id GDX4Hh1b2mX8SgAAqHPOHw:P1 (envelope-from ) for ; Sat, 24 Feb 2024 22:09:49 +0100 Received: from aspmx1.migadu.com ([2001:41d0:303:e224::]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits)) by mp0.migadu.com with LMTPS id GDX4Hh1b2mX8SgAAqHPOHw (envelope-from ) for ; Sat, 24 Feb 2024 22:09:49 +0100 X-Envelope-To: larch@yhetil.org Authentication-Results: aspmx1.migadu.com; 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=none ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=yhetil.org; s=key1; t=1708808988; 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: content-transfer-encoding:content-transfer-encoding:list-id:list-help: list-unsubscribe:list-subscribe:list-post:dkim-signature; bh=JwR950kdR9RE96/36ILGCNoVt98Y6sP8kVsp8grck5Q=; b=fBHT3A3RJ4J0PHOJf4nlqyWo02pxiY7UEEy1dbeD/Gm+LoaVt7KAtKQ56rjdA+UIoKB4u2 crEGm3dbsjZOSe+wB1GcmZxrJ3WK5zPyUUGkZwkhUU3ws7fIB0+CLbHUEvog9zbOxstPNE drfxJniAuV41FryDZLQDM1BRnPWjKcN5hHRTnBQzyHIWJRvAX1NOP+5Dw0gKkXuI6oC8pY kjhRFYPfQ3DpfCSvWlPOS1REKFA4e/bI2Lv8RPMgU1zhhevPsE1yMis54ya5Q81tmmt0Qm gQk0LKr8Ic5/yKxVCaGQAzPPvyrZQnN9SztCOPTEvP4P8jYn7F1YyX4/EseAfw== ARC-Authentication-Results: i=1; aspmx1.migadu.com; 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=none ARC-Seal: i=1; s=key1; d=yhetil.org; t=1708808988; a=rsa-sha256; cv=none; b=Rq7uYlKu2wrVpXQW2dsqx7F0Pvkj25uhactb4HY6WTFSTh0aVTAwsLyZsU23lwieMGnvOM PUDEQGUV5ErUYCiljevEB2vxKtGsDSxnR6aecEgp3LYNxU3oMCBzQaU+sasi7C+KOYsfaL ckXcehP3nvZYRNGH1PY7c5vzmqEKQZGpg8fb87CTgSjS6bGFCI4bKhHK8xyVqUMRXwJOdq 0wEE9dIrAVR5oT9eZh5i9OYMaHN+PfsI8QR2SR9wnxE/ZU2SI3HDa8K1UJV72iY9/scsuc 3MuLhi0VVkrpHsT1EICUiFFRbxCuEuKASJfZyWJ2FjR2BAz9ebl7Z5A3mUq4Iw== 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 79E9719EA4 for ; Sat, 24 Feb 2024 22:09:48 +0100 (CET) Received: from localhost ([::1] helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1rdzGo-0005Yo-5H; Sat, 24 Feb 2024 16:09:18 -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 1rcW7x-0006YV-Cs for help-guix@gnu.org; Tue, 20 Feb 2024 14:50:06 -0500 Received: from fhigh2-smtp.messagingengine.com ([103.168.172.153]) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1rcW7v-0002Vb-27 for help-guix@gnu.org; Tue, 20 Feb 2024 14:50:05 -0500 Received: from compute2.internal (compute2.nyi.internal [10.202.2.46]) by mailfhigh.nyi.internal (Postfix) with ESMTP id 4D39511400B7; Tue, 20 Feb 2024 14:50:00 -0500 (EST) Received: from mailfrontend1 ([10.202.2.162]) by compute2.internal (MEProxy); Tue, 20 Feb 2024 14:50:00 -0500 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=mccd.space; h=cc :cc:content-transfer-encoding:content-type:content-type:date :date:from:from:in-reply-to:message-id:mime-version:reply-to :subject:subject:to:to; s=fm3; t=1708458600; x=1708545000; bh=Jw R950kdR9RE96/36ILGCNoVt98Y6sP8kVsp8grck5Q=; b=hqlisfSwFwWkX1p0kv rffrwBXsxMgdy2g5FBzvDdGYM2vk03huFdC9kS4zUzcD7L9qTM6KMbe6KGPp3Q8w 0RIiAe31OYvr9Dpc0UqJ5w0y26eGfYdyq6cnMAIAK/kDUCguk5OoWNUGQSu8Lz7o YhQEiaptzHhKnb/9BgU3EfZfjzyYCu6jBFnaMP6uoLbDt94AXRgHBxj6hPc5/042 jf3BCqh3qwez6YAK8mQHCb73+HPT30gbXP0x1tSzpZ7DywrhYnSgErPk82hy4iuZ wPEg0JlX3aJ89WiPbuX9EQxI86616TgWOmticunptOfTvv2mh5mZxPEzt95ojuVh F4Aw== DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d= messagingengine.com; h=cc:cc:content-transfer-encoding :content-type:content-type:date:date:feedback-id:feedback-id :from:from:in-reply-to:message-id:mime-version:reply-to:subject :subject:to:to:x-me-proxy:x-me-proxy:x-me-sender:x-me-sender :x-sasl-enc; s=fm1; t=1708458600; x=1708545000; bh=JwR950kdR9RE9 6/36ILGCNoVt98Y6sP8kVsp8grck5Q=; b=VVPiR63Wboc6GdBH1Dn7f05SN7RR4 lSqZhV0pT2/TvNVj4fUBR1DNtrIvdTzldPihEnnudPMkj7guuHTWosUXi1CQGC17 guws5IKlCFEIZpxC8mLf0I/b3eOlfVwseoUUwCyaOEAV81e4RR4DSnekAbeMnU6h ifgUioUi5gSTt+KjXu7pxF4cZjovD9I2r+21zpMCUBY613q6vuSj5abcn8wlBnKy ZZHBveHWpvDYoHtKb9B9r413PaSkYNv6Cw4uuQKbvjxvHows4WB9AZn5suB7mi69 RKOZOR1y9L5OvOVC7i0VxbX4yHkIrncD5PQItWFZX8IqheW1KYvP1ThVQ== X-ME-Sender: X-ME-Received: X-ME-Proxy-Cause: gggruggvucftvghtrhhoucdtuddrgedvledrfedtgddufeduucetufdoteggodetrfdotf fvucfrrhhofhhilhgvmecuhfgrshhtofgrihhlpdfqfgfvpdfurfetoffkrfgpnffqhgen uceurghilhhouhhtmecufedttdenucenucfjughrpefhvfevufffkffogggtgfesthekre dtredtjeenucfhrhhomhepofgrrhgtucevohhquhgrnhguuceomhgrrhgtsehmtggtugdr shhprggtvgeqnecuggftrfgrthhtvghrnheptdeiieeiuefgffeivedugeefffevveehfe elveelteekgefhheevteetleffuedvnecuffhomhgrihhnpehgnhhurdhorhhgpdhgihht hhhusgdrtghomhenucevlhhushhtvghrufhiiigvpedtnecurfgrrhgrmhepmhgrihhlfh hrohhmpehmrghrtgesmhgttggurdhsphgrtggv X-ME-Proxy: Feedback-ID: ia2d149fd:Fastmail Received: by mail.messagingengine.com (Postfix) with ESMTPA; Tue, 20 Feb 2024 14:49:59 -0500 (EST) From: Marc Coquand To: help-guix@gnu.org Cc: Marc Coquand Subject: Changing the prefix for this libpg_query package Date: Tue, 20 Feb 2024 13:46:24 -0600 Message-ID: X-Mailer: git-send-email 2.43.2 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Received-SPF: pass client-ip=103.168.172.153; envelope-from=marc@mccd.space; helo=fhigh2-smtp.messagingengine.com X-Spam_score_int: -27 X-Spam_score: -2.8 X-Spam_bar: -- X-Spam_report: (-2.8 / 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, RCVD_IN_DNSWL_LOW=-0.7, SPF_HELO_NONE=0.001, SPF_PASS=-0.001, T_SCC_BODY_TEXT_LINE=-0.01 autolearn=ham autolearn_force=no X-Spam_action: no action X-Mailman-Approved-At: Sat, 24 Feb 2024 16:09:14 -0500 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-Scanner: mx12.migadu.com X-Migadu-Spam-Score: -3.87 X-Spam-Score: -3.87 X-Migadu-Queue-Id: 79E9719EA4 X-TUID: Tfc7n0Gwjpg0 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 makefile: prefix = /usr/local libdir = $(prefix)/lib includedir = $(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 © 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=" (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")))))) + (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 server environment") + (description + "C library for accessing the PostgreSQL parser outside of the server. This library uses the actual PostgreSQL server source to parse SQL queries and return the internal PostgreSQL parse tree.") + (license license:bsd-3))) base-commit: fdbf4192f5eaa7fdb5e6e2e98ada0726c8104824 -- 2.43.2