3dfcf4fd45
* Extract pandoc function to own module * Bump schema version * Make string handling more explicit * Update logging and pandoc crates * Improve serializing error handling * Serialize values as string (for elastic) * Perform option doc parsing entirely in rust * Show non pandoc'ed results as code elements * Parse correct html string * Change expected `option_type` type to String * Allow treat string unparsable as html like non-docbook strings * Improve deserializing error reporting using serde_path_to_error * Format code
30 lines
851 B
Nix
30 lines
851 B
Nix
{ pkgs ? import <nixpkgs> { } }: with pkgs;
|
|
rustPlatform.buildRustPackage rec {
|
|
name = "flake-info";
|
|
src = ./.;
|
|
cargoLock = {
|
|
lockFile = ./Cargo.lock;
|
|
outputHashes = {
|
|
"elasticsearch-8.0.0-alpha.1" = "sha256-gjmk3Q3LTAvLhzQ+k1knSp1HBwtqNiubjXNnLy/cS5M=";
|
|
};
|
|
};
|
|
nativeBuildInputs = [ pkg-config ];
|
|
buildInputs = [ openssl openssl.dev makeWrapper ]
|
|
++ lib.optional pkgs.stdenv.isDarwin [ libiconv darwin.apple_sdk.frameworks.Security ];
|
|
|
|
checkInputs = [ pandoc ];
|
|
|
|
NIXPKGS_PANDOC_FILTERS_PATH = "${pkgs.path + "/doc/build-aux/pandoc-filters"}";
|
|
|
|
checkFlags = [
|
|
"--skip elastic::tests"
|
|
"--skip nix_gc::tests"
|
|
];
|
|
|
|
postInstall = ''
|
|
wrapProgram $out/bin/flake-info \
|
|
--set NIXPKGS_PANDOC_FILTERS_PATH "${NIXPKGS_PANDOC_FILTERS_PATH}" \
|
|
--prefix PATH : ${pandoc}/bin
|
|
'';
|
|
}
|