hplip: remove duplicate platform definitions
This commit is contained in:
parent
2e248040a6
commit
15324dc7d4
@ -38,10 +38,15 @@ let
|
|||||||
};
|
};
|
||||||
|
|
||||||
hplipArch = hplipPlatforms."${stdenv.system}"
|
hplipArch = hplipPlatforms."${stdenv.system}"
|
||||||
or (abort "Unsupported platform ${stdenv.system}");
|
or (abort "HPLIP not supported on ${stdenv.system}");
|
||||||
|
|
||||||
|
pluginArches = [ "x86_32" "x86_64" ];
|
||||||
|
|
||||||
in
|
in
|
||||||
|
|
||||||
|
assert withPlugin -> builtins.elem hplipArch pluginArches
|
||||||
|
|| abort "HPLIP plugin not supported on ${stdenv.system}";
|
||||||
|
|
||||||
stdenv.mkDerivation {
|
stdenv.mkDerivation {
|
||||||
inherit name src;
|
inherit name src;
|
||||||
|
|
||||||
@ -108,13 +113,7 @@ stdenv.mkDerivation {
|
|||||||
|
|
||||||
enableParallelBuilding = true;
|
enableParallelBuilding = true;
|
||||||
|
|
||||||
postInstall =
|
postInstall = stdenv.lib.optionalString withPlugin
|
||||||
(stdenv.lib.optionalString (withPlugin && builtins.hasAttr stdenv.system hplipPlatforms)
|
|
||||||
(let hplipArch =
|
|
||||||
if stdenv.system == "i686-linux" then "x86_32"
|
|
||||||
else if stdenv.system == "x86_64-linux" then "x86_64"
|
|
||||||
else abort "Plugin platform must be i686-linux or x86_64-linux!";
|
|
||||||
in
|
|
||||||
''
|
''
|
||||||
sh ${plugin} --noexec --keep
|
sh ${plugin} --noexec --keep
|
||||||
cd plugin_tmp
|
cd plugin_tmp
|
||||||
@ -148,7 +147,7 @@ stdenv.mkDerivation {
|
|||||||
mv $out/etc/sane.d/dll.conf $out/etc/sane.d/dll.d/hpaio.conf
|
mv $out/etc/sane.d/dll.conf $out/etc/sane.d/dll.d/hpaio.conf
|
||||||
|
|
||||||
rm $out/etc/udev/rules.d/56-hpmud.rules
|
rm $out/etc/udev/rules.d/56-hpmud.rules
|
||||||
''));
|
'';
|
||||||
|
|
||||||
fixupPhase = ''
|
fixupPhase = ''
|
||||||
# Wrap the user-facing Python scripts in $out/bin without turning the
|
# Wrap the user-facing Python scripts in $out/bin without turning the
|
||||||
|
Loading…
x
Reference in New Issue
Block a user