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 qD5uAOI3QWAIDgAA0tVLHw (envelope-from ) for ; Thu, 04 Mar 2021 19:41:22 +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 SPfnN+E3QWBsLAAA1q6Kng (envelope-from ) for ; Thu, 04 Mar 2021 19:41:21 +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 7E37C20BE3 for ; Thu, 4 Mar 2021 20:41:21 +0100 (CET) Received: from localhost ([::1]:43436 helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1lHtqa-0001jD-H0 for larch@yhetil.org; Thu, 04 Mar 2021 14:41:20 -0500 Received: from eggs.gnu.org ([2001:470:142:3::10]:58476) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1lHWHp-0002oO-J3 for guix-devel@gnu.org; Wed, 03 Mar 2021 13:31:53 -0500 Received: from mail-il1-x132.google.com ([2607:f8b0:4864:20::132]:35907) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.90_1) (envelope-from ) id 1lHWHn-0003Qe-Md for guix-devel@gnu.org; Wed, 03 Mar 2021 13:31:53 -0500 Received: by mail-il1-x132.google.com with SMTP id g9so22341115ilc.3 for ; Wed, 03 Mar 2021 10:31:50 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20161025; h=mime-version:from:date:message-id:subject:to :content-transfer-encoding; bh=+1C/ZUujVlu/1vlnR07JalcSEoE5dJ/n9lV7b3i6Fc0=; b=LBWAH29kjtt3P5Jx3sg1m15Pob3lJGBwcd1IJ4Fm2R9ay1bCMitW6MLLZjttS+klrY WGKlNE/kPf1gHIIgTkSe9tfGd8SEowpU6kijPUixr7SxNS1aCE7B6AGghzsaRFwdlAUY WzNDuYZW/cEE0blOgMN2Fkn0viDGJpXjz9u5d+tb0tvK117eIiba/51bP/IQ72XzqnSN hk0L4UZZ21MEkKBJ65NigTSM9NZmWLf+YfsORX7uGDw4zzbXXOe2RhKFsakk5vbacPR7 0hwo331GCFohdqU7n5dEzUKESzmxTixCnGDEnxwChRpISUYNS8F+kXHnZrIQ6kOFsE6Y MvJA== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:mime-version:from:date:message-id:subject:to :content-transfer-encoding; bh=+1C/ZUujVlu/1vlnR07JalcSEoE5dJ/n9lV7b3i6Fc0=; b=jT4UkhXYM69+y+lo8MQZCRJJ74TOe/vaDB09idfdwW5ma21r/WU88Zkw4zi3udYSjv pHZ3MmSBmA50FiY8v8cjHQDqkDZX42v87uWKEJs8WFvDOtuNG3pS7OHosjdR32wfNAvI FPj2/TxhP/4DQsSJJr1wKEACfG2opPld72Y/i6kCJQlg9G3ImDXUcg8ewZFb0/vQ3g3J RjuHoqq662MIqBeBajKTBqyYz7gqy2JXnjicbV9JFnT3kSInla44nk+XjMPFJiS4lz05 h9kiyfYdWv0HlKVHzCg20YaZhnp5YVAKRxr0KXEep2JwVyb3zb6ptFM33SUAUDkYELpI e5XQ== X-Gm-Message-State: AOAM531mOLG16ZWZMDn00Y3TUyoV5pvJpe6TXCTz1q6iIYCCMDrz+pen JealgokwyYmTbtrK2uKAsUZUvg0VfzN/3r0glOUCN75w3Sc= X-Google-Smtp-Source: ABdhPJyaQVoZbY8gafnxNeeZeg7J6weiOsSNooQPeEQ5PwL0EjXz3/fOaWUmj6XSUjoTVtiYctxn9/kIWdLjTGQg3Tw= X-Received: by 2002:a92:de4c:: with SMTP id e12mr559677ilr.63.1614796309665; Wed, 03 Mar 2021 10:31:49 -0800 (PST) MIME-Version: 1.0 From: =?UTF-8?Q?Vin=C3=ADcius_dos_Santos_Oliveira?= Date: Wed, 3 Mar 2021 15:31:32 -0300 Message-ID: Subject: What features does a language/runtime need to use guix as a package manager? To: guix-devel@gnu.org Content-Type: text/plain; charset="UTF-8" Content-Transfer-Encoding: quoted-printable Received-SPF: pass client-ip=2607:f8b0:4864:20::132; envelope-from=vini.ipsmaker@gmail.com; helo=mail-il1-x132.google.com 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, FREEMAIL_FROM=0.001, RCVD_IN_DNSWL_NONE=-0.0001, SPF_HELO_NONE=0.001, SPF_PASS=-0.001 autolearn=ham autolearn_force=no X-Spam_action: no action X-Mailman-Approved-At: Thu, 04 Mar 2021 14:40:54 -0500 X-BeenThere: guix-devel@gnu.org X-Mailman-Version: 2.1.23 Precedence: list List-Id: "Development of GNU Guix and the GNU System distribution." List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: guix-devel-bounces+larch=yhetil.org@gnu.org Sender: "Guix-devel" X-Migadu-Flow: FLOW_IN ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=yhetil.org; s=key1; t=1614886881; h=from:from:sender:sender:reply-to:subject:subject:date:date: message-id:message-id:to:to: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=+1C/ZUujVlu/1vlnR07JalcSEoE5dJ/n9lV7b3i6Fc0=; b=mRB/MyO7/64SDQUgfZNrsu7Gb83AGtkNmhHBJx7dG/7R9NzGmnoprtOZReeF/e52+9mHkt kN3CGxTYm6SGhQTUiybsy4ZX16wXW0sdNYtQ6lP6vIibtbaRUILGE0LLto48TH6fXbep3t iT6pVPcsAfewldhPncphRZ1Tvb/AluAKhuhgdrt3PFp5o+H19D7/wlQjpUkJh97HIjoZEF OfO7UoYQEkdhgWK80B8WecB6G8/o4o5rPbuHMzFs09GLKRbLcn9NEYjONh2xh12voI5h8B f7S3i/5OP9p1ING+FF1leXbcye9KK4UubMX3DJZqfRtnoI/oKEt2X/Q8CHstzg== ARC-Seal: i=1; s=key1; d=yhetil.org; t=1614886881; a=rsa-sha256; cv=none; b=Iy+jT2OSNm+mKzBsghGfaX3qlyMLq99elg4IEq6iNC8V5QBx99PPxHNP4sFIynfcEIG9S5 XRafeUBFodAUvOV5hbR2rxlIXdunS+vHA7hqqECQC2PUZg5qxU/vwXKOLk6ysMyaGl4vI1 U/J+6eYdDJ4KtPrVYQIGqiBtUJ9HkPAZE0cAwlgZy/qmK5630ly9dpGWaD40PKhrJEvnFa VwWUNT8NRy6uaP64OJrXZKa0S7L71eG35LaZfY5zm7WLscVL2A7oI7t4geDedOQidP+mYd kNwxkmp9pi5WeRvi6hUobY8WaL+kR/soTObyo51cmSQvkim9XTDxBhlIILorcQ== ARC-Authentication-Results: i=1; aspmx1.migadu.com; dkim=pass header.d=gmail.com header.s=20161025 header.b=LBWAH29k; dmarc=pass (policy=none) header.from=gmail.com; spf=pass (aspmx1.migadu.com: domain of guix-devel-bounces@gnu.org designates 209.51.188.17 as permitted sender) smtp.mailfrom=guix-devel-bounces@gnu.org X-Migadu-Spam-Score: -1.06 Authentication-Results: aspmx1.migadu.com; dkim=pass header.d=gmail.com header.s=20161025 header.b=LBWAH29k; dmarc=pass (policy=none) header.from=gmail.com; spf=pass (aspmx1.migadu.com: domain of guix-devel-bounces@gnu.org designates 209.51.188.17 as permitted sender) smtp.mailfrom=guix-devel-bounces@gnu.org X-Migadu-Queue-Id: 7E37C20BE3 X-Spam-Score: -1.06 X-Migadu-Scanner: scn1.migadu.com X-TUID: CkBMSvg/BWiq Hi, I was curious about how a language/runtime module system needs to be designed to use guix as a package manager. I'm developing my own require() function for a Lua host and I'd like to make sure it can use guix as a package manager. >From a tutorial by Andrew Tropin[1] I learned about native-search-paths. So I changed my module system to use a *_PATH environment variable so guix could teach the Lua-based runtime where to find the modules. Then there is the next question: how does the module know where to install itself to? A similar problem is found in GStreamer, so I'll refer to the GStreamer scenario from now on. The guix GStreamer package defines native-search-paths to GST_PLUGIN_SYSTEM_PATH=3Dlib/gstreamer-1.0. As far as I tested, if a package gstreamer-foobar depends on gstreamer and install files to ${prefix}/lib/gstreamer-1.0, then GST_PLUGIN_SYSTEM_PATH will be automatically updated to also contain gstreamer-foobar's /gnu/store/*/lib/gstreamer-1.0. My question here is: how should the software packaged in gstreamer-foobar find out the proper directory to install its plugins? Should it be ${prefix}/lib/gstreamer-1.0? Should it be ${prefix}/lib/gstreamer-1.1? That's something that shouldn't be hardcoded. As far as I see, it can just use the pluginsdir from GStreamer's pkg-config definition. Like so: $ pkg-config --variable=3Dpluginsdir gstreamer-1.0 However this command will print the wrong dir in guix. It'll print something like: /gnu/store/9if71w58d5mkxfxyc7fpz289qssnkqsv-gstreamer-1.18.2/lib/gstreamer-= 1.0 But that's the "namespace" for the gstreamer package, not for the gstreamer-foobar package. A solution would be to invoke pkg-config as follows: $ pkg-config --define-variable=3D"prefix=3D${prefix}" --variable=3Dpluginsdir gstreamer-1.0 This will actually print the proper ${prefix}/lib/gstreamer-1.0. But that's my question here. How should pkg-config be invoked properly? I could just as well invoke it as: $ pkg-config --define-variable=3D"prefix=3D${prefix}" --define-variable=3Dlibdir=3D'${prefix}/lib' --variable=3Dpluginsdir gstreamer-1.0 [1] https://youtu.be/R8DtPnP4eL8 --=20 Vin=C3=ADcius dos Santos Oliveira https://vinipsmaker.github.io/