summary refs log tree commit diff
diff options
context:
space:
mode:
authorAustin Seipp <aseipp@pobox.com>2023-04-28 02:01:08 -0500
committerAustin Seipp <aseipp@pobox.com>2023-04-28 04:40:45 -0500
commit6a086197c2d34075d43bdbe6b1243f97f6222115 (patch)
tree19c0812bcd685eef8401b36755a8a0c0f58acc7b
parent853ab9b4bda17626303fe7d77379b40b10676068 (diff)
downloadnixpkgs-6a086197c2d34075d43bdbe6b1243f97f6222115.tar
nixpkgs-6a086197c2d34075d43bdbe6b1243f97f6222115.tar.gz
nixpkgs-6a086197c2d34075d43bdbe6b1243f97f6222115.tar.bz2
nixpkgs-6a086197c2d34075d43bdbe6b1243f97f6222115.tar.lz
nixpkgs-6a086197c2d34075d43bdbe6b1243f97f6222115.tar.xz
nixpkgs-6a086197c2d34075d43bdbe6b1243f97f6222115.tar.zst
nixpkgs-6a086197c2d34075d43bdbe6b1243f97f6222115.zip
verilator: wrap with glibc LOCALE_ARCHIVE iff stdenv.isLinux
Signed-off-by: Austin Seipp <aseipp@pobox.com>
-rw-r--r--pkgs/applications/science/electronics/verilator/default.nix9
1 files changed, 8 insertions, 1 deletions
diff --git a/pkgs/applications/science/electronics/verilator/default.nix b/pkgs/applications/science/electronics/verilator/default.nix
index e77f6aeeb29..6d96acc4ec9 100644
--- a/pkgs/applications/science/electronics/verilator/default.nix
+++ b/pkgs/applications/science/electronics/verilator/default.nix
@@ -1,6 +1,7 @@
 { lib, stdenv, fetchFromGitHub
 , perl, flex, bison, python3, autoconf
 , which, cmake, help2man
+, makeWrapper, glibcLocales
 }:
 
 stdenv.mkDerivation rec {
@@ -16,7 +17,7 @@ stdenv.mkDerivation rec {
 
   enableParallelBuilding = true;
   buildInputs = [ perl ];
-  nativeBuildInputs = [ flex bison python3 autoconf help2man ];
+  nativeBuildInputs = [ makeWrapper flex bison python3 autoconf help2man ];
   nativeCheckInputs = [ which ];
 
   doCheck = stdenv.isLinux; # darwin tests are broken for now...
@@ -28,6 +29,12 @@ stdenv.mkDerivation rec {
     patchShebangs bin/* src/{flexfix,vlcovgen} test_regress/{driver.pl,t/*.pl}
   '';
 
+  postInstall = lib.optionalString stdenv.isLinux ''
+    for x in $(ls $out/bin/verilator*); do
+      wrapProgram "$x" --set LOCALE_ARCHIVE "${glibcLocales}/lib/locale/locale-archive"
+    done
+  '';
+
   meta = with lib; {
     description = "Fast and robust (System)Verilog simulator/compiler";
     homepage    = "https://www.veripool.org/wiki/verilator";