stockholm/tv/5pkgs/simple/xdpytools/default.nix

32 lines
595 B
Nix
Raw Normal View History

2021-02-07 20:52:37 +00:00
{ lib, pkgs }:
let
install = name: { path }: /* sh */ ''
(
mkdir -p $out/bin
touch $out/bin/${name}
chmod +x $out/bin/${name}
exec >$out/bin/${name}
echo '#! ${pkgs.dash}/bin/dash'
echo export PATH=${lib.makeBinPath path}
sed 1d ${./src + "/${name}"}
)
'';
in
pkgs.runCommand "xdpytools" {}
(toString
(lib.mapAttrsToList install {
xdpychvt.path = [
"$out"
"/run/wrappers/'$LOGNAME'"
"/run/wrappers"
];
xdpysel.path = [
"$out"
pkgs.findutils
pkgs.jq
];
}))