summary refs log tree commit diff
path: root/pkgs
diff options
context:
space:
mode:
authorLéo Gaspard <leo@gaspard.io>2018-03-03 22:24:24 +0100
committerLéo Gaspard <leo@gaspard.io>2018-03-04 14:51:09 +0100
commitd8f8253d3f040982e7948c3ad98efbabf5b771a0 (patch)
tree2da526f52dfffbda3966b638ebc90f0a7a28c3a4 /pkgs
parent831ef4756e372bfff77332713ae319daa3a42742 (diff)
downloadnixpkgs-d8f8253d3f040982e7948c3ad98efbabf5b771a0.tar
nixpkgs-d8f8253d3f040982e7948c3ad98efbabf5b771a0.tar.gz
nixpkgs-d8f8253d3f040982e7948c3ad98efbabf5b771a0.tar.bz2
nixpkgs-d8f8253d3f040982e7948c3ad98efbabf5b771a0.tar.lz
nixpkgs-d8f8253d3f040982e7948c3ad98efbabf5b771a0.tar.xz
nixpkgs-d8f8253d3f040982e7948c3ad98efbabf5b771a0.tar.zst
nixpkgs-d8f8253d3f040982e7948c3ad98efbabf5b771a0.zip
riot-web: make package configurable
Diffstat (limited to 'pkgs')
-rw-r--r--pkgs/applications/networking/instant-messengers/riot/riot-web.nix4
-rw-r--r--pkgs/top-level/all-packages.nix4
2 files changed, 6 insertions, 2 deletions
diff --git a/pkgs/applications/networking/instant-messengers/riot/riot-web.nix b/pkgs/applications/networking/instant-messengers/riot/riot-web.nix
index ea887454815..b47280d3b15 100644
--- a/pkgs/applications/networking/instant-messengers/riot/riot-web.nix
+++ b/pkgs/applications/networking/instant-messengers/riot/riot-web.nix
@@ -1,5 +1,6 @@
-{ stdenv, fetchurl, fetchpatch }:
+{ lib, stdenv, fetchurl, fetchpatch, writeText, conf ? null }:
 
+let configFile = writeText "riot-config.json" conf; in
 stdenv.mkDerivation rec {
   name= "riot-web-${version}";
   version = "0.13.5";
@@ -12,6 +13,7 @@ stdenv.mkDerivation rec {
   installPhase = ''
     mkdir -p $out/
     cp -R . $out/
+    ${lib.optionalString (conf != null) "ln -s ${configFile} $out/config.json"}
   '';
 
   meta = {
diff --git a/pkgs/top-level/all-packages.nix b/pkgs/top-level/all-packages.nix
index 140da3dd2f2..e211cfaeb7c 100644
--- a/pkgs/top-level/all-packages.nix
+++ b/pkgs/top-level/all-packages.nix
@@ -1321,7 +1321,9 @@ with pkgs;
 
   ring-daemon = callPackage ../applications/networking/instant-messengers/ring-daemon { };
 
-  riot-web = callPackage ../applications/networking/instant-messengers/riot/riot-web.nix { };
+  riot-web = callPackage ../applications/networking/instant-messengers/riot/riot-web.nix {
+    conf = config.riot-web.conf or null;
+  };
 
   rsyslog = callPackage ../tools/system/rsyslog {
     hadoop = null; # Currently Broken