From 6c73233948160c13d50fa26a56224bc8d462c398 Mon Sep 17 00:00:00 2001 From: Sridhar Ratnakumar Date: Wed, 3 Apr 2024 02:32:53 +0530 Subject: [PATCH] fix: allow buildFromSdist to ignore Rust drvs --- nix/modules/project/settings/all.nix | 15 +++++++++++---- 1 file changed, 11 insertions(+), 4 deletions(-) diff --git a/nix/modules/project/settings/all.nix b/nix/modules/project/settings/all.nix index b9058ae8..fd85ea60 100644 --- a/nix/modules/project/settings/all.nix +++ b/nix/modules/project/settings/all.nix @@ -318,11 +318,18 @@ in for release-worthiness. ''; impl = enable: + let + # A version that doesn't break against Rust derivations + # https://github.com/srid/haskell-flake/issues/292 + buildFromSdist' = drv: + if !lib.hasAttr "override" drv then drv else buildFromSdist drv; + in if enable then - (pkg: lib.pipe pkg [ - buildFromSdist - (x: log.traceDebug "${name}.buildFromSdist ${x.outPath}" x) - ]) else null; + (pkg: + lib.pipe pkg [ + buildFromSdist' + (x: log.traceDebug "${name}.buildFromSdist ${x.outPath}" x) + ]) else null; }; removeReferencesTo = {