mirror of
https://github.com/NixOS/nixpkgs.git
synced 2024-12-28 08:33:54 +00:00
f3282c8d1e
* treewide: remove unused variables * making ofborg happy
38 lines
916 B
Nix
38 lines
916 B
Nix
{ lib, runCommandCC, skawarePackages }:
|
|
|
|
with skawarePackages;
|
|
|
|
let
|
|
# From https://skarnet.org/software/misc/sdnotify-wrapper.c,
|
|
# which is unversioned.
|
|
src = ./sdnotify-wrapper.c;
|
|
|
|
in runCommandCC "sdnotify-wrapper" {
|
|
|
|
outputs = [ "bin" "doc" "out" ];
|
|
|
|
meta = {
|
|
homepage = "https://skarnet.org/software/misc/sdnotify-wrapper.c";
|
|
description = "Use systemd sd_notify without having to link against libsystemd";
|
|
platforms = lib.platforms.all;
|
|
license = lib.licenses.isc;
|
|
maintainers = with lib.maintainers; [ Profpatsch ];
|
|
};
|
|
|
|
} ''
|
|
mkdir -p $bin/bin
|
|
mkdir $out
|
|
|
|
# just dynamic for now
|
|
$CC \
|
|
-o $bin/bin/sdnotify-wrapper \
|
|
-I${skalibs.dev}/include \
|
|
-L${skalibs.lib}/lib \
|
|
-lskarnet \
|
|
${src}
|
|
|
|
mkdir -p $doc/share/doc/sdnotify-wrapper
|
|
# copy the documentation comment
|
|
sed -ne '/Usage:/,/*\//p' ${src} > $doc/share/doc/sdnotify-wrapper/README
|
|
''
|