foo2zjs: remove use of builderDefsPackage (#17459)

This commit is contained in:
Robert Helgesson 2016-08-03 00:41:47 +02:00 committed by Domen Kožar
parent 0621828bb7
commit cc9547dcf9

View File

@ -1,51 +1,33 @@
x@{builderDefsPackage { stdenv, fetchurl, foomatic_filters, bc, unzip, ghostscript, systemd, vim }:
, foomatic_filters, bc, unzip, ghostscript, systemd, vim
, ...}:
builderDefsPackage
(a :
let
helperArgNames = ["stdenv" "fetchurl" "builderDefsPackage"] ++
[];
buildInputs = map (n: builtins.getAttr n x) stdenv.mkDerivation rec {
(builtins.attrNames (builtins.removeAttrs x helperArgNames)); name = "foo2zjs-20110210";
sourceInfo = rec {
baseName="foo2zjs"; src = fetchurl {
version="20110210"; url = "http://www.loegria.net/mirrors/foo2zjs/${name}.tar.gz";
name="${baseName}-${version}"; sha256 = "0vss8gdbbgxr694xw48rys2qflbnb4sp4gdb1v6z4m9ab97hs5yk";
url="http://www.loegria.net/mirrors/foo2zjs/${name}.tar.gz";
hash="0vss8gdbbgxr694xw48rys2qflbnb4sp4gdb1v6z4m9ab97hs5yk";
};
in
rec {
src = a.fetchurl {
url = sourceInfo.url;
sha256 = sourceInfo.hash;
}; };
inherit (sourceInfo) name version; buildInputs = [ foomatic_filters bc unzip ghostscript systemd vim ];
inherit buildInputs;
phaseNames = ["doPatch" "fixHardcodedPaths" "doMakeDirs" "doMakeInstall" "deployGetWeb"];
patches = [ ./no-hardcode-fw.diff ]; patches = [ ./no-hardcode-fw.diff ];
makeFlags = [ makeFlags = [
''PREFIX=$out'' "PREFIX=$(out)"
''APPL=$out/share/applications'' "APPL=$(out)/share/applications"
''PIXMAPS=$out/share/pixmaps'' "PIXMAPS=$(out)/share/pixmaps"
''UDEVBIN=$out/bin'' "UDEVBIN=$(out)/bin"
''UDEVDIR=$out/etc/udev/rules.d'' "UDEVDIR=$(out)/etc/udev/rules.d"
''UDEVD=${systemd.udev.bin}/sbin/udevd'' "UDEVD=${systemd.udev.bin}/sbin/udevd"
''LIBUDEVDIR=$out/lib/udev/rules.d'' "LIBUDEVDIR=$(out)/lib/udev/rules.d"
''USBDIR=$out/etc/hotplug/usb'' "USBDIR=$(out)/etc/hotplug/usb"
''FOODB=$out/share/foomatic/db/source'' "FOODB=$(out)/share/foomatic/db/source"
''MODEL=$out/share/cups/model'' "MODEL=$(out)/share/cups/model"
]; ];
installFlags = [ "install-hotplug" ]; installFlags = [ "install-hotplug" ];
fixHardcodedPaths = a.fullDepEntry '' postPatch = ''
touch all-test touch all-test
sed -e "/BASENAME=/iPATH=$out/bin:$PATH" -i *-wrapper *-wrapper.in sed -e "/BASENAME=/iPATH=$out/bin:$PATH" -i *-wrapper *-wrapper.in
sed -e "s@PREFIX=/usr@PREFIX=$out@" -i *-wrapper{,.in} sed -e "s@PREFIX=/usr@PREFIX=$out@" -i *-wrapper{,.in}
@ -55,28 +37,25 @@ rec {
sed -e "s@/etc/hotplug/usb@$out&@" -i *rules* sed -e "s@/etc/hotplug/usb@$out&@" -i *rules*
sed -e "s@/usr@$out@g" -i hplj1020.desktop sed -e "s@/usr@$out@g" -i hplj1020.desktop
sed -e "/PRINTERID=/s@=.*@=$out/bin/usb_printerid@" -i hplj1000 sed -e "/PRINTERID=/s@=.*@=$out/bin/usb_printerid@" -i hplj1000
'' ["doPatch" "minInit"]; '';
doMakeDirs = a.fullDepEntry '' preInstall = ''
mkdir -pv $out/{etc/udev/rules.d,lib/udev/rules.d,etc/hotplug/usb} mkdir -pv $out/{etc/udev/rules.d,lib/udev/rules.d,etc/hotplug/usb}
mkdir -pv $out/share/foomatic/db/source/{opt,printer,driver} mkdir -pv $out/share/foomatic/db/source/{opt,printer,driver}
mkdir -pv $out/share/cups/model mkdir -pv $out/share/cups/model
mkdir -pv $out/share/{applications,pixmaps} mkdir -pv $out/share/{applications,pixmaps}
'' ["minInit"];
deployGetWeb = a.fullDepEntry ''
mkdir -pv "$out/bin" mkdir -pv "$out/bin"
cp -v getweb arm2hpdl "$out/bin" cp -v getweb arm2hpdl "$out/bin"
'' ["minInit"]; '';
meta = { meta = with stdenv.lib; {
description = "ZjStream printer drivers"; description = "ZjStream printer drivers";
maintainers = with a.lib.maintainers; maintainers = with maintainers;
[ [
raskin urkud raskin urkud
]; ];
platforms = with a.lib.platforms; platforms = platforms.linux;
linux; license = licenses.gpl2Plus;
license = a.lib.licenses.gpl2Plus;
}; };
}) x }