From 5c101474d350289370105c99bbf65f8bb3a4ef39 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Isma=C3=ABl=20Bouya?= Date: Fri, 4 Jan 2019 17:02:27 +0100 Subject: Bubble up the imports to the main file --- virtual/packages/nextcloud.nix | 17 ++++++++--------- 1 file changed, 8 insertions(+), 9 deletions(-) (limited to 'virtual/packages/nextcloud.nix') diff --git a/virtual/packages/nextcloud.nix b/virtual/packages/nextcloud.nix index ff4b923..d332a10 100644 --- a/virtual/packages/nextcloud.nix +++ b/virtual/packages/nextcloud.nix @@ -1,11 +1,10 @@ -with import ../../libs.nix; -with nixpkgs_unstable; +{ stdenv, fetchurl, checkEnv, writeText, lib }: let nextcloud = let # FIXME: initial sync # FIXME: backup buildApp = { appName, version, url, sha256, installPhase ? "mkdir -p $out && cp -R . $out/" }: - pkgs.stdenv.mkDerivation rec { + stdenv.mkDerivation rec { name = "nextcloud-app-${appName}-${version}"; inherit version; phases = "unpackPhase installPhase"; @@ -106,7 +105,7 @@ let assert checkEnv "NIXOPS_NEXTCLOUD_INSTANCE_ID"; assert checkEnv "NIXOPS_NEXTCLOUD_SECRET"; assert checkEnv "NIXOPS_NEXTCLOUD_REDIS_DB_INDEX"; - pkgs.writeText "config.php" '' + writeText "config.php" '' '${builtins.getEnv "NIXOPS_NEXTCLOUD_INSTANCE_ID"}', @@ -183,16 +182,16 @@ let rm -r $out/config ln -sf ${config} $out/config ${builtins.concatStringsSep "\n" ( - pkgs.lib.attrsets.mapAttrsToList (name: value: "ln -sf ${value} $out/apps/${name}") apps + lib.attrsets.mapAttrsToList (name: value: "ln -sf ${value} $out/apps/${name}") apps )} ''; meta = { description = "Sharing solution for files, calendars, contacts and more"; homepage = https://nextcloud.com; - maintainers = with stdenv.lib.maintainers; [ schneefux bachp globin fpletz ]; - license = stdenv.lib.licenses.agpl3Plus; - platforms = with stdenv.lib.platforms; unix; + maintainers = with lib.maintainers; [ schneefux bachp globin fpletz ]; + license = lib.licenses.agpl3Plus; + platforms = with lib.platforms; unix; }; }; activationScript = { @@ -229,7 +228,7 @@ let phpFpm = rec { basedir = builtins.concatStringsSep ":" ( [ webRoot varDir config ] - ++ pkgs.lib.attrsets.mapAttrsToList (name: value: value) apps); + ++ lib.attrsets.mapAttrsToList (name: value: value) apps); socket = "/var/run/phpfpm/nextcloud.sock"; pool = '' listen = ${socket} -- cgit v1.2.3