link manpages into all linkIntoOwnPackage
users
This commit is contained in:
@@ -2,7 +2,7 @@
|
|||||||
{ pkgs, ... }:
|
{ pkgs, ... }:
|
||||||
{
|
{
|
||||||
sane.programs.ausyscall = {
|
sane.programs.ausyscall = {
|
||||||
packageUnwrapped = pkgs.linkIntoOwnPackage pkgs.audit "bin/ausyscall";
|
packageUnwrapped = pkgs.linkBinIntoOwnPackage pkgs.audit "ausyscall";
|
||||||
|
|
||||||
sandbox.method = "landlock";
|
sandbox.method = "landlock";
|
||||||
};
|
};
|
||||||
|
@@ -1,7 +1,7 @@
|
|||||||
{ pkgs, ... }:
|
{ pkgs, ... }:
|
||||||
{
|
{
|
||||||
sane.programs.bitcoin-cli = {
|
sane.programs.bitcoin-cli = {
|
||||||
packageUnwrapped = pkgs.linkIntoOwnPackage pkgs.bitcoind "bin/bitcoin-cli";
|
packageUnwrapped = pkgs.linkBinIntoOwnPackage pkgs.bitcoind "bitcoin-cli";
|
||||||
sandbox.method = "bwrap";
|
sandbox.method = "bwrap";
|
||||||
sandbox.autodetectCliPaths = "existing"; #< for `bitcoin-cli -datadir=/var/lib/...`
|
sandbox.autodetectCliPaths = "existing"; #< for `bitcoin-cli -datadir=/var/lib/...`
|
||||||
sandbox.extraHomePaths = [
|
sandbox.extraHomePaths = [
|
||||||
|
@@ -1,7 +1,7 @@
|
|||||||
{ pkgs, ... }:
|
{ pkgs, ... }:
|
||||||
{
|
{
|
||||||
sane.programs.errno = {
|
sane.programs.errno = {
|
||||||
# packageUnwrapped = pkgs.linkIntoOwnPackage pkgs.moreutils "bin/errno";
|
# packageUnwrapped = pkgs.linkBinIntoOwnPackage pkgs.moreutils "errno";
|
||||||
# actually, don't build all of moreutils because not all of it builds for cross targets.
|
# actually, don't build all of moreutils because not all of it builds for cross targets.
|
||||||
packageUnwrapped = pkgs.moreutils.overrideAttrs (base: {
|
packageUnwrapped = pkgs.moreutils.overrideAttrs (base: {
|
||||||
makeFlags = (base.makeFlags or []) ++ [
|
makeFlags = (base.makeFlags or []) ++ [
|
||||||
|
@@ -1,7 +1,7 @@
|
|||||||
{ pkgs, ... }:
|
{ pkgs, ... }:
|
||||||
{
|
{
|
||||||
sane.programs.free = {
|
sane.programs.free = {
|
||||||
packageUnwrapped = pkgs.linkIntoOwnPackage pkgs.procps "bin/free";
|
packageUnwrapped = pkgs.linkBinIntoOwnPackage pkgs.procps "free";
|
||||||
sandbox.method = "bwrap";
|
sandbox.method = "bwrap";
|
||||||
sandbox.isolatePids = false;
|
sandbox.isolatePids = false;
|
||||||
};
|
};
|
||||||
|
@@ -1,7 +1,7 @@
|
|||||||
{ pkgs, ... }:
|
{ pkgs, ... }:
|
||||||
{
|
{
|
||||||
sane.programs.gdbus = {
|
sane.programs.gdbus = {
|
||||||
packageUnwrapped = pkgs.linkIntoOwnPackage pkgs.glib "bin/gdbus";
|
packageUnwrapped = pkgs.linkBinIntoOwnPackage pkgs.glib "gdbus";
|
||||||
|
|
||||||
sandbox.method = "bwrap";
|
sandbox.method = "bwrap";
|
||||||
sandbox.whitelistDbus = [ "user" ]; #< XXX: maybe future users will also want system access
|
sandbox.whitelistDbus = [ "user" ]; #< XXX: maybe future users will also want system access
|
||||||
|
@@ -5,10 +5,9 @@
|
|||||||
{ pkgs, ... }:
|
{ pkgs, ... }:
|
||||||
{
|
{
|
||||||
sane.programs.gst-device-monitor = {
|
sane.programs.gst-device-monitor = {
|
||||||
packageUnwrapped = (pkgs.linkIntoOwnPackage pkgs.gst_all_1.gst-plugins-base [
|
packageUnwrapped = (
|
||||||
"bin/gst-device-monitor-1.0"
|
pkgs.linkBinIntoOwnPackage pkgs.gst_all_1.gst-plugins-base "gst-device-monitor-1.0"
|
||||||
"share/man/man1/gst-device-monitor-1.0.1.gz"
|
).overrideAttrs (base: {
|
||||||
]).overrideAttrs (base: {
|
|
||||||
# XXX the binaries need `GST_PLUGIN_SYSTEM_PATH_1_0` set to function,
|
# XXX the binaries need `GST_PLUGIN_SYSTEM_PATH_1_0` set to function,
|
||||||
# but nixpkgs doesn't set those (TODO: upstream this!)
|
# but nixpkgs doesn't set those (TODO: upstream this!)
|
||||||
nativeBuildInputs = (base.nativeBuildInputs or []) ++ [
|
nativeBuildInputs = (base.nativeBuildInputs or []) ++ [
|
||||||
|
@@ -1,7 +1,7 @@
|
|||||||
{ pkgs, ... }:
|
{ pkgs, ... }:
|
||||||
{
|
{
|
||||||
sane.programs.mimetype = {
|
sane.programs.mimetype = {
|
||||||
packageUnwrapped = pkgs.linkIntoOwnPackage pkgs.perlPackages.FileMimeInfo "bin/mimetype";
|
packageUnwrapped = pkgs.linkBinIntoOwnPackage pkgs.perlPackages.FileMimeInfo "mimetype";
|
||||||
sandbox.method = "bwrap";
|
sandbox.method = "bwrap";
|
||||||
sandbox.autodetectCliPaths = "existing";
|
sandbox.autodetectCliPaths = "existing";
|
||||||
};
|
};
|
||||||
|
@@ -3,7 +3,7 @@
|
|||||||
sane.programs.objdump = {
|
sane.programs.objdump = {
|
||||||
# binutils-unwrapped is like 80 MiB, just for this one binary;
|
# binutils-unwrapped is like 80 MiB, just for this one binary;
|
||||||
# dynamic linking means copying the binary doesn't reduce the closure much at all compared to just symlinking it.
|
# dynamic linking means copying the binary doesn't reduce the closure much at all compared to just symlinking it.
|
||||||
packageUnwrapped = pkgs.linkIntoOwnPackage pkgs.binutils-unwrapped "bin/objdump";
|
packageUnwrapped = pkgs.linkBinIntoOwnPackage pkgs.binutils-unwrapped "objdump";
|
||||||
sandbox.method = "bwrap";
|
sandbox.method = "bwrap";
|
||||||
sandbox.autodetectCliPaths = "existingFile";
|
sandbox.autodetectCliPaths = "existingFile";
|
||||||
};
|
};
|
||||||
|
@@ -1,7 +1,7 @@
|
|||||||
{ pkgs, ... }:
|
{ pkgs, ... }:
|
||||||
{
|
{
|
||||||
sane.programs.pactl = {
|
sane.programs.pactl = {
|
||||||
packageUnwrapped = pkgs.linkIntoOwnPackage pkgs.pulseaudio "bin/pactl";
|
packageUnwrapped = pkgs.linkBinIntoOwnPackage pkgs.pulseaudio "pactl";
|
||||||
sandbox.method = "bwrap";
|
sandbox.method = "bwrap";
|
||||||
sandbox.whitelistAudio = true;
|
sandbox.whitelistAudio = true;
|
||||||
};
|
};
|
||||||
|
@@ -1,7 +1,7 @@
|
|||||||
{ pkgs, ... }:
|
{ pkgs, ... }:
|
||||||
{
|
{
|
||||||
sane.programs.pidof = {
|
sane.programs.pidof = {
|
||||||
packageUnwrapped = pkgs.linkIntoOwnPackage pkgs.procps "bin/pidof";
|
packageUnwrapped = pkgs.linkBinIntoOwnPackage pkgs.procps "pidof";
|
||||||
sandbox.method = "bwrap";
|
sandbox.method = "bwrap";
|
||||||
sandbox.isolatePids = false;
|
sandbox.isolatePids = false;
|
||||||
};
|
};
|
||||||
|
@@ -1,7 +1,7 @@
|
|||||||
{ pkgs, ... }:
|
{ pkgs, ... }:
|
||||||
{
|
{
|
||||||
sane.programs.pkill = {
|
sane.programs.pkill = {
|
||||||
packageUnwrapped = pkgs.linkIntoOwnPackage pkgs.procps "bin/pkill";
|
packageUnwrapped = pkgs.linkBinIntoOwnPackage pkgs.procps "pkill";
|
||||||
sandbox.method = "bwrap";
|
sandbox.method = "bwrap";
|
||||||
sandbox.isolatePids = false;
|
sandbox.isolatePids = false;
|
||||||
};
|
};
|
||||||
|
@@ -1,7 +1,7 @@
|
|||||||
{ pkgs, ... }:
|
{ pkgs, ... }:
|
||||||
{
|
{
|
||||||
sane.programs.ps = {
|
sane.programs.ps = {
|
||||||
packageUnwrapped = pkgs.linkIntoOwnPackage pkgs.procps "bin/ps";
|
packageUnwrapped = pkgs.linkBinIntoOwnPackage pkgs.procps "ps";
|
||||||
sandbox.method = "bwrap";
|
sandbox.method = "bwrap";
|
||||||
sandbox.isolatePids = false;
|
sandbox.isolatePids = false;
|
||||||
};
|
};
|
||||||
|
@@ -3,7 +3,7 @@
|
|||||||
sane.programs.strings = {
|
sane.programs.strings = {
|
||||||
# binutils-unwrapped is like 80 MiB, just for this one binary;
|
# binutils-unwrapped is like 80 MiB, just for this one binary;
|
||||||
# dynamic linking means copying the binary doesn't reduce the closure much at all compared to just symlinking it.
|
# dynamic linking means copying the binary doesn't reduce the closure much at all compared to just symlinking it.
|
||||||
packageUnwrapped = pkgs.linkIntoOwnPackage pkgs.binutils-unwrapped "bin/strings";
|
packageUnwrapped = pkgs.linkBinIntoOwnPackage pkgs.binutils-unwrapped "strings";
|
||||||
|
|
||||||
sandbox.method = "landlock";
|
sandbox.method = "landlock";
|
||||||
sandbox.wrapperType = "inplace"; # trivial package; cheaper to wrap in place
|
sandbox.wrapperType = "inplace"; # trivial package; cheaper to wrap in place
|
||||||
|
@@ -4,7 +4,7 @@
|
|||||||
# packageUnwrapped = pkgs.linkIntoOwnPackage config.sane.programs.geoclue2.packageUnwrapped "libexec/geoclue-2.0/demos/where-am-i";
|
# packageUnwrapped = pkgs.linkIntoOwnPackage config.sane.programs.geoclue2.packageUnwrapped "libexec/geoclue-2.0/demos/where-am-i";
|
||||||
packageUnwrapped = pkgs.linkFarm "where-am-i" [{
|
packageUnwrapped = pkgs.linkFarm "where-am-i" [{
|
||||||
# bring the `where-am-i` tool into a `bin/` directory so it can be invokable via PATH
|
# bring the `where-am-i` tool into a `bin/` directory so it can be invokable via PATH
|
||||||
name = "bin/where-am-i";
|
name = "where-am-i";
|
||||||
path = "${config.sane.programs.geoclue2.packageUnwrapped}/libexec/geoclue-2.0/demos/where-am-i";
|
path = "${config.sane.programs.geoclue2.packageUnwrapped}/libexec/geoclue-2.0/demos/where-am-i";
|
||||||
}];
|
}];
|
||||||
|
|
||||||
|
@@ -1,17 +1,17 @@
|
|||||||
{ pkgs, ... }:
|
{ pkgs, ... }:
|
||||||
{
|
{
|
||||||
sane.programs.zfs-tools = {
|
sane.programs.zfs-tools = {
|
||||||
packageUnwrapped = pkgs.linkIntoOwnPackage pkgs.zfs [
|
packageUnwrapped = pkgs.linkBinIntoOwnPackage pkgs.zfs [
|
||||||
"bin/arc_summary"
|
"arc_summary"
|
||||||
"bin/arcstat"
|
"arcstat"
|
||||||
# "bin/dbufstat"
|
# "dbufstat"
|
||||||
"bin/zdb"
|
"zdb"
|
||||||
"bin/zfs"
|
"zfs"
|
||||||
"bin/zfs_ids_to_path"
|
"zfs_ids_to_path"
|
||||||
"bin/zilstat"
|
"zilstat"
|
||||||
"bin/zpool"
|
"zpool"
|
||||||
"bin/zstream"
|
"zstream"
|
||||||
"bin/zstreamdump"
|
"zstreamdump"
|
||||||
];
|
];
|
||||||
|
|
||||||
sandbox.method = "landlock"; #< bwrap doesn't work
|
sandbox.method = "landlock"; #< bwrap doesn't work
|
||||||
|
@@ -235,7 +235,7 @@ in
|
|||||||
};
|
};
|
||||||
|
|
||||||
sane.programs.lightning-cli = {
|
sane.programs.lightning-cli = {
|
||||||
packageUnwrapped = pkgs.linkIntoOwnPackage cfg.package "bin/lightning-cli";
|
packageUnwrapped = pkgs.linkBinIntoOwnPackage cfg.package "lightning-cli";
|
||||||
};
|
};
|
||||||
|
|
||||||
};
|
};
|
||||||
|
@@ -1,5 +1,6 @@
|
|||||||
{ lib
|
{ lib
|
||||||
, deepLinkIntoOwnPackage
|
, deepLinkIntoOwnPackage
|
||||||
|
, linkIntoOwnPackage
|
||||||
, rmDbusServicesInPlace
|
, rmDbusServicesInPlace
|
||||||
, runCommandLocalOverridable
|
, runCommandLocalOverridable
|
||||||
, stdenv
|
, stdenv
|
||||||
@@ -65,6 +66,19 @@
|
|||||||
done
|
done
|
||||||
'';
|
'';
|
||||||
|
|
||||||
|
# `linkBinIntoOwnPackage myPkg "binary-name"`
|
||||||
|
# `linkBinIntoOwnPackage myPkg [ "cli-tool1" "cli-tool2" ]`
|
||||||
|
# `linkBinIntoOwnPackage myPkg [ ]` -> link *all* of bin/
|
||||||
|
#
|
||||||
|
# in addition, all manpages/docs are linked into the output
|
||||||
|
linkBinIntoOwnPackage = pkg: path: let
|
||||||
|
path' = if path == [] then "" else path; #< if handed an empty list, then link all of `bin`
|
||||||
|
paths = if lib.isList path' then path else [ path' ]; #< coerce to list
|
||||||
|
paths' = (lib.map (p: "bin/${p}") paths) ++ [ "share/doc" "share/man" ];
|
||||||
|
in
|
||||||
|
linkIntoOwnPackage pkg paths'
|
||||||
|
;
|
||||||
|
|
||||||
deepLinkIntoOwnPackage = pkg: symlinkJoin {
|
deepLinkIntoOwnPackage = pkg: symlinkJoin {
|
||||||
name = pkg.pname or pkg.name;
|
name = pkg.pname or pkg.name;
|
||||||
paths = [ pkg ];
|
paths = [ pkg ];
|
||||||
|
@@ -118,6 +118,7 @@ let
|
|||||||
inherit (trivial-builders)
|
inherit (trivial-builders)
|
||||||
copyIntoOwnPackage
|
copyIntoOwnPackage
|
||||||
deepLinkIntoOwnPackage
|
deepLinkIntoOwnPackage
|
||||||
|
linkBinIntoOwnPackage
|
||||||
linkIntoOwnPackage
|
linkIntoOwnPackage
|
||||||
rmDbusServices
|
rmDbusServices
|
||||||
rmDbusServicesInPlace
|
rmDbusServicesInPlace
|
||||||
|
Reference in New Issue
Block a user