nix backend: init
Nix has a very different way of using and storing packages, so to make everything work as expected I lie and pretend we have /usr/ even though the $datadir in a nix package is in /nix/store/hash-pkg-version/share (at runtime XDG_DATA_DIRS is set to /run/current-system/sw/share:/nix/store/hash-pkg-version/share:/nix/store/hash-pkg2-version/share etc ).
Waiting for https://github.com/NixOS/nixpkgs/pull/411205 (release tracker) to remove src/asgen/backends/nix/nixpkg.d L144-149
Example asgen-config.json
{
"ProjectName": "Nix",
"ArchiveRoot": "https://cache.nixos.org/",
"Backend": "nix",
"Features": {
"processDesktop": true,
"validateMetainfo": true,
"createScreenshotsStore": false,
"noDownloads": true
},
"Suites": {
"nixpkgs": {
"sections": ["nixos-unstable"],
"architectures": ["x86_64-linux"]
}
}
}
This is fine :-) Nix is pretty much an outlier compared to the other package-management systems, but if you manage to get something working that people would want to use, there'd be no reason not to merge it.
Also, for FreeBSD we'll likely add support for extra data search paths soon, which may also help you.
Also, for FreeBSD we'll likely add support for extra data search paths soon, which may also help you.
That support has been added, check out PackageIndex::dataPrefix() :-)