{ inputs.nixpkgs.url = "github:NixOS/nixpkgs"; description = "Useful libs"; outputs = { self, nixpkgs }: { lib = rec { withNarKey = dep: moduleAttrs: let module = dep.${moduleAttrs}; key = builtins.hashString "sha256" (builtins.path { path = dep.sourceInfo.outPath; name = "source"; }); in if builtins.isFunction module then args@{ config, lib, pkgs, ... }: (module args // { inherit key; }) else module // { inherit key; }; }; }; }