mirror of
https://github.com/foo-dogsquared/nixos-config.git
synced 2025-04-22 12:19:11 +00:00
32 lines
571 B
Nix
32 lines
571 B
Nix
|
{ pkgs, lib, self }:
|
||
|
|
||
|
rec {
|
||
|
/**
|
||
|
Naively get the absolute path of a `.desktop` file given a derivation and a
|
||
|
name.
|
||
|
|
||
|
# Arguments
|
||
|
|
||
|
drv
|
||
|
: The derivation.
|
||
|
|
||
|
name
|
||
|
: The name of the `.desktop` file (without the `.desktop` extension).
|
||
|
|
||
|
# Type
|
||
|
|
||
|
```
|
||
|
getXdgDesktop :: Derivation -> String -> Path
|
||
|
```
|
||
|
|
||
|
# Example
|
||
|
|
||
|
```nix
|
||
|
getXdgDesktop pkgs.wezterm "org.wezfurlong.wezterm"
|
||
|
=> /nix/store/$HASH-wezterm-org.wezterm.wezterm.desktop
|
||
|
```
|
||
|
*/
|
||
|
getXdgDesktop = drv: name:
|
||
|
"${drv}/share/applications/${name}.desktop";
|
||
|
}
|