mirror of
https://github.com/NixOS/nix
synced 2025-07-08 06:53:54 +02:00
Add resolvePath, filesetToSource indirections for Nixpkgs
This commit is contained in:
parent
0729f0a113
commit
bea54d116e
5 changed files with 18 additions and 5 deletions
|
@ -14,9 +14,16 @@
|
|||
let
|
||||
inherit (pkgs) lib;
|
||||
|
||||
root = ../.;
|
||||
|
||||
# Nixpkgs implements this by returning a subpath into the fetched Nix sources.
|
||||
resolvePath = p: p;
|
||||
|
||||
# Indirection for Nixpkgs to override when package.nix files are vendored
|
||||
filesetToSource = lib.fileset.toSource;
|
||||
|
||||
localSourceLayer = finalAttrs: prevAttrs:
|
||||
let
|
||||
root = ../.;
|
||||
workDirPath =
|
||||
# Ideally we'd pick finalAttrs.workDir, but for now `mkDerivation` has
|
||||
# the requirement that everything except passthru and meta must be
|
||||
|
@ -104,5 +111,7 @@ scope: {
|
|||
meta.platforms = lib.platforms.all;
|
||||
});
|
||||
|
||||
inherit resolvePath filesetToSource;
|
||||
|
||||
mkMesonDerivation = f: stdenv.mkDerivation (lib.extends localSourceLayer f);
|
||||
}
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue