From a7ce93955d962ecaa263f04ef3c87a1fe6799f53 Mon Sep 17 00:00:00 2001 From: José Romildo Malaquias Date: Sun, 29 Apr 2018 23:41:36 -0300 Subject: uget-integrator: init at 1.0.0 --- pkgs/tools/networking/uget-integrator/default.nix | 39 +++++++++++++++++++++++ 1 file changed, 39 insertions(+) create mode 100644 pkgs/tools/networking/uget-integrator/default.nix (limited to 'pkgs/tools/networking') diff --git a/pkgs/tools/networking/uget-integrator/default.nix b/pkgs/tools/networking/uget-integrator/default.nix new file mode 100644 index 000000000000..cc93da7f2533 --- /dev/null +++ b/pkgs/tools/networking/uget-integrator/default.nix @@ -0,0 +1,39 @@ +{ stdenv, fetchFromGitHub, uget, python3Packages }: + +stdenv.mkDerivation rec { + name = "uget-integrator-${version}"; + version = "1.0.0"; + + src = fetchFromGitHub { + owner = "ugetdm"; + repo = "uget-integrator"; + rev = "v${version}"; + sha256 = "0bfqwbpprxp5sy49p2hqcjdfj7zamnp2hhcnnyccffkn7pghx8pp"; + }; + + nativeBuildInputs = [ python3Packages.wrapPython ]; + + buildInputs = [ uget python3Packages.python ]; + + installPhase = '' + for f in conf/com.ugetdm.{chrome,firefox}.json; do + substituteInPlace $f --replace "/usr" "$out" + done + + install -D -t $out/bin bin/uget-integrator + install -D -t $out/etc/opt/chrome/native-messaging-hosts conf/com.ugetdm.chrome.json + install -D -t $out/etc/chromium/native-messaging-hosts conf/com.ugetdm.chrome.json + install -D -t $out/etc/opera/native-messaging-hosts conf/com.ugetdm.chrome.json + install -D -t $out/lib/mozilla/native-messaging-hosts conf/com.ugetdm.firefox.json + + wrapPythonPrograms + ''; + + meta = with stdenv.lib; { + description = "Native messaging host to integrate uGet Download Manager with web browsers"; + homepage = https://github.com/ugetdm/uget-integrator; + license = licenses.gpl3; + platforms = platforms.linux; + maintainers = [ maintainers.romildo ]; + }; +} -- cgit 1.4.1