nix-files/pkgs/additional/modemmanager-split/default.nix
Colin 539d9e45a2 networkmanager/modemmanager: ship separate packages for the daemon and CLI tools
they require fundamentally different sandboxing approaches. the daemon *can't* always use bwrap if it wants to run as non-root. meanwhile the CLI tools would mostly *prefer* to run under bwrap.

in the long term i'll maybe upstream the systemd sandboxing into nixpkgs, where there looks to be desire for it
2024-05-31 23:26:16 +00:00

18 lines
467 B
Nix

{ deepLinkIntoOwnPackage
, modemmanager
}:
(deepLinkIntoOwnPackage modemmanager).overrideAttrs (base: {
outputs = [ "out" "daemon" "mmcli" ];
postFixup = ''
moveToOutput "" "$daemon"
for f in bin/mmcli man/man1/mmcli.1.gz share/bash-completion/completions/mmcli; do
moveToOutput "$f" "$mmcli"
done
# ensure non-empty default output so the build doesn't fail
mkdir "$out"
'';
meta = base.meta // {
outputsToInstall = [ ];
};
})