Skip to content

Commit

Permalink
Add 'lib' collection to scope
Browse files Browse the repository at this point in the history
  • Loading branch information
vapourismo committed Sep 20, 2023
1 parent d1dbe56 commit ec0f82a
Show file tree
Hide file tree
Showing 2 changed files with 24 additions and 0 deletions.
2 changes: 2 additions & 0 deletions nix/scope/default.nix
Original file line number Diff line number Diff line change
Expand Up @@ -37,4 +37,6 @@ in
mkdir -p $out/packages
'';
};

lib = callSubPackage ./lib.nix {};
})
22 changes: 22 additions & 0 deletions nix/scope/lib.nix
Original file line number Diff line number Diff line change
@@ -0,0 +1,22 @@
{...}: let
overrideOpamDrv = drv: newArgs:
drv.override (prev: {
mkOpamDerivation = args: prev.mkOpamDerivation (args // newArgs);
});

overrideNativeDepends = drv: nativePackages:
overrideOpamDrv drv {
# Disable any guessed native dependencies.
guessedNativeDepends = [];

# Override the list of native dependencies.
nativeDepends = [
{
filter = {bool, ...}: bool true;
inherit nativePackages;
}
];
};
in {
inherit overrideOpamDrv overrideNativeDepends;
}

0 comments on commit ec0f82a

Please sign in to comment.