flake worki :3
This commit is contained in:
parent
17dec99395
commit
c3768283d3
1 changed files with 35 additions and 4 deletions
39
flake.nix
39
flake.nix
|
|
@ -13,13 +13,28 @@
|
||||||
# Optionally pin to a specific commit of `nixpkgs-esp-dev`.
|
# Optionally pin to a specific commit of `nixpkgs-esp-dev`.
|
||||||
rev = "f37890edc9b327fcbc6d48c4cf174e65e4c0d148";
|
rev = "f37890edc9b327fcbc6d48c4cf174e65e4c0d148";
|
||||||
};
|
};
|
||||||
forEachSupportedSystem = f: nixpkgs.lib.genAttrs supportedSystems (system: f {
|
|
||||||
pkgs = import nixpkgs { inherit system; overlays = [ (import "${nixpkgs-esp-dev}/overlay.nix") ]; };
|
forEachSupportedSystem = f: nixpkgs.lib.genAttrs supportedSystems (system:
|
||||||
});
|
let
|
||||||
|
pkgs = import nixpkgs { inherit system; overlays = [ (import "${nixpkgs-esp-dev}/overlay.nix") ]; };
|
||||||
|
|
||||||
|
libxml2Shared = pkgs.libxml2.overrideAttrs (old: {
|
||||||
|
configureFlags = (old.configureFlags or [ ]) ++ [ "--enable-shared" ];
|
||||||
|
|
||||||
|
# cursed patch necessary to fix linking errors
|
||||||
|
postInstall = ''
|
||||||
|
ln -sf libxml2.so $out/lib/libxml2.so.2
|
||||||
|
${old.postInstall or ""}
|
||||||
|
'';
|
||||||
|
});
|
||||||
|
in
|
||||||
|
f { inherit pkgs libxml2Shared; }
|
||||||
|
);
|
||||||
|
|
||||||
in
|
in
|
||||||
{
|
{
|
||||||
devShells = forEachSupportedSystem
|
devShells = forEachSupportedSystem
|
||||||
({ pkgs }: {
|
({ pkgs, libxml2Shared }: {
|
||||||
default = pkgs.mkShell
|
default = pkgs.mkShell
|
||||||
{
|
{
|
||||||
packages = with pkgs; [
|
packages = with pkgs; [
|
||||||
|
|
@ -27,7 +42,23 @@
|
||||||
espflash
|
espflash
|
||||||
cargo-espflash
|
cargo-espflash
|
||||||
espup
|
espup
|
||||||
|
|
||||||
|
llvmPackages_16.libclang # Explicitly add libclang
|
||||||
|
llvmPackages_16.clang # Include clang/headers
|
||||||
|
pkg-config # Often needed for bindgen to find clang
|
||||||
|
glibc.dev # Needed for C headers
|
||||||
|
libxml2Shared.out
|
||||||
|
ldproxy
|
||||||
];
|
];
|
||||||
|
|
||||||
|
env = {
|
||||||
|
# Set LD_LIBRARY_PATH so libstdc++.so.6 zlib and libxml2 can be found
|
||||||
|
LD_LIBRARY_PATH = with pkgs; pkgs.lib.makeLibraryPath [
|
||||||
|
gcc.cc.lib
|
||||||
|
zlib
|
||||||
|
libxml2Shared.out
|
||||||
|
];
|
||||||
|
};
|
||||||
};
|
};
|
||||||
});
|
});
|
||||||
};
|
};
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue