]> git.immae.eu Git - perso/Immae/Config/Nix.git/blobdiff - virtual/packages/connexionswing.nix
Bubble up the imports to the main file
[perso/Immae/Config/Nix.git] / virtual / packages / connexionswing.nix
index 4c1da369f3a7268322ec80e55a5b07bda6a232e8..f178e495749251c0f11efac8ebec7d7b2a17f366 100644 (file)
@@ -1,5 +1,4 @@
-with import ../../libs.nix;
-with nixpkgs_unstable;
+{ lib, checkEnv, writeText, fetchedGitPrivate, stdenv, php, git, cacert }:
 let
   connexionswing = { environment ? "dev" }: rec {
     varDir = "/var/lib/connexionswing_${environment}";
@@ -11,7 +10,7 @@ let
       assert checkEnv "NIXOPS_CONNEXIONSWING_${envName}_MYSQL_NAME";
       assert checkEnv "NIXOPS_CONNEXIONSWING_${envName}_SECRET";
       assert checkEnv "NIXOPS_CONNEXIONSWING_${envName}_EMAIL";
-      pkgs.writeText "parameters.yml" ''
+      writeText "parameters.yml" ''
         # This file is auto-generated during the composer install
         parameters:
             database_host: db-1.immae.eu
@@ -139,15 +138,15 @@ let
       fi
       '';
     };
-    webappDir = pkgs.stdenv.mkDerivation (fetchedGitPrivate ./connexionswing_master.json // rec {
+    webappDir = stdenv.mkDerivation (fetchedGitPrivate ./connexionswing_master.json // rec {
       # FIXME: can we do better than symlink?
       # FIXME: imagick optional
       # FIXME: initial sync
       # FIXME: backup
       # FIXME: replace with pkgs.phpPackages.composer
       buildPhase = ''
-        export GIT_SSL_CAINFO=${pkgs.cacert}/etc/ssl/certs/ca-bundle.crt
-        export SSL_CERT_FILE=${pkgs.cacert}/etc/ssl/certs/ca-bundle.crt
+        export GIT_SSL_CAINFO=${cacert}/etc/ssl/certs/ca-bundle.crt
+        export SSL_CERT_FILE=${cacert}/etc/ssl/certs/ca-bundle.crt
 
         ln -sf ../../../../../${varDir}/{medias,uploads} web/images/
         ln -sf ${configRoot} app/config/parameters.yml
@@ -162,10 +161,10 @@ let
         cp -a . $out
         '';
       buildInputs = [
-        pkgs.php pkgs.git pkgs.cacert
+        php git cacert
       ];
     });
     webRoot = "${webappDir}/web";
   };
-in 
+in
   connexionswing