From eecb59a805b7b1a0040dfb28b249abe6283a6770 Mon Sep 17 00:00:00 2001 From: Tobias Geerinckx-Rice Date: Wed, 1 Apr 2015 19:25:34 +0200 Subject: [PATCH] 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? --- pkgs/misc/cups/drivers/samsung/builder.sh | 16 ++++++++-------- pkgs/misc/cups/drivers/samsung/default.nix | 16 ++++++++++------ 2 files changed, 18 insertions(+), 14 deletions(-) diff --git a/pkgs/misc/cups/drivers/samsung/builder.sh b/pkgs/misc/cups/drivers/samsung/builder.sh index db54d8a6c936..f750df6e5063 100644 --- a/pkgs/misc/cups/drivers/samsung/builder.sh +++ b/pkgs/misc/cups/drivers/samsung/builder.sh @@ -1,15 +1,14 @@ source $stdenv/setup arch=$(uname -m) -# replace i[3456]86 with i386 -echo arch | egrep -q '^i[3456]86$' && arch=i386 -arch=i386 +echo "$arch" | egrep -q '^i[3456]86$' && arch=i386 +echo "Installing for $arch" + unpackPhase patchPhase set -v -echo $arch cd cdroot/Linux mkdir -p $out/opt cp -r $arch/at_root/* $out @@ -18,8 +17,8 @@ cp -r $arch/at_opt/* $out/opt cp -r noarch/at_opt/* $out/opt cd $out -#test -d usr/lib64 && ln -s usr/lib64 lib || -ln -s usr/lib lib +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/* . @@ -27,8 +26,9 @@ ln -s ppd model cd $out/lib/cups/filter for i in $(ls); do - echo patching $i... - patchelf --set-interpreter $(cat $NIX_CC/nix-support/dynamic-linker) $i || echo "(couldn't set interpreter)" + echo "Patching $i..." + 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. done diff --git a/pkgs/misc/cups/drivers/samsung/default.nix b/pkgs/misc/cups/drivers/samsung/default.nix index 3d111ec59428..b78104a7ddc0 100644 --- a/pkgs/misc/cups/drivers/samsung/default.nix +++ b/pkgs/misc/cups/drivers/samsung/default.nix @@ -13,12 +13,15 @@ {stdenv, fetchurl, cups, gcc, ghostscript, glibc, patchelf}: -stdenv.mkDerivation rec { - name = "samsung-UnifiedLinuxDriver-0.92"; +# Do not bump lightly! Visit +# 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 { - url = "http://downloadcenter.samsung.com/content/DR/200911/20091103171827750/UnifiedLinuxDriver_0.92.tar.gz"; - sha256 = "0p2am0p8xvm339mad07c4j77gz31m63z76sy6d9hgwmxy2prbqfq"; + url = "http://www.bchemnet.com/suldr/driver/UnifiedLinuxDriver-${version}.tar.gz"; + sha256 = "144b4xggbzjfq7ga5nza7nra2cf6qn63z5ls7ba1jybkx1vm369k"; }; buildInputs = [ cups gcc ghostscript glibc patchelf ]; @@ -28,9 +31,10 @@ stdenv.mkDerivation rec { builder = ./builder.sh; meta = with stdenv.lib; { - description = "Samsung's Linux drivers; includes binaries without source code"; - homepage = "http://www.samsung.com/"; + description = "Samsung's Linux printing drivers; includes binaries without source code"; + homepage = http://www.samsung.com/; license = licenses.unfree; platforms = platforms.linux; + maintainers = with maintainers; [ nckx ]; }; }