diff options
Diffstat (limited to 'nixpkgs/pkgs/tools/nix')
-rw-r--r-- | nixpkgs/pkgs/tools/nix/alejandra/default.nix | 7 | ||||
-rw-r--r-- | nixpkgs/pkgs/tools/nix/nix-output-monitor/default.nix | 165 | ||||
-rwxr-xr-x | nixpkgs/pkgs/tools/nix/nix-output-monitor/update.sh | 53 | ||||
-rw-r--r-- | nixpkgs/pkgs/tools/nix/statix/default.nix | 3 |
4 files changed, 203 insertions, 25 deletions
diff --git a/nixpkgs/pkgs/tools/nix/alejandra/default.nix b/nixpkgs/pkgs/tools/nix/alejandra/default.nix index d1ad257568ff..15d232dbfbba 100644 --- a/nixpkgs/pkgs/tools/nix/alejandra/default.nix +++ b/nixpkgs/pkgs/tools/nix/alejandra/default.nix @@ -7,16 +7,16 @@ rustPlatform.buildRustPackage rec { pname = "alejandra"; - version = "0.3.1"; + version = "1.1.0"; src = fetchFromGitHub { owner = "kamadorueda"; repo = "alejandra"; rev = version; - sha256 = "sha256-IQ+hv/R6uRPEPr7+SRXyYol4/cQo1ZqcqJxy26CpOoY="; + sha256 = "sha256-vkFKYnSmhPPXtc3AH7iRtqRRqxhj0o5WySqPT+klDWU="; }; - cargoSha256 = "sha256-PIqdjtqbSVQoxLj5jGSbrzRQ3qddZvp1Y7tIuFs7UEg="; + cargoSha256 = "sha256-MsXaanznE4UtZMj54EDq86aJ2t4xT8O5ziTpa/KCwBw="; passthru.tests = { version = testVersion { package = alejandra; }; @@ -25,6 +25,7 @@ rustPlatform.buildRustPackage rec { meta = with lib; { description = "The Uncompromising Nix Code Formatter"; homepage = "https://github.com/kamadorueda/alejandra"; + changelog = "https://github.com/kamadorueda/alejandra/blob/${version}/CHANGELOG.md"; license = licenses.unlicense; maintainers = with maintainers; [ _0x4A6F kamadorueda ]; }; diff --git a/nixpkgs/pkgs/tools/nix/nix-output-monitor/default.nix b/nixpkgs/pkgs/tools/nix/nix-output-monitor/default.nix index a0700e43c5b2..0f78600a0506 100644 --- a/nixpkgs/pkgs/tools/nix/nix-output-monitor/default.nix +++ b/nixpkgs/pkgs/tools/nix/nix-output-monitor/default.nix @@ -1,41 +1,164 @@ -{ mkDerivation, ansi-terminal, async, attoparsec, base, containers -, cassava, directory, HUnit, mtl, nix-derivation, process, relude, lib -, stm, terminal-size, text, time, unix, wcwidth, fetchFromGitHub -, lock-file, data-default, expect, runtimeShell +# This file has been autogenerate with cabal2nix. +# Update via ./update.sh" +{ + mkDerivation, + ansi-terminal, + async, + attoparsec, + base, + bytestring, + cassava, + containers, + data-default, + directory, + expect, + extra, + fetchzip, + filepath, + generic-optics, + HUnit, + 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 rec { +mkDerivation { pname = "nix-output-monitor"; - version = "1.0.4.0"; - src = fetchFromGitHub { - owner = "maralorn"; - repo = "nix-output-monitor"; - hash = "sha256-3EQgjrDX8C3qG6danuPRl2gnPlX1qZjxjrROrKitsS0="; - rev = "v${version}"; + 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"; }; isLibrary = true; isExecutable = true; libraryHaskellDepends = [ - ansi-terminal async attoparsec base cassava containers directory mtl - nix-derivation relude stm terminal-size text time unix wcwidth lock-file + 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 containers directory mtl - nix-derivation relude stm text time unix + 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 containers directory HUnit mtl - nix-derivation process relude stm text time unix + 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 + ''} ''; - homepage = "https://github.com/maralorn/nix-output-monitor"; - description = "Parses output of nix-build to show additional information"; - license = lib.licenses.agpl3Plus; - maintainers = [ lib.maintainers.maralorn ]; } diff --git a/nixpkgs/pkgs/tools/nix/nix-output-monitor/update.sh b/nixpkgs/pkgs/tools/nix/nix-output-monitor/update.sh new file mode 100755 index 000000000000..ad5da0000300 --- /dev/null +++ b/nixpkgs/pkgs/tools/nix/nix-output-monitor/update.sh @@ -0,0 +1,53 @@ +#!/usr/bin/env nix-shell +#!nix-shell -i bash -p cabal2nix curl jq alejandra +# +# This script will update the nix-output-monitor derivation to the latest version using +# cabal2nix. + +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" + +# 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) + +echo "Updating nix-output-monitor to version $new_version." +echo "Running cabal2nix and outputting to ${derivation_file}..." + +cat > "$derivation_file" << EOF +# This file has been autogenerate with cabal2nix. +# Update via ./update.sh" +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 + +alejandra "${derivation_file}" | cat + +echo "Finished." diff --git a/nixpkgs/pkgs/tools/nix/statix/default.nix b/nixpkgs/pkgs/tools/nix/statix/default.nix index 0f3a1c10e355..d25f51ae5aa2 100644 --- a/nixpkgs/pkgs/tools/nix/statix/default.nix +++ b/nixpkgs/pkgs/tools/nix/statix/default.nix @@ -2,7 +2,8 @@ rustPlatform.buildRustPackage rec { pname = "statix"; - # also update version of the vim plugin in pkgs/misc/vim-plugins/overrides.nix + # also update version of the vim plugin in + # pkgs/applications/editors/vim/plugins/overrides.nix # the version can be found in flake.nix of the source code version = "0.5.4"; |