diff options
| author | Gregor Kleen <gkleen@yggdrasil.li> | 2022-01-17 21:49:19 +0100 | 
|---|---|---|
| committer | Gregor Kleen <gkleen@yggdrasil.li> | 2022-01-17 21:49:19 +0100 | 
| commit | c3abd38ab0f4548f2c59a0e85d9c0276304ec802 (patch) | |
| tree | 8eac53cca4818a39e2a62f1e329e28138318f45e | |
| parent | 83c7d17ed63fffcc118ac7fb9a6da51e1d179b5c (diff) | |
| download | ap01-c3abd38ab0f4548f2c59a0e85d9c0276304ec802.tar ap01-c3abd38ab0f4548f2c59a0e85d9c0276304ec802.tar.gz ap01-c3abd38ab0f4548f2c59a0e85d9c0276304ec802.tar.bz2 ap01-c3abd38ab0f4548f2c59a0e85d9c0276304ec802.tar.xz ap01-c3abd38ab0f4548f2c59a0e85d9c0276304ec802.zip  | |
...
| -rw-r--r-- | flake.lock | 18 | ||||
| -rw-r--r-- | flake.nix | 46 | 
2 files changed, 64 insertions, 0 deletions
| @@ -122,9 +122,27 @@ | |||
| 122 | "openwrt-packages": "openwrt-packages", | 122 | "openwrt-packages": "openwrt-packages", | 
| 123 | "openwrt-routing": "openwrt-routing", | 123 | "openwrt-routing": "openwrt-routing", | 
| 124 | "openwrt-telephony": "openwrt-telephony", | 124 | "openwrt-telephony": "openwrt-telephony", | 
| 125 | "sops": "sops", | ||
| 125 | "sunwait": "sunwait" | 126 | "sunwait": "sunwait" | 
| 126 | } | 127 | } | 
| 127 | }, | 128 | }, | 
| 129 | "sops": { | ||
| 130 | "flake": false, | ||
| 131 | "locked": { | ||
| 132 | "lastModified": 1617918541, | ||
| 133 | "narHash": "sha256-AY6xWdN3SxN53dFWt3/fIgHFW6AGCif/19IXIqhncnw=", | ||
| 134 | "owner": "mozilla", | ||
| 135 | "repo": "sops", | ||
| 136 | "rev": "68e2a824bd61c23a8a682f40360559e1da4d3228", | ||
| 137 | "type": "github" | ||
| 138 | }, | ||
| 139 | "original": { | ||
| 140 | "owner": "mozilla", | ||
| 141 | "ref": "v3.7.1", | ||
| 142 | "repo": "sops", | ||
| 143 | "type": "github" | ||
| 144 | } | ||
| 145 | }, | ||
| 128 | "sunwait": { | 146 | "sunwait": { | 
| 129 | "flake": false, | 147 | "flake": false, | 
| 130 | "locked": { | 148 | "locked": { | 
| @@ -46,6 +46,13 @@ | |||
| 46 | ref = "master"; | 46 | ref = "master"; | 
| 47 | flake = false; | 47 | flake = false; | 
| 48 | }; | 48 | }; | 
| 49 | sops = { | ||
| 50 | type = "github"; | ||
| 51 | owner = "mozilla"; | ||
| 52 | repo = "sops"; | ||
| 53 | ref = "v3.7.1"; | ||
| 54 | flake = false; | ||
| 55 | }; | ||
| 49 | }; | 56 | }; | 
| 50 | 57 | ||
| 51 | outputs = { self, openwrt, nixpkgs, flake-utils, ... }@inputs: flake-utils.lib.eachDefaultSystem (system: | 58 | outputs = { self, openwrt, nixpkgs, flake-utils, ... }@inputs: flake-utils.lib.eachDefaultSystem (system: | 
| @@ -97,6 +104,8 @@ | |||
| 97 | # zlib.static | 104 | # zlib.static | 
| 98 | # glibc.static | 105 | # glibc.static | 
| 99 | 106 | ||
| 107 | go | ||
| 108 | |||
| 100 | pkgconfig | 109 | pkgconfig | 
| 101 | ubnt-mkfwimage | 110 | ubnt-mkfwimage | 
| 102 | gnused | 111 | gnused | 
| @@ -150,12 +159,49 @@ | |||
| 150 | $(eval $(call BuildPackage,sunwait)) | 159 | $(eval $(call BuildPackage,sunwait)) | 
| 151 | ''} $out/utils/sunwait/Makefile | 160 | ''} $out/utils/sunwait/Makefile | 
| 152 | ''; | 161 | ''; | 
| 162 | sopsRepo = pkgs.runCommand "openwrt-sops" {} '' | ||
| 163 | mkdir -p $out/utils/sops | ||
| 164 | cp ${pkgs.writeText "Makefile" '' | ||
| 165 | include $(TOPDIR)/rules.mk | ||
| 166 | |||
| 167 | PKG_NAME:=sops | ||
| 168 | PKG_VERSION:=${inputs.sops.rev} | ||
| 169 | PKG_RELEASE:=1 | ||
| 170 | |||
| 171 | PKG_BUILD_DEPENDS:=golang/host | ||
| 172 | PKG_BUILD_PARALLEL:=1 | ||
| 173 | PKG_USE_MIPS16:=0 | ||
| 174 | |||
| 175 | GO_PKG:=go.mozilla.org/sops/v3/cmd/sops | ||
| 176 | |||
| 177 | include $(INCLUDE_DIR)/package.mk | ||
| 178 | include ${inputs.openwrt-packages}/lang/golang/golang-package.mk | ||
| 179 | |||
| 180 | define Package/sops | ||
| 181 | SECTION:=util | ||
| 182 | CATEGORY:=Utilities | ||
| 183 | SUBMENU:=Encryption | ||
| 184 | TITLE:=sops | ||
| 185 | URL:=https://github.com/mozilla/sops | ||
| 186 | DEPENDS:=$(GO_ARCH_DEPENDS) | ||
| 187 | PKGARCH:=all | ||
| 188 | endef | ||
| 189 | |||
| 190 | define Build/Prepare | ||
| 191 | cp --no-preserve=mode --remove-destination -t $(PKG_BUILD_DIR) -r ${inputs.sops}/. | ||
| 192 | endef | ||
| 193 | |||
| 194 | $(eval $(call GoBinPackage,sops)) | ||
| 195 | $(eval $(call BuildPackage,sops)) | ||
| 196 | ''} $out/utils/sops/Makefile | ||
| 197 | ''; | ||
| 153 | feedsConf = pkgs.writeText "feeds.conf" '' | 198 | feedsConf = pkgs.writeText "feeds.conf" '' | 
| 154 | src-cpy packages ${inputs.openwrt-packages} | 199 | src-cpy packages ${inputs.openwrt-packages} | 
| 155 | src-cpy luci ${inputs.openwrt-luci} | 200 | src-cpy luci ${inputs.openwrt-luci} | 
| 156 | src-cpy routing ${inputs.openwrt-routing} | 201 | src-cpy routing ${inputs.openwrt-routing} | 
| 157 | src-cpy telephony ${inputs.openwrt-telephony} | 202 | src-cpy telephony ${inputs.openwrt-telephony} | 
| 158 | src-cpy sunwait ${sunwaitRepo} | 203 | src-cpy sunwait ${sunwaitRepo} | 
| 204 | src-cpy sops ${sopsRepo} | ||
| 159 | ''; | 205 | ''; | 
| 160 | in '' | 206 | in '' | 
| 161 | rm feeds.conf.default | 207 | rm feeds.conf.default | 
