nixpkgs/pkgs/os-specific/linux/service-wrapper/default.nix

29 lines
780 B
Nix
Raw Normal View History

{ stdenv, runCommand, substituteAll, coreutils }:
2016-11-14 13:56:24 +00:00
let
name = "service-wrapper-${version}";
2019-04-28 16:35:34 +00:00
version = "19.04"; # Akin to Ubuntu Release
2016-11-14 13:56:24 +00:00
in
2019-09-08 23:38:31 +00:00
runCommand name {
2016-11-14 13:56:24 +00:00
script = substituteAll {
src = ./service-wrapper.sh;
isExecutable = true;
inherit (stdenv) shell;
2016-11-14 13:56:24 +00:00
inherit coreutils;
};
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 16:35:34 +00: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
''