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/cabal2nix.nix {
32 distribution-nixpkgs = self.distribution-nixpkgs-unstable;
33 hackage-db = self.hackage-db-unstable;
34 language-nix = self.language-nix-unstable;
35 };
36 distribution-nixpkgs-unstable = self.callPackage ./cabal2nix-unstable/distribution-nixpkgs.nix {
37 language-nix = self.language-nix-unstable;
38 };
39 hackage-db-unstable = self.callPackage ./cabal2nix-unstable/hackage-db.nix { };
40 language-nix-unstable = self.callPackage ./cabal2nix-unstable/language-nix.nix { };
41
42 ghc-settings-edit = self.callPackage ../tools/haskell/ghc-settings-edit { };
43
44 # https://github.com/channable/vaultenv/issues/1
45 vaultenv = self.callPackage ../tools/haskell/vaultenv { };
46
47 # spago is not released to Hackage.
48 # https://github.com/spacchetti/spago/issues/512
49 spago = self.callPackage ../tools/purescript/spago/spago.nix { };
50
51 # Unofficial fork until PRs are merged https://github.com/pcapriotti/optparse-applicative/pulls/roberth
52 # cabal2nix --maintainer roberth https://github.com/hercules-ci/optparse-applicative.git > pkgs/development/misc/haskell/hercules-ci-optparse-applicative.nix
53 hercules-ci-optparse-applicative =
54 self.callPackage ../misc/haskell/hercules-ci-optparse-applicative.nix
55 { };
56
57}
58// lib.mapAttrs (_name: path: self.callPackage path { }) pathsByName