forked from mirrors/nixpkgs
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.
This commit is contained in:
parent
a308118d64
commit
26a4e02e95
|
@ -5,10 +5,10 @@
|
|||
|
||||
stdenv.mkDerivation rec {
|
||||
version = "1.5.1";
|
||||
name = "rofi-${version}";
|
||||
name = "rofi-unwrapped-${version}";
|
||||
|
||||
src = fetchurl {
|
||||
url = "https://github.com/DaveDavenport/rofi/releases/download/${version}/${name}.tar.gz";
|
||||
url = "https://github.com/DaveDavenport/rofi/releases/download/${version}/rofi-${version}.tar.gz";
|
||||
sha256 = "1dc33zf33z38jcxb0lxpyd31waalpf6d4cd9z5f9m5qphdk1g679";
|
||||
};
|
||||
|
||||
|
@ -36,7 +36,7 @@ stdenv.mkDerivation rec {
|
|||
description = "Window switcher, run dialog and dmenu replacement";
|
||||
homepage = https://davedavenport.github.io/rofi;
|
||||
license = licenses.mit;
|
||||
maintainers = with maintainers; [ mbakke garbas ];
|
||||
maintainers = with maintainers; [ mbakke garbas ma27 ];
|
||||
platforms = with platforms; unix;
|
||||
};
|
||||
}
|
||||
|
|
17
pkgs/applications/misc/rofi/wrapper.nix
Normal file
17
pkgs/applications/misc/rofi/wrapper.nix
Normal file
|
@ -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;
|
||||
};
|
||||
}
|
|
@ -17497,7 +17497,8 @@ with pkgs;
|
|||
|
||||
rkt = callPackage ../applications/virtualization/rkt { };
|
||||
|
||||
rofi = callPackage ../applications/misc/rofi { };
|
||||
rofi-unwrapped = callPackage ../applications/misc/rofi { };
|
||||
rofi = callPackage ../applications/misc/rofi/wrapper.nix { };
|
||||
|
||||
rofi-pass = callPackage ../tools/security/pass/rofi-pass.nix { };
|
||||
|
||||
|
|
Loading…
Reference in a new issue