summary refs log tree commit diff
path: root/pkgs/development/tools/haskell/dconf2nix/default.nix
blob: 4cc137b54f75bd227d66eb23c3d0abf457916f0f (plain) (blame)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
{ haskell, haskellPackages, lib, runCommand }:

let
  dconf2nix =
    haskell.lib.compose.justStaticExecutables
      (haskell.lib.compose.overrideCabal (oldAttrs: {
        maintainers = (oldAttrs.maintainers or []) ++ [
          lib.maintainers.gvolpe
        ];
      }) haskellPackages.dconf2nix);
in

dconf2nix.overrideAttrs (oldAttrs: {
  passthru = (oldAttrs.passthru or {}) // {
    updateScript = ./update.sh;

    # These tests can be run with the following command.
    #
    # $ nix-build -A dconf2nix.passthru.tests
    tests =
      runCommand
        "dconf2nix-tests"
        {
          nativeBuildInputs = [
            dconf2nix
          ];
        }
        ''
          dconf2nix > $out
        '';
  };
})