pkgs: ship gst-device-monitor binary

This commit is contained in:
Colin 2024-05-19 10:31:37 +00:00
parent e9d94f2c71
commit 5619bb3334
4 changed files with 32 additions and 17 deletions

View File

@ -58,6 +58,7 @@
./go2tv.nix
./gpodder.nix
./grimshot.nix
./gst-device-monitor.nix
./gthumb.nix
./gvfs.nix
./handbrake.nix

View File

@ -0,0 +1,6 @@
{ pkgs, ... }:
{
sane.programs.gst-device-monitor = {
packageUnwrapped = pkgs.linkIntoOwnPackage pkgs.gst_all_1.gst-plugins-base [ "bin/gst-device-monitor-1.0" "man/man1/gst-device-monitor-1.0.1.gz" ];
};
}

View File

@ -83,6 +83,7 @@ in
# "gnome.seahorse" # keyring/secret manager
"gnome-frog" # OCR/QR decoder
"gpodder"
"gst-device-monitor" # for debugging audio/video
# "gthumb"
# "lemoa" # lemmy app
"libnotify" # for notify-send; debugging

View File

@ -1,4 +1,5 @@
{ runCommandLocal
{ lib
, runCommandLocal
, rmDbusServicesInPlace
, symlinkJoin
}:
@ -7,23 +8,29 @@
# its own package, but otherwise keeping the same path.
# this is done by copying the bits, so as to avoid including the item's neighbors
# in its runtime closure.
copyIntoOwnPackage = pkg: path: runCommandLocal "${pkg.pname or pkg.name}-${path}" {
env.item = path;
env.fromPkg = pkg;
} ''
mkdir -p "$out/$(dirname "$item")"
cp -a "$fromPkg/$item" "$out/$item"
runHook postFixup
'';
copyIntoOwnPackage = pkg: path: let
paths = if lib.isList path then path else [ path ];
suffix = (lib.head paths) + (if paths != [ path ] then "-and-other-paths" else "");
in
runCommandLocal "${pkg.pname or pkg.name}-${suffix}" { } ''
for item in ${lib.escapeShellArgs paths}; do
mkdir -p "$out/$(dirname $item)"
cp -a "${pkg}/$item" "$out/$item"
done
runHook postFixup
'';
linkIntoOwnPackage = pkg: path: runCommandLocal "${pkg.pname or pkg.name}-${path}" {
env.item = path;
env.fromPkg = pkg;
} ''
mkdir -p "$out/$(dirname "$item")"
ln -s "$fromPkg/$item" "$out/$item"
runHook postFixup
'';
linkIntoOwnPackage = pkg: path: let
paths = if lib.isList path then path else [ path ];
suffix = (lib.head paths) + (if paths != [ path ] then "-and-other-paths" else "");
in
runCommandLocal "${pkg.pname or pkg.name}-${suffix}" { } ''
for item in ${lib.escapeShellArgs paths}; do
mkdir -p "$out/$(dirname $item)"
ln -s "${pkg}/$item" "$out/$item"
done
runHook postFixup
'';
# given some package, create a new package which symlinks every file of the original
# *except* for its dbus files.