Skip to content

Instantly share code, notes, and snippets.

@EvilFreelancer
Created November 10, 2018 16:15
Show Gist options
  • Save EvilFreelancer/a4808d66aa0984eff5d2698f1d0176b7 to your computer and use it in GitHub Desktop.
Save EvilFreelancer/a4808d66aa0984eff5d2698f1d0176b7 to your computer and use it in GitHub Desktop.
Upwork on NixOS
#!/bin/sh
source $stdenv/setup
PATH=$dpkg/bin:$PATH
dpkg -x $src unpacked
cp -r unpacked/* $out/
let nixpkgs = import <nixpkgs> {};
stdenv = nixpkgs.stdenv;
in rec {
dumb-upwork = stdenv.mkDerivation {
name = "dumb-upwork";
builder = ./builder.sh;
atk = nixpkgs.atk;
dpkg = nixpkgs.dpkg;
bash = nixpkgs.bash;
gtk2-x11 = nixpkgs.gtk2-x11;
glib = nixpkgs.glib;
pango = nixpkgs.gnome2.pango;
gdk_pixbuf = nixpkgs.gdk_pixbuf;
cairo = nixpkgs.cairo;
fontconfig = nixpkgs.fontconfig;
freetype = nixpkgs.freetype;
dbus = nixpkgs.dbus;
libxcb = nixpkgs.xorg.libxcb;
libX11 = nixpkgs.xorg.libX11;
libXi = nixpkgs.xorg.libXi;
libXcursor = nixpkgs.xorg.libXcursor;
libXdamage = nixpkgs.xorg.libXdamage;
libXrandr = nixpkgs.xorg.libXrandr;
libXcomposite = nixpkgs.xorg.libXcomposite;
libXext = nixpkgs.xorg.libXext;
libXfixes = nixpkgs.xorg.libXfixes;
libXrender = nixpkgs.xorg.libXrender;
libXtst = nixpkgs.xorg.libXtst;
libXScrnSaver = nixpkgs.xorg.libXScrnSaver;
GConf = nixpkgs.gnome2.GConf;
nss = nixpkgs.nss;
nspr = nixpkgs.nspr;
alsaLib = nixpkgs.alsaLib;
cups = nixpkgs.cups;
expat = nixpkgs.expat;
libudev = nixpkgs.libudev;
src = nixpkgs.fetchurl {
url = "https://updates-desktopapp.upwork.com/binaries/v5_1_0_629_t7cbfzorudrgnytv/upwork_5.1.0.629_amd64.deb";
sha256 = "010b44f8b72540fd7ee938abfc1612b312ba888416a291ac8febb49522e4cad6";
};
};
upwork = nixpkgs.buildFHSUserEnv {
name = "upwork";
targetPkgs = pkgs: [ dumb-upwork ];
multiPkgs = pkgs: [ pkgs.dpkg pkgs.bash pkgs.gtk2-x11 pkgs.atk pkgs.glib pkgs.gnome2.pango
pkgs.gdk_pixbuf pkgs.cairo pkgs.fontconfig pkgs.freetype pkgs.dbus
pkgs.xorg.libxcb pkgs.xorg.libX11 pkgs.xorg.libXi pkgs.xorg.libXcursor
pkgs.xorg.libXdamage pkgs.xorg.libXrandr pkgs.xorg.libXcomposite
pkgs.xorg.libXext pkgs.xorg.libXfixes pkgs.xorg.libXrender
pkgs.xorg.libXtst pkgs.xscreensaver pkgs.xorg.libXScrnSaver
pkgs.gnome2.GConf pkgs.nss pkgs.nspr pkgs.alsaLib pkgs.cups pkgs.expat
pkgs.libudev ];
runScript = "upwork";
};
}
@EvilFreelancer
Copy link
Author

  • nix-build -A upwork default.nix
  • ./result/bin/upwork

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment