Allow packages to be marked as "broken" by setting meta.broken

The effect is that they won't show up in "nix-env -qa" anymore.

+24 -8
+9
doc/meta.xml
··· 118 118 package).</para></listitem> 119 119 </varlistentry> 120 120 121 + <varlistentry> 122 + <term><varname>broken</varname></term> 123 + <listitem><para>If set to <literal>true</literal>, the package is 124 + marked as “broken”, meaning that it won’t show up in 125 + <literal>nix-env -qa</literal>, and cannot be built or installed. 126 + Sush packages should be removed from Nixpkgs eventually unless 127 + they are fixed.</para></listitem> 128 + </varlistentry> 129 + 121 130 </variablelist> 122 131 123 132
+1 -1
nixos/modules/module-list.nix
··· 279 279 ./virtualisation/libvirtd.nix 280 280 #./virtualisation/nova.nix 281 281 ./virtualisation/virtualbox-guest.nix 282 - ./virtualisation/xen-dom0.nix 282 + #./virtualisation/xen-dom0.nix 283 283 ]
+1
pkgs/applications/virtualization/nova/client.nix
··· 16 16 meta = { 17 17 homepage = https://github.com/rackspace/python-novaclient; 18 18 description = "Client library and command line tool for the OpenStack Nova API"; 19 + broken = true; 19 20 }; 20 21 }
+8 -7
pkgs/applications/virtualization/nova/default.nix
··· 20 20 paste_deploy m2crypto ipy boto_1_9 twisted sqlalchemy_migrate 21 21 distutils_extra simplejson readline glance cheetah lockfile httplib2 22 22 # !!! should libvirt be a build-time dependency? Note that 23 - # libxml2Python is a dependency of libvirt.py. 23 + # libxml2Python is a dependency of libvirt.py. 24 24 libvirt libxml2Python 25 25 novaclient 26 26 ]; 27 27 28 28 buildInputs = 29 - [ pythonPackages.python 29 + [ pythonPackages.python 30 30 pythonPackages.wrapPython 31 31 pythonPackages.mox 32 32 intltool ··· 45 45 substituteInPlace nova/api/ec2/cloud.py \ 46 46 --replace 'sh genrootca.sh' $out/libexec/nova/genrootca.sh 47 47 ''; 48 - 48 + 49 49 buildPhase = "python setup.py build"; 50 50 51 51 installPhase = 52 - '' 52 + '' 53 53 p=$(toPythonPath $out) 54 54 export PYTHONPATH=$p:$PYTHONPATH 55 55 mkdir -p $p ··· 59 59 # computes some stuff from its own argv[0]. So put the wrapped 60 60 # programs in $out/libexec under their original names. 61 61 mkdir -p $out/libexec/nova 62 - 62 + 63 63 wrapProgram() { 64 64 local prog="$1" 65 65 local hidden=$out/libexec/nova/$(basename "$prog") 66 66 mv $prog $hidden 67 67 makeWrapper $hidden $prog "$@" 68 68 } 69 - 69 + 70 70 wrapPythonPrograms 71 71 72 72 cp -prvd etc $out/etc ··· 86 86 doCheck = false; # !!! fix 87 87 88 88 checkPhase = "python setup.py test"; 89 - 89 + 90 90 meta = { 91 91 homepage = http://nova.openstack.org/; 92 92 description = "OpenStack Compute (a.k.a. Nova), a cloud computing fabric controller"; 93 + broken = true; 93 94 }; 94 95 }
+1
pkgs/applications/virtualization/xen/default.nix
··· 136 136 description = "Xen hypervisor and management tools for Dom0"; 137 137 platforms = [ "i686-linux" "x86_64-linux" ]; 138 138 maintainers = [ stdenv.lib.maintainers.eelco ]; 139 + broken = true; 139 140 }; 140 141 }
+4
pkgs/stdenv/generic/default.nix
··· 18 18 19 19 allowUnfree = config.allowUnfree or true && builtins.getEnv "HYDRA_DISALLOW_UNFREE" != "1"; 20 20 21 + allowBroken = builtins.getEnv "NIXPKGS_ALLOW_BROKEN" == "1"; 22 + 21 23 stdenvGenerator = setupScript: rec { 22 24 23 25 # The stdenv that we are producing. ··· 51 53 mkDerivation = attrs: 52 54 if !allowUnfree && (let l = lib.lists.toList attrs.meta.license or []; in lib.lists.elem "unfree" l || lib.lists.elem "unfree-redistributable" l) then 53 55 throw "package ‘${attrs.name}’ has an unfree license, refusing to evaluate" 56 + else if !allowBroken && attrs.meta.broken or false then 57 + throw "you can't use package ‘${attrs.name}’ because it has been marked as broken" 54 58 else 55 59 lib.addPassthru (derivation ( 56 60 (removeAttrs attrs ["meta" "passthru" "crossAttrs"])