1{ pkgs, haskellLib }:
2
3let
4 inherit (pkgs) lib;
5 inherit (lib.strings) hasSuffix removeSuffix;
6
7 pathsByName = lib.concatMapAttrs (
8 name: type:
9 lib.optionalAttrs (type == "regular" && hasSuffix ".nix" name) {
10 ${removeSuffix ".nix" name} = ./replacements-by-name + "/${name}";
11 }
12 ) (builtins.readDir ./replacements-by-name);
13in
14
15# EXTRA HASKELL PACKAGES NOT ON HACKAGE
16#
17# This file should only contain packages that are not in ./hackage-packages.nix.
18# Attributes in this set should be nothing more than a callPackage call.
19# Overrides to these packages should go to either configuration-nix.nix,
20# configuration-common.nix or to one of the compiler specific configuration
21# files.
22self: super:
23{
24
25 changelog-d = self.callPackage ../misc/haskell/changelog-d { };
26
27 dconf2nix = self.callPackage ../tools/haskell/dconf2nix/dconf2nix.nix { };
28
29 # Used by maintainers/scripts/regenerate-hackage-packages.sh, and generated
30 # from the latest master instead of the current version on Hackage.
31 cabal2nix-unstable = self.callPackage ./cabal2nix-unstable.nix { };
32
33 ghc-settings-edit = self.callPackage ../tools/haskell/ghc-settings-edit { };
34
35 # https://github.com/channable/vaultenv/issues/1
36 vaultenv = self.callPackage ../tools/haskell/vaultenv { };
37
38 # spago is not released to Hackage.
39 # https://github.com/spacchetti/spago/issues/512
40 spago = self.callPackage ../tools/purescript/spago/spago.nix { };
41
42 nix-linter = self.callPackage ../../development/tools/analysis/nix-linter { };
43
44 # Unofficial fork until PRs are merged https://github.com/pcapriotti/optparse-applicative/pulls/roberth
45 # cabal2nix --maintainer roberth https://github.com/hercules-ci/optparse-applicative.git > pkgs/development/misc/haskell/hercules-ci-optparse-applicative.nix
46 hercules-ci-optparse-applicative =
47 self.callPackage ../misc/haskell/hercules-ci-optparse-applicative.nix
48 { };
49
50}
51// lib.mapAttrs (_name: path: self.callPackage path { }) pathsByName