samsung-unified-linux-driver (cups driver): call {pre,post}Install
Add `preInstall` and `postInstall` to the `installPhase` to permit package overrides to add commands to the install phase. Suggested by r-rmcgibbo bot in https://github.com/NixOS/nixpkgs/pull/133537#issuecomment-897437621
This commit is contained in:
@@ -23,6 +23,7 @@ in stdenv.mkDerivation rec {
|
||||
];
|
||||
|
||||
installPhase = ''
|
||||
runHook preInstall
|
||||
|
||||
mkdir -p $out/bin
|
||||
cp -R ${arch}/{gettext,pstosecps,rastertospl,smfpnetdiscovery,usbresetter} $out/bin
|
||||
@@ -82,6 +83,8 @@ in stdenv.mkDerivation rec {
|
||||
cd $out/share/cups
|
||||
ln -s ../ppd .
|
||||
ln -s ppd model
|
||||
|
||||
runHook postInstall
|
||||
'';
|
||||
|
||||
preFixup = ''
|
||||
|
||||
@@ -22,6 +22,7 @@ in stdenv.mkDerivation rec {
|
||||
];
|
||||
|
||||
installPhase = ''
|
||||
runHook preInstall
|
||||
|
||||
mkdir -p $out/bin
|
||||
cp -R ${arch}/{gettext,pstosecps,rastertospl,smfpnetdiscovery,usbresetter} $out/bin
|
||||
@@ -65,6 +66,8 @@ in stdenv.mkDerivation rec {
|
||||
cd $out/share/cups
|
||||
ln -s ../ppd .
|
||||
ln -s ppd model
|
||||
|
||||
runHook postInstall
|
||||
'';
|
||||
|
||||
preFixup = ''
|
||||
|
||||
@@ -40,6 +40,8 @@ in stdenv.mkDerivation rec {
|
||||
dontStrip = true;
|
||||
|
||||
installPhase = ''
|
||||
runHook preInstall
|
||||
|
||||
cd Linux/${installationPath}
|
||||
mkdir -p $out/lib/cups/{backend,filter}
|
||||
install -Dm755 mfp $out/lib/cups/backend/
|
||||
@@ -72,6 +74,8 @@ in stdenv.mkDerivation rec {
|
||||
cd -
|
||||
cd ../noarch/at_opt/share/ppd
|
||||
cp -r ./* $out/share/cups/model/samsung
|
||||
|
||||
runHook postInstall
|
||||
'';
|
||||
|
||||
ppdFileCommands = [
|
||||
|
||||
Reference in New Issue
Block a user