| @@ -1,10 +1,10 @@ | ||
| { callPackage, fetchgit, ... } @ args: | ||
|
|
||
| callPackage ./generic.nix (args // { | ||
| version = "2016-01-25"; | ||
| src = fetchgit { | ||
| sha256 = "db1fecd671bd8b3a777138bb4815285b4364ee3ad01ab05424b4aa0c20ed9919"; | ||
| rev = "056f590f2d147099554d97a89dd5e0ddfa8d6dda"; | ||
| url = "git://alioth.debian.org/git/sane/sane-backends.git"; | ||
| }; | ||
| }) |
| @@ -11,6 +11,8 @@ stdenv.mkDerivation (args // { | ||
| name = "${name}-${version}"; | ||
| inherit src; | ||
|
|
||
| outputs = args.outputs or [ "dev" "out" ]; | ||
|
|
||
| cmakeFlags = | ||
| (args.cmakeFlags or []) | ||
| ++ [ "-DBUILD_TESTING=OFF" ] | ||
| @@ -9,6 +9,8 @@ | ||
| kdeApp { | ||
| name = "kdelibs"; | ||
|
|
||
| outputs = [ "out" ]; | ||
|
|
||
| buildInputs = [ | ||
| attica attr avahi giflib libdbusmenu_qt libjpeg libxml2 | ||
| polkit_qt4 qca2 shared_desktop_ontologies udev xz pcre | ||
| @@ -0,0 +1,26 @@ | ||
| { stdenv, fetchFromGitHub, qtbase, qtx11extras, makeQtWrapper, muparser, cmake }: | ||
|
|
||
| stdenv.mkDerivation rec { | ||
| name = "albert-${version}"; | ||
| version = "0.8.0"; | ||
|
|
||
| src = fetchFromGitHub { | ||
| owner = "manuelschneid3r"; | ||
| repo = "albert"; | ||
| rev = "v${version}"; | ||
| sha256 = "0lzj1gbcc5sp2x1c0d3s21y55kcnnn4dmy8d205mrgnyavjrak7n"; | ||
| }; | ||
|
|
||
| buildInputs = [ cmake qtbase qtx11extras muparser makeQtWrapper ]; | ||
|
|
||
| fixupPhase = '' | ||
| wrapQtProgram $out/bin/albert | ||
| ''; | ||
|
|
||
| meta = { | ||
| homepage = https://github.com/manuelSchneid3r/albert; | ||
| description = "Desktop agnostic launcher"; | ||
| license = stdenv.lib.licenses.gpl3Plus; | ||
| maintainers = [ stdenv.lib.maintainers.ericsagnes ]; | ||
| }; | ||
| } |
| @@ -1,23 +1,28 @@ | ||
| {stdenv, fetchurl, flvstreamer, ffmpeg, makeWrapper, perl, buildPerlPackage, perlPackages, vlc, rtmpdump}: | ||
| buildPerlPackage { | ||
| name = "get_iplayer-2.94"; | ||
|
|
||
| buildInputs = [makeWrapper perl]; | ||
| propagatedBuildInputs = with perlPackages; [HTMLParser HTTPCookies LWP XMLSimple]; | ||
|
|
||
| preConfigure = "touch Makefile.PL"; | ||
| doCheck = false; | ||
|
|
||
| patchPhase = '' | ||
| sed -e 's|^update_script|#update_script|' \ | ||
| -e '/WARNING.*updater/d' \ | ||
| -i get_iplayer | ||
| ''; | ||
|
|
||
| installPhase = '' | ||
| mkdir -p $out/bin | ||
| cp get_iplayer $out/bin | ||
| wrapProgram $out/bin/get_iplayer --suffix PATH : ${ffmpeg.bin}/bin:${flvstreamer}/bin:${vlc}/bin:${rtmpdump}/bin --prefix PERL5LIB : $PERL5LIB | ||
| ''; | ||
|
|
||
| src = fetchurl { | ||
| url = ftp://ftp.infradead.org/pub/get_iplayer/get_iplayer-2.94.tar.gz; | ||
| sha256 = "16p0bw879fl8cs6rp37g1hgrcai771z6rcqk2nvm49kk39dx1zi4"; | ||
| }; | ||
|
|
||
| } |
| @@ -0,0 +1,77 @@ | ||
| /* Beware! | ||
| After starting Guake it will give the error message "Guake can not init! Gconf Error. Have you installed guake.schemas properly?", | ||
| which will have to be resolved manually, because I have not found a way to automate this, without being impure. | ||
| If you have Guake installed, you can use `nix-build -A gnome3.guake` to get the path to the build directory in the nix store, | ||
| which then can be used in the following command to install the schemas file of Guake: | ||
| gconftool-2 --install-schema-file /path/returned/by/nix-build/share/gconf/schemas/guake.schemas | ||
| It can be removed again by the following command: | ||
| gconftool-2 --recursive-unset /apps/guake | ||
| */ | ||
| { stdenv, fetchurl, lib | ||
| , pkgconfig, libtool, intltool, makeWrapper | ||
| , dbus, gtk2, gconf, python2, python2Packages, libutempter, vte, keybinder, gnome2, gnome3 }: | ||
|
|
||
| with lib; | ||
|
|
||
| let inputs = [ dbus gtk2 gconf python2 libutempter vte keybinder gnome3.gnome_common ]; | ||
| pySubDir = "lib/${python2.libPrefix}/site-packages"; | ||
| pyPath = makeSearchPath pySubDir (attrVals [ "dbus" "notify" "pyGtkGlade" "pyxdg" ] python2Packages ++ [ gnome2.gnome_python ]); | ||
| in stdenv.mkDerivation rec { | ||
| name = "guake-${version}"; | ||
| version = "0.8.3"; | ||
|
|
||
| src = fetchurl { | ||
| url = "https://github.com/Guake/guake/archive/${version}.tar.gz"; | ||
| sha256 = "1lbmdz3i9a97840h8239s360hd37nmhy3hs6kancxbzl1512ak1y"; | ||
| }; | ||
|
|
||
| nativeBuildInputs = [ pkgconfig libtool intltool makeWrapper ]; | ||
|
|
||
| buildInputs = inputs ++ (with python2Packages; [ pyGtkGlade pyxdg ]); | ||
|
|
||
| patchPhase = '' | ||
| patchShebangs . | ||
| ''; | ||
|
|
||
| configureScript = "./autogen.sh"; | ||
|
|
||
| configureFlags = [ | ||
| "--sysconfdir=/etc" | ||
| "--localstatedir=/var" | ||
| "--disable-schemas-install" | ||
| ]; | ||
|
|
||
| installFlags = [ | ||
| # Configuring the installation to not install gconf schemas is not always supported, | ||
| # therefore gconftool-2 has this variable, which will make gconftool-2 not update any of the databases. | ||
| "GCONF_DISABLE_MAKEFILE_SCHEMA_INSTALL=1" | ||
| "sysconfdir=\${out}/etc" | ||
| "localstatedir=\${TMPDIR}" | ||
| ]; | ||
|
|
||
| postInstall = '' | ||
| mkdir -p $out/share/gconf/schemas | ||
| cp data/guake.schemas $out/share/gconf/schemas | ||
| ''; | ||
|
|
||
| postFixup = '' | ||
| for bin in $out/bin/{guake,guake-prefs}; do | ||
| substituteInPlace $bin \ | ||
| --replace '/usr/bin/env python2' ${python2}/bin/python2 | ||
| wrapProgram $bin \ | ||
| --prefix XDG_DATA_DIRS : "$out/share:$XDG_ICON_DIRS:$GSETTINGS_SCHEMAS_PATH" \ | ||
| --prefix LD_LIBRARY_PATH : ${makeLibraryPath inputs} \ | ||
| --prefix PYTHONPATH : "$out/${pySubDir}:${pyPath}:$PYTHONPATH" | ||
| done | ||
| ''; | ||
|
|
||
| meta = { | ||
| description = "Drop-down terminal for GNOME"; | ||
| homepage = http://guake-project.org; | ||
| license = licenses.gpl2; | ||
| platforms = platforms.linux; | ||
| maintainers = [ maintainers.msteen ]; | ||
| }; | ||
| } |
| @@ -0,0 +1,34 @@ | ||
| { stdenv, fetchurl, patchelf, makeWrapper, xorg, gcc }: | ||
|
|
||
| assert stdenv.isLinux; | ||
|
|
||
| stdenv.mkDerivation rec { | ||
| name = "IPMIView-${version}"; | ||
| version = "20151223"; | ||
|
|
||
| src = fetchurl { | ||
| url = "ftp://ftp.supermicro.com/utility/IPMIView/Linux/IPMIView_V2.11.0_bundleJRE_Linux_x64_${version}.tar.gz"; | ||
| sha256 = "1rv9j0id7i2ipm25n60bpfdm1gj44xg2aj8rnx4s6id3ln90q121"; | ||
| }; | ||
|
|
||
| buildInputs = [ patchelf makeWrapper ]; | ||
|
|
||
| buildPhase = with xorg; '' | ||
| patchelf --set-rpath "${libX11}/lib:${libXext}/lib:${libXrender}/lib:${libXtst}/lib:${libXi}/lib" ./jre/lib/amd64/xawt/libmawt.so | ||
| patchelf --set-rpath "${gcc.cc}/lib" ./libiKVM64.so | ||
| patchelf --set-rpath "${libXcursor}/lib:${libX11}/lib:${libXext}/lib:${libXrender}/lib:${libXtst}/lib:${libXi}/lib" --set-interpreter "$(cat $NIX_CC/nix-support/dynamic-linker)" ./jre/bin/javaws | ||
| patchelf --set-rpath "${gcc.cc}/lib:$out/jre/lib/amd64/jli" --set-interpreter "$(cat $NIX_CC/nix-support/dynamic-linker)" ./jre/bin/java | ||
| ''; | ||
|
|
||
| installPhase = '' | ||
| mkdir -p $out/bin | ||
| cp -R . $out/ | ||
| echo "$out/jre/bin/java -jar $out/IPMIView20.jar" > $out/bin/IPMIView | ||
| chmod +x $out/bin/IPMIView | ||
| ''; | ||
|
|
||
| meta = with stdenv.lib; { | ||
| license = licenses.unfree; | ||
| }; | ||
| } | ||
|
|
| @@ -0,0 +1,35 @@ | ||
| {stdenv, fetchurl, pkgconfig, gtk2, synergy}: | ||
|
|
||
| stdenv.mkDerivation rec { | ||
| name = "quicksynergy-${version}"; | ||
| version = "0.9.0"; | ||
| src = fetchurl { | ||
| url = "http://downloads.sourceforge.net/project/quicksynergy/Linux/${version}/quicksynergy-${version}.tar.gz"; | ||
| sha256 = "1pi8503bg8q1psw50y6d780i33nnvfjqiy9vnr3v52pdcfip8pix"; | ||
| }; | ||
| buildInputs = [ | ||
| pkgconfig | ||
| gtk2 | ||
| synergy | ||
| ]; | ||
| preBuild = " | ||
| sed -i 's@/usr/bin@${synergy.out}/bin@' src/synergy_config.c | ||
| "; | ||
| meta = { | ||
| description = "GUI application to share mouse and keyboard between computers"; | ||
| longDescription = " | ||
| QuickSynergy is a graphical interface (GUI) for easily configuring | ||
| Synergy2, an application that allows the user to share his mouse and | ||
| keyboard between two or more computers. | ||
| Without the need for any external hardware, Synergy2 uses the TCP-IP | ||
| protocol to share the resources, even between machines with diferent | ||
| operating systems, such as Mac OS, Linux and Windows. | ||
| Remember to open port 24800 (used by synergys program) if you want to | ||
| host mouse and keyboard."; | ||
| homepage = https://code.google.com/p/quicksynergy/; | ||
| license = stdenv.lib.licenses.gpl2; | ||
| maintainers = [ stdenv.lib.maintainers.spinus ]; | ||
| }; | ||
| } |
| @@ -0,0 +1,43 @@ | ||
| {fetchurl, stdenv, makeWrapper, gtk3, python3Packages}: | ||
| let | ||
| version = "0.9.2"; | ||
| in | ||
| stdenv.mkDerivation { | ||
| name = "solaar-${version}"; | ||
| src = fetchurl { | ||
| sha256 = "0954grz2adggfzcj4df4mpr4d7qyl7w8rb4j2s0f9ymawl92i05j"; | ||
| url = "https://github.com/pwr/Solaar/archive/${version}.tar.gz"; | ||
| }; | ||
|
|
||
| buildInputs = [gtk3 python3Packages.pygobject3 python3Packages.pyudev]; | ||
| enableParallelBuilding = true; | ||
| installPhase = '' | ||
| mkdir -p "$out"; | ||
| ''; | ||
| postInstall = '' | ||
| wrapProgram "$out/bin/solaar" \ | ||
| --prefix PYTHONPATH : "$PYTHONPATH" \ | ||
| --prefix GI_TYPELIB_PATH : "$GI_TYPELIB_PATH" | ||
| wrapProgram "$out/bin/solaar-cli" \ | ||
| --prefix PYTHONPATH : "$PYTHONPATH" \ | ||
| --prefix GI_TYPELIB_PATH : "$GI_TYPELIB_PATH" | ||
| ''; | ||
| meta = with stdenv.lib; { | ||
| description = "Linux devices manager for the Logitech Unifying Receiver"; | ||
| longDescription = '' | ||
| Solaar is a Linux device manager for Logitech’s Unifying Receiver | ||
| peripherals. It is able to pair/unpair devices to the receiver, and for | ||
| most devices read battery status. | ||
| It comes in two flavors, command-line and GUI. Both are able to list the | ||
| devices paired to a Unifying Receiver, show detailed info for each | ||
| device, and also pair/unpair supported devices with the receiver. | ||
| To be able to use it, make sure you have access to /dev/hidraw* files. | ||
| ''; | ||
| license = licenses.gpl2; | ||
| homepage = https://pwr.github.io/Solaar/; | ||
| platforms = platforms.linux; | ||
| maintainers = [maintainers.spinus]; | ||
| }; | ||
| } |
| @@ -0,0 +1,58 @@ | ||
| { stdenv, fetchurl, pkgconfig, makeDesktopItem, unzip | ||
| , qtbase, qttools, makeQtWrapper, qtmultimedia, qtquick1, qtquickcontrols | ||
| , openssl, protobuf | ||
| }: | ||
|
|
||
| stdenv.mkDerivation rec { | ||
| name = "ricochet-${version}"; | ||
| version = "1.1.1"; | ||
|
|
||
| src = fetchurl { | ||
| url = "https://github.com/ricochet-im/ricochet/archive/v${version}.tar.gz"; | ||
| sha256 = "0y79igzgl9xn00981zcyxdlks7vnqxhb4rq3x8gwxm0yr98p39ms"; | ||
| }; | ||
|
|
||
| desktopItem = makeDesktopItem { | ||
| name = "ricochet"; | ||
| exec = "ricochet"; | ||
| icon = "ricochet"; | ||
| desktopName = "Ricochet"; | ||
| genericName = "Ricochet"; | ||
| comment = meta.description; | ||
| categories = "Office;Email;"; | ||
| }; | ||
|
|
||
| buildInputs = [ | ||
| qtbase qttools qtmultimedia qtquick1 qtquickcontrols | ||
| openssl protobuf | ||
| ]; | ||
|
|
||
| nativeBuildInputs = [ pkgconfig makeQtWrapper ]; | ||
|
|
||
| preConfigure = '' | ||
| export NIX_CFLAGS_COMPILE="$NIX_CFLAGS_COMPILE $(pkg-config --cflags openssl)" | ||
| ''; | ||
|
|
||
| configureScript = "qmake"; | ||
| dontAddPrefix = true; | ||
| configureFlags = [ "PREFIX=$(out)" "DEFINES+=RICOCHET_NO_PORTABLE" ]; | ||
|
|
||
| installPhase = '' | ||
| mkdir -p $out/bin | ||
| cp ricochet $out/bin | ||
| wrapQtProgram $out/bin/ricochet | ||
| mkdir -p $out/share/applications | ||
| cp $desktopItem/share/applications"/"* $out/share/applications | ||
| mkdir -p $out/share/pixmaps | ||
| cp icons/ricochet.png $out/share/pixmaps/ricochet.png | ||
| ''; | ||
|
|
||
| meta = with stdenv.lib; { | ||
| description = "Anonymous peer-to-peer instant messaging"; | ||
| homepage = "https://ricochet.im"; | ||
| license = licenses.bsd3; | ||
| maintainers = [ maintainers.codsl maintainers.jgillich ]; | ||
| }; | ||
| } |
| @@ -0,0 +1,84 @@ | ||
| { stdenv | ||
| , lib | ||
| , fetchurl | ||
| , cmake | ||
| , extra-cmake-modules | ||
| , kbookmarks | ||
| , karchive | ||
| , kconfig | ||
| , kconfigwidgets | ||
| , kcoreaddons | ||
| , kdbusaddons | ||
| , kdoctools | ||
| , kemoticons | ||
| , kglobalaccel | ||
| , ki18n | ||
| , kiconthemes | ||
| , kidletime | ||
| , kitemviews | ||
| , knotifications | ||
| , knotifyconfig | ||
| , kio | ||
| , kparts | ||
| , kwallet | ||
| , makeQtWrapper | ||
| , solid | ||
| , sonnet | ||
| , phonon}: | ||
|
|
||
| let | ||
| pn = "konversation"; | ||
| v = "1.6"; | ||
| in | ||
|
|
||
| stdenv.mkDerivation rec { | ||
| name = "${pn}-${v}"; | ||
|
|
||
| src = fetchurl { | ||
| url = "mirror://kde/stable/${pn}/${v}/src/${name}.tar.xz"; | ||
| sha256 = "789fd75644bf54606778971310433dbe2bc01ac0917b34bc4e8cac88e204d5b6"; | ||
| }; | ||
|
|
||
| buildInputs = [ | ||
| cmake | ||
| extra-cmake-modules | ||
| kbookmarks | ||
| karchive | ||
| kconfig | ||
| kconfigwidgets | ||
| kcoreaddons | ||
| kdbusaddons | ||
| kdoctools | ||
| kemoticons | ||
| kglobalaccel | ||
| ki18n | ||
| kiconthemes | ||
| kidletime | ||
| kitemviews | ||
| knotifications | ||
| knotifyconfig | ||
| kio | ||
| kparts | ||
| kwallet | ||
| solid | ||
| sonnet | ||
| phonon | ||
| ]; | ||
|
|
||
| nativeBuildInputs = [ | ||
| extra-cmake-modules | ||
| kdoctools | ||
| makeQtWrapper | ||
| ]; | ||
|
|
||
| postInstall = '' | ||
| wrapQtProgram "$out/bin/konversation" | ||
| ''; | ||
|
|
||
| meta = { | ||
| description = "Integrated IRC client for KDE"; | ||
| license = with lib.licenses; [ gpl2 ]; | ||
| maintainers = with lib.maintainers; [ fridh ]; | ||
| homepage = https://konversation.kde.org; | ||
| }; | ||
| } |
| @@ -0,0 +1,162 @@ | ||
| { stdenv, fetchurl, unzip, jdk, ib-tws, xpra }: | ||
|
|
||
| stdenv.mkDerivation rec { | ||
| version = "2.14.0"; | ||
| name = "ib-controller-${version}"; | ||
|
|
||
| src = fetchurl { | ||
| url = "https://github.com/ib-controller/ib-controller/archive/${version}.tar.gz"; | ||
| sha256 = "17a8bcgg9z3b4y38k035hm2lgvhmf8srlz59c7n2q3fdw2i95i68"; | ||
| }; | ||
|
|
||
| phases = [ "unpackPhase" "installPhase" ]; | ||
|
|
||
| buildInputs = [ unzip jdk ib-tws ]; | ||
|
|
||
| installPhase = '' | ||
| mkdir -p $out $out/bin $out/etc/ib/controller $out/share/IBController | ||
| cp resources/*.jar $out/share/IBController/. | ||
| cp resources/*.ini $out/etc/ib/controller/. | ||
| classpath="" | ||
| for jar in ${ib-tws}/share/IBJts/*.jar; do | ||
| classpath="$classpath:$jar" | ||
| done | ||
| for jar in $out/share/IBController/*.jar; do | ||
| classpath="$classpath:$jar" | ||
| done | ||
| # strings to use below; separated to avoid nix specific substitutions | ||
| javaOptions={JAVA_OPTIONS:--Xmx1024M} | ||
| ibProfileDir={IB_PROFILE_DIR:-~/IB/} | ||
| cat<<EOF > $out/bin/ib-tws-c | ||
| #!$SHELL | ||
| if [[ \$1 == /* ]] || [[ \$1 == ./* ]]; then | ||
| IB_USER_PROFILE=\`realpath \$1\` | ||
| IB_USER_PROFILE_TITLE=\`basename \$1\` | ||
| else | ||
| if [[ x\$1 != "x" ]] && [[ \$1 != -* ]]; then | ||
| IB_USER_PROFILE=\`realpath \$$ibProfileDir\$1\` | ||
| IB_USER_PROFILE_TITLE=\$1 | ||
| else | ||
| echo "ERROR: \"\$1\" is not a valid name of a profile." | ||
| exit 1 | ||
| fi | ||
| fi | ||
| shift | ||
| if [ ! -e \$IB_USER_PROFILE ]; then mkdir -p \$IB_USER_PROFILE; fi | ||
| if [ ! -d \$IB_USER_PROFILE ]; then echo "ERROR: \$IB_USER_PROFILE must be a directory!" && echo 1; fi | ||
| if [ ! -e \$IB_USER_PROFILE/jts.ini ]; then cp ${ib-tws}/etc/ib/tws/jts.ini \$IB_USER_PROFILE/. && chmod +w \$IB_USER_PROFILE/jts.ini; fi | ||
| if [ ! -e \$IB_USER_PROFILE/IBController.ini ]; then cp $out/etc/ib/controller/IBController.ini \$IB_USER_PROFILE/. && chmod +w \$IB_USER_PROFILE/IBController.ini; fi | ||
| if [[ \$1 == "-q" ]]; then | ||
| if [ -f \$IB_USER_PROFILE/xpra/run ]; then | ||
| ${xpra}/bin/xpra stop \`cat \$IB_USER_PROFILE/xpra/run\` --socket-dir=\$IB_USER_PROFILE/xpra/ &> /dev/null | ||
| fi | ||
| exit 0 | ||
| fi | ||
| if [[ \$1 == "-d" ]] && [ ! -f \$IB_USER_PROFILE/xpra/run ]; then | ||
| ( sleep infinity ) & | ||
| WAIT_DUMMY_PID=\$! | ||
| ( trap "" INT; | ||
| DISPLAYNUM=100 | ||
| while [ -f /tmp/.X\$DISPLAYNUM-lock ]; do DISPLAYNUM=\$((\$DISPLAYNUM + 1)); done | ||
| mkdir -p \$IB_USER_PROFILE/xpra | ||
| cd \$IB_USER_PROFILE | ||
| nohup ${xpra}/bin/xpra start :\$DISPLAYNUM \ | ||
| --socket-dir=\$IB_USER_PROFILE/xpra/ \ | ||
| --start-child="echo -n :\$DISPLAYNUM > \$IB_USER_PROFILE/xpra/run \ | ||
| && kill \$WAIT_DUMMY_PID &> /dev/null \ | ||
| && ${jdk}/bin/java -cp $classpath \$$javaOptions ibcontroller.IBController \$IB_USER_PROFILE/IBController.ini" \ | ||
| --exit-with-children \ | ||
| --no-pulseaudio \ | ||
| --no-mdns \ | ||
| --no-notification \ | ||
| --no-daemon \ | ||
| &> \$IB_USER_PROFILE/xpra/server.log | ||
| rm -f \$IB_USER_PROFILE/xpra/run | ||
| rm -f /tmp/.X\$DISPLAYNUM-lock | ||
| ) & | ||
| wait \$WAIT_DUMMY_PID | ||
| exit 0 | ||
| fi | ||
| if [ -f \$IB_USER_PROFILE/xpra/run ]; then | ||
| ${xpra}/bin/xpra attach \`cat \$IB_USER_PROFILE/xpra/run\` --socket-dir=\$IB_USER_PROFILE/xpra/ \ | ||
| --windows \ | ||
| --no-speaker \ | ||
| --no-microphone \ | ||
| --no-tray \ | ||
| --title="\$IB_USER_PROFILE_TITLE: @title@" \ | ||
| &> \$IB_USER_PROFILE/xpra/client.log | ||
| fi | ||
| EOF | ||
| chmod u+x $out/bin/ib-tws-c | ||
| cat<<EOF > $out/bin/ib-gw-c | ||
| #!$SHELL | ||
| if [[ \$1 == /* ]] || [[ \$1 == ./* ]]; then | ||
| IB_USER_PROFILE=\`realpath \$1\` | ||
| IB_USER_PROFILE_TITLE=\`basename \$1\` | ||
| else | ||
| if [[ x\$1 != "x" ]] && [[ \$1 != -* ]]; then | ||
| IB_USER_PROFILE=\`realpath \$$ibProfileDir\$1\` | ||
| IB_USER_PROFILE_TITLE=\$1 | ||
| else | ||
| echo "ERROR: \"\$1\" is not a valid name of a profile." | ||
| exit 1 | ||
| fi | ||
| fi | ||
| shift | ||
| if [ ! -e \$IB_USER_PROFILE ]; then mkdir -p \$IB_USER_PROFILE; fi | ||
| if [ ! -d \$IB_USER_PROFILE ]; then echo "ERROR: \$IB_USER_PROFILE must be a directory!" && echo 1; fi | ||
| if [ ! -e \$IB_USER_PROFILE/jts.ini ]; then cp ${ib-tws}/etc/ib/tws/jts.ini \$IB_USER_PROFILE/. && chmod +w \$IB_USER_PROFILE/jts.ini; fi | ||
| if [ ! -e \$IB_USER_PROFILE/IBController.ini ]; then cp $out/etc/ib/controller/IBController.ini \$IB_USER_PROFILE/. && chmod +w \$IB_USER_PROFILE/IBController.ini; fi | ||
| if [[ \$1 == "-q" ]]; then | ||
| if [ -f \$IB_USER_PROFILE/xpra/run ]; then | ||
| ${xpra}/bin/xpra stop \`cat \$IB_USER_PROFILE/xpra/run\` --socket-dir=\$IB_USER_PROFILE/xpra/ &> /dev/null | ||
| fi | ||
| exit 0 | ||
| fi | ||
| if [[ \$1 == "-d" ]] && [ ! -f \$IB_USER_PROFILE/xpra/run ]; then | ||
| ( sleep infinity ) & | ||
| WAIT_DUMMY_PID=\$! | ||
| ( trap "" INT; | ||
| DISPLAYNUM=100 | ||
| while [ -f /tmp/.X\$DISPLAYNUM-lock ]; do DISPLAYNUM=\$((\$DISPLAYNUM + 1)); done | ||
| mkdir -p \$IB_USER_PROFILE/xpra | ||
| cd \$IB_USER_PROFILE | ||
| nohup ${xpra}/bin/xpra start :\$DISPLAYNUM \ | ||
| --socket-dir=\$IB_USER_PROFILE/xpra/ \ | ||
| --start-child="echo -n :\$DISPLAYNUM > \$IB_USER_PROFILE/xpra/run \ | ||
| && kill \$WAIT_DUMMY_PID &> /dev/null \ | ||
| && ${jdk}/bin/java -cp $classpath \$$javaOptions ibcontroller.IBGatewayController \$IB_USER_PROFILE/IBController.ini" \ | ||
| --exit-with-children \ | ||
| --no-pulseaudio \ | ||
| --no-mdns \ | ||
| --no-notification \ | ||
| --no-daemon \ | ||
| &> \$IB_USER_PROFILE/xpra/server.log | ||
| rm -f \$IB_USER_PROFILE/xpra/run | ||
| rm -f /tmp/.X\$DISPLAYNUM-lock | ||
| ) & | ||
| wait \$WAIT_DUMMY_PID | ||
| exit 0 | ||
| fi | ||
| if [ -f \$IB_USER_PROFILE/xpra/run ]; then | ||
| ${xpra}/bin/xpra attach \`cat \$IB_USER_PROFILE/xpra/run\` --socket-dir=\$IB_USER_PROFILE/xpra/ \ | ||
| --windows \ | ||
| --no-speaker \ | ||
| --no-microphone \ | ||
| --no-tray \ | ||
| --title="\$IB_USER_PROFILE_TITLE: @title@" \ | ||
| &> \$IB_USER_PROFILE/xpra/client.log | ||
| fi | ||
| EOF | ||
| chmod u+x $out/bin/ib-gw-c | ||
| ''; | ||
|
|
||
|
|
||
| meta = with stdenv.lib; { | ||
| description = "Automation Controller for the Trader Work Station of Interactive Brokers"; | ||
| homepage = https://github.com/ib-controller/ib-controller; | ||
| license = licenses.gpl3; | ||
| maintainers = [ maintainers.tstrobel ]; | ||
| platforms = platforms.linux; | ||
| }; | ||
| } |
| @@ -0,0 +1,96 @@ | ||
| { stdenv, requireFile, jdk }: | ||
|
|
||
| stdenv.mkDerivation rec { | ||
| version = "9542"; | ||
| name = "ib-tws-${version}"; | ||
|
|
||
| src = requireFile rec { | ||
| name = "ibtws_${version}.jar"; | ||
| message = '' | ||
| This nix expression requires that ${name} is already part of the store. | ||
| Download the TWS from | ||
| https://download2.interactivebrokers.com/download/unixmacosx_latest.jar, | ||
| rename the file to ${name}, and add it to the nix store with | ||
| "nix-prefetch-url file://${name}". | ||
| ''; | ||
| sha256 = "1a2jiwwnr5g3xfba1a89c257bdbnq4zglri8hz021vk7f6s4rlrf"; | ||
| }; | ||
|
|
||
| phases = [ "unpackPhase" "buildPhase" "installPhase" ]; | ||
|
|
||
| buildInputs = [ jdk ]; | ||
|
|
||
| buildPhase = '' | ||
| jar -xf IBJts/jts.jar | ||
| cp trader/common/images/ibapp_icon.gif ibtws_icon.gif | ||
| ''; | ||
|
|
||
| unpackPhase = '' | ||
| jar xf ${src} | ||
| ''; | ||
|
|
||
| installPhase = '' | ||
| mkdir -p $out $out/bin $out/etc/ib/tws $out/share/IBJts $out/share/icons | ||
| cp IBJts/*.jar $out/share/IBJts/. | ||
| cp IBJts/*.ini $out/etc/ib/tws/. | ||
| cp ibtws_icon.gif $out/share/icons/. | ||
| classpath="" | ||
| for jar in $out/share/IBJts/*.jar; do | ||
| classpath="$classpath:$jar" | ||
| done | ||
| # strings to use below; separated to avoid nix specific substitutions | ||
| javaOptions={JAVA_OPTIONS:-'-Xmx1024M -Dawt.useSystemAAFontSettings=lcd -Dsun.java2d.xrender=True -Dsun.java2d.opengl=False'} | ||
| # OTHER JAVA_OPTIONS: -Dawt.useSystemAAFontSettings=on -Dswing.aatext=true -Dswing.defaultlaf=com.sun.java | ||
| ibProfileDir={IB_PROFILE_DIR:-~/IB/} | ||
| cat<<EOF > $out/bin/ib-tws | ||
| #!$SHELL | ||
| if [[ \$1 == /* ]] || [[ \$1 == ./* ]]; then | ||
| IB_USER_PROFILE=\`realpath \$1\` | ||
| IB_USER_PROFILE_TITLE=\`basename \$1\` | ||
| else | ||
| if [[ x\$1 != "x" ]] && [[ \$1 != -* ]]; then | ||
| IB_USER_PROFILE=\`realpath \$$ibProfileDir\$1\` | ||
| IB_USER_PROFILE_TITLE=\$1 | ||
| else | ||
| echo "ERROR: \"\$1\" is not a valid name of a profile." | ||
| exit 1 | ||
| fi | ||
| fi | ||
| shift | ||
| if [ ! -e \$IB_USER_PROFILE ]; then mkdir -p \$IB_USER_PROFILE; fi | ||
| if [ ! -d \$IB_USER_PROFILE ]; then echo "ERROR: \$IB_USER_PROFILE must be a directory!" && echo 1; fi | ||
| if [ ! -e \$IB_USER_PROFILE/jts.ini ]; then cp $out/etc/ib/tws/jts.ini \$IB_USER_PROFILE/. && chmod +w \$IB_USER_PROFILE/jts.ini; fi | ||
| ${jdk}/bin/java -cp $classpath \$$javaOptions jclient.LoginFrame \$IB_USER_PROFILE | ||
| EOF | ||
| chmod u+x $out/bin/ib-tws | ||
| cat<<EOF > $out/bin/ib-gw | ||
| #!$SHELL | ||
| if [[ \$1 == /* ]] || [[ \$1 == ./* ]]; then | ||
| IB_USER_PROFILE=\`realpath \$1\` | ||
| IB_USER_PROFILE_TITLE=\`basename \$1\` | ||
| else | ||
| if [[ x\$1 != "x" ]] && [[ \$1 != -* ]]; then | ||
| IB_USER_PROFILE=\`realpath \$$ibProfileDir\$1\` | ||
| IB_USER_PROFILE_TITLE=\$1 | ||
| else | ||
| echo "ERROR: \"\$1\" is not a valid name of a profile." | ||
| exit 1 | ||
| fi | ||
| fi | ||
| shift | ||
| if [ ! -e \$IB_USER_PROFILE ]; then mkdir -p \$IB_USER_PROFILE; fi | ||
| if [ ! -d \$IB_USER_PROFILE ]; then echo "ERROR: \$IB_USER_PROFILE must be a directory!" && echo 1; fi | ||
| if [ ! -e \$IB_USER_PROFILE/jts.ini ]; then cp $out/etc/ib/tws/jts.ini \$IB_USER_PROFILE/. && chmod +w \$IB_USER_PROFILE/jts.ini; fi | ||
| ${jdk}/bin/java -cp $classpath -Dsun.java2d.noddraw=true \$$javaOptions ibgateway.GWClient \$IB_USER_PROFILE | ||
| EOF | ||
| chmod u+x $out/bin/ib-gw | ||
| ''; | ||
|
|
||
| meta = with stdenv.lib; { | ||
| description = "Trader Work Station of Interactive Brokers"; | ||
| homepage = https://www.interactivebrokers.com; | ||
| license = licenses.unfree; | ||
| maintainers = [ maintainers.tstrobel ]; | ||
| platforms = platforms.linux; | ||
| }; | ||
| } |
| @@ -0,0 +1 @@ | ||
| EVAL additions_libgltf=' subDir = "libgltf/";' |
| @@ -323,6 +323,7 @@ | ||
| name = "libgltf-0.0.2.tar.bz2"; | ||
| md5 = "d63a9f47ab048f5009d90693d6aa6424"; | ||
| brief = true; | ||
| subDir = "libgltf/"; | ||
| } | ||
| { | ||
| name = "liblangtag-0.5.1.tar.bz2"; | ||