Skip to content
Closed
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
13 changes: 12 additions & 1 deletion lib/customisation.nix
Original file line number Diff line number Diff line change
Expand Up @@ -154,6 +154,7 @@ rec {
makeOverridable =
f:
let
fargs = functionArgs f;
# Creates a functor with the same arguments as f
mirrorArgs = mirrorFunctionArgs f;
in
Expand All @@ -178,11 +179,21 @@ rec {
);
# Change the result of the function call by applying g to it
overrideResult = g: makeOverridable (mirrorArgs (args: g (f args))) origArgs;

overrideResultAndArgs = g: newArgs: makeOverridable (mirrorArgs (args: g (f args))) (overrideWith newArgs);
in
if isAttrs result then
result
// {
override = overrideArgs;
override = newArgs:
if result ? override then
let
outerArgs = intersectAttrs fargs newArgs;
innerArgs = removeAttrs newArgs (attrNames fargs);
in
overrideResultAndArgs (x: x.override innerArgs) outerArgs
else
overrideArgs newArgs;
overrideDerivation = fdrv: overrideResult (x: overrideDerivation x fdrv);
${if result ? overrideAttrs then "overrideAttrs" else null} =
/**
Expand Down
3 changes: 0 additions & 3 deletions pkgs/by-name/_1/_1password-gui/package.nix
Original file line number Diff line number Diff line change
Expand Up @@ -4,8 +4,6 @@
channel ? "stable",
fetchurl,
lib,
# This is only relevant for Linux, so we need to pass it through
polkitPolicyOwners ? [ ],
}:

let
Expand Down Expand Up @@ -63,6 +61,5 @@ else
version
src
meta
polkitPolicyOwners
;
}
4 changes: 1 addition & 3 deletions pkgs/by-name/gl/glib/package.nix
Original file line number Diff line number Diff line change
Expand Up @@ -37,9 +37,7 @@
libsysprof-capture,
mesonEmulatorHook,
withIntrospection ?
stdenv.hostPlatform.emulatorAvailable buildPackages
&& lib.meta.availableOn stdenv.hostPlatform gobject-introspection
&& stdenv.hostPlatform.isLittleEndian == stdenv.buildPlatform.isLittleEndian,
false,
}:

assert stdenv.hostPlatform.isLinux -> util-linuxMinimal != null;
Expand Down
Loading