From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from mp0 ([2001:41d0:2:bcc0::]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits)) by ms0.migadu.com with LMTPS id WM2OFMnZG2HMvwAAgWs5BA (envelope-from ) for ; Tue, 17 Aug 2021 17:46:17 +0200 Received: from aspmx1.migadu.com ([2001:41d0:2:bcc0::]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits)) by mp0 with LMTPS id gFpCEMnZG2E6ZwAA1q6Kng (envelope-from ) for ; Tue, 17 Aug 2021 15:46:17 +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 848256AF4 for ; Tue, 17 Aug 2021 17:46:16 +0200 (CEST) Received: from localhost ([::1]:45864 helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1mG1I7-0000uM-IY for larch@yhetil.org; Tue, 17 Aug 2021 11:46:15 -0400 Received: from eggs.gnu.org ([2001:470:142:3::10]:43694) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1mG1Hv-0000tz-Rm for help-guix@gnu.org; Tue, 17 Aug 2021 11:46:04 -0400 Received: from mail-wm1-x333.google.com ([2a00:1450:4864:20::333]:37500) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.90_1) (envelope-from ) id 1mG1Hs-0004jl-R9 for help-guix@gnu.org; Tue, 17 Aug 2021 11:46:03 -0400 Received: by mail-wm1-x333.google.com with SMTP id c8-20020a7bc008000000b002e6e462e95fso2256406wmb.2 for ; Tue, 17 Aug 2021 08:45:59 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=beadling-co-uk.20150623.gappssmtp.com; s=20150623; h=references:user-agent:from:to:cc:subject:in-reply-to:message-id :date:mime-version; bh=QmYjFzZkSIWdIWT1ty8PXTT/7AVB7x6/koRxOdY6oO0=; b=xI172S0BFhmh2JZJ1bEehHRuxLs3/PLY8efAoxnJeLKquwzfnkETdGdO0hwdStRI1S fBRbP8Y0vUWHdbj09ngODkYfgsrhGjU0NsZYzkssbUdVLFoaqvmPmyO9OJ6T88O3EkXQ deJbl/P5aw6bYOpeSSLO/dNBLIwwI+xRry5j0S6dSMSf6hO1aGpKYT56BE5PCixU+bse 1Ysd09Rbr80yUA1PpwxzW7BztY5zDKExYf+qmOWonNIY7Zt5XwNbhwrBt6ng5KGG5xzB S4ocSaA0Jvg8Cn9Gp4sP2mXbglvZqsrnyKyoKnNugNRQBJEZBSW6l3ZHg8RWLXsBDA3B y+lA== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:references:user-agent:from:to:cc:subject :in-reply-to:message-id:date:mime-version; bh=QmYjFzZkSIWdIWT1ty8PXTT/7AVB7x6/koRxOdY6oO0=; b=PpuBEGBTk5abpczSlCKDbIuf1WO064jSKSzXWq6d6S4bkrdeFlZyh9sfGJksgMi6GV FtDRKxl6VYmZbi8BZjsMxG3M4U9I5HwBoq7ooVhhnlJO40qvfLhcxGbYeWYpc+1isIgd vzEioF5mp4UteQ50Ccf7NwLgRZpU7SIjYztOHv41aUuJegv2Gz0uu74F12MGMv/HkF9q bjn/wWRW3kaHkPfPOAuj/FyYC5mVrsaPQ/m1/c8X0KB3IkaK960FKsf2N4gi46tsBzY8 KEtvFD6j4zGAW3OGfyvxMpqJrK0jRkIK2Ziu47u/6xwJDYXX9b2AKrZ6nkrjPVpQHBhW xAjA== X-Gm-Message-State: AOAM531Y6mtarKOk+v33k2lSgqgoTKcpdvgWnCZ6h2PlOy8CGGL4+3mF yqtiAT2c39Su95H/1OHTgGYfdErzKZoYB8e3tDE= X-Google-Smtp-Source: ABdhPJyZO0eSggOg0nM4EokBqlrOgF3MXe9iBIopDzYjgXTPoO7X6nqW5uFqHcbeSinOZ45r9KG5sA== X-Received: by 2002:a1c:46c2:: with SMTP id t185mr4077582wma.107.1629215158546; Tue, 17 Aug 2021 08:45:58 -0700 (PDT) Received: from xps13 (host-78-147-239-103.as13285.net. [78.147.239.103]) by smtp.gmail.com with ESMTPSA id l18sm3039798wmc.30.2021.08.17.08.45.57 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Tue, 17 Aug 2021 08:45:58 -0700 (PDT) References: <87v9442ms4.fsf@rdklein.fr> User-agent: mu4e 1.4.15; emacs 27.2 From: Phil To: Edouard Klein Subject: Re: A single reference to installed non-binaries In-reply-to: <87v9442ms4.fsf@rdklein.fr> Message-ID: <87o89w9iru.fsf@beadling.co.uk> Date: Tue, 17 Aug 2021 16:45:57 +0100 MIME-Version: 1.0 Content-Type: text/plain Received-SPF: none client-ip=2a00:1450:4864:20::333; envelope-from=phil@beadling.co.uk; helo=mail-wm1-x333.google.com X-Spam_score_int: -18 X-Spam_score: -1.9 X-Spam_bar: - X-Spam_report: (-1.9 / 5.0 requ) BAYES_00=-1.9, DKIM_SIGNED=0.1, DKIM_VALID=-0.1, RCVD_IN_DNSWL_NONE=-0.0001, SPF_HELO_NONE=0.001, SPF_NONE=0.001 autolearn=ham autolearn_force=no X-Spam_action: no action X-BeenThere: help-guix@gnu.org X-Mailman-Version: 2.1.23 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Cc: help-guix@gnu.org Errors-To: help-guix-bounces+larch=yhetil.org@gnu.org Sender: "Help-Guix" X-Migadu-Flow: FLOW_IN ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=yhetil.org; s=key1; t=1629215176; 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=QmYjFzZkSIWdIWT1ty8PXTT/7AVB7x6/koRxOdY6oO0=; b=S7suacmETqRhKGTA6hetAnKWE3W1vzkakX3TiPw2vkhAqf69obR8zAFyAo7S3s4dm0etN2 q6IIuCzSQszdhm0YWDrr+aqOVv3yZIBXh1c5XhZe1sdN5MIvN4Ow9KJLDvC0Q5troi7nlR DknaFnWEZbWR9ci2K4eGPdBzSyQG2bGUjZ8rFaTMFd1ptmdp+2ElyNHZ+JWIdhEB8uy51E o3lrjIXytz0ToZ0b4RdDVrO7tAtXF1n2NgTOxlx145b7JZ4vhSTJt8Hc5Lqla03Ko1yd9Q 41xZyyOQD5k3/E6wjRV2aTQJ92lhze0YIsRNtnzF7SaZvJ7JdXHvYY26r+5E3Q== ARC-Seal: i=1; s=key1; d=yhetil.org; t=1629215176; a=rsa-sha256; cv=none; b=OBQ6dZNM0pItLJKPvsExj87AGhpc9MNWvEXnlANEZru1xaKrh8WiSY79YZaKDtOqKZl9Ok 7GaURUIIflOrnKrEaR0eaUud1iGvC1kGVF7ZJ0OO9uS5xrajtZ6V5Fsa5LwHumBxT23s5a TjpNMgLPqDFwbeVL6VDCG0Cx07rTcIDndWa2cfEtiGpH0MRVdLvPPhm1OceMXOLceHTQrf CIimk03QARumn5qH9Ay0LNZmtOmzR7MpEFjtRMeNGyuxqpDVpZW4kp1lAbVRF1IFs7fYNc EWMBRzJtqVAY+aEyz2Smtol8DQItz7wObaL5Jlf6cuIl5FvHEfVkw/1ksG8+Yg== ARC-Authentication-Results: i=1; aspmx1.migadu.com; dkim=pass header.d=beadling-co-uk.20150623.gappssmtp.com header.s=20150623 header.b=xI172S0B; spf=pass (aspmx1.migadu.com: domain of help-guix-bounces@gnu.org designates 209.51.188.17 as permitted sender) smtp.mailfrom=help-guix-bounces@gnu.org X-Migadu-Spam-Score: -2.62 Authentication-Results: aspmx1.migadu.com; dkim=pass header.d=beadling-co-uk.20150623.gappssmtp.com header.s=20150623 header.b=xI172S0B; dmarc=none; spf=pass (aspmx1.migadu.com: domain of help-guix-bounces@gnu.org designates 209.51.188.17 as permitted sender) smtp.mailfrom=help-guix-bounces@gnu.org X-Migadu-Queue-Id: 848256AF4 X-Spam-Score: -2.62 X-Migadu-Scanner: scn1.migadu.com X-TUID: dy7R6yU33Ny7 Thanks for comments Edouard! Responses inline. Edouard Klein writes: > See e.g. > https://gitlab.com/edouardklein/guix/-/blob/beaverlabs/beaver/packages/scheme-xyz.scm#L68 Ahh so wrap-program creates a script that sets the two env vars LD_LIBRARY_PATH and TZDIR before calling the original script? > It has the advantage of not needing to integrate any guix-realted stuff > in package-y, which I would consider an abstraction leak. Yes it's nicer for the underlying program not to have to know about Guix. There is one small wrinkle with this in my particular case. Whilst I can wrap the main entry point to the program easily enough, there is a second entry point via the unit tester (pytest), which is obviously an external tool so not so easy to wrap. I could patch the source code of the unit test itself as an alternative. Another slightly more leftfield idea is to change (or add) package-x to be a python package which holds the original data files and a very thin API client that can serve those files up to Python. Then package-x's python module will be self-aware of its location, relative to the text files and we can serve up either a file path or file object to package-y just by importing package-x, and calling a function. The disadvantage of this would be if we had non-python clients too, but we could keep two different build systems for the same source - one copies the files, and the other installs a python module. I'll give this a whirl.