localtime: install systemd serice and polkit rules
- Use the right variables and `make install` to ensure all products are installed. - Remove unneeded build inputs: we don't need systemd or polkit to install the service or polkit rules.
This commit is contained in:
parent
ae71c13a92
commit
66da10e80f
@ -1,4 +1,4 @@
|
|||||||
{ stdenv, systemd, polkit, fetchFromGitHub, buildGoPackage, m4}:
|
{ stdenv, fetchFromGitHub, buildGoPackage, m4 }:
|
||||||
|
|
||||||
buildGoPackage rec {
|
buildGoPackage rec {
|
||||||
name = "localtime-2017-11-07";
|
name = "localtime-2017-11-07";
|
||||||
@ -11,18 +11,17 @@ buildGoPackage rec {
|
|||||||
};
|
};
|
||||||
goPackagePath = "github.com/Stebalien/localtime";
|
goPackagePath = "github.com/Stebalien/localtime";
|
||||||
|
|
||||||
buildInputs = [ systemd polkit m4 ];
|
buildInputs = [ m4 ];
|
||||||
|
|
||||||
makeFlags = [ "PREFIX=$(out)" ];
|
makeFlags = [ "PREFIX=$(out)" "BINDIR=$(bin)/bin" ];
|
||||||
|
|
||||||
buildPhase = ''
|
buildPhase = ''
|
||||||
cd go/src/${goPackagePath}
|
cd go/src/${goPackagePath}
|
||||||
make localtimed
|
make $makeFlags
|
||||||
'';
|
'';
|
||||||
|
|
||||||
installPhase = ''
|
installPhase = ''
|
||||||
mkdir -p $bin/bin
|
make install $makeFlags
|
||||||
install -Dm555 localtimed $bin/bin
|
|
||||||
'';
|
'';
|
||||||
|
|
||||||
meta = with stdenv.lib; {
|
meta = with stdenv.lib; {
|
||||||
|
Loading…
Reference in New Issue
Block a user