cups-idprt-{barcode,mt888,mt890,sp900,tspl}: Fix missing attribute on aarch64-linux

`getAttr` has a slightly better performance but it's not possible to
throw with it so one would have to do `builtins.hasAttr` first which makes
that methods performance worse than string interpolation and `or throw`
This commit is contained in:
Artturin
2024-09-26 03:48:21 +03:00
parent a70951ade3
commit 5176f640ee
5 changed files with 35 additions and 20 deletions
@@ -25,10 +25,13 @@ stdenvNoCC.mkDerivation {
installPhase =
let
arch = builtins.getAttr stdenvNoCC.hostPlatform.system {
x86_64-linux = "x64";
x86-linux = "x86";
};
arch =
{
x86_64-linux = "x64";
x86-linux = "x86";
}
."${stdenvNoCC.hostPlatform.system}"
or (throw "cups-idprt-barcode: No prebuilt filters for system: ${stdenvNoCC.hostPlatform.system}");
in
''
runHook preInstall
+7 -4
View File
@@ -25,10 +25,13 @@ stdenvNoCC.mkDerivation {
installPhase =
let
arch = builtins.getAttr stdenvNoCC.hostPlatform.system {
x86_64-linux = "x64";
x86-linux = "x86";
};
arch =
{
x86_64-linux = "x64";
x86-linux = "x86";
}
."${stdenvNoCC.hostPlatform.system}"
or (throw "cups-idprt-mt888: No prebuilt filters for system: ${stdenvNoCC.hostPlatform.system}");
in
''
runHook preInstall
+7 -4
View File
@@ -25,10 +25,13 @@ stdenvNoCC.mkDerivation {
installPhase =
let
arch = builtins.getAttr stdenvNoCC.hostPlatform.system {
x86_64-linux = "x64";
x86-linux = "x86";
};
arch =
{
x86_64-linux = "x64";
x86-linux = "x86";
}
."${stdenvNoCC.hostPlatform.system}"
or (throw "cups-idprt-mt890: No prebuilt filters for system: ${stdenvNoCC.hostPlatform.system}");
in
''
runHook preInstall
+7 -4
View File
@@ -34,10 +34,13 @@ stdenvNoCC.mkDerivation (finalAttrs: {
installPhase =
let
arch = builtins.getAttr stdenvNoCC.hostPlatform.system {
x86_64-linux = "x64";
x86-linux = "x86";
};
arch =
{
x86_64-linux = "x64";
x86-linux = "x86";
}
."${stdenvNoCC.hostPlatform.system}"
or (throw "cups-idprt-sp900: No prebuilt filters for system: ${stdenvNoCC.hostPlatform.system}");
in
''
runHook preInstall
+7 -4
View File
@@ -33,10 +33,13 @@ stdenvNoCC.mkDerivation {
installPhase =
let
arch = builtins.getAttr stdenvNoCC.hostPlatform.system {
x86_64-linux = "x64";
x86-linux = "x86";
};
arch =
{
x86_64-linux = "x64";
x86-linux = "x86";
}
."${stdenvNoCC.hostPlatform.system}"
or (throw "cups-idprt-tspl: No prebuilt filters for system: ${stdenvNoCC.hostPlatform.system}");
in
''
runHook preInstall