From 3a1792e7a14a1a74615c19c7fcf262e39b715a26 Mon Sep 17 00:00:00 2001 From: Bignaux Ronan Date: Wed, 1 May 2019 23:31:04 +0200 Subject: [PATCH] photon: 1.0.7 -> 1.3.0 --- pkgs/tools/networking/photon/default.nix | 28 ++++++++++-------------- 1 file changed, 11 insertions(+), 17 deletions(-) diff --git a/pkgs/tools/networking/photon/default.nix b/pkgs/tools/networking/photon/default.nix index aa5a3e9f6f11..5b923748c673 100644 --- a/pkgs/tools/networking/photon/default.nix +++ b/pkgs/tools/networking/photon/default.nix @@ -1,32 +1,26 @@ -{ stdenv, pythonPackages, fetchurl, makeWrapper }: +{ stdenv, python3Packages, fetchFromGitHub, makeWrapper }: -with pythonPackages; -buildPythonApplication rec { +python3Packages.buildPythonApplication rec { pname = "photon"; - version = "1.0.7"; + version = "1.3.0"; - src = fetchurl { - url = "https://github.com/s0md3v/Photon/archive/v${version}.tar.gz"; - sha256 = "0c5l1sbkkagfxmh8v7yvi6z58mhqbwjyr7fczb5qwxm7la42ah9y"; + src = fetchFromGitHub { + owner = "s0md3v"; + repo = "Photon"; + rev = "v${version}"; + sha256 = "02z1xj72bq35dilr4b6njry4kixz6j2a3ag02nla98q0fvgmgnvy"; }; - patches = [ ./destdir.patch ]; - postPatch = '' - substituteInPlace photon.py --replace DESTDIR $out/share/photon - ''; - dontBuild = true; doCheck = false; - propagatedBuildInputs = [ - requests - urllib3 - ]; + + propagatedBuildInputs = with python3Packages; [ requests urllib3 tld ]; installPhase = '' mkdir -p "$out"/{bin,share/photon} cp -R photon.py core plugins $out/share/photon - makeWrapper ${python.interpreter} $out/bin/photon \ + makeWrapper ${python3Packages.python.interpreter} $out/bin/photon \ --set PYTHONPATH "$PYTHONPATH:$out/share/photon" \ --add-flags "-O $out/share/photon/photon.py" '';