OpenWRT

From NixOS Wiki
Revision as of 00:45, 31 January 2021 by imported>Jtojnar (avoid deprecated github:NixOS/nixpkgs-channels)

Building OpenWRT with a nix shell

Download this Gist as your shell.nix in the same folder as openwrt and run nix-shell in this folder. This gist has been tested with the following inputs:

  • Nixpkgs Revision bee172501de3b4496ff81cc1621d307f167e9382
  • OpenWRT revision 0f063f8ac70943ff1f383c9bd05d1792730fe614

Due to the very delicate OpenWRT dev environment it may be necessary to pin the nixpkgs revision you are using. This can be done by replacing the first lines of the gist with:

{ opkgs ? import <nixpkgs> {} }:                           
                                                           
let                                                        
  pkgs = import (opkgs.fetchFromGitHub {                   
    owner = "NixOS";
    repo = "nixpkgs";            
    rev = "bee172501de3b4496ff81cc1621d307f167e9382";      
    sha256 = "14jn7jiq4likrm7fry2m3q3rmv3y4xjfnwx13wh6iqd8c3bcjd12";                                                   
  }) {};
...