Merge pull request #164431 from maralorn/bump-nom
nix-output-monitor: 1.1.2.0 -> 1.1.2.1 + Refactor
This commit is contained in:
commit
2e80229c81
|
@ -24,8 +24,6 @@ self: super: {
|
|||
|
||||
nix-linter = self.callPackage ../../development/tools/analysis/nix-linter { };
|
||||
|
||||
nix-output-monitor = self.callPackage ../../tools/nix/nix-output-monitor { };
|
||||
|
||||
# hasura graphql-engine is not released to hackage.
|
||||
# https://github.com/hasura/graphql-engine/issues/7391
|
||||
ci-info = self.callPackage ../misc/haskell/hasura/ci-info.nix {};
|
||||
|
|
|
@ -1,164 +1,23 @@
|
|||
# This file has been autogenerate with cabal2nix.
|
||||
# Update via ./update.sh"
|
||||
{
|
||||
mkDerivation,
|
||||
ansi-terminal,
|
||||
async,
|
||||
attoparsec,
|
||||
base,
|
||||
bytestring,
|
||||
cassava,
|
||||
containers,
|
||||
data-default,
|
||||
directory,
|
||||
haskell,
|
||||
expect,
|
||||
extra,
|
||||
fetchzip,
|
||||
filepath,
|
||||
generic-optics,
|
||||
HUnit,
|
||||
haskellPackages,
|
||||
installShellFiles,
|
||||
lib,
|
||||
lock-file,
|
||||
MemoTrie,
|
||||
mtl,
|
||||
nix-derivation,
|
||||
optics,
|
||||
process,
|
||||
random,
|
||||
relude,
|
||||
runtimeShell,
|
||||
safe,
|
||||
stm,
|
||||
streamly,
|
||||
terminal-size,
|
||||
text,
|
||||
time,
|
||||
unix,
|
||||
vector,
|
||||
wcwidth,
|
||||
word8,
|
||||
}:
|
||||
mkDerivation {
|
||||
pname = "nix-output-monitor";
|
||||
version = "1.1.2.0";
|
||||
src = fetchzip {
|
||||
url = "https://github.com/maralorn/nix-output-monitor/archive/refs/tags/v1.1.2.0.tar.gz";
|
||||
sha256 = "03qhy4xzika41pxlmvpz3psgy54va72ipn9v1lv33l6369ikrhl1";
|
||||
}: let
|
||||
inherit (haskell.lib.compose) justStaticExecutables overrideCabal;
|
||||
overrides = {
|
||||
passthru.updateScript = ./update.sh;
|
||||
testTarget = "unit-tests";
|
||||
buildTools = [installShellFiles];
|
||||
postInstall = ''
|
||||
substitute "exe-sh/nom-build" "$out/bin/nom-build" \
|
||||
--replace 'unbuffer' '${expect}/bin/unbuffer' \
|
||||
--replace 'nom' "$out/bin/nom"
|
||||
chmod a+x $out/bin/nom-build
|
||||
installShellCompletion --zsh --name _nom-build completions/completion.zsh
|
||||
'';
|
||||
};
|
||||
isLibrary = true;
|
||||
isExecutable = true;
|
||||
libraryHaskellDepends = [
|
||||
ansi-terminal
|
||||
async
|
||||
attoparsec
|
||||
base
|
||||
bytestring
|
||||
cassava
|
||||
containers
|
||||
data-default
|
||||
directory
|
||||
extra
|
||||
filepath
|
||||
generic-optics
|
||||
lock-file
|
||||
MemoTrie
|
||||
mtl
|
||||
nix-derivation
|
||||
optics
|
||||
random
|
||||
relude
|
||||
safe
|
||||
stm
|
||||
streamly
|
||||
terminal-size
|
||||
text
|
||||
time
|
||||
unix
|
||||
vector
|
||||
wcwidth
|
||||
word8
|
||||
];
|
||||
executableHaskellDepends = [
|
||||
ansi-terminal
|
||||
async
|
||||
attoparsec
|
||||
base
|
||||
bytestring
|
||||
cassava
|
||||
containers
|
||||
data-default
|
||||
directory
|
||||
extra
|
||||
filepath
|
||||
generic-optics
|
||||
lock-file
|
||||
MemoTrie
|
||||
mtl
|
||||
nix-derivation
|
||||
optics
|
||||
random
|
||||
relude
|
||||
safe
|
||||
stm
|
||||
streamly
|
||||
terminal-size
|
||||
text
|
||||
time
|
||||
unix
|
||||
vector
|
||||
wcwidth
|
||||
word8
|
||||
];
|
||||
testHaskellDepends = [
|
||||
ansi-terminal
|
||||
async
|
||||
attoparsec
|
||||
base
|
||||
bytestring
|
||||
cassava
|
||||
containers
|
||||
data-default
|
||||
directory
|
||||
extra
|
||||
filepath
|
||||
generic-optics
|
||||
HUnit
|
||||
lock-file
|
||||
MemoTrie
|
||||
mtl
|
||||
nix-derivation
|
||||
optics
|
||||
process
|
||||
random
|
||||
relude
|
||||
safe
|
||||
stm
|
||||
streamly
|
||||
terminal-size
|
||||
text
|
||||
time
|
||||
unix
|
||||
vector
|
||||
wcwidth
|
||||
word8
|
||||
];
|
||||
homepage = "https://github.com/maralorn/nix-output-monitor";
|
||||
description = "Parses output of nix-build to show additional information";
|
||||
license = lib.licenses.agpl3Plus;
|
||||
maintainers = with lib.maintainers; [maralorn];
|
||||
passthru.updateScript = ./update.sh;
|
||||
testTarget = "unit-tests";
|
||||
buildTools = [installShellFiles];
|
||||
postInstall = ''
|
||||
cat > $out/bin/nom-build << EOF
|
||||
#!${runtimeShell}
|
||||
${expect}/bin/unbuffer nix-build "\$@" 2>&1 | exec $out/bin/nom
|
||||
EOF
|
||||
chmod a+x $out/bin/nom-build
|
||||
installShellCompletion --zsh --name _nom-build ${builtins.toFile "completion.zsh" ''
|
||||
#compdef nom-build
|
||||
compdef nom-build=nix-build
|
||||
''}
|
||||
'';
|
||||
}
|
||||
in
|
||||
justStaticExecutables
|
||||
(overrideCabal overrides
|
||||
(haskellPackages.callPackage ./generated-package.nix {}))
|
||||
|
|
147
pkgs/tools/nix/nix-output-monitor/generated-package.nix
Normal file
147
pkgs/tools/nix/nix-output-monitor/generated-package.nix
Normal file
|
@ -0,0 +1,147 @@
|
|||
# This file has been autogenerate with cabal2nix.
|
||||
# Update via ./update.sh"
|
||||
{
|
||||
mkDerivation,
|
||||
ansi-terminal,
|
||||
async,
|
||||
attoparsec,
|
||||
base,
|
||||
bytestring,
|
||||
cassava,
|
||||
containers,
|
||||
data-default,
|
||||
directory,
|
||||
extra,
|
||||
fetchzip,
|
||||
filepath,
|
||||
generic-optics,
|
||||
HUnit,
|
||||
lib,
|
||||
lock-file,
|
||||
MemoTrie,
|
||||
mtl,
|
||||
nix-derivation,
|
||||
optics,
|
||||
process,
|
||||
random,
|
||||
relude,
|
||||
safe,
|
||||
stm,
|
||||
streamly,
|
||||
terminal-size,
|
||||
text,
|
||||
time,
|
||||
unix,
|
||||
vector,
|
||||
wcwidth,
|
||||
word8,
|
||||
}:
|
||||
mkDerivation {
|
||||
pname = "nix-output-monitor";
|
||||
version = "1.1.2.1";
|
||||
src = fetchzip {
|
||||
url = "https://github.com/maralorn/nix-output-monitor/archive/refs/tags/v1.1.2.1.tar.gz";
|
||||
sha256 = "00jn963jskyqnwvbvn5x0z92x2gv105p5h8m13nlmr90lj4axynx";
|
||||
};
|
||||
isLibrary = true;
|
||||
isExecutable = true;
|
||||
libraryHaskellDepends = [
|
||||
ansi-terminal
|
||||
async
|
||||
attoparsec
|
||||
base
|
||||
bytestring
|
||||
cassava
|
||||
containers
|
||||
data-default
|
||||
directory
|
||||
extra
|
||||
filepath
|
||||
generic-optics
|
||||
lock-file
|
||||
MemoTrie
|
||||
mtl
|
||||
nix-derivation
|
||||
optics
|
||||
random
|
||||
relude
|
||||
safe
|
||||
stm
|
||||
streamly
|
||||
terminal-size
|
||||
text
|
||||
time
|
||||
unix
|
||||
vector
|
||||
wcwidth
|
||||
word8
|
||||
];
|
||||
executableHaskellDepends = [
|
||||
ansi-terminal
|
||||
async
|
||||
attoparsec
|
||||
base
|
||||
bytestring
|
||||
cassava
|
||||
containers
|
||||
data-default
|
||||
directory
|
||||
extra
|
||||
filepath
|
||||
generic-optics
|
||||
lock-file
|
||||
MemoTrie
|
||||
mtl
|
||||
nix-derivation
|
||||
optics
|
||||
random
|
||||
relude
|
||||
safe
|
||||
stm
|
||||
streamly
|
||||
terminal-size
|
||||
text
|
||||
time
|
||||
unix
|
||||
vector
|
||||
wcwidth
|
||||
word8
|
||||
];
|
||||
testHaskellDepends = [
|
||||
ansi-terminal
|
||||
async
|
||||
attoparsec
|
||||
base
|
||||
bytestring
|
||||
cassava
|
||||
containers
|
||||
data-default
|
||||
directory
|
||||
extra
|
||||
filepath
|
||||
generic-optics
|
||||
HUnit
|
||||
lock-file
|
||||
MemoTrie
|
||||
mtl
|
||||
nix-derivation
|
||||
optics
|
||||
process
|
||||
random
|
||||
relude
|
||||
safe
|
||||
stm
|
||||
streamly
|
||||
terminal-size
|
||||
text
|
||||
time
|
||||
unix
|
||||
vector
|
||||
wcwidth
|
||||
word8
|
||||
];
|
||||
homepage = "https://github.com/maralorn/nix-output-monitor";
|
||||
description = "Parses output of nix-build to show additional information";
|
||||
license = lib.licenses.agpl3Plus;
|
||||
maintainers = with lib.maintainers; [maralorn];
|
||||
}
|
|
@ -9,7 +9,7 @@ set -eo pipefail
|
|||
# This is the directory of this update.sh script.
|
||||
script_dir="$( cd "$( dirname "${BASH_SOURCE[0]}" )" >/dev/null 2>&1 && pwd )"
|
||||
|
||||
derivation_file="${script_dir}/default.nix"
|
||||
derivation_file="${script_dir}/generated-package.nix"
|
||||
|
||||
# This is the latest released version of nix-output-monitor on GitHub.
|
||||
new_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
|
|||
EOF
|
||||
|
||||
cabal2nix \
|
||||
--extra-arguments expect \
|
||||
--extra-arguments runtimeShell\
|
||||
--extra-arguments installShellFiles\
|
||||
--maintainer maralorn \
|
||||
"https://github.com/maralorn/nix-output-monitor/archive/refs/tags/${new_version}.tar.gz" \
|
||||
| head -n-1 >> "$derivation_file"
|
||||
|
||||
cat >> "$derivation_file" << EOF
|
||||
passthru.updateScript = ./update.sh;
|
||||
testTarget = "unit-tests";
|
||||
buildTools = [ installShellFiles ];
|
||||
postInstall = ''
|
||||
cat > \$out/bin/nom-build << EOF
|
||||
#!\${runtimeShell}
|
||||
\${expect}/bin/unbuffer nix-build "\\\$@" 2>&1 | exec \$out/bin/nom
|
||||
EOF
|
||||
chmod a+x \$out/bin/nom-build
|
||||
installShellCompletion --zsh --name _nom-build \${builtins.toFile "completion.zsh" ''
|
||||
#compdef nom-build
|
||||
compdef nom-build=nix-build
|
||||
''}
|
||||
'';
|
||||
}
|
||||
EOF
|
||||
>> "$derivation_file"
|
||||
|
||||
alejandra "${derivation_file}" | cat
|
||||
|
||||
|
|
|
@ -3606,7 +3606,7 @@ with pkgs;
|
|||
|
||||
nix-direnv = callPackage ../tools/misc/nix-direnv { };
|
||||
|
||||
nix-output-monitor = haskell.lib.compose.justStaticExecutables (haskellPackages.nix-output-monitor);
|
||||
nix-output-monitor = callPackage ../tools/nix/nix-output-monitor { };
|
||||
|
||||
nix-template = callPackage ../tools/package-management/nix-template {
|
||||
inherit (darwin.apple_sdk.frameworks) Security;
|
||||
|
|
Loading…
Reference in a new issue