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

Ignoring revisions in .git-blame-ignore-revs. Click here to bypass and see the normal blame view.

29 lines
778 B
Nix
Raw Normal View History

{ lib, stdenv, runCommand, substituteAll, coreutils }:
2016-11-14 14:56:24 +01:00
let
name = "service-wrapper-${version}";
2019-04-28 18:35:34 +02:00
version = "19.04"; # Akin to Ubuntu Release
2016-11-14 14:56:24 +01:00
in
2019-09-09 01:38:31 +02:00
runCommand name {
2016-11-14 14:56:24 +01:00
script = substituteAll {
src = ./service-wrapper.sh;
isExecutable = true;
inherit (stdenv) shell;
2016-11-14 14:56:24 +01:00
inherit coreutils;
};
meta = with lib; {
2016-11-14 14:56:24 +01: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 18:35:34 +02:00
# Shellscript has been modified but upstream source is: https://git.launchpad.net/ubuntu/+source/init-system-helpers
2016-11-14 14:56:24 +01:00
};
}
''
mkdir -p $out/bin
ln -s $out/bin $out/sbin
cp $script $out/bin/service
chmod a+x $out/bin/service
''