summary refs log tree commit diff
path: root/pkgs/tools/system/localtime
diff options
context:
space:
mode:
authorMichael Peyton Jones <me@michaelpj.com>2019-06-16 12:16:51 +0100
committerMichael Peyton Jones <me@michaelpj.com>2019-06-16 13:46:52 +0200
commit66da10e80f92b7bde048a566e3bf97cc6b349d86 (patch)
tree99803600395a243e068cf54aed5cb445aa5af952 /pkgs/tools/system/localtime
parentae71c13a92f7e3b7968e8b7b1db9f6238dc00a25 (diff)
downloadnixpkgs-66da10e80f92b7bde048a566e3bf97cc6b349d86.tar
nixpkgs-66da10e80f92b7bde048a566e3bf97cc6b349d86.tar.gz
nixpkgs-66da10e80f92b7bde048a566e3bf97cc6b349d86.tar.bz2
nixpkgs-66da10e80f92b7bde048a566e3bf97cc6b349d86.tar.lz
nixpkgs-66da10e80f92b7bde048a566e3bf97cc6b349d86.tar.xz
nixpkgs-66da10e80f92b7bde048a566e3bf97cc6b349d86.tar.zst
nixpkgs-66da10e80f92b7bde048a566e3bf97cc6b349d86.zip
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.
Diffstat (limited to 'pkgs/tools/system/localtime')
-rw-r--r--pkgs/tools/system/localtime/default.nix11
1 files changed, 5 insertions, 6 deletions
diff --git a/pkgs/tools/system/localtime/default.nix b/pkgs/tools/system/localtime/default.nix
index 45cf378a14e..56346548f00 100644
--- a/pkgs/tools/system/localtime/default.nix
+++ b/pkgs/tools/system/localtime/default.nix
@@ -1,4 +1,4 @@
-{ stdenv, systemd, polkit, fetchFromGitHub, buildGoPackage, m4}:
+{ stdenv, fetchFromGitHub, buildGoPackage, m4 }:
 
 buildGoPackage rec {
   name = "localtime-2017-11-07";
@@ -11,18 +11,17 @@ buildGoPackage rec {
   };
   goPackagePath = "github.com/Stebalien/localtime";
 
-  buildInputs = [ systemd polkit m4 ];
+  buildInputs = [ m4 ];
 
-  makeFlags = [ "PREFIX=$(out)" ];
+  makeFlags = [ "PREFIX=$(out)" "BINDIR=$(bin)/bin" ];
 
   buildPhase = ''
     cd go/src/${goPackagePath}
-    make localtimed
+    make $makeFlags
   '';
 
   installPhase = ''
-    mkdir -p $bin/bin
-    install -Dm555 localtimed $bin/bin
+    make install $makeFlags
   '';
 
   meta = with stdenv.lib; {