From 7844de536be8c018cf762aa495ed7447a34cfdf6 Mon Sep 17 00:00:00 2001 From: Aaron Jheng Date: Mon, 30 May 2022 09:17:46 +0000 Subject: [PATCH] go-sct: 20180605-eb1e851 -> unstable-2022-01-32 --- pkgs/tools/X11/go-sct/default.nix | 27 ++++++++++++++++----------- pkgs/tools/X11/go-sct/deps.nix | 11 ----------- 2 files changed, 16 insertions(+), 22 deletions(-) delete mode 100644 pkgs/tools/X11/go-sct/deps.nix diff --git a/pkgs/tools/X11/go-sct/default.nix b/pkgs/tools/X11/go-sct/default.nix index 801ddc96c4a0..69ddff23e4a9 100644 --- a/pkgs/tools/X11/go-sct/default.nix +++ b/pkgs/tools/X11/go-sct/default.nix @@ -1,27 +1,32 @@ -{ lib, xorg, buildGoPackage, fetchFromGitHub }: +{ lib, buildGoModule, fetchFromGitHub, xorg, wayland }: -buildGoPackage rec { +buildGoModule rec { pname = "go-sct"; - version = "20180605-${lib.strings.substring 0 7 rev}"; - rev = "eb1e851f2d5017038d2b8e3653645c36d3a279f4"; - - goPackagePath = "github.com/d4l3k/go-sct"; + version = "unstable-2022-01-32"; src = fetchFromGitHub { - inherit rev; owner = "d4l3k"; repo = "go-sct"; - sha256 = "16z2ml9x424cnliazyxlw7pm7q64pppjam3dnmq2xab0wlbbm3nm"; + rev = "4ae88a6bf50e0b917541ddbcec1ff10ab77a0b15"; + sha256 = "sha256-/0ilM1g3CNaseqV9i+cKWyzxvWnj+TFqazt+aYDtNVs="; }; - goDeps = ./deps.nix; + postPatch = '' + # Disable tests require network access + rm -f geoip/geoip_test.go + ''; - buildInputs = [ xorg.libX11 xorg.libXrandr ]; + vendorSha256 = "sha256-Rx5/oORink2QtRcD+JqbyFroWYhuYmuYDzZ391R4Jsw="; + + buildInputs = [ xorg.libX11 xorg.libXrandr wayland.dev ]; + + ldflags = [ "-s" "-w" ]; meta = with lib; { description = "Color temperature setting library and CLI that operates in a similar way to f.lux and Redshift"; + homepage = "https://github.com/d4l3k/go-sct"; license = licenses.mit; maintainers = with maintainers; [ cstrahan ]; - platforms = platforms.linux ++ platforms.windows; + mainProgram = "sct"; }; } diff --git a/pkgs/tools/X11/go-sct/deps.nix b/pkgs/tools/X11/go-sct/deps.nix deleted file mode 100644 index f808858e091a..000000000000 --- a/pkgs/tools/X11/go-sct/deps.nix +++ /dev/null @@ -1,11 +0,0 @@ -[ - { - goPackagePath = "github.com/cpucycle/astrotime"; - fetch = { - type = "git"; - url = "https://github.com/cpucycle/astrotime"; - rev = "9c7d514efdb561775030eaf8f1a9ae6bddb3a2ca"; - sha256 = "024sc7g55v4s54irssm5wsn74sr2k2ynsm6z16w47q66cxhgvby1"; - }; - } -]