From mboxrd@z Thu Jan 1 00:00:00 1970 X-Spam-Checker-Version: SpamAssassin 3.4.6 (2021-04-09) on atuin.qyliss.net X-Spam-Level: X-Spam-Status: No, score=-1.1 required=5.0 tests=DKIM_SIGNED,DKIM_VALID, DKIM_VALID_AU,MAILING_LIST_MULTI,RCVD_IN_DNSWL_NONE,SPF_HELO_NONE autolearn=unavailable autolearn_force=no version=3.4.6 Received: from atuin.qyliss.net (localhost [IPv6:::1]) by atuin.qyliss.net (Postfix) with ESMTP id 369CD7226E; Fri, 30 Sep 2022 21:10:00 +0000 (UTC) Received: by atuin.qyliss.net (Postfix, from userid 496) id CFFF9721D0; Fri, 30 Sep 2022 21:09:57 +0000 (UTC) Received: from mail-ej1-x630.google.com (mail-ej1-x630.google.com [IPv6:2a00:1450:4864:20::630]) by atuin.qyliss.net (Postfix) with ESMTPS id F1CD472171 for ; Fri, 30 Sep 2022 21:09:54 +0000 (UTC) Received: by mail-ej1-x630.google.com with SMTP id sd10so11554958ejc.2 for ; Fri, 30 Sep 2022 14:09:54 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=unikie.com; s=google; h=content-transfer-encoding:mime-version:references:in-reply-to :message-id:date:subject:cc:to:from:from:to:cc:subject:date; bh=1MFdTSAwx5UL/v7AZGhkVFJlVCpi/y22sQYSgIrfoCQ=; b=fVUbrfdU6AOi6Jghk9PdRiZbAjLcgp5zAQk7Xw8Sil4eGvkpLVFELlgWNG2zbFiJlH ghVbWSc3dELWZfXpM4yIa+S+xpIXpBkzyKMf7SQEzkjmOe3SwRkeJlNlPVJGMoocry/1 bfw7J7KTGEV+gmlc9laQHNqzO/4mZIKChTWoA+IB7F42Pxpq0jsneTQM/nGG9SlYjPus mShL+gWjf8vUHGj0nqRKf0Up3q5A+ini0NcSaO4wz6nlt+YavJm2uvJ8OhHl5FpYelKh OcM1nmh1Tc9sA3azj5ti/ps/9fhImoniGoVQTy4l98yzI96sMkf2wpw425IMMDkieXXe 7/qQ== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20210112; h=content-transfer-encoding:mime-version:references:in-reply-to :message-id:date:subject:cc:to:from:x-gm-message-state:from:to:cc :subject:date; bh=1MFdTSAwx5UL/v7AZGhkVFJlVCpi/y22sQYSgIrfoCQ=; b=iums8ZF869c8+CeDqtO/xy6Ozn056gaCFr8XV9q+BI7Jj5PVTAmXp/qa7XGxJny9Qi haWh47bbtYrEkdQ2t50eEs8rPNQd8a5eLYKSqdKeQgcxxrC2wnlqonFHjOfJu6FZ6IH1 Z8YwV5fECrHRAq9ms5i3v9F+TueYsoFxLzQDwa66qymVoQ+Hdooh2LS48SbNF6zuPrCI 5rSWJie37DRRxiyydIivc/TZDincEmR4CQ61v/c3fOqU0r9fyEDKMLdCK/6ByDhoFv6j O3Sd/EknP07of9iTAhBDy58tDhBHJQDxebP/rWbiMQjdniKQPm/J9UrsBCyjnRDUXzjB yR0Q== X-Gm-Message-State: ACrzQf07fbd3NDb9tG+cqIdULc0/rOATTnqAoSpju2OzvW5yulMj54qq Tv6hA+99j0I7JP0jc+fVDlRHrg== X-Google-Smtp-Source: AMsMyM4QrAurVxdb7VNNHOvcJvl/wOJeOAzR6to+ygtfsisg2vqrfEylJ2skCeRcZGSQNmiXqL+evg== X-Received: by 2002:a17:907:7b9e:b0:783:10cb:2826 with SMTP id ne30-20020a1709077b9e00b0078310cb2826mr7860910ejc.208.1664572194479; Fri, 30 Sep 2022 14:09:54 -0700 (PDT) Received: from x220.qyliss.net (p200300ed67079c010000000000000003.dip0.t-ipconnect.de. [2003:ed:6707:9c01::3]) by smtp.gmail.com with ESMTPSA id m15-20020aa7d34f000000b0045722259584sm2242789edr.86.2022.09.30.14.09.53 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Fri, 30 Sep 2022 14:09:53 -0700 (PDT) Received: by x220.qyliss.net (Postfix, from userid 1000) id 94E685A5; Fri, 30 Sep 2022 21:09:53 +0000 (UTC) From: Alyssa Ross To: devel@spectrum-os.org Subject: [RFC PATCH nixpkgs v2 6/9] rustPlatform: forward unpack hooks to cargo fetch Date: Fri, 30 Sep 2022 21:09:03 +0000 Message-Id: <20220930210906.1696349-7-alyssa.ross@unikie.com> X-Mailer: git-send-email 2.37.1 In-Reply-To: <20220930210906.1696349-1-alyssa.ross@unikie.com> References: <20220930210906.1696349-1-alyssa.ross@unikie.com> MIME-Version: 1.0 Content-Transfer-Encoding: 8bit Message-ID-Hash: SWJDZIGMREIDBYHVCDZ7TH3RECD4QT2K X-Message-ID-Hash: SWJDZIGMREIDBYHVCDZ7TH3RECD4QT2K X-MailFrom: alyssa.ross@unikie.com X-Mailman-Rule-Hits: header-match-devel.spectrum-os.org-0 X-Mailman-Rule-Misses: dmarc-mitigation; no-senders; approved; emergency; loop; banned-address; member-moderation; header-match-config-1 CC: Puck Meerburg , Ville Ilvonen X-Mailman-Version: 3.3.5 Precedence: list List-Id: Patches and low-level development discussion Archived-At: List-Archive: List-Help: List-Owner: List-Post: List-Subscribe: List-Unsubscribe: Sometimes it's more ergonomic to set up the build environment in hooks, to add to the default behaviour rather than replacing it. It's very surprising that the fetcher works fine with a custom unpackPhase, but not with custom preUnpack or postUnpack. Signed-off-by: Alyssa Ross --- pkgs/build-support/rust/build-rust-package/default.nix | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/pkgs/build-support/rust/build-rust-package/default.nix b/pkgs/build-support/rust/build-rust-package/default.nix index db0d2c53bb1..c35f906ba08 100644 --- a/pkgs/build-support/rust/build-rust-package/default.nix +++ b/pkgs/build-support/rust/build-rust-package/default.nix @@ -22,7 +22,9 @@ , src ? null , srcs ? null +, preUnpack ? null , unpackPhase ? null +, postUnpack ? null , cargoPatches ? [] , patches ? [] , sourceRoot ? null @@ -63,7 +65,7 @@ let if cargoVendorDir != null then null else if cargoLock != null then importCargoLock cargoLock else fetchCargoTarball ({ - inherit src srcs sourceRoot unpackPhase cargoUpdateHook; + inherit src srcs sourceRoot preUnpack unpackPhase postUnpack cargoUpdateHook; name = cargoDepsName; patches = cargoPatches; } // lib.optionalAttrs (args ? cargoHash) { -- 2.37.1