From 4b30e1a0d97baf749e14d8d253c19cc8fbfbbba3 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Janne=20He=C3=9F?= Date: Thu, 8 Aug 2024 11:12:51 +0200 Subject: [PATCH] nixfmt-rfc-style: 2024-07-12 -> 2024-08-08 - nixfmt --version shows the actual version, closes https://github.com/NixOS/nixfmt/issues/229 - Support for pipe operators - Fix for an infinite recursion --- pkgs/by-name/ni/nixfmt-rfc-style/date.txt | 2 +- .../ni/nixfmt-rfc-style/generated-package.nix | 14 ++++++++------ pkgs/by-name/ni/nixfmt-rfc-style/package.nix | 6 +++++- 3 files changed, 14 insertions(+), 8 deletions(-) diff --git a/pkgs/by-name/ni/nixfmt-rfc-style/date.txt b/pkgs/by-name/ni/nixfmt-rfc-style/date.txt index c471a757cea5..b489d080c1cd 100644 --- a/pkgs/by-name/ni/nixfmt-rfc-style/date.txt +++ b/pkgs/by-name/ni/nixfmt-rfc-style/date.txt @@ -1 +1 @@ -2024-07-12 +2024-08-08 diff --git a/pkgs/by-name/ni/nixfmt-rfc-style/generated-package.nix b/pkgs/by-name/ni/nixfmt-rfc-style/generated-package.nix index 2a52509d1f16..9e73ac8e2e75 100644 --- a/pkgs/by-name/ni/nixfmt-rfc-style/generated-package.nix +++ b/pkgs/by-name/ni/nixfmt-rfc-style/generated-package.nix @@ -1,15 +1,16 @@ # This file has been autogenerate with cabal2nix. # Update via ./update.sh -{ mkDerivation, base, cmdargs, directory, fetchzip, filepath, lib -, megaparsec, mtl, parser-combinators, pretty-simple -, safe-exceptions, scientific, text, transformers, unix +{ mkDerivation, base, bytestring, cmdargs, directory, fetchzip +, file-embed, filepath, lib, megaparsec, mtl, parser-combinators +, pretty-simple, safe-exceptions, scientific, text, transformers +, unix }: mkDerivation { pname = "nixfmt"; version = "0.6.0"; src = fetchzip { - url = "https://github.com/nixos/nixfmt/archive/83de1eceaae8a891ae52a3a2b82226540207309e.tar.gz"; - sha256 = "0lnl9vlbyrfplmq3hpmpjlmhjdwwbgk900wgi25ib27v0mlgpnxp"; + url = "https://github.com/nixos/nixfmt/archive/a707c70ab6fed71032ac55bb1029306a50a80d34.tar.gz"; + sha256 = "1v5hch8j1w1bvn2r4xz4ym60ykgsc074y28vpin9qraagv06x8sm"; }; isLibrary = true; isExecutable = true; @@ -18,7 +19,8 @@ mkDerivation { text transformers ]; executableHaskellDepends = [ - base cmdargs directory filepath safe-exceptions text unix + base bytestring cmdargs directory file-embed filepath + safe-exceptions text unix ]; jailbreak = true; homepage = "https://github.com/NixOS/nixfmt"; diff --git a/pkgs/by-name/ni/nixfmt-rfc-style/package.nix b/pkgs/by-name/ni/nixfmt-rfc-style/package.nix index a11e2d29ff69..980a840d6408 100644 --- a/pkgs/by-name/ni/nixfmt-rfc-style/package.nix +++ b/pkgs/by-name/ni/nixfmt-rfc-style/package.nix @@ -8,13 +8,17 @@ let inherit (haskell.lib.compose) overrideCabal justStaticExecutables; - overrides = { + overrides = rec { version = "unstable-${lib.fileContents ./date.txt}"; passthru.updateScript = ./update.sh; maintainers = lib.teams.formatter.members; + preBuild = '' + echo -n 'nixpkgs-${version}' > .version + ''; + # These tests can be run with the following command. # # $ nix-build -A nixfmt-rfc-style.tests