I have a package that build with a /share
subdir however if I install with, say, nix-env or with nix-shell it does not get added to XDG_DATA_DIRS.
What should I do to add it to the variable, considering other packages do it automagically?
NixOS:master
← pasqui23:lightly
opened 05:09PM - 20 Nov 21 UTC
<!--
To help with the large amounts of pull requests, we would appreciate your
…
reviews of other pull requests, especially simple package updates. Just leave a
comment describing what you have tested in the relevant package/service.
Reviewing helps to reduce the average time-to-merge for everyone.
Thanks a lot if you do!
List of open PRs: https://github.com/NixOS/nixpkgs/pulls
Reviewing guidelines: https://nixos.org/manual/nixpkgs/unstable/#chap-reviewing-contributions
-->
###### Motivation for this change
###### Things done
At the moment XDG_DATA_DIRS is not set correctly,despite building correctly
```
nix shell .#plasma5Packages.thirdParty.lightly
echo $XDG_DATA_DIRS|grep lightly
nix shell .#plasma5Packages.thirdParty.lightly
tree result
result
├── lib
│ ├── cmake
│ │ └── Lightly
│ │ ├── LightlyConfig.cmake
│ │ └── LightlyConfigVersion.cmake
│ ├── kconf_update_bin
│ │ └── kde4lightly
│ ├── liblightlycommon5.so.5 -> liblightlycommon5.so.5.19.4
│ ├── liblightlycommon5.so.5.19.4
│ └── qt-5.15.3
│ └── plugins
│ ├── kstyle_lightly_config.so
│ ├── org.kde.kdecoration2
│ │ └── lightlydecoration.so
│ └── styles
│ └── lightly.so
└── share
├── color-schemes
│ └── Lightly.colors
├── kconf_update
│ └── kde4lightly.upd
├── kservices5
│ ├── lightlydecorationconfig.desktop
│ └── lightlystyleconfig.desktop
└── kstyle
└── themes
└── lightly.themerc
```
- Built on platform(s)
- [x] x86_64-linux
- [ ] aarch64-linux
- [ ] x86_64-darwin
- [ ] aarch64-darwin
- [ ] For non-Linux: Is `sandbox = true` set in `nix.conf`? (See [Nix manual](https://nixos.org/manual/nix/stable/command-ref/conf-file.html))
- [ ] Tested, as applicable:
- [NixOS test(s)](https://nixos.org/manual/nixos/unstable/index.html#sec-nixos-tests) (look inside [nixos/tests](https://github.com/NixOS/nixpkgs/blob/master/nixos/tests))
- and/or [package tests](https://nixos.org/manual/nixpkgs/unstable/#sec-package-tests)
- or, for functions and "core" functionality, tests in [lib/tests](https://github.com/NixOS/nixpkgs/blob/master/lib/tests) or [pkgs/test](https://github.com/NixOS/nixpkgs/blob/master/pkgs/test)
- made sure NixOS tests are [linked](https://nixos.org/manual/nixpkgs/unstable/#ssec-nixos-tests-linking) to the relevant packages
- [ ] Tested compilation of all packages that depend on this change using `nix-shell -p nixpkgs-review --run "nixpkgs-review rev HEAD"`. Note: all changes have to be committed, also see [nixpkgs-review usage](https://github.com/Mic92/nixpkgs-review#usage)
- [ ] Tested basic functionality of all binary files (usually in `./result/bin/`)
- [21.11 Release Notes (or backporting 21.05 Release notes)](https://github.com/NixOS/nixpkgs/blob/master/CONTRIBUTING.md#generating-2111-release-notes)
- [ ] (Package updates) Added a release notes entry if the change is major or breaking
- [ ] (Module updates) Added a release notes entry if the change is significant
- [ ] (Module addition) Added a release notes entry if adding a new NixOS module
- [ ] (Release notes changes) Ran `nixos/doc/manual/md-to-db.sh` to update generated release notes
- [ ] Fits [CONTRIBUTING.md](https://github.com/NixOS/nixpkgs/blob/master/CONTRIBUTING.md).
NobbZ
November 20, 2021, 5:49pm
2
Can you share an example of a program that adds itself and how you get it to do that?
echo $XDG_DATA_DIRS
will give you plenty of examples, but like I’ve sain in that pr even after a nix profile install ...
echo $XDG_DATA_DIRS|grep lightly
give me nothing.
echo $XDG_DATA_DIRS | grep yakuake
will instead highlight the portion of the var coming from yakuake.
ok I was dumb
all the various programs get linked together in a single direcrtory ,linked in .nix-profile