3
0
Fork 0
forked from mirrors/nixpkgs

samsungUnifiedLinuxDriver 0.92 -> 4.00.39

This not the latest, but the greatest version (by number of models still
supported).

A big bump. Everything seems to work fine. Tested with a Samsung CLP-325.
Also fixed some strange things. Did this ever even work? On x86_64?
This commit is contained in:
Tobias Geerinckx-Rice 2015-04-01 19:25:34 +02:00
parent a993778fd7
commit eecb59a805
2 changed files with 18 additions and 14 deletions

View file

@ -1,15 +1,14 @@
source $stdenv/setup source $stdenv/setup
arch=$(uname -m) arch=$(uname -m)
# replace i[3456]86 with i386 echo "$arch" | egrep -q '^i[3456]86$' && arch=i386
echo arch | egrep -q '^i[3456]86$' && arch=i386 echo "Installing for $arch"
arch=i386
unpackPhase unpackPhase
patchPhase patchPhase
set -v set -v
echo $arch
cd cdroot/Linux cd cdroot/Linux
mkdir -p $out/opt mkdir -p $out/opt
cp -r $arch/at_root/* $out cp -r $arch/at_root/* $out
@ -18,8 +17,8 @@ cp -r $arch/at_opt/* $out/opt
cp -r noarch/at_opt/* $out/opt cp -r noarch/at_opt/* $out/opt
cd $out cd $out
#test -d usr/lib64 && ln -s usr/lib64 lib || test -d usr/lib64 && ln -s usr/lib64 lib ||
ln -s usr/lib lib ln -s usr/lib lib
mkdir -p share/cups mkdir -p share/cups
cd share/cups cd share/cups
ln -s ../../opt/share/* . ln -s ../../opt/share/* .
@ -27,8 +26,9 @@ ln -s ppd model
cd $out/lib/cups/filter cd $out/lib/cups/filter
for i in $(ls); do for i in $(ls); do
echo patching $i... echo "Patching $i..."
patchelf --set-interpreter $(cat $NIX_CC/nix-support/dynamic-linker) $i || echo "(couldn't set interpreter)" patchelf --set-interpreter $(cat $NIX_CC/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. patchelf --set-rpath $cups/lib:$gcc/lib:$glibc/lib $i # This might not be necessary.
done done

View file

@ -13,12 +13,15 @@
{stdenv, fetchurl, cups, gcc, ghostscript, glibc, patchelf}: {stdenv, fetchurl, cups, gcc, ghostscript, glibc, patchelf}:
stdenv.mkDerivation rec { # Do not bump lightly! Visit <http://www.bchemnet.com/suldr/supported.html>
name = "samsung-UnifiedLinuxDriver-0.92"; # to see what will break when upgrading. Consider a new versioned attribute.
let version = "4.00.39"; in
stdenv.mkDerivation {
name = "samsung-UnifiedLinuxDriver-${version}";
src = fetchurl { src = fetchurl {
url = "http://downloadcenter.samsung.com/content/DR/200911/20091103171827750/UnifiedLinuxDriver_0.92.tar.gz"; url = "http://www.bchemnet.com/suldr/driver/UnifiedLinuxDriver-${version}.tar.gz";
sha256 = "0p2am0p8xvm339mad07c4j77gz31m63z76sy6d9hgwmxy2prbqfq"; sha256 = "144b4xggbzjfq7ga5nza7nra2cf6qn63z5ls7ba1jybkx1vm369k";
}; };
buildInputs = [ cups gcc ghostscript glibc patchelf ]; buildInputs = [ cups gcc ghostscript glibc patchelf ];
@ -28,9 +31,10 @@ stdenv.mkDerivation rec {
builder = ./builder.sh; builder = ./builder.sh;
meta = with stdenv.lib; { meta = with stdenv.lib; {
description = "Samsung's Linux drivers; includes binaries without source code"; description = "Samsung's Linux printing drivers; includes binaries without source code";
homepage = "http://www.samsung.com/"; homepage = http://www.samsung.com/;
license = licenses.unfree; license = licenses.unfree;
platforms = platforms.linux; platforms = platforms.linux;
maintainers = with maintainers; [ nckx ];
}; };
} }