Merge pull request #278777 from tweag/fix-evals

`lib.callPackageWith`: Use abort again instead of throw and fix evaluation errors caused by it
This commit is contained in:
Silvan Mosberger
2024-01-08 03:50:58 +01:00
committed by GitHub
8 changed files with 21 additions and 15 deletions

View File

@@ -203,7 +203,11 @@ rec {
in if missingArgs == {} in if missingArgs == {}
then makeOverridable f allArgs then makeOverridable f allArgs
else throw "lib.customisation.callPackageWith: ${error}"; # This needs to be an abort so it can't be caught with `builtins.tryEval`,
# which is used by nix-env and ofborg to filter out packages that don't evaluate.
# This way we're forced to fix such errors in Nixpkgs,
# which is especially relevant with allowAliases = false
else abort "lib.customisation.callPackageWith: ${error}";
/* Like callPackage, but for a function that returns an attribute /* Like callPackage, but for a function that returns an attribute

View File

@@ -9,14 +9,16 @@
, libnotify , libnotify
, libxml2 , libxml2
, libcanberra-gtk3 , libcanberra-gtk3
, mod_dnssd , apacheHttpdPackages
, apacheHttpd
, hicolor-icon-theme , hicolor-icon-theme
, mate , mate
, wrapGAppsHook , wrapGAppsHook
, mateUpdateScript , mateUpdateScript
}: }:
let
inherit (apacheHttpdPackages) apacheHttpd mod_dnssd;
in
stdenv.mkDerivation rec { stdenv.mkDerivation rec {
pname = "mate-user-share"; pname = "mate-user-share";
version = "1.26.0"; version = "1.26.0";

View File

@@ -53,7 +53,7 @@ final: _: {
autoAddCudaCompatRunpathHook = autoAddCudaCompatRunpathHook =
final.callPackage final.callPackage
( (
{makeSetupHook, cuda_compat}: {makeSetupHook, cuda_compat ? throw "autoAddCudaCompatRunpathHook: No cuda_compat for CUDA ${final.cudaMajorMinorVersion}" }:
makeSetupHook makeSetupHook
{ {
name = "auto-add-cuda-compat-runpath-hook"; name = "auto-add-cuda-compat-runpath-hook";

View File

@@ -4,7 +4,7 @@
# dependencies # dependencies
, cmake , cmake
, dateutil , python-dateutil
, dbus-python , dbus-python
, dnf4 , dnf4
, gettext , gettext
@@ -54,7 +54,7 @@ buildPythonPackage rec {
]; ];
propagatedBuildInputs = [ propagatedBuildInputs = [
dateutil python-dateutil
dbus-python dbus-python
dnf4.py dnf4.py
libcomps libcomps

View File

@@ -3,7 +3,7 @@
, fetchFromGitHub , fetchFromGitHub
, poetry-core , poetry-core
, argparse-dataclass , argparse-dataclass
, ConfigArgParse , configargparse
}: }:
buildPythonPackage rec { buildPythonPackage rec {
@@ -24,7 +24,7 @@ buildPythonPackage rec {
propagatedBuildInputs = [ propagatedBuildInputs = [
argparse-dataclass argparse-dataclass
ConfigArgParse configargparse
]; ];
pythonImportsCheck = [ "snakemake_interface_common" ]; pythonImportsCheck = [ "snakemake_interface_common" ];

View File

@@ -13,7 +13,7 @@
, aiosqlite , aiosqlite
, asyncmy , asyncmy
, asyncpg , asyncpg
, cx_oracle , cx-oracle
, mariadb , mariadb
, mypy , mypy
, mysql-connector , mysql-connector
@@ -79,7 +79,7 @@ buildPythonPackage rec {
mariadb mariadb
]; ];
oracle = [ oracle = [
cx_oracle cx-oracle
]; ];
postgresql = [ postgresql = [
psycopg2 psycopg2

View File

@@ -1,9 +1,9 @@
{ hello, checkpointBuildTools, runCommandNoCC, texinfo, stdenv, rsync }: { hello, checkpointBuildTools, runCommand, texinfo, stdenv, rsync }:
let let
baseHelloArtifacts = checkpointBuildTools.prepareCheckpointBuild hello; baseHelloArtifacts = checkpointBuildTools.prepareCheckpointBuild hello;
patchedHello = hello.overrideAttrs (old: { patchedHello = hello.overrideAttrs (old: {
buildInputs = [ texinfo ]; buildInputs = [ texinfo ];
src = runCommandNoCC "patch-hello-src" { } '' src = runCommand "patch-hello-src" { } ''
mkdir -p $out mkdir -p $out
cd $out cd $out
tar xf ${hello.src} --strip-components=1 tar xf ${hello.src} --strip-components=1
@@ -24,7 +24,7 @@ let
patches = [ ./hello-additionalFile.patch ]; patches = [ ./hello-additionalFile.patch ];
})); }));
preparedHelloRemoveFileSrc = runCommandNoCC "patch-hello-src" { } '' preparedHelloRemoveFileSrc = runCommand "patch-hello-src" { } ''
mkdir -p $out mkdir -p $out
cd $out cd $out
tar xf ${hello.src} --strip-components=1 tar xf ${hello.src} --strip-components=1
@@ -33,7 +33,7 @@ let
patchedHelloRemoveFile = hello.overrideAttrs (old: { patchedHelloRemoveFile = hello.overrideAttrs (old: {
buildInputs = [ texinfo ]; buildInputs = [ texinfo ];
src = runCommandNoCC "patch-hello-src" { } '' src = runCommand "patch-hello-src" { } ''
mkdir -p $out mkdir -p $out
cd $out cd $out
${rsync}/bin/rsync -cutU --chown=$USER:$USER --chmod=+w -r ${preparedHelloRemoveFileSrc}/* . ${rsync}/bin/rsync -cutU --chown=$USER:$USER --chmod=+w -r ${preparedHelloRemoveFileSrc}/* .

View File

@@ -30292,7 +30292,7 @@ with pkgs;
aaxtomp3 = callPackage ../applications/audio/aaxtomp3 { }; aaxtomp3 = callPackage ../applications/audio/aaxtomp3 { };
abcde = callPackage ../applications/audio/abcde { abcde = callPackage ../applications/audio/abcde {
inherit (python3Packages) eyeD3; inherit (python3Packages) eyed3;
}; };
abiword = callPackage ../applications/office/abiword { }; abiword = callPackage ../applications/office/abiword { };