2019-01-15 22:41:31 +00:00
|
|
|
{ stdenv, runCommand, substituteAll, coreutils }:
|
2016-11-14 13:56:24 +00:00
|
|
|
|
|
|
|
let
|
|
|
|
name = "service-wrapper-${version}";
|
2019-04-28 17:35:34 +01:00
|
|
|
version = "19.04"; # Akin to Ubuntu Release
|
2016-11-14 13:56:24 +00:00
|
|
|
in
|
2019-09-09 00:38:31 +01:00
|
|
|
runCommand name {
|
2016-11-14 13:56:24 +00:00
|
|
|
script = substituteAll {
|
|
|
|
src = ./service-wrapper.sh;
|
2019-03-05 23:10:34 +00:00
|
|
|
isExecutable = true;
|
2019-01-15 22:41:31 +00:00
|
|
|
inherit (stdenv) shell;
|
2016-11-14 13:56:24 +00:00
|
|
|
inherit coreutils;
|
|
|
|
};
|
|
|
|
|
2019-01-15 22:41:31 +00:00
|
|
|
meta = with stdenv.lib; {
|
2016-11-14 13:56:24 +00:00
|
|
|
description = "A convenient wrapper for the systemctl commands, borrow from Ubuntu";
|
|
|
|
license = licenses.gpl2Plus;
|
|
|
|
platforms = platforms.linux;
|
|
|
|
maintainers = with maintainers; [ DerTim1 ];
|
2019-04-28 17:35:34 +01:00
|
|
|
# Shellscript has been modified but upstream source is: https://git.launchpad.net/ubuntu/+source/init-system-helpers
|
2016-11-14 13:56:24 +00:00
|
|
|
};
|
|
|
|
}
|
|
|
|
''
|
|
|
|
mkdir -p $out/bin
|
|
|
|
ln -s $out/bin $out/sbin
|
|
|
|
cp $script $out/bin/service
|
|
|
|
chmod a+x $out/bin/service
|
|
|
|
''
|