go: add disabled flag for packages

This commit is contained in:
Luca Bruno 2015-05-18 12:46:22 +02:00
parent 81c115ba99
commit a43bd6bbcd
2 changed files with 10 additions and 1 deletions

View File

@ -2,6 +2,9 @@
{ name, buildInputs ? []
# Disabled flag
, disabled ? false
# Go import path of the package
, goPackagePath
@ -15,6 +18,8 @@
, meta ? {}, ... } @ args':
if disabled then throw "${name} not supported for go ${go.meta.branch}" else
let
args = lib.filterAttrs (name: _: name != "extraSrcs") args';
in

View File

@ -3,7 +3,10 @@
{ overrides, stdenv, go, buildGoPackage, git, pkgconfig, libusb
, fetchgit, fetchhg, fetchurl, fetchFromGitHub, fetchbzr, pkgs }:
let self = _self // overrides; _self = with self; {
let
isGo13 = go.meta.branch == "1.3";
isGo14 = go.meta.branch == "1.4";
self = _self // overrides; _self = with self; {
inherit go buildGoPackage;
@ -14,6 +17,7 @@ let self = _self // overrides; _self = with self; {
name = "go-crypto-${rev}";
goPackagePath = "golang.org/x/crypto";
goPackageAliases = [ "code.google.com/p/go.crypto" ];
disabled = isGo13;
src = fetchFromGitHub {
inherit rev;