diff options
Diffstat (limited to 'pkgs/misc')
-rw-r--r-- | pkgs/misc/drivers/hplip/3.16.11.nix (renamed from pkgs/misc/drivers/hplip/3.15.9.nix) | 96 | ||||
-rw-r--r-- | pkgs/misc/drivers/hplip/default.nix | 16 | ||||
-rw-r--r-- | pkgs/misc/emulators/epsxe/default.nix | 55 | ||||
-rw-r--r-- | pkgs/misc/themes/gtk3/numix-solarized-gtk-theme/default.nix | 35 | ||||
-rw-r--r-- | pkgs/misc/vim-plugins/default.nix | 24 | ||||
-rw-r--r-- | pkgs/misc/vim-plugins/vim-plugin-names | 2 | ||||
-rw-r--r-- | pkgs/misc/vim-plugins/vim-utils.nix | 8 |
7 files changed, 176 insertions, 60 deletions
diff --git a/pkgs/misc/drivers/hplip/3.15.9.nix b/pkgs/misc/drivers/hplip/3.16.11.nix index ae96a946e79d..f538066e75ce 100644 --- a/pkgs/misc/drivers/hplip/3.15.9.nix +++ b/pkgs/misc/drivers/hplip/3.16.11.nix @@ -1,66 +1,62 @@ { stdenv, fetchurl, substituteAll , pkgconfig +, makeWrapper , cups, zlib, libjpeg, libusb1, pythonPackages, sane-backends, dbus, usbutils -, net_snmp, polkit +, net_snmp, openssl, polkit, nettools , bash, coreutils, utillinux -, qtSupport ? true, qt4 +, qtSupport ? true , withPlugin ? false }: let name = "hplip-${version}"; - version = "3.15.9"; + version = "3.16.11"; src = fetchurl { url = "mirror://sourceforge/hplip/${name}.tar.gz"; - sha256 = "0vcxz3gsqcamlzx61xm77h7c769ya8kdhzwafa9w2wvkf3l8zxd1"; + sha256 = "094vkyr0rjng72m13dgr824cdl7q20x23qjxzih4w7l9njn0rqpn"; }; plugin = fetchurl { url = "http://www.openprinting.org/download/printdriver/auxfiles/HP/plugins/${name}-plugin.run"; - sha256 = "1ahalw83xm8x0h6hljhnkknry1hny9flkrlzcymv8nmwgic0kjgs"; + sha256 = "1y3wdax2wb6kdd8bi40wl7v9s8ffyjz95bz42sjcpzzddmlhcaxg"; }; - hplipState = - substituteAll - { - inherit version; - src = ./hplip.state; - }; - - hplipPlatforms = - { - "i686-linux" = "x86_32"; - "x86_64-linux" = "x86_64"; - "armv6l-linux" = "arm32"; - "armv7l-linux" = "arm32"; - }; + hplipState = substituteAll { + inherit version; + src = ./hplip.state; + }; + + hplipPlatforms = { + "i686-linux" = "x86_32"; + "x86_64-linux" = "x86_64"; + "armv6l-linux" = "arm32"; + "armv7l-linux" = "arm32"; + }; hplipArch = hplipPlatforms."${stdenv.system}" or (throw "HPLIP not supported on ${stdenv.system}"); - pluginArches = [ "x86_32" "x86_64" ]; + pluginArches = [ "x86_32" "x86_64" "arm32" ]; in assert withPlugin -> builtins.elem hplipArch pluginArches || throw "HPLIP plugin not supported on ${stdenv.system}"; -stdenv.mkDerivation { - inherit name src version; +pythonPackages.buildPythonApplication { + inherit name src; + format = "other"; buildInputs = [ libjpeg cups libusb1 - pythonPackages.python - pythonPackages.wrapPython sane-backends dbus net_snmp - ] ++ stdenv.lib.optionals qtSupport [ - qt4 + openssl ]; nativeBuildInputs = [ @@ -71,13 +67,14 @@ stdenv.mkDerivation { dbus pillow pygobject2 - recursivePthLoader reportlab usbutils ] ++ stdenv.lib.optionals qtSupport [ pyqt4 ]; + makeWrapperArgs = [ ''--prefix PATH : "${nettools}/bin"'' ]; + prePatch = '' # HPLIP hardcodes absolute paths everywhere. Nuke from orbit. find . -type f -exec sed -i \ @@ -92,6 +89,7 @@ stdenv.mkDerivation { preConfigure = '' export configureFlags="$configureFlags + --with-hpppddir=$out/share/cups/model/HP --with-cupsfilterdir=$out/lib/cups/filter --with-cupsbackenddir=$out/lib/cups/backend --with-icondir=$out/share/applications @@ -148,32 +146,30 @@ stdenv.mkDerivation { rm $out/etc/udev/rules.d/56-hpmud.rules ''; - fixupPhase = '' - # Wrap the user-facing Python scripts in $out/bin without turning the - # ones in $out /share into shell scripts (they need to be importable). - # Note that $out/bin contains only symlinks to $out/share. + # The installed executables are just symlinks into $out/share/hplip, + # but wrapPythonPrograms ignores symlinks. We cannot replace the Python + # modules in $out/share/hplip with wrapper scripts because they import + # each other as libraries. Instead, we emulate wrapPythonPrograms by + # 1. Calling patchPythonProgram on the original script in $out/share/hplip + # 2. Making our own wrapper pointing directly to the original script. + dontWrapPythonPrograms = true; + preFixup = '' + buildPythonPath "$out $pythonPath" + for bin in $out/bin/*; do - py=`readlink -m $bin` + py=$(readlink -m $bin) rm $bin - cp $py $bin - wrapPythonProgramsIn $bin "$out $pythonPath" - sed -i "s@$(dirname $bin)/[^ ]*@$py@g" $bin + echo "patching \`$py'..." + patchPythonScript "$py" + echo "wrapping \`$bin'..." + makeWrapper "$py" "$bin" \ + --prefix PATH ':' "$program_PATH" \ + --set PYTHONNOUSERSITE "true" \ + $makeWrapperArgs done + ''; - # Remove originals. Knows a little too much about wrapPythonProgramsIn. - rm -f $out/bin/.*-wrapped - - # Merely patching shebangs in $out/share does not cause trouble. - for i in $out/share/hplip{,/*}/*.py; do - substituteInPlace $i \ - --replace /usr/bin/python \ - ${pythonPackages.python}/bin/${pythonPackages.python.executable} \ - --replace "/usr/bin/env python" \ - ${pythonPackages.python}/bin/${pythonPackages.python.executable} - done - - wrapPythonProgramsIn $out/lib "$out $pythonPath" - + postFixup = '' substituteInPlace $out/etc/hp/hplip.conf --replace /usr $out '' + stdenv.lib.optionalString (!withPlugin) '' # A udev rule to notify users that they need the binary plugin. @@ -192,6 +188,6 @@ stdenv.mkDerivation { then licenses.unfree else with licenses; [ mit bsd2 gpl2Plus ]; platforms = [ "i686-linux" "x86_64-linux" "armv6l-linux" "armv7l-linux" ]; - maintainers = with maintainers; [ jgeerds nckx ]; + maintainers = with maintainers; [ jgeerds ttuegel ]; }; } diff --git a/pkgs/misc/drivers/hplip/default.nix b/pkgs/misc/drivers/hplip/default.nix index 9342c547a17e..a01fc74ce471 100644 --- a/pkgs/misc/drivers/hplip/default.nix +++ b/pkgs/misc/drivers/hplip/default.nix @@ -4,23 +4,23 @@ , cups, zlib, libjpeg, libusb1, pythonPackages, sane-backends, dbus, usbutils , net_snmp, openssl, polkit, nettools , bash, coreutils, utillinux -, qtSupport ? true +, withQt5 ? true , withPlugin ? false }: let name = "hplip-${version}"; - version = "3.16.11"; + version = "3.17.9"; src = fetchurl { url = "mirror://sourceforge/hplip/${name}.tar.gz"; - sha256 = "094vkyr0rjng72m13dgr824cdl7q20x23qjxzih4w7l9njn0rqpn"; + sha256 = "0y46jjq8jdfk9m4vjq55h8yggibvqbi9rl08vni7vbhxym1diamj"; }; plugin = fetchurl { - url = "http://www.openprinting.org/download/printdriver/auxfiles/HP/plugins/${name}-plugin.run"; - sha256 = "1y3wdax2wb6kdd8bi40wl7v9s8ffyjz95bz42sjcpzzddmlhcaxg"; + url = "http://hplipopensource.com/hplip-web/plugin/${name}-plugin.run"; + sha256 = "10z8vzwcwmwni7s4j9xp0fa7l4lwrhl4kp450dga3fj0cck1gxwq"; }; hplipState = substituteAll { @@ -69,8 +69,8 @@ pythonPackages.buildPythonApplication { pygobject2 reportlab usbutils - ] ++ stdenv.lib.optionals qtSupport [ - pyqt4 + ] ++ stdenv.lib.optionals withQt5 [ + pyqt5 ]; makeWrapperArgs = [ ''--prefix PATH : "${nettools}/bin"'' ]; @@ -188,6 +188,6 @@ pythonPackages.buildPythonApplication { then licenses.unfree else with licenses; [ mit bsd2 gpl2Plus ]; platforms = [ "i686-linux" "x86_64-linux" "armv6l-linux" "armv7l-linux" ]; - maintainers = with maintainers; [ jgeerds nckx ]; + maintainers = with maintainers; [ jgeerds ttuegel ]; }; } diff --git a/pkgs/misc/emulators/epsxe/default.nix b/pkgs/misc/emulators/epsxe/default.nix new file mode 100644 index 000000000000..e367d6a14984 --- /dev/null +++ b/pkgs/misc/emulators/epsxe/default.nix @@ -0,0 +1,55 @@ +{ stdenv, fetchurl, alsaLib, curl, gdk_pixbuf, gcc, glib, gtk3, + libX11, openssl, ncurses5, SDL, SDL_ttf, unzip, zlib, wrapGAppsHook }: + +with stdenv.lib; + +stdenv.mkDerivation rec { + name = "epsxe-${version}"; + version = "2.0.5"; + + src = with stdenv.lib; let + version2 = concatStrings (splitString "." version); + platform = "linux" + (optionalString stdenv.is64bit "_x64"); + in fetchurl { + url = "http://www.epsxe.com/files/ePSXe${version2}${platform}.zip"; + sha256 = if stdenv.is64bit + then "16fa9qc2xhaz1f6294m0b56s5l86cbmclwm9w3mqnch0yjsrvab0" + else "1677lclam557kp8jwvchdrk27zfj50fqx2q9i3bcx26d9k61q3kl"; + }; + + nativeBuildInputs = [ unzip wrapGAppsHook ]; + sourceRoot = "."; + + buildInputs = [ + alsaLib + curl + gdk_pixbuf + glib + gtk3 + libX11 + openssl + ncurses5 + SDL + SDL_ttf + stdenv.cc.cc.lib + zlib + ]; + + dontStrip = true; + + installPhase = '' + install -D ${if stdenv.is64bit then "epsxe_x64" else "ePSXe"} $out/bin/epsxe + patchelf \ + --set-interpreter $(cat ${stdenv.cc}/nix-support/dynamic-linker) \ + --set-rpath ${makeLibraryPath buildInputs} \ + $out/bin/epsxe + ''; + + meta = { + homepage = http://epsxe.com/; + description = "Enhanced PSX (PlayStation 1) emulator"; + license = licenses.unfree; + maintainers = with maintainers; [ yegortimoshenko ]; + platforms = [ "i686-linux" "x86_64-linux" ]; + }; +} diff --git a/pkgs/misc/themes/gtk3/numix-solarized-gtk-theme/default.nix b/pkgs/misc/themes/gtk3/numix-solarized-gtk-theme/default.nix new file mode 100644 index 000000000000..4ede14d3bb39 --- /dev/null +++ b/pkgs/misc/themes/gtk3/numix-solarized-gtk-theme/default.nix @@ -0,0 +1,35 @@ +{ stdenv, fetchFromGitHub, sass, glib, gdk_pixbuf }: + +stdenv.mkDerivation rec { + version = "20160919"; + name = "numix-solarized-gtk-theme-${version}"; + + src = fetchFromGitHub { + owner = "Ferdi265"; + repo = "numix-solarized-gtk-theme"; + rev = version; + sha256 = "0243w918ycmf9vnkzfvwnrxz9zc6xxk7167h8ywxj901pqy59kad"; + }; + + postPatch = '' + substituteInPlace Makefile --replace \ + 'INSTALL_DIR=$(DESTDIR)/usr/share/themes' "INSTALL_DIR=$out/share/themes" + patchShebangs . + ''; + + buildInputs = [sass glib gdk_pixbuf]; + + meta = with stdenv.lib; { + description = "GTK3.20-compatible version of bitterologist's Numix Solarized from deviantart"; + longDescription = '' + This is a fork of the Numix GTK theme that replaces the colors of the theme + and icons to use the solarized theme with a solarized green accent color. + This theme supports both the dark and light theme, just as Numix proper. + ''; + homepage = https://github.com/Ferdi265/numix-solarized-gtk-theme; + downloadPage = https://github.com/Ferdi265/numix-solarized-gtk-theme/releases; + license = licenses.gpl3; + maintainers = [ maintainers.offline ]; + platforms = platforms.linux; + }; +} diff --git a/pkgs/misc/vim-plugins/default.nix b/pkgs/misc/vim-plugins/default.nix index 24dd868d64dc..adc2a6104e7b 100644 --- a/pkgs/misc/vim-plugins/default.nix +++ b/pkgs/misc/vim-plugins/default.nix @@ -16,7 +16,7 @@ in # TL;DR # Add your plugin to ./vim-plugin-names -# Regenerate via `nix-shell -p vimPlugins.pluginnames2nix --command "vim-plugin-names-to-nix"` +# Regenerate via `nix-shell -I nixpkgs=/path/to/your/local/fork -p vimPlugins.pluginnames2nix --command "vim-plugin-names-to-nix"` # Copy the generated expression(s) into this file. # If plugin is complicated then make changes to ./vim2nix/additional-nix-code @@ -652,6 +652,17 @@ rec { }; + xptemplate = buildVimPluginFrom2Nix { # created by nix#NixDerivation + name = "xptemplate-2017-04-18"; + src = fetchgit { + url = "https://github.com/drmingdrmer/xptemplate"; + rev = "52d84e361e9da53c4309b0d96a1ab667c67b7f07"; + sha256 = "195r5p4cyiip64zmgcih56c59gwm0irgid6cdrqc2y747gyxmf7m"; + }; + dependencies = []; + + }; + neco-ghc = buildVimPluginFrom2Nix { # created by nix#NixDerivation name = "neco-ghc-2017-07-22"; src = fetchgit { @@ -1162,6 +1173,17 @@ rec { }; + robotframework-vim = buildVimPluginFrom2Nix { # created by nix#NixDerivation + name = "robotframework-vim-2017-04-14"; + src = fetchgit { + url = "https://github.com/mfukar/robotframework-vim"; + rev = "75d5b371a4da2a090a2872d55bd0dead013f334e"; + sha256 = "091ac5rq6f1a7j2q3dy9rc00vckv21m4wd29ijj63jannr02v5ad"; + }; + dependencies = []; + + }; + vim-startify = buildVimPluginFrom2Nix { # created by nix#NixDerivation name = "vim-startify-2017-06-15"; src = fetchgit { diff --git a/pkgs/misc/vim-plugins/vim-plugin-names b/pkgs/misc/vim-plugins/vim-plugin-names index f1983e3eeb6a..acde3cf2e5b6 100644 --- a/pkgs/misc/vim-plugins/vim-plugin-names +++ b/pkgs/misc/vim-plugins/vim-plugin-names @@ -45,6 +45,7 @@ "github:digitaltoad/vim-jade" "github:dleonard0/pony-vim-syntax" "github:dracula/vim" +"github:drmingdrmer/xptemplate" "github:eagletmt/neco-ghc" "github:editorconfig/editorconfig-vim" "github:eikenb/acp" @@ -91,6 +92,7 @@ "github:martinda/Jenkinsfile-vim-syntax" "github:megaannum/forms" "github:megaannum/self" +"github:mfukar/robotframework-vim" "github:mhinz/vim-startify" "github:michaeljsmith/vim-indent-object" "github:mileszs/ack.vim" diff --git a/pkgs/misc/vim-plugins/vim-utils.nix b/pkgs/misc/vim-plugins/vim-utils.nix index 87b2f9d3e188..b659266ace7f 100644 --- a/pkgs/misc/vim-plugins/vim-utils.nix +++ b/pkgs/misc/vim-plugins/vim-utils.nix @@ -383,6 +383,8 @@ rec { unpackPhase ? "", configurePhase ? "", buildPhase ? "", + preInstall ? "", + postInstall ? "", path ? (builtins.parseDrvName name).name, addonInfo ? null, ... @@ -390,9 +392,11 @@ rec { addRtp "${rtpPath}/${path}" (stdenv.mkDerivation (a // { name = namePrefix + name; - inherit unpackPhase configurePhase buildPhase addonInfo; + inherit unpackPhase configurePhase buildPhase addonInfo preInstall postInstall; installPhase = '' + runHook preInstall + target=$out/${rtpPath}/${path} mkdir -p $out/${rtpPath} cp -r . $target @@ -401,6 +405,8 @@ rec { if [ -n "$addonInfo" ]; then echo "$addonInfo" > $target/addon-info.json fi + + runHook postInstall ''; })); |