1{ lib, runCommand, substituteAll, fetchurl, systemd, coreutils }:
2
3let
4 name = "service-wrapper-${version}";
5 version = "16.04.0"; # Ajar to Ubuntu Release
6in
7runCommand "${name}" {
8 script = substituteAll {
9 src = ./service-wrapper.sh;
10 inherit coreutils;
11 };
12
13 meta = with lib; {
14 description = "A convenient wrapper for the systemctl commands, borrow from Ubuntu";
15 license = licenses.gpl2Plus;
16 platforms = platforms.linux;
17 maintainers = with maintainers; [ DerTim1 ];
18 };
19}
20''
21 mkdir -p $out/bin
22 ln -s $out/bin $out/sbin
23 cp $script $out/bin/service
24 chmod a+x $out/bin/service
25''