You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
This repository has been archived by the owner on May 19, 2022. It is now read-only.
First off, thanks for this awesome project. It's amazing being able to build a .deb file with very little configuration.
Recently, I've been looking to add in shell completions for my small CLI app. A common approach I've found is using a build.rs script to generate the shell completions from Clap. However, there doesn't seem to be a way to reference those files in the package.metadata.debassets list. Since build scripts are limited to writing to Cargo's OUT_DIR, it'd be very helpful if that location was another candidate in the search path for listed assets.
I think adding support for this would address part of the problem in #67. ripgrep is another project I came across that can't build a deb via cargo deb directly, relying on a separate script to stage the data before the command can be run. Unless I'm mistaken, it'd also allow this project's example build script to adhere to the restrictions in the Rust docs on build scripts: "Build scripts may save any output files in the directory specified in the OUT_DIR environment variable. Scripts should not modify any files outside of that directory."
Of course, this all presupposes that there's a way for OUT_DIR to be exposed to cargo-deb. If not, I'm sorry for the noise.
The text was updated successfully, but these errors were encountered:
There was an attempt to replace build tasks with xtask, but xtask has chosen a design that is also a black box from outside, so it's incompatible with cargo-deb matklad/cargo-xtask#10
Thanks for those links. I spent a while searching for information, but I was mostly limiting the search to cargo-deb. It's an unfortunate situation without a great solution. The simplest approach, like the one taken in the example build script, is subject to breaking without notification. Trying to find the "out" directory is tedious and error-prone.
Since it looks like you've already extensively investigated this and there's a limitation in Cargo, please feel free to close this issue as you see fit.
First off, thanks for this awesome project. It's amazing being able to build a .deb file with very little configuration.
Recently, I've been looking to add in shell completions for my small CLI app. A common approach I've found is using a build.rs script to generate the shell completions from Clap. However, there doesn't seem to be a way to reference those files in the package.metadata.deb assets list. Since build scripts are limited to writing to Cargo's
OUT_DIR
, it'd be very helpful if that location was another candidate in the search path for listed assets.I think adding support for this would address part of the problem in #67. ripgrep is another project I came across that can't build a deb via
cargo deb
directly, relying on a separate script to stage the data before the command can be run. Unless I'm mistaken, it'd also allow this project's example build script to adhere to the restrictions in the Rust docs on build scripts: "Build scripts may save any output files in the directory specified in the OUT_DIR environment variable. Scripts should not modify any files outside of that directory."Of course, this all presupposes that there's a way for
OUT_DIR
to be exposed to cargo-deb. If not, I'm sorry for the noise.The text was updated successfully, but these errors were encountered: