From a9a612199da01d24082051c80b90ebc0ef8b638a Mon Sep 17 00:00:00 2001 From: I-Al-Istannen Date: Wed, 8 Jan 2025 19:47:09 +0100 Subject: [PATCH] chore: Update nix lockfile (#6130) --- flake.lock | 6 +++--- flake.nix | 35 ++++++++++++++--------------------- 2 files changed, 17 insertions(+), 24 deletions(-) diff --git a/flake.lock b/flake.lock index ad56595227c..8fb5d40f6bb 100644 --- a/flake.lock +++ b/flake.lock @@ -2,11 +2,11 @@ "nodes": { "nixpkgs": { "locked": { - "lastModified": 1734649271, - "narHash": "sha256-4EVBRhOjMDuGtMaofAIqzJbg4Ql7Ai0PSeuVZTHjyKQ=", + "lastModified": 1736012469, + "narHash": "sha256-/qlNWm/IEVVH7GfgAIyP6EsVZI6zjAx1cV5zNyrs+rI=", "owner": "NixOS", "repo": "nixpkgs", - "rev": "d70bd19e0a38ad4790d3913bf08fcbfc9eeca507", + "rev": "8f3e1f807051e32d8c95cd12b9b421623850a34d", "type": "github" }, "original": { diff --git a/flake.nix b/flake.nix index 91d82867bd7..e33eaf9bf86 100644 --- a/flake.nix +++ b/flake.nix @@ -44,28 +44,21 @@ sha256 = "sha256-wl5UEu2U11Q0lZfm9reMhGMCI7y6sabk18j7SPWgy1k="; }; }; - jreleaser = pkgs.stdenv.mkDerivation rec { - pname = "jreleaser-cli"; - version = "1.11.0"; - - src = pkgs.fetchurl { - url = "https://github.com/jreleaser/jreleaser/releases/download/v${version}/jreleaser-tool-provider-${version}.jar"; - sha256 = "sha256-VkINXKVBBBK6/PIRPMVKZGY9afE7mAsqrcFPh2Algqk="; - }; - - nativeBuildInputs = with pkgs; [ makeWrapper ]; - - dontUnpack = true; - - installPhase = '' - mkdir -p $out/share/java/ $out/bin/ - cp $src $out/share/java/${pname}.jar - makeWrapper ${pkgs.jdk}/bin/java $out/bin/${pname} \ - --add-flags "-jar $out/share/java/${pname}.jar" - ''; - }; in pkgs.mkShell rec { + shellHook = '' + if [ "$LANG" = "C.UTF-8" ]; then + echo "You are using the C locale. Tests will fail. Changing it to en_US if possible" + + if locale -a | grep -iP "en_us.utf(-?)8"; then + echo "Changing your locale to en_US.UTF-8" + export LANG=en_US.UTF-8 + else + echo "You do not have en_US.UTF-8 installed ('localectl list-locales'/'locale -a')" + echo "Please change it something else yourself" + fi + fi + ''; test = pkgs.writeScriptBin "test" '' set -eu @@ -179,7 +172,7 @@ packages = with pkgs; [ jdk maven test codegen coverage mavenPomQuality javadocQuality reproducibleBuilds ] ++ (if extraChecks then [ gradle pythonEnv extra extraRemote jbang ] else [ ]) - ++ (if release then [ semver jreleaser ] else [ ]); + ++ (if release then [ semver pkgs.jreleaser-cli ] else [ ]); }; in {