From 72857e28506ffc2c0082f6aea2ab550551a118b4 Mon Sep 17 00:00:00 2001 From: Philipp Middendorf Date: Mon, 28 Jan 2019 15:51:17 +0100 Subject: [PATCH] fdroidserver: 2016-05-31 -> 1.1, and move out of pythonPackages --- .../python-modules/fdroidserver/default.nix | 35 ----------- .../tools/fdroidserver/default.nix | 58 +++++++++++++++++++ pkgs/top-level/all-packages.nix | 2 + pkgs/top-level/python-packages.nix | 2 - 4 files changed, 60 insertions(+), 37 deletions(-) delete mode 100644 pkgs/development/python-modules/fdroidserver/default.nix create mode 100644 pkgs/development/tools/fdroidserver/default.nix diff --git a/pkgs/development/python-modules/fdroidserver/default.nix b/pkgs/development/python-modules/fdroidserver/default.nix deleted file mode 100644 index b9b936ae83e8..000000000000 --- a/pkgs/development/python-modules/fdroidserver/default.nix +++ /dev/null @@ -1,35 +0,0 @@ -{ stdenv -, buildPythonPackage -, fetchFromGitLab -, libcloud -, pyyaml -, paramiko -, pyasn1 -, pyasn1-modules -, pillow -, mwclient -, GitPython -, isPy3k -}: - -buildPythonPackage rec { - version = "2016-05-31"; - pname = "fdroidserver-git"; - disabled = ! isPy3k; - - src = fetchFromGitLab { - owner = "fdroid"; - repo = "fdroidserver"; - rev = "401649e0365e6e365fc48ae8a3af94768af865f3"; - sha256 = "1mmi2ffpym1qw694yj938kc7b4xhq0blri7wkjaqddcyykjyr94d"; - }; - - propagatedBuildInputs = [ libcloud pyyaml paramiko pyasn1 pyasn1-modules pillow mwclient GitPython ]; - - meta = with stdenv.lib; { - homepage = https://f-droid.org; - description = "Server and tools for F-Droid, the Free Software repository system for Android"; - license = licenses.agpl3; - }; - -} diff --git a/pkgs/development/tools/fdroidserver/default.nix b/pkgs/development/tools/fdroidserver/default.nix new file mode 100644 index 000000000000..2bdb455f8e88 --- /dev/null +++ b/pkgs/development/tools/fdroidserver/default.nix @@ -0,0 +1,58 @@ +{ docker +, fetchFromGitLab +, python +, lib }: + +python.pkgs.buildPythonApplication rec { + version = "1.1"; + pname = "fdroidserver"; + + src = fetchFromGitLab { + owner = "fdroid"; + repo = "fdroidserver"; + rev = version; + sha256 = "1910ali90aj3wkxy6mi88c5ya6n7zbqr69nvmpc5dydxm0gb98w5"; + }; + + patchPhase = '' + substituteInPlace fdroidserver/common.py --replace "FDROID_PATH = os.path.realpath(os.path.join(os.path.dirname(__file__), '..'))" "FDROID_PATH = '$out/bin'" + substituteInPlace setup.py --replace "pyasn1-modules == 0.2.1" "pyasn1-modules" + ''; + + preConfigure = '' + ${python.interpreter} setup.py compile_catalog + ''; + postInstall = '' + install -m 0755 gradlew-fdroid $out/bin + ''; + + buildInputs = [ python.pkgs.Babel ]; + + propagatedBuildInputs = with python.pkgs; [ + androguard + clint + defusedxml + docker + docker-py + GitPython + libcloud + mwclient + paramiko + pillow + pyasn1 + pyasn1-modules + python-vagrant + pyyaml + qrcode + requests + ruamel_yaml + ]; + + meta = with lib; { + homepage = https://f-droid.org; + description = "Server and tools for F-Droid, the Free Software repository system for Android"; + license = licenses.agpl3; + maintainers = [ lib.maintainers.pmiddend ]; + }; + +} diff --git a/pkgs/top-level/all-packages.nix b/pkgs/top-level/all-packages.nix index b138d0b85735..066bdacda05e 100644 --- a/pkgs/top-level/all-packages.nix +++ b/pkgs/top-level/all-packages.nix @@ -1350,6 +1350,8 @@ in fd = callPackage ../tools/misc/fd { }; + fdroidserver = python3Packages.callPackage ../development/tools/fdroidserver { }; + filebench = callPackage ../tools/misc/filebench { }; fileshelter = callPackage ../servers/web-apps/fileshelter { }; diff --git a/pkgs/top-level/python-packages.nix b/pkgs/top-level/python-packages.nix index 7f0045eca1e8..e4085b64edbc 100644 --- a/pkgs/top-level/python-packages.nix +++ b/pkgs/top-level/python-packages.nix @@ -2389,8 +2389,6 @@ in { pyftpdlib = callPackage ../development/python-modules/pyftpdlib { }; - fdroidserver = callPackage ../development/python-modules/fdroidserver { }; - filebrowser_safe = callPackage ../development/python-modules/filebrowser_safe { }; pycodestyle = callPackage ../development/python-modules/pycodestyle { };