From d8f8253d3f040982e7948c3ad98efbabf5b771a0 Mon Sep 17 00:00:00 2001 From: Léo Gaspard Date: Sat, 3 Mar 2018 22:24:24 +0100 Subject: riot-web: make package configurable --- pkgs/applications/networking/instant-messengers/riot/riot-web.nix | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) (limited to 'pkgs/applications/networking/instant-messengers') 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 = { -- cgit 1.4.1