Init repo
This commit is contained in:
commit
28005ac978
21
README.md
Normal file
21
README.md
Normal file
@ -0,0 +1,21 @@
|
|||||||
|
# openwrt-buildroot-nix
|
||||||
|
|
||||||
|
This provides a Nix environment for [OpenWRT Buildroot](https://openwrt.org/docs/guide-developer/toolchain/use-buildsystem).
|
||||||
|
|
||||||
|
## Usage
|
||||||
|
|
||||||
|
```
|
||||||
|
nix develop git+https://git.clerie.de/clerie/openwrt-buildroot-nix.git
|
||||||
|
```
|
||||||
|
|
||||||
|
## Troubleshooting
|
||||||
|
|
||||||
|
### Dependencies cannot be found randomly
|
||||||
|
|
||||||
|
OpenWRT buildroot seem to hardcode paths it found for dependencies.
|
||||||
|
If the nix environment gets changed these paths change too.
|
||||||
|
Clean the build environment to get it working again:
|
||||||
|
|
||||||
|
```
|
||||||
|
make dirclean
|
||||||
|
```
|
27
flake.lock
Normal file
27
flake.lock
Normal file
@ -0,0 +1,27 @@
|
|||||||
|
{
|
||||||
|
"nodes": {
|
||||||
|
"nixpkgs": {
|
||||||
|
"locked": {
|
||||||
|
"lastModified": 1703499205,
|
||||||
|
"narHash": "sha256-lF9rK5mSUfIZJgZxC3ge40tp1gmyyOXZ+lRY3P8bfbg=",
|
||||||
|
"owner": "NixOS",
|
||||||
|
"repo": "nixpkgs",
|
||||||
|
"rev": "e1fa12d4f6c6fe19ccb59cac54b5b3f25e160870",
|
||||||
|
"type": "github"
|
||||||
|
},
|
||||||
|
"original": {
|
||||||
|
"owner": "NixOS",
|
||||||
|
"ref": "nixpkgs-unstable",
|
||||||
|
"repo": "nixpkgs",
|
||||||
|
"type": "github"
|
||||||
|
}
|
||||||
|
},
|
||||||
|
"root": {
|
||||||
|
"inputs": {
|
||||||
|
"nixpkgs": "nixpkgs"
|
||||||
|
}
|
||||||
|
}
|
||||||
|
},
|
||||||
|
"root": "root",
|
||||||
|
"version": 7
|
||||||
|
}
|
39
flake.nix
Normal file
39
flake.nix
Normal file
@ -0,0 +1,39 @@
|
|||||||
|
{
|
||||||
|
inputs = {
|
||||||
|
nixpkgs.url = "github:NixOS/nixpkgs/nixpkgs-unstable";
|
||||||
|
};
|
||||||
|
outputs = { self, nixpkgs, ... }: {
|
||||||
|
|
||||||
|
devShells."x86_64-linux".default = let
|
||||||
|
|
||||||
|
pkgs = import nixpkgs {
|
||||||
|
system = "x86_64-linux";
|
||||||
|
};
|
||||||
|
|
||||||
|
in pkgs.mkShell {
|
||||||
|
|
||||||
|
nativeBuildInputs = with pkgs; [
|
||||||
|
pkg-config
|
||||||
|
];
|
||||||
|
|
||||||
|
buildInputs = with pkgs; [
|
||||||
|
git
|
||||||
|
ncurses
|
||||||
|
unzip
|
||||||
|
python3
|
||||||
|
cdrkit # mkisofs
|
||||||
|
];
|
||||||
|
|
||||||
|
/*
|
||||||
|
OpenWRT toolchain code isn't as clean as it needs to be to
|
||||||
|
pass nixpkgs hardening, so we disable it
|
||||||
|
|
||||||
|
Resolves:
|
||||||
|
-Werror=format-security
|
||||||
|
*/
|
||||||
|
hardeningDisable = [ "all" ];
|
||||||
|
|
||||||
|
};
|
||||||
|
|
||||||
|
};
|
||||||
|
}
|
Loading…
Reference in New Issue
Block a user