git.iko.soy/typeable/nixpkgs
on master help sign in
virtlyst: init at 1.1.0

Co-authored-by: elseym <elseym@me.com>

commit1d235be2086dde14050fc811dc37528dec301783 authorFranz Pletz <fpletz@fnordicwalking.de> dateTue 26 Jun 2018, 01:11 (8 years ago) parent5d534c2
3 files changed+48
pkgs/servers/web-apps/virtlyst/add-admin-password-env.patch+14 pkgs/servers/web-apps/virtlyst/default.nix+32 pkgs/top-level/all-packages.nix+2
pkgs/servers/web-apps/virtlyst/add-admin-password-env.patchnew file+14
@@ -0,0 +1,14 @@
1+diff --git a/src/virtlyst.cpp b/src/virtlyst.cpp
2+index acd195d..8809e4f 100644
3+--- a/src/virtlyst.cpp
4++++ b/src/virtlyst.cpp
5+@@ -340,7 +340,8 @@ bool Virtlyst::createDB()
6+ qCCritical(VIRTLYST) << "Error creating database" << query.lastError().text();
7+ return false;
8+ }
9+- const QString password = QString::fromLatin1(QUuid::createUuid().toRfc4122().toHex());
10++ const QString password = qEnvironmentVariable("VIRTLYST_ADMIN_PASSWORD",
11++ QString::fromLatin1(QUuid::createUuid().toRfc4122().toHex()));
12+ query.bindValue(QStringLiteral(":password"), QString::fromLatin1(
13+ CredentialPassword::createPassword(password.toUtf8(), QCryptographicHash::Sha256, 10000, 16, 16)));
14+ if (!query.exec()) {
pkgs/servers/web-apps/virtlyst/default.nixnew file+32
@@ -0,0 +1,32 @@
1+{ stdenv, lib, fetchFromGitHub, cmake, pkgconfig, autoPatchelfHook
2+, qtbase, libvirt, cutelyst, grantlee }:
3+
4+stdenv.mkDerivation rec {
5+ name = "virtlyst-${version}";
6+ version = "1.1.0";
7+
8+ src = fetchFromGitHub {
9+ owner = "cutelyst";
10+ repo = "Virtlyst";
11+ rev = "v${version}";
12+ sha256 = "1rqv93dys666wsqbg1lvl3pjl8gpdx3dc3y71m3r8apalgr11ikw";
13+ };
14+
15+ nativeBuildInputs = [ cmake pkgconfig autoPatchelfHook ];
16+ buildInputs = [ qtbase libvirt cutelyst grantlee ];
17+
18+ installPhase = ''
19+ mkdir -p $out/lib
20+ cp src/libVirtlyst.so $out/lib
21+ cp -r ../root $out
22+ '';
23+
24+ patches = [ ./add-admin-password-env.patch ];
25+
26+ meta = with lib; {
27+ description = "Web interface to manage virtual machines with libvirt";
28+ homepage = https://github.com/cutelyst/Virtlyst;
29+ license = licenses.agpl3Plus;
30+ maintainers = with maintainers; [ fpletz ];
31+ };
32+}
pkgs/top-level/all-packages.nix+2
@@ -13171,6 +13171,8 @@ with pkgs;
1317113171 unifiTesting;
1317213172 unifi = unifiStable;
1317313173
13174+ virtlyst = libsForQt5.callPackage ../servers/web-apps/virtlyst { };
13175+
1317413176 virtuoso6 = callPackage ../servers/sql/virtuoso/6.x.nix { };
1317513177
1317613178 virtuoso7 = callPackage ../servers/sql/virtuoso/7.x.nix { };