···384 # for the "shellFor" environment (ensuring that any test/benchmark
385 # dependencies for "foo" will be available within the nix-shell).
386 , genericBuilderArgsModifier ? (args: args)
000000000000387 , ...
388 } @ args:
389 let
···474 # See the Note in `zipperCombinedPkgs` for what gets filtered out from
475 # each of these dependency lists.
476 packageInputs =
477- pkgs.lib.zipAttrsWith (_name: zipperCombinedPkgs) cabalDepsForSelected;
478479 # A attribute set to pass to `haskellPackages.mkDerivation`.
480 #
···514 # pkgWithCombinedDepsDevDrv :: Derivation
515 pkgWithCombinedDepsDevDrv = pkgWithCombinedDeps.envFunc { inherit withHoogle; };
516517- mkDerivationArgs = builtins.removeAttrs args [ "genericBuilderArgsModifier" "packages" "withHoogle" "doBenchmark" ];
518519 in pkgWithCombinedDepsDevDrv.overrideAttrs (old: mkDerivationArgs // {
520 nativeBuildInputs = old.nativeBuildInputs ++ mkDerivationArgs.nativeBuildInputs or [];
···384 # for the "shellFor" environment (ensuring that any test/benchmark
385 # dependencies for "foo" will be available within the nix-shell).
386 , genericBuilderArgsModifier ? (args: args)
387+388+ # Extra dependencies, in the form of cabal2nix build attributes.
389+ #
390+ # An example use case is when you have Haskell scripts that use
391+ # libraries that don't occur in your packages' dependencies.
392+ #
393+ # Example:
394+ #
395+ # extraDependencies = p: {
396+ # libraryHaskellDepends = [ p.releaser ];
397+ # };
398+ , extraDependencies ? p: {}
399 , ...
400 } @ args:
401 let
···486 # See the Note in `zipperCombinedPkgs` for what gets filtered out from
487 # each of these dependency lists.
488 packageInputs =
489+ pkgs.lib.zipAttrsWith (_name: zipperCombinedPkgs) (cabalDepsForSelected ++ [ (extraDependencies self) ]);
490491 # A attribute set to pass to `haskellPackages.mkDerivation`.
492 #
···526 # pkgWithCombinedDepsDevDrv :: Derivation
527 pkgWithCombinedDepsDevDrv = pkgWithCombinedDeps.envFunc { inherit withHoogle; };
528529+ mkDerivationArgs = builtins.removeAttrs args [ "genericBuilderArgsModifier" "packages" "withHoogle" "doBenchmark" "extraDependencies" ];
530531 in pkgWithCombinedDepsDevDrv.overrideAttrs (old: mkDerivationArgs // {
532 nativeBuildInputs = old.nativeBuildInputs ++ mkDerivationArgs.nativeBuildInputs or [];