about summary refs log tree commit diff
path: root/pkgs/tools/misc
diff options
context:
space:
mode:
authorMatthew Bauer <mjbauer95@gmail.com>2019-02-09 12:14:06 -0500
committerMatthew Bauer <mjbauer95@gmail.com>2019-02-09 12:14:06 -0500
commit5c09d977c794d9243ddac17f6c429b5432431f8f (patch)
tree1acbd7e7f0c01546d955d47c6a8fddfec8e632b6 /pkgs/tools/misc
parent21d991b1fd78214023551a0dada17b129cbd5cd5 (diff)
parent18d059a4ac001fbaa9c2abc750a2830a52e1dae5 (diff)
downloadnixlib-5c09d977c794d9243ddac17f6c429b5432431f8f.tar
nixlib-5c09d977c794d9243ddac17f6c429b5432431f8f.tar.gz
nixlib-5c09d977c794d9243ddac17f6c429b5432431f8f.tar.bz2
nixlib-5c09d977c794d9243ddac17f6c429b5432431f8f.tar.lz
nixlib-5c09d977c794d9243ddac17f6c429b5432431f8f.tar.xz
nixlib-5c09d977c794d9243ddac17f6c429b5432431f8f.tar.zst
nixlib-5c09d977c794d9243ddac17f6c429b5432431f8f.zip
Merge remote-tracking branch 'origin/master' into staging
Diffstat (limited to 'pkgs/tools/misc')
-rw-r--r--pkgs/tools/misc/chezmoi/default.nix29
-rw-r--r--pkgs/tools/misc/chezmoi/deps.nix399
-rw-r--r--pkgs/tools/misc/debianutils/default.nix4
-rw-r--r--pkgs/tools/misc/desktop-file-utils/default.nix2
-rw-r--r--pkgs/tools/misc/desktop-file-utils/setup-hook.sh6
-rw-r--r--pkgs/tools/misc/diffoscope/default.nix5
-rw-r--r--pkgs/tools/misc/flameshot/default.nix37
-rw-r--r--pkgs/tools/misc/fortune/default.nix33
-rw-r--r--pkgs/tools/misc/git-town/default.nix25
-rw-r--r--pkgs/tools/misc/ifdtool/default.nix28
-rw-r--r--pkgs/tools/misc/lbdb/default.nix4
-rw-r--r--pkgs/tools/misc/moreutils/default.nix5
-rw-r--r--pkgs/tools/misc/nagstamon/default.nix6
-rw-r--r--pkgs/tools/misc/ncdu/default.nix6
-rw-r--r--pkgs/tools/misc/ostree/default.nix47
-rw-r--r--pkgs/tools/misc/papis/default.nix62
-rw-r--r--pkgs/tools/misc/rpm-ostree/default.nix59
-rw-r--r--pkgs/tools/misc/rpm-ostree/fix-introspection-build.patch11
-rw-r--r--pkgs/tools/misc/rrdtool/default.nix12
-rw-r--r--pkgs/tools/misc/sonota/default.nix54
-rw-r--r--pkgs/tools/misc/sonota/set_resource_path.patch20
-rw-r--r--pkgs/tools/misc/youtube-dl/default.nix4
22 files changed, 695 insertions, 163 deletions
diff --git a/pkgs/tools/misc/chezmoi/default.nix b/pkgs/tools/misc/chezmoi/default.nix
new file mode 100644
index 000000000000..f15dfc2adba7
--- /dev/null
+++ b/pkgs/tools/misc/chezmoi/default.nix
@@ -0,0 +1,29 @@
+{ stdenv, buildGoPackage, fetchFromGitHub }:
+
+buildGoPackage rec {
+  name = "chezmoi-${version}";
+  version = "1.3.0";
+
+  goPackagePath = "github.com/twpayne/chezmoi";
+
+  src = fetchFromGitHub {
+    owner = "twpayne";
+    repo = "chezmoi";
+    rev = "v${version}";
+    sha256 = "0dvdjx5khpw62lprn06k271xfc9fdrw4c1q74vd1vffaz60yfd8d";
+  };
+
+  goDeps = ./deps.nix;
+
+  buildFlagsArray = [
+    "-ldflags=-s -w -X ${goPackagePath}/cmd.version=${version}"
+  ];
+
+  meta = with stdenv.lib; {
+    homepage = https://github.com/twpayne/chezmoi;
+    description = "Manage your dotfiles across multiple machines, securely";
+    license = licenses.mit;
+    maintainers = with maintainers; [ jhillyerd ];
+    platforms = platforms.all;
+  };
+}
diff --git a/pkgs/tools/misc/chezmoi/deps.nix b/pkgs/tools/misc/chezmoi/deps.nix
new file mode 100644
index 000000000000..4fb1bd535528
--- /dev/null
+++ b/pkgs/tools/misc/chezmoi/deps.nix
@@ -0,0 +1,399 @@
+# file generated from go.mod using vgo2nix (https://github.com/adisbladis/vgo2nix)
+[
+  {
+    goPackagePath = "github.com/BurntSushi/toml";
+    fetch = {
+      type = "git";
+      url = "https://github.com/BurntSushi/toml";
+      rev = "v0.3.1";
+      sha256 = "1fjdwwfzyzllgiwydknf1pwjvy49qxfsczqx5gz3y0izs7as99j6";
+    };
+  }
+  {
+    goPackagePath = "github.com/Masterminds/semver";
+    fetch = {
+      type = "git";
+      url = "https://github.com/Masterminds/semver";
+      rev = "v1.4.2";
+      sha256 = "0k2fpk2x8jbvqkqxx5hkx1ygrsppzmzypqb90i1r33yq7ac7zlxj";
+    };
+  }
+  {
+    goPackagePath = "github.com/Masterminds/sprig";
+    fetch = {
+      type = "git";
+      url = "https://github.com/Masterminds/sprig";
+      rev = "v2.17.1";
+      sha256 = "0iiwga57100r780k2d509fzx67x6l8z0wjl84pyzg5mpy6zp2y9y";
+    };
+  }
+  {
+    goPackagePath = "github.com/aokoli/goutils";
+    fetch = {
+      type = "git";
+      url = "https://github.com/aokoli/goutils";
+      rev = "v1.1.0";
+      sha256 = "180px47gj936qyk5bkv5mbbgiil9abdjq6kwkf7sq70vyi9mcfiq";
+    };
+  }
+  {
+    goPackagePath = "github.com/armon/consul-api";
+    fetch = {
+      type = "git";
+      url = "https://github.com/armon/consul-api";
+      rev = "eb2c6b5be1b6";
+      sha256 = "1j6fdr1sg36qy4n4xjl7brq739fpm5npq98cmvklzjc9qrx98nk9";
+    };
+  }
+  {
+    goPackagePath = "github.com/blang/semver";
+    fetch = {
+      type = "git";
+      url = "https://github.com/blang/semver";
+      rev = "v3.5.1";
+      sha256 = "13ws259bwcibkclbr82ilhk6zadm63kxklxhk12wayklj8ghhsmy";
+    };
+  }
+  {
+    goPackagePath = "github.com/coreos/etcd";
+    fetch = {
+      type = "git";
+      url = "https://github.com/coreos/etcd";
+      rev = "v3.3.10";
+      sha256 = "1x2ii1hj8jraba8rbxz6dmc03y3sjxdnzipdvg6fywnlq1f3l3wl";
+    };
+  }
+  {
+    goPackagePath = "github.com/coreos/go-etcd";
+    fetch = {
+      type = "git";
+      url = "https://github.com/coreos/go-etcd";
+      rev = "v2.0.0";
+      sha256 = "1xb34hzaa1lkbq5vkzy9vcz6gqwj7hp6cdbvyack2bf28dwn33jj";
+    };
+  }
+  {
+    goPackagePath = "github.com/coreos/go-semver";
+    fetch = {
+      type = "git";
+      url = "https://github.com/coreos/go-semver";
+      rev = "v0.2.0";
+      sha256 = "1gghi5bnqj50hfxhqc1cxmynqmh2yk9ii7ab9gsm75y5cp94ymk0";
+    };
+  }
+  {
+    goPackagePath = "github.com/d4l3k/messagediff";
+    fetch = {
+      type = "git";
+      url = "https://github.com/d4l3k/messagediff";
+      rev = "v1.2.1";
+      sha256 = "104hl8x57ciaz7mzafg1vp9qggxcyfm8hsv9bmlihbz9ml3nyr8v";
+    };
+  }
+  {
+    goPackagePath = "github.com/danieljoos/wincred";
+    fetch = {
+      type = "git";
+      url = "https://github.com/danieljoos/wincred";
+      rev = "v1.0.1";
+      sha256 = "1bb1928nnikx5036aw4152p55g8xgwx42rv0n2i5zydh1031f50m";
+    };
+  }
+  {
+    goPackagePath = "github.com/davecgh/go-spew";
+    fetch = {
+      type = "git";
+      url = "https://github.com/davecgh/go-spew";
+      rev = "v1.1.1";
+      sha256 = "0hka6hmyvp701adzag2g26cxdj47g21x6jz4sc6jjz1mn59d474y";
+    };
+  }
+  {
+    goPackagePath = "github.com/fsnotify/fsnotify";
+    fetch = {
+      type = "git";
+      url = "https://github.com/fsnotify/fsnotify";
+      rev = "v1.4.7";
+      sha256 = "07va9crci0ijlivbb7q57d2rz9h27zgn2fsm60spjsqpdbvyrx4g";
+    };
+  }
+  {
+    goPackagePath = "github.com/godbus/dbus";
+    fetch = {
+      type = "git";
+      url = "https://github.com/godbus/dbus";
+      rev = "v4.1.0";
+      sha256 = "1ckvg15zdsgmbn4mi36cazkb407ixc9mmyf7vwj8b8wi3d00rgn9";
+    };
+  }
+  {
+    goPackagePath = "github.com/google/renameio";
+    fetch = {
+      type = "git";
+      url = "https://github.com/google/renameio";
+      rev = "v0.1.0";
+      sha256 = "1ki2x5a9nrj17sn092d6n4zr29lfg5ydv4xz5cp58z6cw8ip43jx";
+    };
+  }
+  {
+    goPackagePath = "github.com/google/uuid";
+    fetch = {
+      type = "git";
+      url = "https://github.com/google/uuid";
+      rev = "v1.1.0";
+      sha256 = "0yx4kiafyshdshrmrqcf2say5mzsviz7r94a0y1l6xfbkkyvnc86";
+    };
+  }
+  {
+    goPackagePath = "github.com/hashicorp/hcl";
+    fetch = {
+      type = "git";
+      url = "https://github.com/hashicorp/hcl";
+      rev = "v1.0.0";
+      sha256 = "0q6ml0qqs0yil76mpn4mdx4lp94id8vbv575qm60jzl1ijcl5i66";
+    };
+  }
+  {
+    goPackagePath = "github.com/huandu/xstrings";
+    fetch = {
+      type = "git";
+      url = "https://github.com/huandu/xstrings";
+      rev = "v1.2.0";
+      sha256 = "0bn1kac5vcspxdpx4bygr4gngdbk67pnbqc04b0f7a4ny25n10iq";
+    };
+  }
+  {
+    goPackagePath = "github.com/imdario/mergo";
+    fetch = {
+      type = "git";
+      url = "https://github.com/imdario/mergo";
+      rev = "v0.3.7";
+      sha256 = "05ir0jj74w0yfi1lrhjd97v759in1dpsma64cgmbiqvyp6hfmmf8";
+    };
+  }
+  {
+    goPackagePath = "github.com/inconshreveable/mousetrap";
+    fetch = {
+      type = "git";
+      url = "https://github.com/inconshreveable/mousetrap";
+      rev = "v1.0.0";
+      sha256 = "1mn0kg48xkd74brf48qf5hzp0bc6g8cf5a77w895rl3qnlpfw152";
+    };
+  }
+  {
+    goPackagePath = "github.com/magiconair/properties";
+    fetch = {
+      type = "git";
+      url = "https://github.com/magiconair/properties";
+      rev = "v1.8.0";
+      sha256 = "1a10362wv8a8qwb818wygn2z48lgzch940hvpv81hv8gc747ajxn";
+    };
+  }
+  {
+    goPackagePath = "github.com/mitchellh/go-homedir";
+    fetch = {
+      type = "git";
+      url = "https://github.com/mitchellh/go-homedir";
+      rev = "v1.0.0";
+      sha256 = "0f0z0aa4wivk4z1y503dmnw0k0g0g403dly8i4q263gfshs82sbq";
+    };
+  }
+  {
+    goPackagePath = "github.com/mitchellh/mapstructure";
+    fetch = {
+      type = "git";
+      url = "https://github.com/mitchellh/mapstructure";
+      rev = "v1.1.2";
+      sha256 = "03bpv28jz9zhn4947saqwi328ydj7f6g6pf1m2d4m5zdh5jlfkrr";
+    };
+  }
+  {
+    goPackagePath = "github.com/pelletier/go-toml";
+    fetch = {
+      type = "git";
+      url = "https://github.com/pelletier/go-toml";
+      rev = "v1.2.0";
+      sha256 = "1fjzpcjng60mc3a4b2ql5a00d5gah84wj740dabv9kq67mpg8fxy";
+    };
+  }
+  {
+    goPackagePath = "github.com/pmezard/go-difflib";
+    fetch = {
+      type = "git";
+      url = "https://github.com/pmezard/go-difflib";
+      rev = "v1.0.0";
+      sha256 = "0c1cn55m4rypmscgf0rrb88pn58j3ysvc2d0432dp3c6fqg6cnzw";
+    };
+  }
+  {
+    goPackagePath = "github.com/spf13/afero";
+    fetch = {
+      type = "git";
+      url = "https://github.com/spf13/afero";
+      rev = "v1.1.2";
+      sha256 = "0miv4faf5ihjfifb1zv6aia6f6ik7h1s4954kcb8n6ixzhx9ck6k";
+    };
+  }
+  {
+    goPackagePath = "github.com/spf13/cast";
+    fetch = {
+      type = "git";
+      url = "https://github.com/spf13/cast";
+      rev = "v1.3.0";
+      sha256 = "0xq1ffqj8y8h7dcnm0m9lfrh0ga7pssnn2c1dnr09chqbpn4bdc5";
+    };
+  }
+  {
+    goPackagePath = "github.com/spf13/cobra";
+    fetch = {
+      type = "git";
+      url = "https://github.com/spf13/cobra";
+      rev = "v0.0.3";
+      sha256 = "1q1nsx05svyv9fv3fy6xv6gs9ffimkyzsfm49flvl3wnvf1ncrkd";
+    };
+  }
+  {
+    goPackagePath = "github.com/spf13/jwalterweatherman";
+    fetch = {
+      type = "git";
+      url = "https://github.com/spf13/jwalterweatherman";
+      rev = "v1.0.0";
+      sha256 = "093fmmvavv84pv4q84hav7ph3fmrq87bvspjj899q0qsx37yvdr8";
+    };
+  }
+  {
+    goPackagePath = "github.com/spf13/pflag";
+    fetch = {
+      type = "git";
+      url = "https://github.com/spf13/pflag";
+      rev = "v1.0.3";
+      sha256 = "1cj3cjm7d3zk0mf1xdybh0jywkbbw7a6yr3y22x9sis31scprswd";
+    };
+  }
+  {
+    goPackagePath = "github.com/spf13/viper";
+    fetch = {
+      type = "git";
+      url = "https://github.com/spf13/viper";
+      rev = "v1.3.1";
+      sha256 = "1190mg04718r03qriav99sf4kx2n7wdgr8vdni15f74bpbzrdjrl";
+    };
+  }
+  {
+    goPackagePath = "github.com/stretchr/objx";
+    fetch = {
+      type = "git";
+      url = "https://github.com/stretchr/objx";
+      rev = "v0.1.1";
+      sha256 = "0iph0qmpyqg4kwv8jsx6a56a7hhqq8swrazv40ycxk9rzr0s8yls";
+    };
+  }
+  {
+    goPackagePath = "github.com/stretchr/testify";
+    fetch = {
+      type = "git";
+      url = "https://github.com/stretchr/testify";
+      rev = "v1.2.2";
+      sha256 = "0dlszlshlxbmmfxj5hlwgv3r22x0y1af45gn1vd198nvvs3pnvfs";
+    };
+  }
+  {
+    goPackagePath = "github.com/twpayne/go-shell";
+    fetch = {
+      type = "git";
+      url = "https://github.com/twpayne/go-shell";
+      rev = "v0.0.1";
+      sha256 = "0nbbfxdwqy14izbfbk8c8ia90l31wbhkcwd2r7v6jhz58iaxcvxk";
+    };
+  }
+  {
+    goPackagePath = "github.com/twpayne/go-vfs";
+    fetch = {
+      type = "git";
+      url = "https://github.com/twpayne/go-vfs";
+      rev = "v1.0.3";
+      sha256 = "138ykzmb4994qwbv3m99536p75804ap15c2drvz6d3k0v95rbw38";
+    };
+  }
+  {
+    goPackagePath = "github.com/twpayne/go-xdg";
+    fetch = {
+      type = "git";
+      url = "https://github.com/twpayne/go-xdg";
+      rev = "v1.0.0";
+      sha256 = "06np468cl8bbpal6x0mf8q6jzlkz65rzma5y65n7wfmrg2k7yn72";
+    };
+  }
+  {
+    goPackagePath = "github.com/ugorji/go";
+    fetch = {
+      type = "git";
+      url = "https://github.com/ugorji/go";
+      rev = "d75b2dcb6bc8";
+      sha256 = "0di1k35gpq9bp958ywranpbskx2vdwlb38s22vl9rybm3wa5g3ps";
+    };
+  }
+  {
+    goPackagePath = "github.com/xordataexchange/crypt";
+    fetch = {
+      type = "git";
+      url = "https://github.com/xordataexchange/crypt";
+      rev = "b2862e3d0a77";
+      sha256 = "04q3856anpzl4gdfgmg7pbp9cx231nkz3ymq2xp27rnmmwhfxr8y";
+    };
+  }
+  {
+    goPackagePath = "github.com/zalando/go-keyring";
+    fetch = {
+      type = "git";
+      url = "https://github.com/zalando/go-keyring";
+      rev = "6d81c293b3fb";
+      sha256 = "1wah726fi08h6ga5wnwxd1zyxq7ckp3qliql44bxgliw2p35kkyb";
+    };
+  }
+  {
+    goPackagePath = "golang.org/x/crypto";
+    fetch = {
+      type = "git";
+      url = "https://go.googlesource.com/crypto";
+      rev = "505ab145d0a9";
+      sha256 = "1vbsvcvmjz6c00p5vf8ls533p52fx2y3gy6v4k5qrdlzl4wf0i5s";
+    };
+  }
+  {
+    goPackagePath = "golang.org/x/sys";
+    fetch = {
+      type = "git";
+      url = "https://go.googlesource.com/sys";
+      rev = "a5c9d58dba9a";
+      sha256 = "02qv5i7yps35p7fa81345qz7k8i73gkigj69anwmpw9rhpmzayf9";
+    };
+  }
+  {
+    goPackagePath = "golang.org/x/text";
+    fetch = {
+      type = "git";
+      url = "https://go.googlesource.com/text";
+      rev = "v0.3.0";
+      sha256 = "0r6x6zjzhr8ksqlpiwm5gdd7s209kwk5p4lw54xjvz10cs3qlq19";
+    };
+  }
+  {
+    goPackagePath = "gopkg.in/check.v1";
+    fetch = {
+      type = "git";
+      url = "https://gopkg.in/check.v1";
+      rev = "20d25e280405";
+      sha256 = "0k1m83ji9l1a7ng8a7v40psbymxasmssbrrhpdv2wl4rhs0nc3np";
+    };
+  }
+  {
+    goPackagePath = "gopkg.in/yaml.v2";
+    fetch = {
+      type = "git";
+      url = "https://gopkg.in/yaml.v2";
+      rev = "v2.2.2";
+      sha256 = "01wj12jzsdqlnidpyjssmj0r4yavlqy7dwrg7adqd8dicjc4ncsa";
+    };
+  }
+]
diff --git a/pkgs/tools/misc/debianutils/default.nix b/pkgs/tools/misc/debianutils/default.nix
index bec0cbbd2b9b..ddd0053f529a 100644
--- a/pkgs/tools/misc/debianutils/default.nix
+++ b/pkgs/tools/misc/debianutils/default.nix
@@ -1,12 +1,12 @@
 { stdenv, fetchurl }:
 
 stdenv.mkDerivation rec {
-  version = "4.8.6";
+  version = "4.8.6.1";
   name = "debianutils-${version}";
 
   src = fetchurl {
     url = "mirror://debian/pool/main/d/debianutils/debianutils_${version}.tar.xz";
-    sha256 = "0wrz8ak4896f5i8wirijr9hdvc43xzxpg2gjs0snmpys8iqh82fv";
+    sha256 = "1vamrgzsfdb2183xgj1qmfzh710iqj2dlbdsl92n3ckqfa51x7q9";
   };
 
   meta = {
diff --git a/pkgs/tools/misc/desktop-file-utils/default.nix b/pkgs/tools/misc/desktop-file-utils/default.nix
index 8dc590c5d6fc..3e47ebd51d74 100644
--- a/pkgs/tools/misc/desktop-file-utils/default.nix
+++ b/pkgs/tools/misc/desktop-file-utils/default.nix
@@ -21,6 +21,8 @@ stdenv.mkDerivation rec {
   nativeBuildInputs = [ pkgconfig ];
   buildInputs = [ glib libintl ];
 
+  setupHook = ./setup-hook.sh;
+
   meta = {
     homepage = http://www.freedesktop.org/wiki/Software/desktop-file-utils;
     description = "Command line utilities for working with .desktop files";
diff --git a/pkgs/tools/misc/desktop-file-utils/setup-hook.sh b/pkgs/tools/misc/desktop-file-utils/setup-hook.sh
new file mode 100644
index 000000000000..004d635cff0e
--- /dev/null
+++ b/pkgs/tools/misc/desktop-file-utils/setup-hook.sh
@@ -0,0 +1,6 @@
+# Remove mimeinfo cache
+mimeinfoPreFixupPhase() {
+    rm -f $out/share/applications/mimeinfo.cache
+}
+
+preFixupPhases="$preFixupPhases mimeinfoPreFixupPhase"
diff --git a/pkgs/tools/misc/diffoscope/default.nix b/pkgs/tools/misc/diffoscope/default.nix
index 80e0cde7e54a..b4272dac5317 100644
--- a/pkgs/tools/misc/diffoscope/default.nix
+++ b/pkgs/tools/misc/diffoscope/default.nix
@@ -9,12 +9,12 @@
 # Note: when upgrading this package, please run the list-missing-tools.sh script as described below!
 python3Packages.buildPythonApplication rec {
   name = "diffoscope-${version}";
-  version = "99";
+  version = "110";
 
   src = fetchgit {
     url    = "https://anonscm.debian.org/git/reproducible/diffoscope.git";
     rev    = "refs/tags/${version}";
-    sha256 = "04a2sqv43g002b7s0crk9gnpdvf90j8j8p01b6shinxh6an8prs2";
+    sha256 = "0rhjxigwxbqbqk7xv7n4m4rh693rg3cbp4x565jv68iy423mf2fb";
   };
 
   patches = [
@@ -43,6 +43,7 @@ python3Packages.buildPythonApplication rec {
     ] ++ lib.optionals enableBloat [
       apktool cbfstool colord fpc ghc ghostscriptX giflib gnupg1 gnumeric imagemagick
       llvm jdk mono openssh pdftk poppler_utils tcpdump unoconv
+      python3Packages.guestfs
     ];
 
   doCheck = false; # Calls 'mknod' in squashfs tests, which needs root
diff --git a/pkgs/tools/misc/flameshot/default.nix b/pkgs/tools/misc/flameshot/default.nix
index 3be418af823c..16a46ac1432b 100644
--- a/pkgs/tools/misc/flameshot/default.nix
+++ b/pkgs/tools/misc/flameshot/default.nix
@@ -1,25 +1,14 @@
 { stdenv, fetchFromGitHub, qtbase, qmake, qttools, qtsvg }:
 
+# To use `flameshot gui`, you will also need to put flameshot in `services.dbus.packages`
+# in configuration.nix so that the daemon gets launched properly:
+#
+#   services.dbus.packages = [ pkgs.flameshot ];
+#   environment.systemPackages = [ pkgs.flameshot ];
 stdenv.mkDerivation rec {
   name = "flameshot-${version}";
   version = "0.6.0";
 
-  nativeBuildInputs = [ qmake qttools qtsvg ];
-  buildInputs = [ qtbase ];
-
-  qmakeFlags = [
-    # flameshot.pro assumes qmake is being run in a git checkout and uses it
-    # to determine the version being built. Let's replace that.
-    "VERSION=${version}"
-    "PREFIX=/"
-  ];
-  patchPhase = ''
-    sed -i 's/VERSION =/#VERSION =/g' flameshot.pro
-    sed -i 's,USRPATH = /usr/local,USRPATH = /,g' flameshot.pro
-  '';
-
-  installFlags = [ "INSTALL_ROOT=$(out)" ];
-
   src = fetchFromGitHub {
     owner = "lupoDharkael";
     repo = "flameshot";
@@ -27,6 +16,22 @@ stdenv.mkDerivation rec {
     sha256 = "193szslh55v44jzxzx5g9kxhl8p8di7vbcnxlid4acfidhnvgazm";
   };
 
+  nativeBuildInputs = [ qmake qttools qtsvg ];
+  buildInputs = [ qtbase ];
+
+  qmakeFlags = [ "PREFIX=${placeholder "out"}" ];
+
+  preConfigure = ''
+    # flameshot.pro assumes qmake is being run in a git checkout.
+    git() { echo ${version}; }
+    export -f git
+  '';
+
+  postFixup = ''
+    substituteInPlace $out/share/dbus-1/services/org.dharkael.Flameshot.service \
+      --replace "/usr/local" "$out"
+  '';
+
   enableParallelBuilding = true;
 
   meta = with stdenv.lib; {
diff --git a/pkgs/tools/misc/fortune/default.nix b/pkgs/tools/misc/fortune/default.nix
index 8e9557335982..45d27e7b7c82 100644
--- a/pkgs/tools/misc/fortune/default.nix
+++ b/pkgs/tools/misc/fortune/default.nix
@@ -1,26 +1,35 @@
-{ stdenv, fetchurl, recode }:
+{ stdenv, fetchurl, cmake, recode, perl }:
 
+let srcs = {
+      fortune = fetchurl {
+        url = "https://github.com/shlomif/fortune-mod/archive/fortune-mod-${version}.tar.gz";
+        sha256 = "89223bb649ea62b030527f181539182d6a17a1a43b0cc499a52732b839f7b691";
+      };
+      shlomifCommon = fetchurl {
+        url = https://bitbucket.org/shlomif/shlomif-cmake-modules/raw/default/shlomif-cmake-modules/Shlomif_Common.cmake;
+        sha256 = "62f188a9f1b7ab0e757eb0bc6540d9c0026d75edc7acc1c3cdf7438871d0a94f";
+      };
+    };
+    version = "2.6.2";
+in
 stdenv.mkDerivation {
-  name = "fortune-mod-1.99.1";
+  name = "fortune-mod-${version}";
 
-  src = fetchurl {
-    url = http://ftp.de.debian.org/debian/pool/main/f/fortune-mod/fortune-mod_1.99.1.orig.tar.gz;
-    sha256 = "1kpa2hgbglj5dbfasvl9wc1q3xpl91mqn3sfby46r4rwyzhswlgw";
-  };
+  src = srcs.fortune;
+
+  sourceRoot = "fortune-mod-fortune-mod-${version}/fortune-mod";
+
+  nativeBuildInputs = [ cmake perl ];
 
   buildInputs = [ recode ];
 
   preConfigure = ''
-    sed -i "s|/usr/|$out/|" Makefile
-  '';
-
-  preBuild = ''
-    makeFlagsArray=("CC=$CC" "REGEXDEFS=-DHAVE_REGEX_H -DPOSIX_REGEX" "LDFLAGS=")
+    cp ${srcs.shlomifCommon} cmake/Shlomif_Common.cmake
   '';
 
   postInstall = ''
     mv $out/games/fortune $out/bin/fortune
-    rmdir $out/games
+    rm -r $out/games
   '';
 
   meta = with stdenv.lib; {
diff --git a/pkgs/tools/misc/git-town/default.nix b/pkgs/tools/misc/git-town/default.nix
new file mode 100644
index 000000000000..afcf9cf4c781
--- /dev/null
+++ b/pkgs/tools/misc/git-town/default.nix
@@ -0,0 +1,25 @@
+{ stdenv, buildGoPackage, fetchFromGitHub }: 
+
+  buildGoPackage rec {
+    name = "git-town-${version}";
+    version = "7.2.0";
+
+    goPackagePath = "github.com/Originate/git-town";
+
+    src = fetchFromGitHub {
+      owner = "Originate";
+      repo = "git-town";
+      rev = "v${version}";
+      sha256 = "0hr0c6iya34lanfhsg9kj03l4ajalcfxkbn4bgwh0749smhi6mrj";
+    };
+
+    buildFlagsArray = [ "-ldflags=-X github.com/Originate/git-town/src/cmd.version=v${version} -X github.com/Originate/git-town/src/cmd.buildDate=nix" ];
+
+    meta = with stdenv.lib; {
+      description = "Generic, high-level git support for git-flow workflows";
+      homepage = http://www.git-town.com/;
+      maintainers = [ maintainers.allonsy ];
+      license = licenses.mit;
+    };
+  }
+
diff --git a/pkgs/tools/misc/ifdtool/default.nix b/pkgs/tools/misc/ifdtool/default.nix
new file mode 100644
index 000000000000..7d15825c27e8
--- /dev/null
+++ b/pkgs/tools/misc/ifdtool/default.nix
@@ -0,0 +1,28 @@
+{ stdenv, fetchurl }:
+
+stdenv.mkDerivation rec {
+  name = "ifdtool-${version}";
+  version = "4.9";
+
+  src = fetchurl {
+    url = "https://coreboot.org/releases/coreboot-${version}.tar.xz";
+    sha256 = "0xkai65d3z9fivwscbkm7ndcw2p9g794xz8fwdv979w77n5qsdij";
+  };
+
+  buildPhase = ''
+    make -C util/ifdtool
+    '';
+
+  installPhase = ''
+    install -Dm755 util/ifdtool/ifdtool $out/bin/ifdtool
+    '';
+
+  meta = with stdenv.lib; {
+    description = "Extract and dump Intel Firmware Descriptor information";
+    homepage = https://www.coreboot.org;
+    license = licenses.gpl2;
+    maintainers = [ maintainers.petabyteboy ];
+    platforms = platforms.linux;
+  };
+}
+
diff --git a/pkgs/tools/misc/lbdb/default.nix b/pkgs/tools/misc/lbdb/default.nix
index 0aadfa580154..a00da33d8c91 100644
--- a/pkgs/tools/misc/lbdb/default.nix
+++ b/pkgs/tools/misc/lbdb/default.nix
@@ -7,7 +7,7 @@
 }:
 
 let
-  version = "0.48";
+  version = "0.48.1";
 in
 with stdenv.lib;
 with perlPackages;
@@ -15,7 +15,7 @@ stdenv.mkDerivation {
   name = "lbdb-${version}";
   src = fetchurl {
     url = "http://www.spinnaker.de/lbdb/download/lbdb_${version}.tar.gz";
-    sha256 = "1j1ac0nnf6j5mwb6rh61ax9aidj4lvv2vrj5b1p71d4d1m3g180z";
+    sha256 = "1gr5l2fr9qbdccga8bhsrpvz6jxigvfkdxrln9wyf2xpps5cdjxh";
   };
 
   buildInputs = [ goobook makeWrapper perl ConvertASN1 perlldap AuthenSASL ]
diff --git a/pkgs/tools/misc/moreutils/default.nix b/pkgs/tools/misc/moreutils/default.nix
index a7cfed568b16..00cbc8b46295 100644
--- a/pkgs/tools/misc/moreutils/default.nix
+++ b/pkgs/tools/misc/moreutils/default.nix
@@ -23,7 +23,10 @@ stdenv.mkDerivation rec {
   buildFlags = "CC=cc";
   installFlags = "PREFIX=$(out)";
 
-  postInstall = "wrapProgram $out/bin/chronic --prefix PERL5LIB : $PERL5LIB";
+  postInstall = ''
+    wrapProgram $out/bin/chronic --prefix PERL5LIB : $PERL5LIB
+    wrapProgram $out/bin/ts --prefix PERL5LIB : $PERL5LIB
+  '';
 
   meta = {
     description = "Growing collection of the unix tools that nobody thought to write long ago when unix was young";
diff --git a/pkgs/tools/misc/nagstamon/default.nix b/pkgs/tools/misc/nagstamon/default.nix
index 3163b78437ec..57036acb58e8 100644
--- a/pkgs/tools/misc/nagstamon/default.nix
+++ b/pkgs/tools/misc/nagstamon/default.nix
@@ -2,18 +2,18 @@
 
 pythonPackages.buildPythonApplication rec {
   name = "nagstamon-${version}";
-  version = "2.0.1";
+  version = "3.2.1";
 
   src = fetchurl {
     url = "https://nagstamon.ifw-dresden.de/files/stable/Nagstamon-${version}.tar.gz";
-    sha256 = "3d4b22190d47250b175a4a70b12391c694ba2399832320887e5909e1ce3dfd7b";
+    sha256 = "1048x55g3nlyyggn6a36xmj24w4hv08llg58f4hzc0fwg074cd58";
   };
 
   # Test assumes darwin
   doCheck = false;
 
   propagatedBuildInputs = with pythonPackages; [ configparser pyqt5 psutil requests
-     beautifulsoup4  ];
+     beautifulsoup4 keyring requests-kerberos kerberos lxml ];
 
   meta = with stdenv.lib; {
     description = "A status monitor for the desktop";
diff --git a/pkgs/tools/misc/ncdu/default.nix b/pkgs/tools/misc/ncdu/default.nix
index b167d0f2c475..bb7924515647 100644
--- a/pkgs/tools/misc/ncdu/default.nix
+++ b/pkgs/tools/misc/ncdu/default.nix
@@ -2,17 +2,17 @@
 
 stdenv.mkDerivation rec {
   name = "ncdu-${version}";
-  version = "1.13";
+  version = "1.14";
 
   src = fetchurl {
     url = "https://dev.yorhel.nl/download/${name}.tar.gz";
-    sha256 = "0ni56ymlii577src4dzfbrq1mznbf6i0nka4bvh2sb1971f2ingl";
+    sha256 = "0i4cap2z3037xx2rdzhrlazl2igk3xy4ncddp9j7xqi1mcx7i566";
   };
 
   buildInputs = [ ncurses ];
 
   meta = with stdenv.lib; {
-    description = "Ncurses disk usage analyzer";
+    description = "Disk usage analyzer with an ncurses interface";
     homepage = https://dev.yorhel.nl/ncdu;
     license = licenses.mit;
     platforms = platforms.all;
diff --git a/pkgs/tools/misc/ostree/default.nix b/pkgs/tools/misc/ostree/default.nix
index fc3d016757b5..0054e38ed2da 100644
--- a/pkgs/tools/misc/ostree/default.nix
+++ b/pkgs/tools/misc/ostree/default.nix
@@ -1,34 +1,17 @@
-{ stdenv, fetchFromGitHub, fetchpatch, pkgconfig, gtk-doc, gobject-introspection, gnome3
+{ stdenv, fetchurl, fetchpatch, pkgconfig, gtk-doc, gobject-introspection, gnome3
 , glib, systemd, xz, e2fsprogs, libsoup, gpgme, which, autoconf, automake, libtool, fuse, utillinuxMinimal, libselinux
 , libarchive, libcap, bzip2, yacc, libxslt, docbook_xsl, docbook_xml_dtd_42, python3
 }:
 
-let
-  version = "2018.9";
-
-  libglnx-src = fetchFromGitHub {
-    owner = "GNOME";
-    repo = "libglnx";
-    rev = "470af8763ff7b99bec950a6ae0a957c1dcfc8edd";
-    sha256 = "1fwik38i6w3r6pn4qkizradcqp1m83n7ljh9jg0y3p3kvrbfxh15";
-  };
-
-  bsdiff-src = fetchFromGitHub {
-    owner = "mendsley";
-    repo = "bsdiff";
-    rev = "1edf9f656850c0c64dae260960fabd8249ea9c60";
-    sha256 = "1h71d2h2d3anp4msvpaff445rnzdxii3id2yglqk7af9i43kdsn1";
-  };
-in stdenv.mkDerivation {
-  name = "ostree-${version}";
+stdenv.mkDerivation rec {
+  pname = "ostree";
+  version = "2019.1";
 
   outputs = [ "out" "dev" "man" "installedTests" ];
 
-  src = fetchFromGitHub {
-    rev = "v${version}";
-    owner = "ostreedev";
-    repo = "ostree";
-    sha256 = "0a8gr4qqxcvz3fqv9w4dxy6iq0rq4kdzf08rzv8xg4gic3ldgyvj";
+  src = fetchurl {
+    url = "https://github.com/ostreedev/ostree/releases/download/v${version}/libostree-${version}.tar.xz";
+    sha256 = "08y7nsxl305dnlfak4kyj88lld848y4kg6bvjqngcxaqqvkk9xqm";
   };
 
   patches = [
@@ -57,13 +40,6 @@ in stdenv.mkDerivation {
     (python3.withPackages (p: with p; [ pyyaml ])) gnome3.gjs # for tests
   ];
 
-  prePatch = ''
-    rmdir libglnx bsdiff
-    cp --no-preserve=mode -r ${libglnx-src} libglnx
-    cp --no-preserve=mode -r ${bsdiff-src} bsdiff
-  '';
-
-
   preConfigure = ''
     env NOCONFIGURE=1 ./autogen.sh
   '';
@@ -71,17 +47,16 @@ in stdenv.mkDerivation {
   enableParallelBuilding = true;
 
   configureFlags = [
-    "--with-systemdsystemunitdir=$(out)/lib/systemd/system"
-    "--with-systemdsystemgeneratordir=$(out)/lib/systemd/system-generators"
+    "--with-systemdsystemunitdir=${placeholder "out"}/lib/systemd/system"
+    "--with-systemdsystemgeneratordir=${placeholder "out"}/lib/systemd/system-generators"
     "--enable-installed-tests"
   ];
 
   makeFlags = [
-    "installed_testdir=$(installedTests)/libexec/installed-tests/libostree"
-    "installed_test_metadir=$(installedTests)/share/installed-tests/libostree"
+    "installed_testdir=${placeholder "installedTests"}/libexec/installed-tests/libostree"
+    "installed_test_metadir=${placeholder "installedTests"}/share/installed-tests/libostree"
   ];
 
-
   meta = with stdenv.lib; {
     description = "Git for operating system binaries";
     homepage = https://ostree.readthedocs.io/en/latest/;
diff --git a/pkgs/tools/misc/papis/default.nix b/pkgs/tools/misc/papis/default.nix
index 52e704eb52e1..8bccfccfeabf 100644
--- a/pkgs/tools/misc/papis/default.nix
+++ b/pkgs/tools/misc/papis/default.nix
@@ -1,52 +1,52 @@
-{ lib, fetchFromGitHub, bashInteractive
-, python3, vim
+{ lib, fetchFromGitHub, fetchpatch
+, python36, xdg_utils
 }:
 
-let
-  python = python3;
-
-in python.pkgs.buildPythonApplication rec {
+python36.pkgs.buildPythonApplication rec {
   pname = "papis";
-  version = "0.6";
+  version = "0.7.5";
 
   # Missing tests on Pypi
   src = fetchFromGitHub {
     owner = "papis";
     repo = pname;
     rev = "v${version}";
-    sha256 = "0zy8q154zhpqb75c775nwq3mdl1szhzhkfi0nvyjmzfgsv2g1wa2";
+    sha256 = "1b481sj92z9nw7gwbrpkgd4nlmqc1n73qilkc51k2r56cy1kjvss";
   };
 
-  postPatch = ''
-    sed -i 's/configparser>=3.0.0/# configparser>=3.0.0/' setup.py
-    patchShebangs tests
-  '';
+  # Update click version to 7.0.0
+  patches = fetchpatch {
+    url = https://github.com/papis/papis/commit/fddb80978a37a229300b604c26e992e2dc90913f.patch;
+    sha256 = "0cmagfdaaml1pxhnxggifpb47z5g1p231qywnvnqpd3dm93382w1";
+  };
 
-  propagatedBuildInputs = with python.pkgs; [
-    argcomplete arxiv2bib beautifulsoup4 bibtexparser
-    configparser dmenu-python habanero papis-python-rofi
-    pylibgen prompt_toolkit pyparser python_magic pyyaml
-    requests unidecode urwid vobject tkinter whoosh
-    vim
+  propagatedBuildInputs = with python36.pkgs; [
+    click requests filetype pyparsing configparser
+    arxiv2bib pyyaml chardet beautifulsoup4 prompt_toolkit
+    bibtexparser python-slugify pyparser pylibgen
+    habanero isbnlib
+    # optional dependencies
+    dmenu-python whoosh
   ];
 
-  checkInputs = with python.pkgs; [ pytest ];
-
-  # Papis tries to create the config folder under $HOME during the tests
-  checkPhase = ''
-    mkdir -p check-phase
-    export PATH=$out/bin:$PATH
-    # Still don't know why this fails
-    sed -i 's/--set dir=hello //' tests/bash/test_default.sh
+  postInstall = ''
+    install -Dt "$out/etc/bash_completion.d" scripts/shell_completion/build/bash/papis
+  '';
 
-    # This test has been disabled since it requires a network connaction
-    sed -i 's/test_downloader_getter(self):/disabled_test_downloader_getter(self):/' papis/downloaders/tests/test_main.py
+  checkInputs = (with python36.pkgs; [
+    pytest
+  ]) ++ [
+    xdg_utils
+  ];
 
-    export HOME=$(pwd)/check-phase
-    make test
-    SH=${bashInteractive}/bin/bash make test-non-pythonic
+  # most of the downloader tests require a network connection
+  checkPhase = ''
+    HOME=$(mktemp -d) pytest papis tests --ignore tests/downloaders
   '';
 
+  # FIXME: find out why 39 tests fail
+  doCheck = false;
+
   meta = {
     description = "Powerful command-line document and bibliography manager";
     homepage = http://papis.readthedocs.io/en/latest/;
diff --git a/pkgs/tools/misc/rpm-ostree/default.nix b/pkgs/tools/misc/rpm-ostree/default.nix
index feb8fa4fbc1d..6127473343c1 100644
--- a/pkgs/tools/misc/rpm-ostree/default.nix
+++ b/pkgs/tools/misc/rpm-ostree/default.nix
@@ -1,39 +1,28 @@
-{ stdenv, fetchpatch, fetchFromGitHub, ostree, rpm, which, autoconf, automake, libtool, pkgconfig,
-  gobject-introspection, gtk-doc, libxml2, libxslt, docbook_xsl, docbook_xml_dtd_42, gperf, cmake,
+{ stdenv, fetchurl, ostree, rpm, which, autoconf, automake, libtool, pkgconfig, cargo, rustc,
+  gobject-introspection, gtk-doc, libxml2, libxslt, docbook_xsl, docbook_xml_dtd_42, docbook_xml_dtd_43, gperf, cmake,
   libcap, glib, systemd, json-glib, libarchive, libsolv, librepo, polkit,
   bubblewrap, pcre, check, python }:
 
-let
-  libglnx-src = fetchFromGitHub {
-    owner = "GNOME";
-    repo = "libglnx";
-    rev = "97b5c08d2f93dc93ba296a84bbd2a5ab9bd8fc97";
-    sha256 = "0cz4x63f6ys7dln54g6mrr7hksvqwz78wdc8qb7zr1h2cp1azcvs";
-  };
+stdenv.mkDerivation rec {
+  pname = "rpm-ostree";
+  version = "2019.1";
 
-  libdnf-src = fetchFromGitHub {
-    owner = "rpm-software-management";
-    repo = "libdnf";
-    rev = "b3fcc53f6f3baf4f51f836f5e1eb54eb82d5df49";
-    sha256 = "15nl9x4blyc9922rvz7iq56yy8hxhpsf31cs3ag7aypqpfx3czci";
+  src = fetchurl {
+    url = "https://github.com/projectatomic/${pname}/releases/download/v${version}/${pname}-${version}.tar.xz";
+    sha256 = "14qk8mq5yc67j3wl3fa9xnhh8ii8x5qdiavf7ybw7mp4ma4lwa8k";
   };
 
-  version = "2018.5";
-in stdenv.mkDerivation {
-  name = "rpm-ostree-${version}";
+  patches = [
+    # gobject-introspection requires curl in cflags
+    # https://github.com/NixOS/nixpkgs/pull/50953#issuecomment-449777169
+    # https://github.com/NixOS/nixpkgs/pull/50953#issuecomment-452177080
+    ./fix-introspection-build.patch
+  ];
 
   outputs = [ "out" "dev" "man" "devdoc" ];
-
-  src = fetchFromGitHub {
-    rev = "v${version}";
-    owner = "projectatomic";
-    repo = "rpm-ostree";
-    sha256 = "0y37hr8mmrsww4ka2hlqmz7wp57ibzhah4j87yg8q8dks5hxcbsx";
-  };
-
   nativeBuildInputs = [
-    pkgconfig which autoconf automake libtool cmake gperf
-    gobject-introspection gtk-doc libxml2 libxslt docbook_xsl docbook_xml_dtd_42
+    pkgconfig which autoconf automake libtool cmake gperf cargo rustc
+    gobject-introspection gtk-doc libxml2 libxslt docbook_xsl docbook_xml_dtd_42 docbook_xml_dtd_43
   ];
   buildInputs = [
     libcap ostree rpm glib systemd polkit bubblewrap
@@ -41,14 +30,6 @@ in stdenv.mkDerivation {
     pcre check python
   ];
 
-  patches = [
-    # Use gdbus-codegen from PATH
-    (fetchpatch {
-      url = https://github.com/projectatomic/rpm-ostree/commit/315406d8cd0937e786723986e88d376c88806c60.patch;
-      sha256 = "073yfa62515kyf58s0sz56w0a40062lh761y2y4assqipybwxbvp";
-    })
-  ];
-
   configureFlags = [
     "--enable-gtk-doc"
     "--with-bubblewrap=${bubblewrap}/bin/bwrap"
@@ -57,16 +38,9 @@ in stdenv.mkDerivation {
   dontUseCmakeConfigure = true;
 
   prePatch = ''
-    rmdir libglnx libdnf
-    cp --no-preserve=mode -r ${libglnx-src} libglnx
-    cp --no-preserve=mode -r ${libdnf-src} libdnf
-
     # According to #cmake on freenode, libdnf should bundle the FindLibSolv.cmake module
     cp ${libsolv}/share/cmake/Modules/FindLibSolv.cmake libdnf/cmake/modules/
 
-    # libdnf normally wants sphinx to build its hawkey manpages, but we don't care about those manpages since we don't use hawkey
-    substituteInPlace configure.ac --replace 'cmake \' 'cmake -DWITH_MAN=off \'
-
     # Let's not hardcode the rpm-gpg path...
     substituteInPlace libdnf/libdnf/dnf-keyring.cpp \
       --replace '"/etc/pki/rpm-gpg"' 'getenv("LIBDNF_RPM_GPG_PATH_OVERRIDE") ? getenv("LIBDNF_RPM_GPG_PATH_OVERRIDE") : "/etc/pki/rpm-gpg"'
@@ -84,4 +58,3 @@ in stdenv.mkDerivation {
     platforms = platforms.linux;
   };
 }
-
diff --git a/pkgs/tools/misc/rpm-ostree/fix-introspection-build.patch b/pkgs/tools/misc/rpm-ostree/fix-introspection-build.patch
new file mode 100644
index 000000000000..b82ad5b24b5c
--- /dev/null
+++ b/pkgs/tools/misc/rpm-ostree/fix-introspection-build.patch
@@ -0,0 +1,11 @@
+--- a/configure.ac
++++ b/configure.ac
+@@ -103,7 +103,7 @@
+ 				     ostree-1 >= 2018.9
+ 				     libsystemd
+ 				     polkit-gobject-1
+-				     rpm librepo libsolv
++				     rpm librepo libsolv libcurl
+ 				     libarchive])
+ 
+ dnl -ldl: https://github.com/ostreedev/ostree/commit/1f832597fc83fda6cb8daf48c4495a9e1590774c
diff --git a/pkgs/tools/misc/rrdtool/default.nix b/pkgs/tools/misc/rrdtool/default.nix
index ab16d8cb6bf3..09df21e4c41c 100644
--- a/pkgs/tools/misc/rrdtool/default.nix
+++ b/pkgs/tools/misc/rrdtool/default.nix
@@ -2,21 +2,13 @@
 , tcl-8_5, darwin }:
 
 stdenv.mkDerivation rec {
-  name = "rrdtool-1.7.0";
+  name = "rrdtool-1.7.1";
 
   src = fetchurl {
     url = "https://oss.oetiker.ch/rrdtool/pub/${name}.tar.gz";
-    sha256 = "0ssjqpa0dwwzbylc0drmlbq922qcw8crffc0rpr805xr6n4k8zgr";
+    sha256 = "1bhsg119j94xwykp2sbp01hhxcg78gzblfn7j98slrv9va77g6wq";
   };
 
-  patches = [
-    # fix regression https://github.com/oetiker/rrdtool-1.x/issues/794
-    (fetchpatch {
-      url = "https://github.com/oetiker/rrdtool-1.x/compare/0f28f99...f1edd12.patch";
-      sha256 = "10g56zy0rdjpv3kvvmf6vvaysmla05wi8byy3l0xrz2x8m02ylqq";
-    })
-  ];
-
   nativeBuildInputs = [ pkgconfig ];
 
   buildInputs = [ gettext perl libxml2 pango cairo groff ]
diff --git a/pkgs/tools/misc/sonota/default.nix b/pkgs/tools/misc/sonota/default.nix
new file mode 100644
index 000000000000..de9366d1d0ff
--- /dev/null
+++ b/pkgs/tools/misc/sonota/default.nix
@@ -0,0 +1,54 @@
+{ fetchFromGitHub, fetchurl, lib, python3Packages
+, coreVersion ? "1.13.3" # the version of the binary espurna image to flash
+, coreSize    ? "1MB"    # size of the binary image to flash
+, coreSha256  ? "0pkb2nmml0blrfiqpc46xpjc2dw927i89k1lfyqx827wanhc704x" }:
+
+with python3Packages;
+
+let
+  core = fetchurl {
+    url    = "https://github.com/xoseperez/espurna/releases/download/${coreVersion}/espurna-${coreVersion}-espurna-core-${coreSize}.bin";
+    sha256 = coreSha256;
+  };
+
+in buildPythonApplication rec {
+  name = "sonota-unstable-${version}";
+  version = "2018-10-07";
+
+  src = fetchFromGitHub {
+    owner  = "mirko";
+    repo   = "SonOTA";
+    rev    = "d7f4b353858aae7ac403f95475a35560fb7ffeae";
+    sha256 = "0jd9xrhcyk8d2plbjnrlpn87536zr6n708797n0k5blf109q3c1z";
+  };
+
+  patches = [
+    ./set_resource_path.patch
+  ];
+
+  postPatch = ''
+    substituteInPlace sonota.py --subst-var out
+  '';
+
+  format = "other";
+
+  propagatedBuildInputs = [ httplib2 netifaces tornado ];
+
+  installPhase = ''
+    runHook preInstall
+
+    install -Dm755 sonota.py $out/bin/sonota
+    install -d $out/share/sonota
+    cp -r ssl static $out/share/sonota
+    cp ${core} $out/share/sonota/static/image_arduino.bin
+
+    runHook postInstall
+  '';
+
+  meta = with lib; {
+    description = "Flash Itead Sonoff devices with custom firmware via original OTA mechanism";
+    homepage = src.meta.homepage;
+    license = licenses.gpl2;
+    maintainers = with maintainers; [ peterhoeg ];
+  };
+}
diff --git a/pkgs/tools/misc/sonota/set_resource_path.patch b/pkgs/tools/misc/sonota/set_resource_path.patch
new file mode 100644
index 000000000000..f9a802657762
--- /dev/null
+++ b/pkgs/tools/misc/sonota/set_resource_path.patch
@@ -0,0 +1,20 @@
+diff --git a/sonota.py b/sonota.py
+index f67128b..9f2752e 100644
+--- a/sonota.py
++++ b/sonota.py
+@@ -475,14 +475,7 @@ def promptforval(msg):
+             return val
+
+ def resource_path(relative_path):
+-    """ Get absolute path to resource, works for dev and for PyInstaller """
+-    try:
+-        # PyInstaller creates a temp folder and stores path in _MEIPASS
+-        base_path = sys._MEIPASS
+-    except Exception:
+-        base_path = os.path.dirname(sys.argv[0])
+-
+-    return os.path.join(base_path, relative_path)
++    return os.path.join("@out@/share/sonota", relative_path)
+
+ def checkargs():
+     # Make sure all of the binary files that are needed are there
diff --git a/pkgs/tools/misc/youtube-dl/default.nix b/pkgs/tools/misc/youtube-dl/default.nix
index dd210498fe75..0598976ec98e 100644
--- a/pkgs/tools/misc/youtube-dl/default.nix
+++ b/pkgs/tools/misc/youtube-dl/default.nix
@@ -19,11 +19,11 @@ buildPythonPackage rec {
   # The websites youtube-dl deals with are a very moving target. That means that
   # downloads break constantly. Because of that, updates should always be backported
   # to the latest stable release.
-  version = "2019.01.17";
+  version = "2019.01.30.1";
 
   src = fetchurl {
     url = "https://yt-dl.org/downloads/${version}/${pname}-${version}.tar.gz";
-    sha256 = "0fxajwv81b0bjw9qlwmxd4r93yp5nnqll79vhic0vy72ii0093r7";
+    sha256 = "0wamv1fs4w8jjx67p60rgrgdi6k04yy0h4p3cwscza5pzhpmvnlf";
   };
 
   nativeBuildInputs = [ makeWrapper ];