summary refs log tree commit diff
path: root/pkgs/misc
diff options
context:
space:
mode:
Diffstat (limited to 'pkgs/misc')
-rw-r--r--pkgs/misc/cups/drivers/kyodialog3/default.nix61
-rw-r--r--pkgs/misc/themes/onestepback/default.nix25
-rw-r--r--pkgs/misc/vim-plugins/vim-utils.nix2
3 files changed, 87 insertions, 1 deletions
diff --git a/pkgs/misc/cups/drivers/kyodialog3/default.nix b/pkgs/misc/cups/drivers/kyodialog3/default.nix
new file mode 100644
index 000000000000..073bd4ccbbfc
--- /dev/null
+++ b/pkgs/misc/cups/drivers/kyodialog3/default.nix
@@ -0,0 +1,61 @@
+{ stdenv, lib, fetchzip, cups, autoPatchelfHook
+
+  # Can either be "EU" or "Global"; it's unclear what the difference is
+  , region ? "Global", qt4
+}:
+
+let
+  platform =
+    if stdenv.system == "x86_64-linux" then "64bit"
+    else if stdenv.system == "i686-linux" then "32bit"
+         else throw "Unsupported system: ${stdenv.system}";
+  debPlatform =
+    if platform == "64bit" then "amd64"
+    else "i386";
+  debRegion = if region == "EU" then "EU." else "";
+in
+stdenv.mkDerivation rec {
+  name = "cups-kyodialog3-${version}";
+  version = "8.1601";
+
+  dontStrip = true;
+
+  src = fetchzip {
+    url = "https://usa.kyoceradocumentsolutions.com/content/dam/kdc/kdag/downloads/technical/executables/drivers/kyoceradocumentsolutions/us/en/Kyocera_Linux_PPD_Ver_${version}.tar.gz";
+    sha256 = "11znnlkfssakml7w80gxlz1k59f3nvhph91fkzzadnm9i7a8yjal";
+  };
+
+  nativeBuildInputs = [ autoPatchelfHook ];
+
+  buildInputs = [ cups qt4 ];
+
+  installPhase = ''
+    mkdir -p $out
+    cd $out
+
+    # unpack the debian archive
+    ar p ${src}/KyoceraLinuxPackages/${region}/${platform}/kyodialog3.en${debRegion}_0.5-0_${debPlatform}.deb data.tar.gz | tar -xz
+    rm -Rf KyoceraLinuxPackages
+
+    # strip $out/usr
+    mv usr/* .
+    rmdir usr
+
+    # allow cups to find the ppd files
+    mkdir -p share/cups/model
+    mv share/ppd/kyocera share/cups/model/Kyocera
+    rmdir share/ppd
+
+    # prepend $out to all references in ppd and desktop files
+    find -name "*.ppd" -exec sed -E -i "s:/usr/lib:$out/lib:g" {} \;
+    find -name "*.desktop" -exec sed -E -i "s:/usr/lib:$out/lib:g" {} \;
+  '';
+
+  meta = with lib; {
+    description = "CUPS drivers for several Kyocera printers";
+    homepage = "https://www.kyoceradocumentsolutions.com";
+    license = licenses.unfree;
+    maintainers = [ maintainers.steveej ];
+    platforms = platforms.linux;
+  };
+}
diff --git a/pkgs/misc/themes/onestepback/default.nix b/pkgs/misc/themes/onestepback/default.nix
new file mode 100644
index 000000000000..609e027d9eba
--- /dev/null
+++ b/pkgs/misc/themes/onestepback/default.nix
@@ -0,0 +1,25 @@
+{ stdenv, fetchzip }:
+
+let
+  version = "0.98";
+
+in fetchzip {
+  name = "onestepback-${version}";
+
+  url = "http://www.vide.memoire.free.fr/perso/OneStepBack/OneStepBack-v${version}.zip";
+
+  postFetch = ''
+    mkdir -p $out/share/themes
+    unzip $downloadedFile -x OneStepBack/LICENSE -d $out/share/themes
+  '';
+
+  sha256 = "0sjacvx7020lzc89r5310w83wclw96gzzczy3mss54ldkgmnd0mr";
+
+  meta = with stdenv.lib; {
+    description = "Gtk theme inspired by the NextStep look";
+    homepage = https://www.opendesktop.org/p/1013663/;
+    license = licenses.gpl3;
+    platforms = platforms.all;
+    maintainers = [ maintainers.romildo ];
+  };
+}
diff --git a/pkgs/misc/vim-plugins/vim-utils.nix b/pkgs/misc/vim-plugins/vim-utils.nix
index e11419846aeb..514c1daed629 100644
--- a/pkgs/misc/vim-plugins/vim-utils.nix
+++ b/pkgs/misc/vim-plugins/vim-utils.nix
@@ -224,7 +224,7 @@ let
           else if builtins.isAttrs x && builtins ? out then toNix "${x}" # a derivation
           else if builtins.isAttrs x then "{${lib.concatStringsSep ", " (lib.mapAttrsToList (n: v: "${toNix n}: ${toNix v}") x)}}"
           else if builtins.isList x then "[${lib.concatMapStringsSep ", " toNix x}]"
-          else throw "turning ${lib.showVal x} into a VimL thing not implemented yet";
+          else throw "turning ${lib.generators.toPretty {} x} into a VimL thing not implemented yet";
 
       in assert builtins.hasAttr "vim-addon-manager" knownPlugins;
       ''