Skip to content
Permalink

Comparing changes

Choose two branches to see what’s changed or to start a new pull request. If you need to, you can also or learn more about diff comparisons.

Open a pull request

Create a new pull request by comparing changes across two branches. If you need to, you can also . Learn more about diff comparisons here.
base repository: NixOS/nixpkgs
Failed to load repositories. Confirm that selected base ref is valid, then try again.
Loading
base: bfca7082d49d
Choose a base ref
...
head repository: NixOS/nixpkgs
Failed to load repositories. Confirm that selected head ref is valid, then try again.
Loading
compare: 594fd0ff6e0b
Choose a head ref
  • 2 commits
  • 1 file changed
  • 2 contributors

Commits on Dec 21, 2018

  1. localtime: migrate to using buildGoPackage

    Signed-off-by: Vincent Demeester <vincent@sbr.pm>
    vdemeester committed Dec 21, 2018

    Verified

    This commit was signed with the committer’s verified signature. The key has expired.
    vdemeester Vincent Demeester
    Copy the full SHA
    ed473e6 View commit details
  2. Merge pull request #52627 from vdemeester/52469-localtime-to-buildgop…

    …ackage
    
    localtime: migrate to using buildGoPackage
    Mic92 authored Dec 21, 2018

    Verified

    This commit was created on GitHub.com and signed with GitHub’s verified signature. The key has expired.
    Copy the full SHA
    594fd0f View commit details
Showing with 12 additions and 6 deletions.
  1. +12 −6 pkgs/tools/system/localtime/default.nix
18 changes: 12 additions & 6 deletions pkgs/tools/system/localtime/default.nix
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{ stdenv, go, systemd, polkit, fetchFromGitHub, m4, removeReferencesTo }:
{ stdenv, systemd, polkit, fetchFromGitHub, buildGoPackage, m4}:

stdenv.mkDerivation {
buildGoPackage rec {
name = "localtime-2017-11-07";

src = fetchFromGitHub {
@@ -9,14 +9,20 @@ stdenv.mkDerivation {
rev = "2e7b4317c723406bd75b2a1d640219ab9f8090ce";
sha256 = "04fyna8p7q7skzx9fzmncd6gx7x5pwa9jh8a84hpljlvj0kldfs8";
};
goPackagePath = "github.com/Stebalien/localtime";

buildInputs = [ go systemd polkit m4 removeReferencesTo ];
disallowedRequisites = [ go ];
buildInputs = [ systemd polkit m4 ];

makeFlags = [ "PREFIX=$(out)" ];

preFixup = ''
find $out/bin -type f -exec remove-references-to -t ${go} '{}' +
buildPhase = ''
cd go/src/${goPackagePath}
make localtimed
'';

installPhase = ''
mkdir -p $bin/bin
install -Dm555 localtimed $bin/bin
'';

meta = with stdenv.lib; {