summary refs log tree commit diff
path: root/pkgs/tools/nix/nix-output-monitor/default.nix
blob: 2eb15ebcfb7ae455598609b00df3b474e6ac65ca (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
{
  haskell,
  haskellPackages,
  installShellFiles,
  lib,
}: let
  inherit (haskell.lib.compose) justStaticExecutables overrideCabal;

  overrides = {
    passthru.updateScript = ./update.sh;

    # nom has unit-tests and golden-tests
    # golden-tests call nix and thus can’t be run in a nix build.
    testTarget = "unit-tests";

    buildTools = [installShellFiles];
    postInstall = ''
      ln -s nom "$out/bin/nom-build"
      ln -s nom "$out/bin/nom-shell"
      chmod a+x $out/bin/nom-build
      installShellCompletion --zsh --name _nom-build completions/completion.zsh
    '';
  };
  raw-pkg = haskellPackages.callPackage ./generated-package.nix {};
in
  lib.pipe
  raw-pkg
  [
    (overrideCabal overrides)
    justStaticExecutables
  ]