git.iko.soy/typeable/nixpkgs
on master help sign in
Merge pull request #164431 from maralorn/bump-nom

nix-output-monitor: 1.1.2.0 -> 1.1.2.1 + Refactor

commit2e80229c8180f05de3d119d726e5b12b05f0a9f9 authormaralorn <malte.brandy@maralorn.de> dateThu 17 Mar 2022, 00:53 (5 years ago) parented8d521c998ef5
5 files changed+169−186
pkgs/development/haskell-modules/non-hackage-packages.nix−2 pkgs/tools/nix/nix-output-monitor/default.nix+19−160 pkgs/tools/nix/nix-output-monitor/generated-package.nix+147 pkgs/tools/nix/nix-output-monitor/update.sh+2−23 pkgs/top-level/all-packages.nix+1−1
pkgs/development/haskell-modules/non-hackage-packages.nix−2
@@ -24,8 +24,6 @@ self: super: {
2424
2525 nix-linter = self.callPackage ../../development/tools/analysis/nix-linter { };
2626
27− nix-output-monitor = self.callPackage ../../tools/nix/nix-output-monitor { };
28−
2927 # hasura graphql-engine is not released to hackage.
3028 # https://github.com/hasura/graphql-engine/issues/7391
3129 ci-info = self.callPackage ../misc/haskell/hasura/ci-info.nix {};
pkgs/tools/nix/nix-output-monitor/default.nix+19−160
@@ -1,164 +1,23 @@
1−# This file has been autogenerate with cabal2nix.
2−# Update via ./update.sh"
31{
4− mkDerivation,
5− ansi-terminal,
6− async,
7− attoparsec,
8− base,
9− bytestring,
10− cassava,
11− containers,
12− data-default,
13− directory,
2+ haskell,
143 expect,
15− extra,
16− fetchzip,
17− filepath,
18− generic-optics,
19− HUnit,
4+ haskellPackages,
205 installShellFiles,
21− lib,
22− lock-file,
23− MemoTrie,
24− mtl,
25− nix-derivation,
26− optics,
27− process,
28− random,
29− relude,
30− runtimeShell,
31− safe,
32− stm,
33− streamly,
34− terminal-size,
35− text,
36− time,
37− unix,
38− vector,
39− wcwidth,
40− word8,
41−}:
42−mkDerivation {
43− pname = "nix-output-monitor";
44− version = "1.1.2.0";
45− src = fetchzip {
46− url = "https://github.com/maralorn/nix-output-monitor/archive/refs/tags/v1.1.2.0.tar.gz";
47− sha256 = "03qhy4xzika41pxlmvpz3psgy54va72ipn9v1lv33l6369ikrhl1";
6+}: let
7+ inherit (haskell.lib.compose) justStaticExecutables overrideCabal;
8+ overrides = {
9+ passthru.updateScript = ./update.sh;
10+ testTarget = "unit-tests";
11+ buildTools = [installShellFiles];
12+ postInstall = ''
13+ substitute "exe-sh/nom-build" "$out/bin/nom-build" \
14+ --replace 'unbuffer' '${expect}/bin/unbuffer' \
15+ --replace 'nom' "$out/bin/nom"
16+ chmod a+x $out/bin/nom-build
17+ installShellCompletion --zsh --name _nom-build completions/completion.zsh
18+ '';
4819 };
49− isLibrary = true;
50− isExecutable = true;
51− libraryHaskellDepends = [
52− ansi-terminal
53− async
54− attoparsec
55− base
56− bytestring
57− cassava
58− containers
59− data-default
60− directory
61− extra
62− filepath
63− generic-optics
64− lock-file
65− MemoTrie
66− mtl
67− nix-derivation
68− optics
69− random
70− relude
71− safe
72− stm
73− streamly
74− terminal-size
75− text
76− time
77− unix
78− vector
79− wcwidth
80− word8
81− ];
82− executableHaskellDepends = [
83− ansi-terminal
84− async
85− attoparsec
86− base
87− bytestring
88− cassava
89− containers
90− data-default
91− directory
92− extra
93− filepath
94− generic-optics
95− lock-file
96− MemoTrie
97− mtl
98− nix-derivation
99− optics
100− random
101− relude
102− safe
103− stm
104− streamly
105− terminal-size
106− text
107− time
108− unix
109− vector
110− wcwidth
111− word8
112− ];
113− testHaskellDepends = [
114− ansi-terminal
115− async
116− attoparsec
117− base
118− bytestring
119− cassava
120− containers
121− data-default
122− directory
123− extra
124− filepath
125− generic-optics
126− HUnit
127− lock-file
128− MemoTrie
129− mtl
130− nix-derivation
131− optics
132− process
133− random
134− relude
135− safe
136− stm
137− streamly
138− terminal-size
139− text
140− time
141− unix
142− vector
143− wcwidth
144− word8
145− ];
146− homepage = "https://github.com/maralorn/nix-output-monitor";
147− description = "Parses output of nix-build to show additional information";
148− license = lib.licenses.agpl3Plus;
149− maintainers = with lib.maintainers; [maralorn];
150− passthru.updateScript = ./update.sh;
151− testTarget = "unit-tests";
152− buildTools = [installShellFiles];
153− postInstall = ''
154− cat > $out/bin/nom-build << EOF
155− #!${runtimeShell}
156− ${expect}/bin/unbuffer nix-build "\$@" 2>&1 | exec $out/bin/nom
157− EOF
158− chmod a+x $out/bin/nom-build
159− installShellCompletion --zsh --name _nom-build ${builtins.toFile "completion.zsh" ''
160− #compdef nom-build
161− compdef nom-build=nix-build
162− ''}
163− '';
164−}
20+in
21+ justStaticExecutables
22+ (overrideCabal overrides
23+ (haskellPackages.callPackage ./generated-package.nix {}))
pkgs/tools/nix/nix-output-monitor/generated-package.nixnew file+147
@@ -0,0 +1,147 @@
1+# This file has been autogenerate with cabal2nix.
2+# Update via ./update.sh"
3+{
4+ mkDerivation,
5+ ansi-terminal,
6+ async,
7+ attoparsec,
8+ base,
9+ bytestring,
10+ cassava,
11+ containers,
12+ data-default,
13+ directory,
14+ extra,
15+ fetchzip,
16+ filepath,
17+ generic-optics,
18+ HUnit,
19+ lib,
20+ lock-file,
21+ MemoTrie,
22+ mtl,
23+ nix-derivation,
24+ optics,
25+ process,
26+ random,
27+ relude,
28+ safe,
29+ stm,
30+ streamly,
31+ terminal-size,
32+ text,
33+ time,
34+ unix,
35+ vector,
36+ wcwidth,
37+ word8,
38+}:
39+mkDerivation {
40+ pname = "nix-output-monitor";
41+ version = "1.1.2.1";
42+ src = fetchzip {
43+ url = "https://github.com/maralorn/nix-output-monitor/archive/refs/tags/v1.1.2.1.tar.gz";
44+ sha256 = "00jn963jskyqnwvbvn5x0z92x2gv105p5h8m13nlmr90lj4axynx";
45+ };
46+ isLibrary = true;
47+ isExecutable = true;
48+ libraryHaskellDepends = [
49+ ansi-terminal
50+ async
51+ attoparsec
52+ base
53+ bytestring
54+ cassava
55+ containers
56+ data-default
57+ directory
58+ extra
59+ filepath
60+ generic-optics
61+ lock-file
62+ MemoTrie
63+ mtl
64+ nix-derivation
65+ optics
66+ random
67+ relude
68+ safe
69+ stm
70+ streamly
71+ terminal-size
72+ text
73+ time
74+ unix
75+ vector
76+ wcwidth
77+ word8
78+ ];
79+ executableHaskellDepends = [
80+ ansi-terminal
81+ async
82+ attoparsec
83+ base
84+ bytestring
85+ cassava
86+ containers
87+ data-default
88+ directory
89+ extra
90+ filepath
91+ generic-optics
92+ lock-file
93+ MemoTrie
94+ mtl
95+ nix-derivation
96+ optics
97+ random
98+ relude
99+ safe
100+ stm
101+ streamly
102+ terminal-size
103+ text
104+ time
105+ unix
106+ vector
107+ wcwidth
108+ word8
109+ ];
110+ testHaskellDepends = [
111+ ansi-terminal
112+ async
113+ attoparsec
114+ base
115+ bytestring
116+ cassava
117+ containers
118+ data-default
119+ directory
120+ extra
121+ filepath
122+ generic-optics
123+ HUnit
124+ lock-file
125+ MemoTrie
126+ mtl
127+ nix-derivation
128+ optics
129+ process
130+ random
131+ relude
132+ safe
133+ stm
134+ streamly
135+ terminal-size
136+ text
137+ time
138+ unix
139+ vector
140+ wcwidth
141+ word8
142+ ];
143+ homepage = "https://github.com/maralorn/nix-output-monitor";
144+ description = "Parses output of nix-build to show additional information";
145+ license = lib.licenses.agpl3Plus;
146+ maintainers = with lib.maintainers; [maralorn];
147+}
pkgs/tools/nix/nix-output-monitor/update.sh+2−23
@@ -9,7 +9,7 @@ set -eo pipefail
99# This is the directory of this update.sh script.
1010script_dir="$( cd "$( dirname "${BASH_SOURCE[0]}" )" >/dev/null 2>&1 && pwd )"
1111
12−derivation_file="${script_dir}/default.nix"
12+derivation_file="${script_dir}/generated-package.nix"
1313
1414# This is the latest released version of nix-output-monitor on GitHub.
1515new_version=$(curl --silent "https://api.github.com/repos/maralorn/nix-output-monitor/releases" | jq '.[0].tag_name' --raw-output)
@@ -23,30 +23,9 @@ cat > "$derivation_file" << EOF
2323EOF
2424
2525cabal2nix \
26− --extra-arguments expect \
27− --extra-arguments runtimeShell\
28− --extra-arguments installShellFiles\
2926 --maintainer maralorn \
3027 "https://github.com/maralorn/nix-output-monitor/archive/refs/tags/${new_version}.tar.gz" \
31− | head -n-1 >> "$derivation_file"
32−
33−cat >> "$derivation_file" << EOF
34− passthru.updateScript = ./update.sh;
35− testTarget = "unit-tests";
36− buildTools = [ installShellFiles ];
37− postInstall = ''
38− cat > \$out/bin/nom-build << EOF
39− #!\${runtimeShell}
40− \${expect}/bin/unbuffer nix-build "\\\$@" 2>&1 | exec \$out/bin/nom
41− EOF
42− chmod a+x \$out/bin/nom-build
43− installShellCompletion --zsh --name _nom-build \${builtins.toFile "completion.zsh" ''
44− #compdef nom-build
45− compdef nom-build=nix-build
46− ''}
47− '';
48−}
49−EOF
28+ >> "$derivation_file"
5029
5130alejandra "${derivation_file}" | cat
5231
pkgs/top-level/all-packages.nix+1−1
@@ -3606,7 +3606,7 @@ with pkgs;
36063606
36073607 nix-direnv = callPackage ../tools/misc/nix-direnv { };
36083608
3609− nix-output-monitor = haskell.lib.compose.justStaticExecutables (haskellPackages.nix-output-monitor);
3609+ nix-output-monitor = callPackage ../tools/nix/nix-output-monitor { };
36103610
36113611 nix-template = callPackage ../tools/package-management/nix-template {
36123612 inherit (darwin.apple_sdk.frameworks) Security;