Skip to content

Commit e31ace5

Browse files
committed
buildGoModule: use lib.toExtension
Use toExtension from Nixpkgs library instead of the one defined locally.
1 parent 53a24f4 commit e31ace5

1 file changed

Lines changed: 1 addition & 15 deletions

File tree

pkgs/build-support/go/module.nix

Lines changed: 1 addition & 15 deletions
Original file line numberDiff line numberDiff line change
@@ -63,20 +63,6 @@ let
6363
GO111MODULE = "on";
6464
GOTOOLCHAIN = "local";
6565

66-
toExtension =
67-
overlay0:
68-
if lib.isFunction overlay0 then
69-
final: prev:
70-
if lib.isFunction (overlay0 prev) then
71-
# `overlay0` is `final: prev: { ... }`
72-
overlay0 final prev
73-
else
74-
# `overlay0` is `prev: { ... }`
75-
overlay0 prev
76-
else
77-
# `overlay0` is `{ ... }`
78-
final: prev: overlay0;
79-
8066
in
8167
(stdenv.mkDerivation (finalAttrs:
8268
args
@@ -333,7 +319,7 @@ in
333319
# Canonicallize `overrideModAttrs` as an attribute overlay.
334320
# `passthru.overrideModAttrs` will be overridden
335321
# when users want to override `goModules`.
336-
overrideModAttrs = toExtension overrideModAttrs;
322+
overrideModAttrs = lib.toExtension overrideModAttrs;
337323
} // passthru;
338324

339325
meta = {

0 commit comments

Comments
 (0)