Commit 3486572d698f

Vincent Demeester <vincent@sbr.pm>
2018-04-17 15:05:04
Import some sbrpkgs in this repository and use overlays
Signed-off-by: Vincent Demeester <vincent@sbr.pm>
1 parent 5b08140
overlays/sbr.overlay.nix
@@ -0,0 +1,7 @@
+self: super: {
+  ape = import ../pkgs/ape { inherit (self) stdenv lib buildGoPackage fetchFromGitHub; };
+  clasp = import ../pkgs/clasp { inherit (self) stdenv lib buildGoPackage fetchFromGitHub; };
+  tuck = import ../pkgs/tuck { inherit (self) stdenv lib buildGoPackage fetchFromGitHub; };
+  dobi = import ../pkgs/dobi { inherit (self) stdenv lib buildGoPackage fetchFromGitHub; };
+  envbox = import ../pkgs/envbox { inherit (self) stdenv lib buildGoPackage fetchFromGitHub; };
+}
pkgs/ape/default.nix
@@ -0,0 +1,22 @@
+{ stdenv, lib, buildGoPackage, fetchFromGitHub }:
+
+buildGoPackage rec {
+  name = "ape-${version}";
+  version = "0.1.1";
+  rev = "v${version}";
+
+  goPackagePath = "github.com/vdemeester/ape";
+
+  src = fetchFromGitHub {
+    inherit rev;
+    owner = "vdemeester";
+    repo = "ape";
+    sha256 = "0gz329a9ym4yyh9m7c563axaa833gdhh8xfr8a521djzh5snynsq";
+  };
+
+  meta = {
+    description = "a git mirror *upstream* updater ";
+    homepage = "https://github.com/vdemeester/ape";
+    licence = lib.licenses.asl20;
+  };
+}
pkgs/clasp/default.nix
@@ -0,0 +1,22 @@
+{ stdenv, lib, buildGoPackage, fetchFromGitHub }:
+
+buildGoPackage rec {
+  name = "clasp-${version}";
+  version = "0.0.1";
+  rev = "v${version}";
+
+  goPackagePath = "github.com/vdemeester/clasp";
+
+  src = fetchFromGitHub {
+    inherit rev;
+    owner = "vdemeester";
+    repo = "clasp";
+    sha256 = "0vvb3ay635svp710z8kn499426ajf5x83i4fih6zwp32fnmwvfwn";
+  };
+
+  meta = {
+    description = "mini hook / rebuild configuration binary written in Go";
+    homepage = "https://github.com/vdemeester/clasp";
+    licence = lib.licenses.asl20;
+  };
+}
pkgs/dobi/default.nix
@@ -0,0 +1,30 @@
+{ stdenv, lib, buildGoPackage, fetchFromGitHub }:
+
+buildGoPackage rec {
+  name = "dobi-${version}";
+  version = "v0.9";
+  rev = "0cb9d4c4290d8c044b34f1fb5c662ac4116c2f25";
+
+  buildFlagsArray = let t = "${goPackagePath}/cmd"; in ''
+    -ldflags=
+       -X ${t}.gitsha=${rev}
+       -X ${t}.buildDate=unknown
+  '';
+  goPackagePath = "github.com/dnephin/dobi";
+  excludedPackages = "docs";
+
+  src = fetchFromGitHub {
+    inherit rev;
+    owner = "dnephin";
+    repo = "dobi";
+    sha256 = "11a3nhhxcixz3sb92vr57gj5dpg4h47xy2v0wczxzcn1fhf2s06n";
+  };
+
+  goDeps = ./deps.nix;
+
+  meta = {
+    description = "A build automation tool for Docker applications";
+    homepage = https://dnephin.github.io/dobi/;
+    license = lib.licenses.asl20;
+  };
+}
pkgs/dobi/deps.nix
@@ -0,0 +1,220 @@
+[
+  {
+    goPackagePath = "github.com/Azure/go-ansiterm";
+    fetch = {
+      type = "git";
+      url = "https://github.com/Azure/go-ansiterm";
+      rev = "fa152c58bc15761d0200cb75fe958b89a9d4888e";
+      sha256 = "09qlywlnp8gwjn4n5ri376bnvmkid823la8xsp0v0si8a98z8bv4";
+    };
+  }
+  {
+    goPackagePath = "github.com/dnephin/configtf";
+    fetch = {
+      type = "git";
+      url = "https://github.com/dnephin/configtf";
+      rev = "6b0d1fdf5e68504061777fe78693fba1b40aef85";
+      sha256 = "0qbcpq2vqm8wws3ixb25z9dz5v4n62w8m10vhy68vvblsp46x2jp";
+    };
+  }
+  {
+    goPackagePath = "github.com/dnephin/go-os-user";
+    fetch = {
+      type = "git";
+      url = "https://github.com/dnephin/go-os-user";
+      rev = "44e2994deb1ed3c8bf21e28cbd5d2e3107b35e0b";
+      sha256 = "0dk122hicmqvkdl7lm099mwsbhb0zrndafm7r9qxvlbffigipx1f";
+    };
+  }
+  {
+    goPackagePath = "github.com/docker/docker";
+    fetch = {
+      type = "git";
+      url = "https://github.com/docker/docker";
+      rev = "515e5dade7a006dbd2c42880f1af695da22ece60";
+      sha256 = "1m4cll2v0j0l00mp117x7gbs5r5shxgf7ydbp21pgjxb9v8f969y";
+    };
+  }
+  {
+    goPackagePath = "github.com/docker/go-connections";
+    fetch = {
+      type = "git";
+      url = "https://github.com/docker/go-connections";
+      rev = "1494b6df4050e60923d68cd8cc6a19e7af9f1c01";
+      sha256 = "1r1r2a3giir1ixdqwqvg82mjvnah19xjry2i1nv30ri3xfxcz33n";
+    };
+  }
+  {
+    goPackagePath = "github.com/docker/go-units";
+    fetch = {
+      type = "git";
+      url = "https://github.com/docker/go-units";
+      rev = "8a7beacffa3009a9ac66bad506b18ffdd110cf97";
+      sha256 = "0cljjl9j2bi10fy16y7icb3iz95x1zhjfswhc2yj0w2l8wvgzfjp";
+    };
+  }
+  {
+    goPackagePath = "github.com/fsouza/go-dockerclient";
+    fetch = {
+      type = "git";
+      url = "https://github.com/fsouza/go-dockerclient";
+      rev = "348eb84e7de87ad89fd9a2656f56081b2a4d837b";
+      sha256 = "0gm4cn2wcbnwb4zc5qwj4nry4hg9k922kk6b23zvhl63hy35mizv";
+    };
+  }
+  {
+    goPackagePath = "github.com/gogits/git-module";
+    fetch = {
+      type = "git";
+      url = "https://github.com/gogits/git-module";
+      rev = "b3009dc4f5842cf9e2e80fef1e125e79c38e4949";
+      sha256 = "1f5mms15hknnj17nvb5dwwk8fcm8a9msy9qdjvkplihxgaqm0amz";
+    };
+  }
+  {
+    goPackagePath = "github.com/hashicorp/go-cleanhttp";
+    fetch = {
+      type = "git";
+      url = "https://github.com/hashicorp/go-cleanhttp";
+      rev = "ad28ea4487f05916463e2423a55166280e8254b5";
+      sha256 = "0xw0qas3ixg8p2xh09hhc81km0mfn9lbnfgrdb309hzcwhmiyqjm";
+    };
+  }
+  /*
+  {
+    goPackagePath = "github.com/inconshreveable/mousetrap";
+    fetch = {
+      type = "git";
+      url = "https://github.com/inconshreveable/mousetrap";
+      rev = "76626ae9c91c4f2a10f34cad8ce83ea42c93bb75";
+      sha256 = "1j51aaskfqc953p5s9naqimr04hzfijm4yczdsiway1xnnvvpfr1";
+    };
+  }
+  */
+  {
+    goPackagePath = "github.com/kballard/go-shellquote";
+    fetch = {
+      type = "git";
+      url = "https://github.com/kballard/go-shellquote";
+      rev = "d8ec1a69a250a17bb0e419c386eac1f3711dc142";
+      sha256 = "1a57hm0zwyi70am670s0pkglnkk1ilddnmfxz1ba7innpkf5z6s7";
+    };
+  }
+  {
+    goPackagePath = "github.com/mcuadros/go-version";
+    fetch = {
+      type = "git";
+      url = "https://github.com/mcuadros/go-version";
+      rev = "d52711f8d6bea8dc01efafdb68ad95a4e2606630";
+      sha256 = "08ps27vvn77jhrnks8p8mx5cwgb1ikhaddcnrpgpz7aq905a5kzn";
+    };
+  }
+  {
+    goPackagePath = "github.com/metakeule/fmtdate";
+    fetch = {
+      type = "git";
+      url = "https://github.com/metakeule/fmtdate";
+      rev = "427373e7d2f8fcaa70a83e289c15fb3618a945bc";
+      sha256 = "1xfcg8vd1z12kvp03arp5rbvrf5717blwippia9c1yxn050a4qwy";
+    };
+  }
+  {
+    goPackagePath = "github.com/Microsoft/go-winio";
+    fetch = {
+      type = "git";
+      url = "https://github.com/Microsoft/go-winio";
+      rev = "ce2922f643c8fd76b46cadc7f404a06282678b34";
+      sha256 = "162533q8jhbpl48hcpxyzbldrkmm9v803s8r6ssds5xbqx7gv2s1";
+    };
+  }
+  {
+    goPackagePath = "github.com/opencontainers/runc";
+    fetch = {
+      type = "git";
+      url = "https://github.com/opencontainers/runc";
+      rev = "4c8007f34a0077a1040923ee4c7cec64b6e070d4";
+      sha256 = "0dlrlflam74035gz6c351ay32yb7vysv5wf0a971hy01lvm68d7c";
+    };
+  }
+  {
+    goPackagePath = "github.com/renstorm/dedent";
+    fetch = {
+      type = "git";
+      url = "https://github.com/renstrom/dedent";
+      rev = "020d11c3b9c0c7a3c2efcc8e5cf5b9ef7bcea21f";
+      sha256 = "0awsnc3hf4n46p388zg0cijh2sk813cyqpqk6f95kbzx9h9gv7lk";
+    };
+  }
+  {
+    goPackagePath = "github.com/Sirupsen/logrus";
+    fetch = {
+      type = "git";
+      url = "https://github.com/Sirupsen/logrus";
+      rev = "26709e2714106fb8ad40b773b711ebce25b78914";
+      sha256 = "11sd2dc5w3ny84zk1pcvvirkmq84ac0bnf1vq4p9j5qj05zjz3rb";
+    };
+  }
+  {
+    goPackagePath = "github.com/spf13/cobra";
+    fetch = {
+      type = "git";
+      url = "https://github.com/dnephin/cobra";
+      rev = "8e4c18bd418c1b9060ddf7760316aa7c2a468127";
+      sha256 = "0an8mv9xn3zlzvy0whq8k9wi9jwqk2mwb2rv7fks6yknyfpvdh98";
+    };
+  }
+  {
+    goPackagePath = "github.com/spf13/pflag";
+    fetch = {
+      type = "git";
+      url = "https://github.com/spf13/pflag";
+      rev = "5ccb023bc27df288a957c5e994cd44fd19619465";
+      sha256 = "1r65j8sw15pz0iacwnf303p6s51vkv0k6qc5cyb2kybfraqd7f7z";
+    };
+  }
+  {
+    goPackagePath = "github.com/Unknwon/com";
+    fetch = {
+      type = "git";
+      url = "https://github.com/Unknwon/com";
+      rev = "28b053d5a2923b87ce8c5a08f3af779894a72758";
+      sha256 = "09i9slj4zbsqmwkkx9bqi7cgpv6hqby6r98l6qx1wag89qijybz2";
+    };
+  }
+  {
+    goPackagePath = "github.com/valyala/fasttemplate";
+    fetch = {
+      type = "git";
+      url = "https://github.com/valyala/fasttemplate";
+      rev = "3b874956e03f1636d171bda64b130f9135f42cff";
+      sha256 = "0h17a316a148g3diylpasa9hwx0rp8l619kqdz6spmf9l5iml4hh";
+    };
+  }
+  {
+    goPackagePath = "golang.org/x/net";
+    fetch = {
+      type = "git";
+      url = "https://go.googlesource.com/net";
+      rev = "3fe3024eef808ba2798cc1855690f49e2b860573";
+      sha256 = "0r6i9b3r33lzpcww0sijzw16dw4klz97m4dynja1ids7g6yddq4a";
+    };
+  }
+  {
+    goPackagePath = "golang.org/x/sys";
+    fetch = {
+      type = "git";
+      url = "https://go.googlesource.com/sys";
+      rev = "c200b10b5d5e122be351b67af224adc6128af5bf";
+      sha256 = "1f764m3q05q2dq1pdms07jcixw4xakqw46w1djrmbhjmd9q8b0av";
+    };
+  }
+  {
+    goPackagePath = "gopkg.in/yaml.v2";
+    fetch = {
+      type = "git";
+      url = "https://gopkg.in/yaml.v2";
+      rev = "a5b47d31c556af34a302ce5d659e6fea44d90de0";
+      sha256 = "0v6l48fshdjrqzyq1kwn22gy7vy434xdr1i0lm3prsf6jbln9fam";
+    };
+  }
+]
pkgs/envbox/default.nix
@@ -0,0 +1,22 @@
+{ stdenv, lib, buildGoPackage, fetchFromGitHub }:
+
+buildGoPackage rec {
+  name = "envbox-${version}";
+  version = "0.0.3";
+  rev = "v${version}";
+
+  goPackagePath = "github.com/justone/envbox";
+
+  src = fetchFromGitHub {
+    inherit rev;
+    owner = "justone";
+    repo = "envbox";
+    sha256 = "0ihwdhq05s0116ngcnh3vsxhm5k3lnidyaky2qv6dbw1hnq2pv1y";
+  };
+
+  meta = {
+    description = "Secure environment variables via secretbox";
+    homepage = "https://github.com/justone/envbox";
+    licence = lib.licenses.mit;
+  };
+}
pkgs/tuck/default.nix
@@ -0,0 +1,22 @@
+{ stdenv, lib, buildGoPackage, fetchFromGitHub }:
+
+buildGoPackage rec {
+  name = "tuck-${version}";
+  version = "0.1.1";
+  rev = "v${version}";
+
+  goPackagePath = "github.com/vdemeester/tuck";
+
+  src = fetchFromGitHub {
+    inherit rev;
+    owner = "vdemeester";
+    repo = "tuck";
+    sha256 = "1wwwh6wq5z0xdix2pdxh6i72f5w8qyc8rsc29b50vl00z869igv8";
+  };
+
+  meta = {
+    description = "symlink farm manager à-la-stow";
+    homepage = "https://github.com/vdemeester/tuck";
+    licence = lib.licenses.asl20;
+  };
+}
pkgs/home-manager
@@ -0,0 +1,1 @@
+Subproject commit 8ff7d934b2dc83aa3c37b9846f515691ff5e1fce
profiles/default.nix
@@ -56,6 +56,13 @@
 */
   };
   nixpkgs = {
+    overlays = [
+      (import ../overlays/sbr.overlay.nix)
+      # add third-party packages from outside the nixpkgs tree
+      (self: super: {
+        home-manager = import ../pkgs/home-manager { inherit pkgs; };
+      })
+    ];
     config = {
       allowUnfree = true;
     };
profiles/desktop.nix
@@ -31,15 +31,8 @@
       rev = "9c048f4fb66adc33c6b379f2edefcb615fd53de6";
       sha256 = "18xbnfzj753bphzmgp74rn9is4n5ir4mvb4gp9lgpqrbfyy5dl2j";
     }) {};
-		sbrPkgs = import (fetchNixPkgs {
-			owner = "vdemeester";
-			repo = "sbrpkgs";
-			rev = "df281994c5e438c25af6c054ebfbd19333f3e132";
-			sha256 = "0636k102vw1pmbcch75xvhjlkfk9553bcf6rba5i69m7b5bdsfd0";
-		}) {};
 	in {
       inherit (unstablePkgs) iosevka fira-code;
-			inherit (sbrPkgs) ape tuck clasp;
 		};
 		allowUnfree = true;
 	};
@@ -81,6 +74,8 @@
 		networkmanagerapplet
     gnupg
     pinentry
+    # overlay ?
+    envbox
 	];
 	hardware.opengl.extraPackages = [ pkgs.vaapiIntel ];
 	networking.networkmanager.enable = true;
.gitmodules
@@ -0,0 +1,3 @@
+[submodule "pkgs/home-manager"]
+	path = pkgs/home-manager
+	url = git@github.com:rycee/home-manager.git