summary refs log tree commit diff
path: root/pkgs/tools/X11/go-sct/default.nix
diff options
context:
space:
mode:
authorAaron Jheng <wentworth@outlook.com>2022-05-30 09:17:46 +0000
committerAaron Jheng <wentworth@outlook.com>2022-06-01 00:37:43 +0000
commit7844de536be8c018cf762aa495ed7447a34cfdf6 (patch)
treeb695250c59af52ecb812e1464d3c5c7be8c218f7 /pkgs/tools/X11/go-sct/default.nix
parent170394ab476503447f5238f63fce7e35c9e580d6 (diff)
go-sct: 20180605-eb1e851 -> unstable-2022-01-32
Diffstat (limited to 'pkgs/tools/X11/go-sct/default.nix')
-rw-r--r--pkgs/tools/X11/go-sct/default.nix27
1 files changed, 16 insertions, 11 deletions
diff --git a/pkgs/tools/X11/go-sct/default.nix b/pkgs/tools/X11/go-sct/default.nix
index 801ddc96c4a02..69ddff23e4a92 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
+  '';
+
+  vendorSha256 = "sha256-Rx5/oORink2QtRcD+JqbyFroWYhuYmuYDzZ391R4Jsw=";
+
+  buildInputs = [ xorg.libX11 xorg.libXrandr wayland.dev ];
 
-  buildInputs = [ xorg.libX11 xorg.libXrandr ];
+  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";
   };
 }