Remove noisy prints to stderr (#386)
* Make stderr less noisy * Set and refer to pandoc filter path in derivation
This commit is contained in:
parent
875eedde46
commit
fa5fe2a61c
|
@ -1,5 +1,5 @@
|
||||||
{ pkgs ? import <nixpkgs> { } }: with pkgs;
|
{ pkgs ? import <nixpkgs> { } }: with pkgs;
|
||||||
rustPlatform.buildRustPackage {
|
rustPlatform.buildRustPackage rec {
|
||||||
name = "flake-info";
|
name = "flake-info";
|
||||||
src = ./.;
|
src = ./.;
|
||||||
cargoLock = {
|
cargoLock = {
|
||||||
|
@ -24,7 +24,7 @@ rustPlatform.buildRustPackage {
|
||||||
|
|
||||||
postInstall = ''
|
postInstall = ''
|
||||||
wrapProgram $out/bin/flake-info \
|
wrapProgram $out/bin/flake-info \
|
||||||
--set NIXPKGS_PANDOC_FILTERS_PATH "${pkgs.path + "/doc/build-aux/pandoc-filters"}" \
|
--set NIXPKGS_PANDOC_FILTERS_PATH "${NIXPKGS_PANDOC_FILTERS_PATH}" \
|
||||||
--prefix PATH : ${pandoc}/bin
|
--prefix PATH : ${pandoc}/bin
|
||||||
'';
|
'';
|
||||||
}
|
}
|
||||||
|
|
|
@ -10,6 +10,7 @@ pub mod data;
|
||||||
pub mod elastic;
|
pub mod elastic;
|
||||||
|
|
||||||
pub use commands::get_flake_info;
|
pub use commands::get_flake_info;
|
||||||
|
use log::trace;
|
||||||
|
|
||||||
pub fn process_flake(
|
pub fn process_flake(
|
||||||
source: &Source,
|
source: &Source,
|
||||||
|
@ -20,8 +21,8 @@ pub fn process_flake(
|
||||||
let mut info = commands::get_flake_info(source.to_flake_ref(), temp_store, extra)?;
|
let mut info = commands::get_flake_info(source.to_flake_ref(), temp_store, extra)?;
|
||||||
info.source = Some(source.clone());
|
info.source = Some(source.clone());
|
||||||
let packages = commands::get_derivation_info(source.to_flake_ref(), *kind, temp_store, extra)?;
|
let packages = commands::get_derivation_info(source.to_flake_ref(), *kind, temp_store, extra)?;
|
||||||
eprintln!("{:#?}", info);
|
trace!("flake info: {:#?}", info);
|
||||||
eprintln!("{:#?}", packages);
|
trace!("flake content: {:#?}", packages);
|
||||||
|
|
||||||
let exports: Vec<Export> = packages
|
let exports: Vec<Export> = packages
|
||||||
.into_iter()
|
.into_iter()
|
||||||
|
|
|
@ -24,9 +24,13 @@
|
||||||
};
|
};
|
||||||
|
|
||||||
devShell = system:
|
devShell = system:
|
||||||
|
let packages_inst = (packages system);
|
||||||
|
in
|
||||||
nixpkgs.legacyPackages.${system}.mkShell {
|
nixpkgs.legacyPackages.${system}.mkShell {
|
||||||
inputsFrom = builtins.attrValues (packages system);
|
inputsFrom = builtins.attrValues packages_inst;
|
||||||
NIXPKGS_PANDOC_FILTERS_PATH = "${nixpkgs + "/doc/build-aux/pandoc-filters"}";
|
shellHook = ''
|
||||||
|
export NIXPKGS_PANDOC_FILTERS_PATH="${packages_inst.flake_info.NIXPKGS_PANDOC_FILTERS_PATH}";
|
||||||
|
'';
|
||||||
};
|
};
|
||||||
in
|
in
|
||||||
{
|
{
|
||||||
|
|
Loading…
Reference in a new issue