1 { stdenv, lib, runCommandCC, skawarePackages, skalibs }:
4 # From https://skarnet.org/software/misc/sdnotify-wrapper.c,
5 # which is unversioned.
6 src = ./sdnotify-wrapper.c;
8 in runCommandCC "sdnotify-wrapper" {
10 outputs = [ "bin" "doc" "out" ];
13 homepage = "https://skarnet.org/software/misc/sdnotify-wrapper.c";
14 description = "Use systemd sd_notify without having to link against libsystemd";
15 mainProgram = "sdnotify-wrapper";
16 platforms = lib.platforms.linux;
17 license = lib.licenses.isc;
18 maintainers = with lib.maintainers; [ Profpatsch ];
25 # the -lskarnet has to come at the end to support static builds
27 -o $bin/bin/sdnotify-wrapper \
28 -I${skalibs.dev}/include \
29 -L${skalibs.lib}/lib \
33 mkdir -p $doc/share/doc/sdnotify-wrapper
34 # copy the documentation comment
35 sed -ne '/Usage:/,/*\//p' ${src} > $doc/share/doc/sdnotify-wrapper/README