I am trying to build a wireshark dissector using the rust crate wsdf.
While complinig epan-sys in my dev environment I get the following error:
CMake Error: The source directory "/home/user/.cargo/registry/src/index.crates.io-6f17d22bba15001f/epan-sys-0.1.0/wireshark" does not exist.
my flake:
{
inputs.nixpkgs.url = "github:nixos/nixpkgs/nixos-unstable";
inputs.nci.url = "github:yusdacra/nix-cargo-integration";
inputs.nci.inputs.nixpkgs.follows = "nixpkgs";
inputs.parts.url = "github:hercules-ci/flake-parts";
inputs.parts.inputs.nixpkgs-lib.follows = "nixpkgs";
inputs.treefmt-nix.url = "github:numtide/treefmt-nix";
outputs = inputs@{ parts, nci, treefmt-nix, ... }:
parts.lib.mkFlake { inherit inputs; } {
systems = [ "x86_64-linux" ];
imports = [ nci.flakeModule treefmt-nix.flakeModule ];
perSystem = { pkgs, config, ... }:
let crateName = "dissector";
in let
base_shell = config.nci.outputs.${crateName}.devShell.overrideAttrs
(old: {
packages = (old.packages or [ ]) ++ [
pkgs.lldb
pkgs.rust-analyzer
pkgs.cargo-nextest
pkgs.pkg-config
pkgs.cargo-vet
pkgs.cargo-audit
pkgs.samply
pkgs.cmake
pkgs.wireshark.dev
];
shellHook = ''
${old.shellHook or ""}
echo "Wellcome in ${crateName}!"
'';
});
in {
# declare projects
nci.projects.${crateName}.path = ./.;
devShells.default = base_shell;
# configure crates
nci.crates.${crateName} = {
### override stdenv for both dependencies and main derivation ###
#depsDrvConfig = { deps.stdenv = pkgs.clangStdenv; };
#drvConfig = { deps.stdenv = pkgs.clangStdenv; };
# note: for overriding stdenv for *all* packages in a project
# you can use `drvConfig` and `depsDrvConfig` under `nci.projects.<name>`
# instead.
};
};
};
}
Any idea how to fix the issue is welcome