diff options
author | Maximilian Bosch <maximilian@mbosch.me> | 2018-03-11 02:37:59 +0100 |
---|---|---|
committer | Maximilian Bosch <maximilian@mbosch.me> | 2018-04-04 15:24:51 +0200 |
commit | 26a4e02e956ed287bc85f2b0f729a79343f0be92 (patch) | |
tree | e1d06faaf8d1340f52660f9994f440519240877c /pkgs/applications/misc/rofi/wrapper.nix | |
parent | a308118d64304a0ddb3fac21c7db52f08219d63b (diff) | |
download | nixpkgs-26a4e02e956ed287bc85f2b0f729a79343f0be92.tar nixpkgs-26a4e02e956ed287bc85f2b0f729a79343f0be92.tar.gz nixpkgs-26a4e02e956ed287bc85f2b0f729a79343f0be92.tar.bz2 nixpkgs-26a4e02e956ed287bc85f2b0f729a79343f0be92.tar.lz nixpkgs-26a4e02e956ed287bc85f2b0f729a79343f0be92.tar.xz nixpkgs-26a4e02e956ed287bc85f2b0f729a79343f0be92.tar.zst nixpkgs-26a4e02e956ed287bc85f2b0f729a79343f0be92.zip |
rofi: add `theme` option
This is helpful when defining a `*.rasi` theme for rofi using `pkgs.writeText` rather than messing up the impure `~/.config` directory.
Diffstat (limited to 'pkgs/applications/misc/rofi/wrapper.nix')
-rw-r--r-- | pkgs/applications/misc/rofi/wrapper.nix | 17 |
1 files changed, 17 insertions, 0 deletions
diff --git a/pkgs/applications/misc/rofi/wrapper.nix b/pkgs/applications/misc/rofi/wrapper.nix new file mode 100644 index 00000000000..44c6f892bf5 --- /dev/null +++ b/pkgs/applications/misc/rofi/wrapper.nix @@ -0,0 +1,17 @@ +{ stdenv, rofi-unwrapped, makeWrapper, theme ? null, lib }: + +stdenv.mkDerivation { + name = "rofi-${rofi-unwrapped.version}"; + buildInputs = [ makeWrapper ]; + preferLocalBuild = true; + passthru = { unwrapped = rofi-unwrapped; }; + buildCommand = '' + mkdir -p $out/bin + ln -s ${rofi-unwrapped}/bin/rofi $out/bin/rofi + ${lib.optionalString (theme != null) ''wrapProgram $out/bin/rofi --add-flags "-theme ${theme}"''} + ''; + + meta = rofi-unwrapped.meta // { + priority = (rofi-unwrapped.meta.priority or 0) - 1; + }; +} |