From e2e3d8802f878495bb54a631554a9b1705ace456 Mon Sep 17 00:00:00 2001 From: Kamil Chmielewski Date: Fri, 3 Jun 2016 14:25:31 +0200 Subject: [PATCH] go-sct: extracted from goPackages --- pkgs/development/go-modules/libs.json | 11 +++++++++- pkgs/tools/X11/go-sct/default.nix | 29 +++++++++++++++++++++++++++ pkgs/tools/X11/go-sct/deps.json | 8 ++++++++ pkgs/top-level/all-packages.nix | 2 +- pkgs/top-level/go-packages.nix | 22 -------------------- 5 files changed, 48 insertions(+), 24 deletions(-) create mode 100644 pkgs/tools/X11/go-sct/default.nix create mode 100644 pkgs/tools/X11/go-sct/deps.json diff --git a/pkgs/development/go-modules/libs.json b/pkgs/development/go-modules/libs.json index 497487f5d1e7..a172cc524842 100644 --- a/pkgs/development/go-modules/libs.json +++ b/pkgs/development/go-modules/libs.json @@ -133,5 +133,14 @@ "rev": "bd746dd8bcc8c059a9d953a786a6156eb83f398e", "sha256": "1dvvclp418j3d02v9717sfqhl6fw6yyddr9r3j8gsiv8nb62ib56" } + }, + { + "goPackagePath": "github.com/cpucycle/astrotime", + "fetch": { + "type": "git", + "url": "https://github.com/cpucycle/astrotime", + "rev": "9c7d514efdb561775030eaf8f1a9ae6bddb3a2ca", + "sha256": "024sc7g55v4s54irssm5wsn74sr2k2ynsm6z16w47q66cxhgvby1" + } } -] +] \ No newline at end of file diff --git a/pkgs/tools/X11/go-sct/default.nix b/pkgs/tools/X11/go-sct/default.nix new file mode 100644 index 000000000000..18877917d0d3 --- /dev/null +++ b/pkgs/tools/X11/go-sct/default.nix @@ -0,0 +1,29 @@ +# This file was generated by go2nix. +{ stdenv, lib, xorg, goPackages, fetchgit, fetchhg, fetchbzr, fetchsvn }: + +with goPackages; + +buildGoPackage rec { + name = "go-sct-${version}"; + version = "20160529-${stdenv.lib.strings.substring 0 7 rev}"; + rev = "1d6b5e05a0b63bfeac9df55003efec352e1bc19d"; + + goPackagePath = "github.com/d4l3k/go-sct"; + + src = fetchgit { + inherit rev; + url = "https://github.com/d4l3k/go-sct"; + sha256 = "1iqdagrq0j7sqxgsj31skgk73k2rbpbvj41v087af9103wf8h9z7"; + }; + + goDeps = ./deps.json; + + buildInputs = [ xorg.libX11 xorg.libXrandr ]; + + meta = with stdenv.lib; { + description = "Color temperature setting library and CLI that operates in a similar way to f.lux and Redshift"; + license = licenses.mit; + maintainers = with maintainers; [ cstrahan ]; + platforms = platforms.unix; + }; +} diff --git a/pkgs/tools/X11/go-sct/deps.json b/pkgs/tools/X11/go-sct/deps.json new file mode 100644 index 000000000000..7a7ce4989d35 --- /dev/null +++ b/pkgs/tools/X11/go-sct/deps.json @@ -0,0 +1,8 @@ +[ + { + "include": "../../../go-modules/libs.json", + "packages": [ + "github.com/cpucycle/astrotime" + ] + } +] diff --git a/pkgs/top-level/all-packages.nix b/pkgs/top-level/all-packages.nix index b3f38640780e..226abaee854b 100644 --- a/pkgs/top-level/all-packages.nix +++ b/pkgs/top-level/all-packages.nix @@ -1762,7 +1762,7 @@ in go-pup = (callPackage ../development/tools/pup { }).bin; - go-sct = goPackages.go-sct.bin // { outputs = [ "bin" ]; }; + go-sct = (callPackage ../tools/X11/go-sct { }).bin; go-upower-notify = goPackages.upower-notify.bin // { outputs = [ "bin" ]; }; diff --git a/pkgs/top-level/go-packages.nix b/pkgs/top-level/go-packages.nix index 39596bead4c4..190f520df31e 100644 --- a/pkgs/top-level/go-packages.nix +++ b/pkgs/top-level/go-packages.nix @@ -290,13 +290,6 @@ let doCheck = false; }; - astrotime = buildFromGitHub { - rev = "9c7d514efdb561775030eaf8f1a9ae6bddb3a2ca"; - owner = "cpucycle"; - repo = "astrotime"; - sha256 = "024sc7g55v4s54irssm5wsn74sr2k2ynsm6z16w47q66cxhgvby1"; - }; - aws-sdk-go = buildFromGitHub { rev = "d85fa529a99a833067e11c0a838b9db7a5d5ea71"; version = "1.1.24"; @@ -1848,21 +1841,6 @@ let sha256 = "00f2rfhsaqj2wjanh5qp73phx7x12a5pwd7lc0rjfv68l6sgpg2v"; }; - go-sct = buildFromGitHub { - rev = "b82c2f81727357c45a47a43965c50ed5da5a2e74"; - version = "2016-01-11"; - owner = "d4l3k"; - repo = "go-sct"; - sha256 = "13hgmpv2c8ll5ap8fn1n480bdv1j21n86jjwcssd36kh2i933anl"; - buildInputs = [ astrotime pkgs.xorg.libX11 pkgs.xorg.libXrandr ]; - meta = with stdenv.lib; { - description = "Color temperature setting library and CLI that operates in a similar way to f.lux and Redshift"; - license = licenses.mit; - maintainers = with maintainers; [ cstrahan ]; - platforms = platforms.unix; - }; - }; - go-shlex = buildFromGitHub { rev = "3f9db97f856818214da2e1057f8ad84803971cff"; owner = "flynn";