New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
riot-web: make package configurable #36265
Conversation
Actually I've just been reminded that I could just But well, the person who told me that having also told me they first started to write the same PR as me then found this trick somewhere, I guess that's the “natural” way we expected to do stuff. So I'm leaving this open, despite the fact another solution exists :) |
@@ -12,6 +13,7 @@ stdenv.mkDerivation rec { | |||
installPhase = '' | |||
mkdir -p $out/ | |||
cp -R . $out/ | |||
${lib.optionalString (config != null) "cp ${configFile} $out/config.json"} |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
ln -s
?
8dde198
to
2767db5
Compare
|
@@ -1,5 +1,6 @@ | |||
{ stdenv, fetchurl, fetchpatch }: | |||
{ lib, stdenv, fetchurl, fetchpatch, writeText, config ? null }: |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Mhm, conf
is a pretty generic term that might be set accidentially in all-packages.nix
Adding
riot-web = callPackage ../applications/networking/instant-messengers/riot/riot-web.nix {
conf = config.riot-web.conf or null;
};
to all-packages.nix
helps to avoid namespace pollution.
It can be still overridden with the override
function, but it can be also set in:
~/.config/nixpkgs/config.nix
via riot-web.conf
I think renaming it from conf
to config
also don't hurt.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I guess you meant renaming from config
to conf
? Anyway you're right, I didn't think about the possibility of name conflict, changes applied, thank you :)
2767db5
to
d8f8253
Compare
Thanks! :) |
Make
riot-web
more easy to configure for eg. a NixOS install: having a configuredriot-web
vhost becomes a matter of:cc @bachp