about summary refs log tree commit diff
path: root/pkgs/applications/science
diff options
context:
space:
mode:
Diffstat (limited to 'pkgs/applications/science')
-rw-r--r--pkgs/applications/science/biology/blast/bin.nix60
-rw-r--r--pkgs/applications/science/biology/last/default.nix4
-rw-r--r--pkgs/applications/science/chemistry/pymol/default.nix1
-rw-r--r--pkgs/applications/science/electronics/kicad/base.nix53
-rw-r--r--pkgs/applications/science/electronics/kicad/default.nix5
-rw-r--r--pkgs/applications/science/electronics/kicad/versions.nix40
-rw-r--r--pkgs/applications/science/electronics/openroad/0001-Fix-string-formatting-in-tests.patch53
-rw-r--r--pkgs/applications/science/electronics/openroad/0002-Ignore-warning-on-stderr.patch41
-rw-r--r--pkgs/applications/science/electronics/openroad/default.nix36
-rw-r--r--pkgs/applications/science/math/scalp/default.nix2
10 files changed, 227 insertions, 68 deletions
diff --git a/pkgs/applications/science/biology/blast/bin.nix b/pkgs/applications/science/biology/blast/bin.nix
new file mode 100644
index 0000000000000..03e61bdcbe867
--- /dev/null
+++ b/pkgs/applications/science/biology/blast/bin.nix
@@ -0,0 +1,60 @@
+{ lib
+, stdenv
+, fetchurl
+, python3
+, perl
+, blast
+, autoPatchelfHook
+, zlib
+, bzip2
+, glib
+, libxml2
+, coreutils
+}:
+let
+  pname = "blast-bin";
+  version = "2.13.0";
+
+  srcs = rec {
+    x86_64-linux = fetchurl {
+      url = "https://ftp.ncbi.nlm.nih.gov/blast/executables/blast+/${version}/ncbi-blast-${version}+-x64-linux.tar.gz";
+      hash = "sha256-QPK3OdT++GoNI1NHyEpu2/hB2hqHYPQ/vNXFAVCwVEc=";
+    };
+    aarch64-linux = fetchurl {
+      url = "https://ftp.ncbi.nlm.nih.gov/blast/executables/blast+/${version}/ncbi-blast-${version}+-x64-arm-linux.tar.gz";
+      hash = "sha256-vY8K66k7KunpBUjFsJTTb+ur5n1XmU0/mYxhZsi9ycs=";
+    };
+    x86_64-darwin = fetchurl {
+      url = "https://ftp.ncbi.nlm.nih.gov/blast/executables/blast+/${version}/ncbi-blast-${version}+-x64-macosx.tar.gz";
+      hash = "sha256-Y0JlOUl9Ego6LTxTCNny3P5c1H3fApPXQm7Z6Zhq9RA=";
+    };
+    aarch64-darwin = x86_64-darwin;
+  };
+  src = srcs.${stdenv.hostPlatform.system};
+in
+stdenv.mkDerivation {
+  inherit pname version src;
+
+  nativeBuildInputs = lib.optional stdenv.isLinux [ autoPatchelfHook ];
+
+  buildInputs = [ python3 perl ] ++ lib.optionals stdenv.isLinux [ zlib bzip2 glib libxml2 ];
+
+  installPhase = ''
+    runHook preInstall
+
+    install -Dm755 bin/* -t $out/bin
+
+    runHook postInstall
+  '';
+
+  preFixup = ''
+    substituteInPlace $out/bin/get_species_taxids.sh \
+      --replace /bin/rm ${coreutils}/bin/rm
+  '';
+
+  meta = with lib; {
+    inherit (blast.meta) description homepage license;
+    platforms = [ "x86_64-linux" "aarch64-linux" "x86_64-darwin" "aarch64-darwin" ];
+    maintainers = with maintainers; [ natsukium ];
+  };
+}
diff --git a/pkgs/applications/science/biology/last/default.nix b/pkgs/applications/science/biology/last/default.nix
index 0104a5506bc6a..7b6689a358a8a 100644
--- a/pkgs/applications/science/biology/last/default.nix
+++ b/pkgs/applications/science/biology/last/default.nix
@@ -9,13 +9,13 @@
 
 stdenv.mkDerivation rec {
   pname = "last";
-  version = "1447";
+  version = "1453";
 
   src = fetchFromGitLab {
     owner = "mcfrith";
     repo = "last";
     rev = "refs/tags/${version}";
-    hash = "sha256-zts1F2tFeBP7CQifpc2M4i6duK8FA7hQXTOizv8/kWM=";
+    hash = "sha256-r8bWk1+weSyQ5QPGKKwdAzMkzh3DgzTUr5YCMUq5UUM=";
   };
 
   nativeBuildInputs = [
diff --git a/pkgs/applications/science/chemistry/pymol/default.nix b/pkgs/applications/science/chemistry/pymol/default.nix
index 15a1e3158233f..155d521549e3b 100644
--- a/pkgs/applications/science/chemistry/pymol/default.nix
+++ b/pkgs/applications/science/chemistry/pymol/default.nix
@@ -70,7 +70,6 @@ python3Packages.buildPythonApplication rec {
   '';
 
   meta = with lib; {
-    broken = stdenv.isDarwin;
     inherit description;
     homepage = "https://www.pymol.org/";
     license = licenses.mit;
diff --git a/pkgs/applications/science/electronics/kicad/base.nix b/pkgs/applications/science/electronics/kicad/base.nix
index 697c27842081d..eb65b6881ae20 100644
--- a/pkgs/applications/science/electronics/kicad/base.nix
+++ b/pkgs/applications/science/electronics/kicad/base.nix
@@ -20,9 +20,7 @@
 , pcre
 , libpthreadstubs
 , libXdmcp
-, lndir
 , unixODBC
-, fetchpatch
 
 , util-linux
 , libselinux
@@ -48,7 +46,6 @@
 , baseName
 , kicadSrc
 , kicadVersion
-, withOCC
 , withNgspice
 , withScripting
 , withI18n
@@ -72,19 +69,6 @@ stdenv.mkDerivation rec {
   patches = [
     # upstream issue 12941 (attempted to upstream, but appreciably unacceptable)
     ./writable.patch
-  ]
-  ++ optionals (stable) # the 2 wxGTK ones should in the next stable point release
-  [
-    (fetchpatch { # for wxGTK 3.2.2.1's .1 field
-      name = "support wxWidgets subrelease field";
-      url = "https://gitlab.com/kicad/code/kicad/-/commit/b536580119c59fde78e38d8d6388f2540ecb6cf9.diff";
-      hash = "sha256-F+J5oZO0BsT1VWKpx0KGA7ecn5/PBgCw8uiScihM+54=";
-    })
-    (fetchpatch { # for wxGTK 3.2.2.1's .1 field, but for wxPython
-      name = "relax wxPython check to just major.minor";
-      url = "https://gitlab.com/kicad/code/kicad/-/commit/1e8cc6855d6a8fc1f9dfc933224c3a10fb759f9c.diff";
-      hash = "sha256-CGNgxZ7QiVLkaauNl7Pmcl152lwyDZqA/HSyFdOswwU=";
-    })
   ];
 
   # tagged releases don't have "unknown"
@@ -97,40 +81,42 @@ stdenv.mkDerivation rec {
 
   makeFlags = optionals (debug) [ "CFLAGS+=-Og" "CFLAGS+=-ggdb" ];
 
+  # some ngspice tests attempt to write to $HOME/.cache/
+  XDG_CACHE_HOME = "$TMP";
+  # failing tests still attempt to create $HOME though
+
   cmakeFlags = [
-    # RPATH of binary /nix/store/.../bin/... contains a forbidden reference to /build/
-    "-DCMAKE_SKIP_BUILD_RPATH=ON"
     "-DKICAD_USE_EGL=ON"
-    "-DCMAKE_CTEST_ARGUMENTS='--exclude-regex;qa_eeschema'"  # upstream issue 12491
+    "-DOCC_INCLUDE_DIR=${opencascade-occt}/include/opencascade"
+  ]
+  ++ optionals (stable) [
+    # https://gitlab.com/kicad/code/kicad/-/issues/12491
+    # should be resolved in the next release
+    "-DCMAKE_CTEST_ARGUMENTS='--exclude-regex;qa_eeschema'"
   ]
-  ++ optionals (withScripting) [
-    "-DKICAD_SCRIPTING_WXPYTHON=ON"
+  ++ optionals (!stable) [ # workaround for https://gitlab.com/kicad/code/kicad/-/issues/14346
+    "-DPYTHON_SITE_PACKAGE_PATH=${placeholder "out"}/${python.sitePackages}/"
   ]
+  ++ optional (stable && !withNgspice) "-DKICAD_SPICE=OFF"
   ++ optionals (!withScripting) [
     "-DKICAD_SCRIPTING_WXPYTHON=OFF"
   ]
-  ++ optional (!withNgspice) "-DKICAD_SPICE=OFF"
-  ++ optional (!withOCC) "-DKICAD_USE_OCC=OFF"
-  ++ optionals (withOCC) [
-    "-DKICAD_USE_OCC=ON"
-    "-DOCC_INCLUDE_DIR=${opencascade-occt}/include/opencascade"
+  ++ optionals (withI18n) [
+    "-DKICAD_BUILD_I18N=ON"
+  ]
+  ++ optionals (!doInstallCheck) [
+    "-DKICAD_BUILD_QA_TESTS=OFF"
   ]
   ++ optionals (debug) [
     "-DCMAKE_BUILD_TYPE=Debug"
     "-DKICAD_STDLIB_DEBUG=ON"
     "-DKICAD_USE_VALGRIND=ON"
   ]
-  ++ optionals (!doInstallCheck) [
-    "-DKICAD_BUILD_QA_TESTS=OFF"
-  ]
   ++ optionals (sanitizeAddress) [
     "-DKICAD_SANITIZE_ADDRESS=ON"
   ]
   ++ optionals (sanitizeThreads) [
     "-DKICAD_SANITIZE_THREADS=ON"
-  ]
-  ++ optionals (withI18n) [
-    "-DKICAD_BUILD_I18N=ON"
   ];
 
   nativeBuildInputs = [
@@ -138,7 +124,6 @@ stdenv.mkDerivation rec {
     doxygen
     graphviz
     pkg-config
-    lndir
   ]
   # wanted by configuration on linux, doesn't seem to affect performance
   # no effect on closure size
@@ -177,10 +162,10 @@ stdenv.mkDerivation rec {
     python
     unixODBC
     libdeflate
+    opencascade-occt
   ]
   ++ optional (withScripting) wxPython
   ++ optional (withNgspice) libngspice
-  ++ optional (withOCC) opencascade-occt
   ++ optional (debug) valgrind;
 
   # debug builds fail all but the python test
diff --git a/pkgs/applications/science/electronics/kicad/default.nix b/pkgs/applications/science/electronics/kicad/default.nix
index c7eb9d69522c9..50628a3e1f019 100644
--- a/pkgs/applications/science/electronics/kicad/default.nix
+++ b/pkgs/applications/science/electronics/kicad/default.nix
@@ -14,7 +14,6 @@
 
 , pname ? "kicad"
 , stable ? true
-, withOCC ? true
 , withNgspice ? !stdenv.isDarwin
 , libngspice
 , withScripting ? true
@@ -117,7 +116,7 @@ stdenv.mkDerivation rec {
     inherit stable baseName;
     inherit kicadSrc kicadVersion;
     inherit wxGTK python wxPython;
-    inherit withOCC withNgspice withScripting withI18n;
+    inherit withNgspice withScripting withI18n;
     inherit debug sanitizeAddress sanitizeThreads;
   };
 
@@ -131,7 +130,7 @@ stdenv.mkDerivation rec {
   dontFixup = true;
 
   pythonPath = optionals (withScripting)
-    [ wxPython python.pkgs.six ];
+    [ wxPython python.pkgs.six python.pkgs.requests ];
 
   nativeBuildInputs = [ makeWrapper ]
     ++ optionals (withScripting)
diff --git a/pkgs/applications/science/electronics/kicad/versions.nix b/pkgs/applications/science/electronics/kicad/versions.nix
index 4562e8447624f..b102da24a3d40 100644
--- a/pkgs/applications/science/electronics/kicad/versions.nix
+++ b/pkgs/applications/science/electronics/kicad/versions.nix
@@ -3,45 +3,45 @@
 {
   "kicad" = {
     kicadVersion = {
-      version =			"7.0.0";
+      version =			"7.0.1";
       src = {
-        rev =			"da2b9df05c3ccd5ec104cf8cd8ded34f5dd25216";
-        sha256 =		"1zgpj1rvf97qv36hg4dja46pbzyixlh2g04wlh7cizcrs16b9mzw";
+        rev =			"3b83917a115be1ce2f33a73039f59f8784b5c2e7";
+        sha256 =		"021safxvyq9qzs08jy3jvpazmhvix4kyl05s9y9hwmyzdmdl2smn";
       };
     };
     libVersion = {
-      version =			"7.0.0";
+      version =			"7.0.1";
       libSources = {
-        symbols.rev =		"08a25991d07924b263cbf87c6e513feac2b2169f";
-        symbols.sha256 =	"1r87xr1453dpfglkg1m4p5d7kcv9gxls1anwk3vp2yppnwz24ydm";
+        symbols.rev =		"adfe3c06b5750d81580ed44e669b578f49c205eb";
+        symbols.sha256 =	"14c5gci13m30xv0cmic5jxsmfx9lq3fnd8hyq3mmgkrw7443zy30";
         templates.rev =		"66d76556d9e81f8a5be74457686d211c666ed200";
         templates.sha256 =	"02i279269mhq7wjhb1yqk90820ncssxl9n7b20qr2r4fmm7jpvxv";
-        footprints.rev =	"a0388d07e4a37e8db13a716efb3ad4750c839f9c";
-        footprints.sha256 =	"1akhifnjm8jvqsvscn2rr1wpzrls73bpdc6sk40355r1in2djmry";
-        packages3d.rev =	"bbee2295519bcf469d97f5e06bcf7175cddd2037";
-        packages3d.sha256 =	"1qw5xm0wbhv6gqvd8mn0jp4abjbizrkx79r6y8f6911mkzi47r6n";
+        footprints.rev =	"1cf5a1d979cffebd62464c1bb0d7b09c5ee3b8c3";
+        footprints.sha256 =	"0k0z40wmaq665hjxb6kp1yl3v7clxz49r6ki0chyphsxv1cnixmy";
+        packages3d.rev =	"e54b5b6368d03f396098448bcce37f2e432dac33";
+        packages3d.sha256 =	"0nzi7ijfb3rjm98kaa9va2mkh0nfzpq4vfhxkq8j18qhx24h5c8v";
       };
     };
   };
   "kicad-unstable" = {
     kicadVersion = {
-      version =			"2023-02-14";
+      version =			"2023-03-29";
       src = {
-        rev =			"29c4482bc898f627cebcd5f64e063e8a813a5445";
-        sha256 =		"1hs1p79skmrn2k7qrpnkynzkk2g8ry20lqivzfqg87c56rd1522y";
+        rev =			"d5bc223ff2cd1fbf4e923e23b5bb442bb54faa95";
+        sha256 =		"0pbzmv9vh4bzhsxj46gjkgh7kk6a0v8gijvkmb56fy5i8xv2ixkn";
       };
     };
     libVersion = {
-      version =			"2023-02-14";
+      version =			"2023-03-29";
       libSources = {
-        symbols.rev =		"3ad8b98287ddf528ce8ff07bbe70aed85cb4410a";
-        symbols.sha256 =	"1p0wa3bhw2qgdvb5vzwvrbhkb6sqpc93d754rbcs2xh79d75l9nn";
+        symbols.rev =		"36fc1c88921bf32ebf667e027dfe63cca649fd95";
+        symbols.sha256 =	"177mqvjf3knldnl7pf1abv4pmlgi5cg02ggfwbc655jq4x6x8fkz";
         templates.rev =		"867eef383a0f61015cb69677d5c632d78a2ea01a";
         templates.sha256 =	"1qi20mrsfn4fxmr1fyphmil2i9p2nzmwk5rlfchc5aq2194nj3lq";
-        footprints.rev =	"a168dd18ea63c2df948c2de3026dc19730cb70cf";
-        footprints.sha256 =	"0y3cl9fcyi8z4yrn0kfgfy28gn9ngrdvnpgbpwykbbp8fpx401nk";
-        packages3d.rev =	"a0919e5e805157bccd65af313806de3833c1673e";
-        packages3d.sha256 =	"1yizw9g3skz7i9x9iwbnn3gk3lnh10krf6xg32plb2plxfynz3cw";
+        footprints.rev =	"dc4574eb65136d95a7775d09412d5159f8d7832c";
+        footprints.sha256 =	"1iz4wyiysdii378c3pjgkgwh1cssxbh5jkbhvj7rmi2vmgngl6nc";
+        packages3d.rev =	"e54b5b6368d03f396098448bcce37f2e432dac33";
+        packages3d.sha256 =	"0nzi7ijfb3rjm98kaa9va2mkh0nfzpq4vfhxkq8j18qhx24h5c8v";
       };
     };
   };
diff --git a/pkgs/applications/science/electronics/openroad/0001-Fix-string-formatting-in-tests.patch b/pkgs/applications/science/electronics/openroad/0001-Fix-string-formatting-in-tests.patch
new file mode 100644
index 0000000000000..0332ade17dc70
--- /dev/null
+++ b/pkgs/applications/science/electronics/openroad/0001-Fix-string-formatting-in-tests.patch
@@ -0,0 +1,53 @@
+From 0000000000000000000000000000000000000000 Mon Sep 17 00:00:00 2001
+From: Nicolas Benes <nbenes.gh@xandea.de>
+Date: Sun, 2 Apr 2023 01:24:51 +0200
+Subject: [PATCH] Fix string formatting in tests
+
+Hide the decimal point and digits after the decimal point when they are
+not needed.
+
+diff --git a/src/par/test/partition_gcd.ok b/src/par/test/partition_gcd.ok
+index 6c40c14..b9a42f6 100644
+--- a/src/par/test/partition_gcd.ok
++++ b/src/par/test/partition_gcd.ok
+@@ -9,7 +9,7 @@
+ ========================================
+ [INFO] Partitioning parameters**** 
+ [PARAM] Number of partitions = 2
+-[PARAM] UBfactor = 1.0
++[PARAM] UBfactor = 1
+ [PARAM] Vertex dimensions = 1
+ [PARAM] Hyperedge dimensions = 1
+ ========================================
+@@ -118,7 +118,7 @@ After Hyperedge Reduction :  num_vertices = 137, num_hyperedges = 251
+ [V-Refine] Level 2 :: 207, 301, 154.65254
+ [V-Refine] Level 3 :: 312, 370, 154.65254
+ [V-Refine] Level 4 :: 469, 451, 154.65254
+-[INFO] V-cycle refinement 1 delta cost 0.0
++[INFO] V-cycle refinement 1 delta cost 0
+ =========================================
+ [STATUS] Running FC multilevel coarsening 
+ =========================================
+@@ -133,7 +133,7 @@ After Hyperedge Reduction :  num_vertices = 137, num_hyperedges = 251
+ [V-Refine] Level 2 :: 207, 301, 154.65254
+ [V-Refine] Level 3 :: 312, 370, 154.65254
+ [V-Refine] Level 4 :: 469, 451, 154.65254
+-[INFO] V-cycle refinement 2 delta cost 0.0
++[INFO] V-cycle refinement 2 delta cost 0
+ [Cutcost of partition : 154.65254]
+ [Vertex balance of block_0 : 0.59249  ( 327.17993 )    
+ [Vertex balance of block_1 : 0.40751  ( 225.03609 )    
+diff --git a/src/pdn/test/design_width.ok b/src/pdn/test/design_width.ok
+index 381dca1..a102974 100644
+--- a/src/pdn/test/design_width.ok
++++ b/src/pdn/test/design_width.ok
+@@ -9,5 +9,5 @@
+ [INFO ODB-0130]     Created 54 pins.
+ [INFO ODB-0131]     Created 406 components and 1816 component-terminals.
+ [INFO ODB-0133]     Created 361 nets and 1004 connections.
+-[ERROR PDN-0185] Insufficient width (14.04 um) to add straps on layer M8 in grid "Core" with total strap width 6.0 um and offset 10.0 um.
++[ERROR PDN-0185] Insufficient width (14.04 um) to add straps on layer M8 in grid "Core" with total strap width 6 um and offset 10 um.
+ PDN-0185
+-- 
+2.38.4
+
diff --git a/pkgs/applications/science/electronics/openroad/0002-Ignore-warning-on-stderr.patch b/pkgs/applications/science/electronics/openroad/0002-Ignore-warning-on-stderr.patch
new file mode 100644
index 0000000000000..f0b0666789a79
--- /dev/null
+++ b/pkgs/applications/science/electronics/openroad/0002-Ignore-warning-on-stderr.patch
@@ -0,0 +1,41 @@
+From 0000000000000000000000000000000000000000 Mon Sep 17 00:00:00 2001
+From: Nicolas Benes <nbenes.gh@xandea.de>
+Date: Sun, 2 Apr 2023 04:57:17 +0200
+Subject: [PATCH] Ignore warning on stderr
+
+The following warning is written to stderr, which causes the overall
+test to fail:
+
+```
+sh: warning: setlocale: LC_ALL: cannot change locale (en_US.UTF-8)
+```
+
+diff --git a/src/dst/test/cpp_tests.tcl b/src/dst/test/cpp_tests.tcl
+index 9087c2c..63d0cb7 100644
+--- a/src/dst/test/cpp_tests.tcl
++++ b/src/dst/test/cpp_tests.tcl
+@@ -4,7 +4,7 @@ set test_dir [pwd]
+ set openroad_dir [file dirname [file dirname [file dirname $test_dir]]]
+ set tests_path [file join $openroad_dir "build" "src" "dst" "test" "cpp"]
+ 
+-set tests_list [split [exec sh -c "find $tests_path -maxdepth 1 -name 'Test*'"] \n]
++set tests_list [split [exec -ignorestderr sh -c "find $tests_path -maxdepth 1 -name 'Test*'"] \n]
+ 
+ foreach test $tests_list {
+     set test_name [file tail $test]
+diff --git a/src/odb/test/cpp_tests.tcl b/src/odb/test/cpp_tests.tcl
+index 091d576..6811760 100644
+--- a/src/odb/test/cpp_tests.tcl
++++ b/src/odb/test/cpp_tests.tcl
+@@ -4,7 +4,7 @@ set test_dir [pwd]
+ set openroad_dir [file dirname [file dirname [file dirname $test_dir]]]
+ set tests_path [file join $openroad_dir "build" "src" "odb" "test" "cpp"]
+ 
+-set tests_list [split [exec sh -c "find $tests_path -maxdepth 1 -name 'Test*' ! -name '*.cmake'"] \n]
++set tests_list [split [exec -ignorestderr sh -c "find $tests_path -maxdepth 1 -name 'Test*' ! -name '*.cmake'"] \n]
+ 
+ foreach test $tests_list {
+     set test_name [file tail $test]
+-- 
+2.38.4
+
diff --git a/pkgs/applications/science/electronics/openroad/default.nix b/pkgs/applications/science/electronics/openroad/default.nix
index 636caec6902a1..68e079e2f89b6 100644
--- a/pkgs/applications/science/electronics/openroad/default.nix
+++ b/pkgs/applications/science/electronics/openroad/default.nix
@@ -9,13 +9,20 @@
 , python3
 , swig4
 , boost17x
+, cbc       # for clp
 , cimg
+, clp       # for or-tools
 , eigen
+, glpk
+, gtest
 , lcov
 , lemon-graph
 , libjpeg
+, or-tools
 , pcre
+, pkg-config
 , qtbase
+, re2       # for or-tools
 , readline
 , spdlog
 , tcl
@@ -27,14 +34,14 @@
 
 mkDerivation rec {
   pname = "openroad";
-  version = "unstable-2022-07-19";
+  version = "unstable-2023-03-31";
 
   src = fetchFromGitHub {
     owner = "The-OpenROAD-Project";
     repo = "OpenROAD";
-    rev = "2610b3953ef62651825d89fb96917cf5d20af0f1";
+    rev = "cd03c5cf8a8eb78c0e07fe33a56b8e9d64672efe";
     fetchSubmodules = true;
-    sha256 = "sha256-BP0JSnxl1XyqHzDY4eITaGHevqd+rbjWZy/LAfDfELs=";
+    hash = "sha256-BWUvFCuWKWQpifErpak03J+A7ni0jZWIrCMhMdKIbD0=";
   };
 
   nativeBuildInputs = [
@@ -43,19 +50,25 @@ mkDerivation rec {
     doxygen
     flex
     git
+    pkg-config
     swig4
   ];
 
   buildInputs = [
     boost17x
+    cbc
     cimg
+    clp
     eigen
+    glpk
     lcov
     lemon-graph
     libjpeg
+    or-tools
     pcre
     python3
     qtbase
+    re2
     readline
     spdlog
     tcl
@@ -65,6 +78,11 @@ mkDerivation rec {
     zlib
   ];
 
+  patches = [
+    ./0001-Fix-string-formatting-in-tests.patch
+    ./0002-Ignore-warning-on-stderr.patch
+  ];
+
   postPatch = ''
     patchShebangs --build etc/find_messages.py
   '';
@@ -74,18 +92,22 @@ mkDerivation rec {
     "-DUSE_SYSTEM_BOOST=ON"
     "-DUSE_CIMG_LIB=ON"
     "-DOPENROAD_VERSION=${src.rev}"
+
+    # 2023-03-31: see discussion on fmt workaround in
+    # https://github.com/The-OpenROAD-Project/OpenROAD/pull/2696
+    "-DCMAKE_CXX_FLAGS=-DFMT_DEPRECATED_OSTREAM"
   ];
 
   # Resynthesis needs access to the Yosys binaries.
   qtWrapperArgs = [ "--prefix PATH : ${lib.makeBinPath [ yosys ]}" ];
 
+  checkInputs = [ gtest ];
+
   # Upstream uses vendored package versions for some dependencies, so regression testing is prudent
   # to see if there are any breaking changes in unstable that should be vendored as well.
-  doCheck = false; # Disabled pending upstream release with fix for rcx log file creation.
+  doCheck = true;
   checkPhase = ''
-    # Regression tests must be run from the project root not from within the CMake build directory.
-    cd ..
-    test/regression
+    ../test/regression
   '';
 
   doInstallCheck = true;
diff --git a/pkgs/applications/science/math/scalp/default.nix b/pkgs/applications/science/math/scalp/default.nix
index 05261701fc287..4145407d7aaaa 100644
--- a/pkgs/applications/science/math/scalp/default.nix
+++ b/pkgs/applications/science/math/scalp/default.nix
@@ -16,7 +16,7 @@ stdenv.mkDerivation rec {
 
   src = fetchgit {
     url = "https://digidev.digi.e-technik.uni-kassel.de/git/scalp.git";
-    # mirrored at https://github.com/wegank/scalp.git
+    # mirrored at https://git.sr.ht/~weijia/scalp
     rev = "185b84e4ff967f42cf2de5db4db4e6fa0cc18fb8";
     sha256 = "sha256-NyMZdJwdD3FR6uweYCclJjfcf3Y24Bns1ViwsmJ5izg=";
   };