samsung-unified-linux-driver (cups driver): use patchPpdFilesHook
The `sed` script in the `installPhase` is removed. Instead, the setup hook `patchPpdFilesHook` is used to patch the path to the filter executables. The result should essentially be the same. Comparing the generated ppd files showed no difference, short of the package's hash in the absolute paths and added newline characters at the end of some ppd files. Missing newline characters at the end of the last line are apparently added by `awk`; this shouldn't affect functionality. The new package also contains a `propagated-build-inputs` file which propagates the package itself. This ensures the package is available whenever a ppd file is singled out by another package.
This commit is contained in:
parent
bf30b53817
commit
bfe3271fc0
1 changed files with 11 additions and 7 deletions
|
@ -11,7 +11,13 @@
|
|||
# }
|
||||
# (This advice was tested on the 1st November 2016.)
|
||||
|
||||
{ lib, stdenv, fetchurl, cups, libusb-compat-0_1 }:
|
||||
{ lib
|
||||
, stdenv
|
||||
, cups
|
||||
, libusb-compat-0_1
|
||||
, fetchurl
|
||||
, patchPpdFilesHook
|
||||
}:
|
||||
|
||||
# Do not bump lightly! Visit <http://www.bchemnet.com/suldr/supported.html>
|
||||
# to see what will break when upgrading. Consider a new versioned attribute.
|
||||
|
@ -28,6 +34,8 @@ in stdenv.mkDerivation rec {
|
|||
sha256 = "1vv3pzvqpg1dq3xjr8161x2yp3v7ca75vil56ranhw5pkjwq66x0";
|
||||
};
|
||||
|
||||
nativeBuildInputs = [ patchPpdFilesHook ];
|
||||
|
||||
dontPatchELF = true;
|
||||
dontStrip = true;
|
||||
|
||||
|
@ -63,15 +71,11 @@ in stdenv.mkDerivation rec {
|
|||
mkdir -p $out/share/cups/model/samsung
|
||||
cd -
|
||||
cd ../noarch/at_opt/share/ppd
|
||||
for i in *.ppd; do
|
||||
sed -i $i -e \
|
||||
"s,pstosecps,$out/lib/cups/filter/pstosecps,g; \
|
||||
s,pstospl,$out/lib/cups/filter/pstospl,g; \
|
||||
s,rastertospl,$out/lib/cups/filter/rastertospl,g"
|
||||
done;
|
||||
cp -r ./* $out/share/cups/model/samsung
|
||||
'';
|
||||
|
||||
ppdFileCommands = [ "pstosecps" "pstospl" "rastertospl" ];
|
||||
|
||||
meta = with lib; {
|
||||
description = "Samsung's Linux printing drivers; includes binaries without source code";
|
||||
homepage = "http://www.samsung.com/";
|
||||
|
|
Loading…
Reference in a new issue