aboutsummaryrefslogtreecommitdiff
path: root/nixpkgs/pkgs/development/tools/haskell/dconf2nix/default.nix
blob: cfd391866ee30b19597823ac286e562a5589da84 (plain)
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.justStaticExecutables
      (haskell.lib.overrideCabal haskellPackages.dconf2nix (oldAttrs: {
        maintainers = (oldAttrs.maintainers or []) ++ [
          lib.maintainers.gvolpe
        ];
      }));
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
        '';
  };
})