Skip to content

Commit

Permalink
mozillavpn: extract netfilter derivation for updateScript
Browse files Browse the repository at this point in the history
Signed-off-by: Anders Kaseorg <[email protected]>
(cherry picked from commit 2b59e8e)
  • Loading branch information
andersk committed Oct 4, 2024
1 parent e5b6959 commit b245c98
Showing 1 changed file with 11 additions and 12 deletions.
23 changes: 11 additions & 12 deletions pkgs/by-name/mo/mozillavpn/package.nix
Original file line number Diff line number Diff line change
Expand Up @@ -31,17 +31,16 @@ stdenv.mkDerivation (finalAttrs: {
};
patches = [ ];

netfilterGoModules =
(buildGoModule {
inherit (finalAttrs)
pname
version
src
patches
;
modRoot = "linux/netfilter";
vendorHash = "sha256-Cmo0wnl0z5r1paaEf1MhCPbInWeoMhGjnxCxGh0cyO8=";
}).goModules;
netfilter = buildGoModule {
pname = "${finalAttrs.pname}-netfilter";
inherit (finalAttrs)
version
src
patches
;
modRoot = "linux/netfilter";
vendorHash = "sha256-Cmo0wnl0z5r1paaEf1MhCPbInWeoMhGjnxCxGh0cyO8=";
};

cargoDeps = rustPlatform.fetchCargoTarball {
inherit (finalAttrs) src patches;
Expand Down Expand Up @@ -84,7 +83,7 @@ stdenv.mkDerivation (finalAttrs: {
substituteInPlace extension/CMakeLists.txt \
--replace '/etc' "$out/etc"
ln -s '${finalAttrs.netfilterGoModules}' linux/netfilter/vendor
ln -s '${finalAttrs.netfilter.goModules}' linux/netfilter/vendor
'';

cmakeFlags = [
Expand Down

0 comments on commit b245c98

Please sign in to comment.