add builderVersion parameter

This commit is contained in:
stubbfelnewpc
2021-07-13 23:01:10 +02:00
parent 74562f4bb5
commit 5a79743e88
4 changed files with 13 additions and 8 deletions

View File

@@ -6,7 +6,8 @@
version, version,
packages ? [], packages ? [],
manifestPkgs ? "$(cat manifest_packages)", manifestPkgs ? "$(cat manifest_packages)",
workingFolder ? "$PWD/_builder" workingFolder ? "$PWD/_builder",
builderVersion ? version
}: }:
pkgs.mkShell { pkgs.mkShell {
name = "openwrt-build-${target}-${arch}-${profile}"; name = "openwrt-build-${target}-${arch}-${profile}";
@@ -41,17 +42,18 @@ pkgs.mkShell {
shellHook = shellHook =
'' ''
export WORKING_FOLDER=$(realpath ${workingFolder}) export WORKING_FOLDER=$(realpath ${workingFolder})
mkdir -p $WORKING_FOLDER
function loadBuilder() { function loadBuilder() {
curl -s https://downloads.openwrt.org/releases/${version}/targets/${target}/${arch}/openwrt-imagebuilder-${version}-${target}-${arch}.Linux-x86_64.tar.xz | tar xvJ -C $WORKING_FOLDER curl -s https://downloads.openwrt.org/releases/${builderVersion}/targets/${target}/${arch}/openwrt-imagebuilder-${builderVersion}-${target}-${arch}.Linux-x86_64.tar.xz | tar xvJ -C $WORKING_FOLDER
curl -s https://downloads.openwrt.org/releases/${version}/targets/${target}/${arch}/openwrt-${version}-${target}-${arch}.manifest | cut -f 1 -d ' ' | tr '\n' ' ' > $WORKING_FOLDER/openwrt-imagebuilder-${version}-${target}-${arch}.Linux-x86_64/manifest_packages curl -s https://downloads.openwrt.org/releases/${version}/targets/${target}/${arch}/openwrt-${version}-${target}-${arch}.manifest | cut -f 1 -d ' ' | tr '\n' ' ' > $WORKING_FOLDER/openwrt-imagebuilder-${builderVersion}-${target}-${arch}.Linux-x86_64/manifest_packages
} }
function removeBuilder() { function removeBuilder() {
rm -rf $WORKING_FOLDER/openwrt-imagebuilder-${version}-${target}-${arch}.Linux-x86_64 rm -rf $WORKING_FOLDER/openwrt-imagebuilder-${builderVersion}-${target}-${arch}.Linux-x86_64
} }
function makeImage() { function makeImage() {
cd $WORKING_FOLDER/openwrt-imagebuilder-${version}-${target}-${arch}.Linux-x86_64 cd $WORKING_FOLDER/openwrt-imagebuilder-${builderVersion}-${target}-${arch}.Linux-x86_64
MANIFEST_PKGS=${manifestPkgs} MANIFEST_PKGS=${manifestPkgs}
make image PROFILE=${profile} PACKAGES="$MANIFEST_PKGS ${toString packages}" make image PROFILE=${profile} PACKAGES="$MANIFEST_PKGS ${toString packages}"
} }

View File

@@ -2,11 +2,13 @@
pkgs.callPackage ../buildOpenwrt.nix { pkgs.callPackage ../buildOpenwrt.nix {
target = "ar71xx"; target = "ar71xx";
arch = "generic"; arch = "generic";
version= "19.07.4"; version= "19.07.7";
profile = "gl-inet-6416A-v1"; profile = "gl-inet-6416A-v1";
packages = [ packages = [
"luci-ssl" "luci-ssl"
"luci-proto-wireguard" "luci-proto-wireguard"
"luci-app-wireguard" "luci-app-wireguard"
"kmod-ath9k-htc"
"ath9k-htc-firmware"
]; ];
} }

View File

@@ -2,7 +2,8 @@
pkgs.callPackage ../buildOpenwrt.nix { pkgs.callPackage ../buildOpenwrt.nix {
target = "mvebu"; target = "mvebu";
arch = "cortexa9"; arch = "cortexa9";
version= "19.07.4"; version= "19.07.7";
builderVersion = "19.07-SNAPSHOT";
profile = "linksys_wrt1200ac"; profile = "linksys_wrt1200ac";
packages = [ packages = [
"adblock" "adblock"

View File

@@ -2,7 +2,7 @@
pkgs.callPackage ../buildOpenwrt.nix { pkgs.callPackage ../buildOpenwrt.nix {
target = "brcm2708"; target = "brcm2708";
arch = "bcm2708"; arch = "bcm2708";
version= "19.07.4"; version= "19.07.7";
profile = "rpi"; profile = "rpi";
packages = ["luci-ssl"]; packages = ["luci-ssl"];
} }