From 24abbb43d6d2c5aa9126cb9413f98165d17bf8f4 Mon Sep 17 00:00:00 2001 From: Brian Weir Date: Tue, 22 Aug 2023 15:03:33 +0200 Subject: [PATCH 1/2] Add linux environment variable for packell to nix env --- Makefile | 4 ++-- nix/packell.nix | 9 ++++++++- 2 files changed, 10 insertions(+), 3 deletions(-) diff --git a/Makefile b/Makefile index bfb37680d..9270773f4 100644 --- a/Makefile +++ b/Makefile @@ -127,13 +127,13 @@ ci-assembly: ci-versioning: @nix-shell \ --pure \ - --run 'export LANG=C.UTF-8; packell versioning validate' + --run 'packell versioning validate' .PHONY: ci-data-dependencies ci-data-dependencies: @nix-shell \ --pure \ - --run 'export LANG=C.UTF-8; packell data-dependencies validate' + --run 'packell data-dependencies validate' .PHONY: ci-local ci-local: clean-all ci-headers-check ci-versioning ci-data-dependencies ci-build ci-validate ci-build-java ci-build-js ci-test ci-docs diff --git a/nix/packell.nix b/nix/packell.nix index 13daa551f..3a3a61082 100644 --- a/nix/packell.nix +++ b/nix/packell.nix @@ -26,10 +26,17 @@ in version = "$version"; src = tarball; nativeBuildInputs = if stdenv.isLinux then [ pkgs.autoPatchelfHook ] else [ ]; - buildInputs = if stdenv.isLinux then [ pkgs.gmp pkgs.libffi ] else [ ]; + buildInputs = if stdenv.isLinux then [ pkgs.gmp pkgs.libffi ] else [ ]; baseInputs = [ pkgs.binutils ]; installPhase = '' mkdir -p $out/bin cp packell $out/bin ''; + preFixup = if stdenv.isLinux + then '' + # Set LANG for linux environments. + mkdir -p $out/nix-support + echo export LANG=C.UTF-8 > $out/nix-support/setup-hook + '' + else ""; } From 2f20c9e27dc22b857d7e1ef4d35db270f7fb82e6 Mon Sep 17 00:00:00 2001 From: Brian Weir Date: Tue, 22 Aug 2023 15:15:44 +0200 Subject: [PATCH 2/2] Remove LANG export in circleci config --- .circleci/config.yml | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/.circleci/config.yml b/.circleci/config.yml index 9fa54a079..a1046d5e4 100644 --- a/.circleci/config.yml +++ b/.circleci/config.yml @@ -204,11 +204,11 @@ jobs: - run: name: Validate package versions command: - nix-shell --pure --run 'export LANG=C.UTF-8; packell versioning validate' + make ci-versioning - run: name: Validate package data-dependencies command: - nix-shell --pure --run 'export LANG=C.UTF-8; packell data-dependencies validate' + make ci-data-dependencies - run_daml_build - run: name: Validate packages