Clone of https://github.com/NixOS/nixpkgs.git (to stress-test knotserver)

haskell.lib.packagesFromDirectory: only `.nix` files

This changes `haskell.lib.packagesFromDirectory` to ignore non-Nix
files so that it doesn't attempt to run `callPackage` on, say, a
`.md` file in the same directory.

+3 -1
+3 -1
pkgs/development/haskell-modules/lib/compose.nix
··· 407 408 self: super: 409 let 410 - haskellPaths = builtins.attrNames (builtins.readDir directory); 411 412 toKeyVal = file: { 413 name = builtins.replaceStrings [ ".nix" ] [ "" ] file;
··· 407 408 self: super: 409 let 410 + haskellPaths = 411 + lib.filter (lib.hasSuffix ".nix") 412 + (builtins.attrNames (builtins.readDir directory)); 413 414 toKeyVal = file: { 415 name = builtins.replaceStrings [ ".nix" ] [ "" ] file;