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 ALtUE2yKoGCYaAEAgWs5BA (envelope-from ) for ; Sun, 16 May 2021 04:58:52 +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 sBMUD2yKoGDWbwAA1q6Kng (envelope-from ) for ; Sun, 16 May 2021 02:58:52 +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 96D67D17C for ; Sun, 16 May 2021 04:58:51 +0200 (CEST) Received: from localhost ([::1]:49696 helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1li6zR-0007lU-CP for larch@yhetil.org; Sat, 15 May 2021 22:58:49 -0400 Received: from eggs.gnu.org ([2001:470:142:3::10]:45130) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1li6zI-0007l7-Cv for help-guix@gnu.org; Sat, 15 May 2021 22:58:40 -0400 Received: from mail-qt1-x833.google.com ([2607:f8b0:4864:20::833]:45732) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.90_1) (envelope-from ) id 1li6zE-0006jx-NL for help-guix@gnu.org; Sat, 15 May 2021 22:58:40 -0400 Received: by mail-qt1-x833.google.com with SMTP id j11so2519464qtn.12 for ; Sat, 15 May 2021 19:58:36 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20161025; h=from:to:cc:subject:references:date:in-reply-to:message-id :user-agent:mime-version; bh=QkVafkcj4oRpru6WJnWgFsCcxUNt9ipAh35llK0wQbQ=; b=BS5Z+Iyt8/OKx/m4XSFQZiBhijI7IsnUVIB5nQ8sJt14xFdSMKasTli2V3WpU4z++f CbnY+jsok8rfRnWeg/pt47tsNYTCknU9AvOBEDygHy1OLwq5I1P6S6ohrJMtuffp7sG/ Ad35VvLRzGChNiMqS1LgpZasKxDtDDTWU7cuBe6clMcwHquVBR4dpTnVCmjYea4/iy2b LUlyyxQtlMS4lWEC/bMjvnbX6Q1uuTfHahyHUvF5uwkcDmqrCD+Ad5RjB/J++oyFL4VE 8awXl6sYZhHOk+2ZwjIuye1Ba2fqzXu+/bgiynLUZHFYibJ6fBZSN5ZLfgROkmc7bb8n 0zdw== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:from:to:cc:subject:references:date:in-reply-to :message-id:user-agent:mime-version; bh=QkVafkcj4oRpru6WJnWgFsCcxUNt9ipAh35llK0wQbQ=; b=VLX855c86iCnTj+cFT1u1d2whPidfvxbEbpptpiRxyjiw31nSo0tctso0KxdvvQaST FW0wyCFKNXlMy2xujznByXexGWBV1NrdF810yIcYVEkW5fXgGhtN7OILoZhRbp3scTOi Y0HdFj+cAzqcAIyni8JGDQO0z//3gYWRECoRGrhgV6XYksPTHEUnpMXNAxPqA/mvKEA4 DV9nuu1EAzTkJqiIge0kv8ZWZLy3gvuEY2nNJ9qRx9jclj4Q77Q/rCjW0NapcCNN/k0F aW+QzPX9dNpDBYcCXliQLCnuv1flpnELwCszYK+sTCZhzdeGvwpQ+qpREdjctSSnbc9a srMA== X-Gm-Message-State: AOAM532pckmzK+dEIescHosvl0VqvYFALFcMk5z8+ZzCtfyMlfxcXSwj QTr5r5O9b5EeymuJQy2G9XkIb6l8iNk= X-Google-Smtp-Source: ABdhPJxiGi9KANHHEvc09iGTTnuaFy8p2q6NOX/kpBswJzk07f5+9k/ovwAC8uTiEKtW/gJvYdOenw== X-Received: by 2002:aed:3001:: with SMTP id 1mr50382698qte.344.1621133915606; Sat, 15 May 2021 19:58:35 -0700 (PDT) Received: from hurd (dsl-10-134-2.b2b2c.ca. [72.10.134.2]) by smtp.gmail.com with ESMTPSA id a21sm6471687qtm.54.2021.05.15.19.58.34 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Sat, 15 May 2021 19:58:35 -0700 (PDT) From: Maxim Cournoyer To: Phil Beadling Subject: Re: Find location of installed package in /gnu/store References: Date: Sat, 15 May 2021 22:58:34 -0400 In-Reply-To: (Phil Beadling's message of "Sat, 15 May 2021 03:28:01 +0100") Message-ID: <875yzjpep1.fsf@gmail.com> User-Agent: Gnus/5.13 (Gnus v5.13) Emacs/27.2 (gnu/linux) MIME-Version: 1.0 Content-Type: text/plain Received-SPF: pass client-ip=2607:f8b0:4864:20::833; envelope-from=maxim.cournoyer@gmail.com; helo=mail-qt1-x833.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-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 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=1621133931; 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=QkVafkcj4oRpru6WJnWgFsCcxUNt9ipAh35llK0wQbQ=; b=snGWqNmycZbG3qX+291CTGdJJxvTbL1HsSy3MPu9vIQf6/z7zkkXWPWBS4Hgf2of5msQe7 /TEqBQbdZ/sTioXhrpnVr7XWWXdmfqK6aW2xisAP6k+/RoVz+nSWcFlClsHz/fkRvmK5ig 5vDphg7bSSc5xHY37Y57xhOpyLbJguCF9F/rSnXlSpeybUHgjSqVlb42UKJZ/xuYsfPDGC dgjmmaQ1R7TB1pJNxYN0DbkB99coqkJo19ULab8TZOz5yXBgQO3eEbqH6UMEfrwHZhZMHn WBJIvncxQw82JKr8vQ8Cc5GQJtnVut+Fg4MqIK6ZJ0D+IHq5wX0DhFXA/+1LXg== ARC-Seal: i=1; s=key1; d=yhetil.org; t=1621133931; a=rsa-sha256; cv=none; b=fr9Er0fye7f1cfE+waYy3SXtYcDoFzH27J0gf1iBUmCFt42GqKxf3TrYArmS3oUkyjmfxD SUWB1k20q/z9wca3g/xLpZe8r1rliqwLHL2K9DePM9sjOpKfEC8HpBAh2224zdApiztjt3 EcmwiQ/BzZ168snpkWYOGBP44dDwCmpykSke43sDfvoVLLrFZuBTw+rroa7dLHQo7qwVTL Gub2HnmthC9Z/VDk/4lkfOBINHYE7TlQQAS2tvPQGJlYYmoxDqh40bHi0PorhT8MDoKx5d JMzpKMJyT2ZHw4Nvs7L4QS3vbGpkujARq3ekCnM3uL4L4nnIyfCUfPPHGRYpDw== ARC-Authentication-Results: i=1; aspmx1.migadu.com; dkim=pass header.d=gmail.com header.s=20161025 header.b=BS5Z+Iyt; dmarc=pass (policy=none) header.from=gmail.com; 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: -1.65 Authentication-Results: aspmx1.migadu.com; dkim=pass header.d=gmail.com header.s=20161025 header.b=BS5Z+Iyt; dmarc=pass (policy=none) header.from=gmail.com; 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: 96D67D17C X-Spam-Score: -1.65 X-Migadu-Scanner: scn0.migadu.com X-TUID: sYPbSd3NVzXW Hello Phil, Phil Beadling writes: > Hi, > > Given a package definition, eg icedtea-8's JDK, how can can I determine the > location of the installed package in my /gnu/store? > > There doesn't seem to be anything on the package module itself, presumably > because this is static data, and what I need is something to calculate the > hash of the resulting install specific to my Guix? >From the command line API, the way to retrieve a package's store file name is by doing: $ guix build package > The aim is to use this to derivive the JDK include directories in a generic > way for some scripts I'm writing, such that I don't need to update them > each time the JDK hash changes after a guix pull. If you prefer to use the Guix API from Guile, you could use something like: --8<---------------cut here---------------start------------->8--- (use-modules (guix derivations) (guix gexp) (guix store) (gnu packages base)) (let* ((hello-drv (with-store store (run-with-store store (lower-object hello)))) (hello-store-path (derivation->output-path hello-drv))) (format #t "~a~%" hello-store-path) hello-store-path) --8<---------------cut here---------------end--------------->8--- HTH! Maxim