Package Samsung unified printer driver. i686 only but apparently can be improved to support x86_64. Based on patch by James Cook <james.cook[NOSPAM]@utoronto.ca>
parent
e8ff7d627a
commit
0eecd67d14
@ -0,0 +1,35 @@ |
||||
source $stdenv/setup |
||||
|
||||
arch=$(uname -m) |
||||
# replace i[3456]86 with i386 |
||||
echo arch | egrep -q '^i[3456]86$' && arch=i386 |
||||
arch=i386 |
||||
unpackPhase |
||||
patchPhase |
||||
|
||||
set -v |
||||
|
||||
echo $arch |
||||
cd cdroot/Linux |
||||
mkdir -p $out/opt |
||||
cp -r $arch/at_root/* $out |
||||
cp -r $arch/at_opt/* $out/opt |
||||
#cp -r noarch/at_root/* $out |
||||
cp -r noarch/at_opt/* $out/opt |
||||
|
||||
cd $out |
||||
#test -d usr/lib64 && ln -s usr/lib64 lib || |
||||
ln -s usr/lib lib |
||||
mkdir -p share/cups |
||||
cd share/cups |
||||
ln -s ../../opt/share/* . |
||||
ln -s ppd model |
||||
|
||||
cd $out/lib/cups/filter |
||||
for i in $(ls); do |
||||
echo patching $i... |
||||
patchelf --set-interpreter $(cat $NIX_GCC/nix-support/dynamic-linker) $i || echo "(couldn't set interpreter)" |
||||
patchelf --set-rpath $cups/lib:$gcc/lib:$glibc/lib $i # This might not be necessary. |
||||
done |
||||
|
||||
ln -s $ghostscript/bin/gs $out/lib/cups/filter |
@ -0,0 +1,35 @@ |
||||
# Tested on linux-x86_64. Might work on linux-i386. Probably won't work on anything else. |
||||
|
||||
# To use this driver in NixOS, add it to printing.drivers in configuration.nix. |
||||
# configuration.nix might look like this when you're done: |
||||
# { pkgs, ... }: { |
||||
# printing = { |
||||
# enable = true; |
||||
# drivers = [ pkgs.samsungUnifiedLinuxDriver ]; |
||||
# }; |
||||
# (more stuff) |
||||
# } |
||||
# (This advice was tested on 2010 August 2.) |
||||
|
||||
{stdenv, fetchurl, cups, gcc, ghostscript, glibc, patchelf}: |
||||
|
||||
stdenv.mkDerivation rec { |
||||
name = "samsung-UnifiedLinuxDriver-0.92"; |
||||
|
||||
src = fetchurl { |
||||
url = "http://downloadcenter.samsung.com/content/DR/200911/20091103171827750/UnifiedLinuxDriver_0.92.tar.gz"; |
||||
sha256 = "0p2am0p8xvm339mad07c4j77gz31m63z76sy6d9hgwmxy2prbqfq"; |
||||
}; |
||||
|
||||
buildInputs = [ cups gcc ghostscript glibc patchelf ]; |
||||
|
||||
inherit cups gcc ghostscript glibc; |
||||
|
||||
builder = ./builder.sh; |
||||
|
||||
meta = { |
||||
description = "Samsung's Linux drivers; includes binaries without source code"; |
||||
homepage = "http://www.samsung.com/"; |
||||
license = "samsung"; # Binary-only |
||||
}; |
||||
} |
Loading…
Reference in new issue