|
1 | 1 | mod build; |
2 | 2 | mod cfg; |
3 | 3 | mod cli; |
| 4 | +mod cmd; |
4 | 5 | mod fetcher; |
5 | 6 | mod inputs; |
6 | 7 | mod lang; |
@@ -41,6 +42,7 @@ use crate::{ |
41 | 42 | build::{BuildType, PythonFormat, RustVendor}, |
42 | 43 | cfg::load_config, |
43 | 44 | cli::Opts, |
| 45 | + cmd::{NIX, NURL}, |
44 | 46 | fetcher::{Fetcher, PackageInfo, PypiFormat, Revisions, Version}, |
45 | 47 | inputs::{write_all_lambda_inputs, write_inputs, write_lambda_input, AllInputs}, |
46 | 48 | lang::{ |
@@ -150,16 +152,11 @@ async fn run() -> Result<()> { |
150 | 152 | } |
151 | 153 | }; |
152 | 154 |
|
153 | | - let mut fetcher = serde_json::from_slice( |
154 | | - &Command::new("nurl") |
155 | | - .arg(&url) |
156 | | - .arg("-p") |
157 | | - .get_stdout() |
158 | | - .await?, |
159 | | - ) |
160 | | - .context("failed to parse nurl output")?; |
| 155 | + let mut fetcher = |
| 156 | + serde_json::from_slice(&Command::new(NURL).arg(&url).arg("-p").get_stdout().await?) |
| 157 | + .context("failed to parse nurl output")?; |
161 | 158 |
|
162 | | - let mut cmd = Command::new("nurl"); |
| 159 | + let mut cmd = Command::new(NURL); |
163 | 160 | let mut licenses = BTreeMap::new(); |
164 | 161 | let mut pypi_format = PypiFormat::TarGz; |
165 | 162 | let (pname, rev, version, desc, prefix, mut python_deps) = |
@@ -348,7 +345,7 @@ async fn run() -> Result<()> { |
348 | 345 | } |
349 | 346 | }; |
350 | 347 |
|
351 | | - let stdout = Command::new("nix") |
| 348 | + let stdout = Command::new(NIX) |
352 | 349 | .arg("build") |
353 | 350 | .arg("--extra-experimental-features") |
354 | 351 | .arg("nix-command") |
|
0 commit comments