Re: [Nix-dev] Confused about packages

2015-05-19 Thread Marc Weber
Excerpts from Roger Qiu's message of Tue May 19 05:56:30 + 2015:
> Wouldn't it be better for version numbers to always exist?
You're totally right that the

  mkDerivation {
name ="name-"
  }

version should always exist. Thus if you find cases just create a topic
branch, fix, and submit once in a while.

I was quite surprised that "mysql" in all-packages.nix started pointing
to mariadb which broke my ruby overlay because headers were not found.

Thus what can you do?

there is builtins.compareVersions function, and there are "nixos" module
assertions - thus you could ensure this way that compareVersion
pkgs.mysql equals "5.0" or so - or you could just add a constraint
mysql.name = "mysql-5.0" which would fail building.

You always "know" the version as long as you're using the same nixpkgs
revision - but sometimes you have to update - and then adding such nixos
assertios would be close to what you want. Just grep nixpkgs/nixos for
assertions to see samples.

However usually upgrades "just happen to work fine" - in the end testing
for versions doesn't protect you from mal functioning (eg a dependency
could have changed) - thus what you really want is writing tests.

There are some samples in the nixpgks repository as well.

Marc Weber
___
nix-dev mailing list
nix-dev@lists.science.uu.nl
http://lists.science.uu.nl/mailman/listinfo/nix-dev


Re: [Nix-dev] Confused about packages

2015-05-19 Thread Roger Qiu
Wouldn't it be better for version numbers to always exist? That way it's 
simple to know the exact version of your package that you're installing, 
even if it's just one package. I'd prefer for it not to be random.


On 16/05/2015 7:27 AM, Vladimír Čunát wrote:

Hi.

On 05/15/2015 11:09 PM, Amy de Buitléir wrote:

Q 1. Why do some packages have version numbers, and some don't? Are the ones
without version numbers some sort of "virtual" package?

Missing version should be considered a bug, I believe, at least in most
cases. I versioned dmenu2 in d41798321.


Q 2. Why can't I find some packages that I would expect to find? Are they
"hidden"? For example, I have the following in my /etc/nixos/configuration.nix:

   environment.systemPackages = with pkgs; [
 dmenu2
 dzen2
 haskellPackages.xmonad
 haskellPackages.xmonadContrib
 haskellPackages.xmonadExtras
 wget
 xsel
   ];

But if someone hadn't told me the names to put there, how could I have found
the names of the packages? Searching for them using nix-env didn't find them:

I consider that a bug, too.
Peti: I guess this would be because of haskellPackages missing
recurseIntoAttrs. I can't see it in there and no haskell packages are
shown for me on master.


Vladimir




___
nix-dev mailing list
nix-dev@lists.science.uu.nl
http://lists.science.uu.nl/mailman/listinfo/nix-dev


--
Founder of Matrix AI
http://matrix.ai/
+61420925975

___
nix-dev mailing list
nix-dev@lists.science.uu.nl
http://lists.science.uu.nl/mailman/listinfo/nix-dev


Re: [Nix-dev] Confused about packages

2015-05-15 Thread Vladimír Čunát
Hi.

On 05/15/2015 11:09 PM, Amy de Buitléir wrote:
> Q 1. Why do some packages have version numbers, and some don't? Are the ones
> without version numbers some sort of "virtual" package?

Missing version should be considered a bug, I believe, at least in most
cases. I versioned dmenu2 in d41798321.

> Q 2. Why can't I find some packages that I would expect to find? Are they
> "hidden"? For example, I have the following in my 
> /etc/nixos/configuration.nix:
> 
>   environment.systemPackages = with pkgs; [
> dmenu2
> dzen2
> haskellPackages.xmonad
> haskellPackages.xmonadContrib
> haskellPackages.xmonadExtras
> wget
> xsel
>   ];
> 
> But if someone hadn't told me the names to put there, how could I have found
> the names of the packages? Searching for them using nix-env didn't find them:

I consider that a bug, too.
Peti: I guess this would be because of haskellPackages missing
recurseIntoAttrs. I can't see it in there and no haskell packages are
shown for me on master.


Vladimir




smime.p7s
Description: S/MIME Cryptographic Signature
___
nix-dev mailing list
nix-dev@lists.science.uu.nl
http://lists.science.uu.nl/mailman/listinfo/nix-dev


Re: [Nix-dev] Confused about packages

2015-05-15 Thread Marc Weber
> [ with and without version numbers ]
Version numbers get added if people find that there is need to keep
multiple versions. Thus its kind of random

> where / how to find package names
See https://nixos.org/wiki/Howto_find_a_package_in_NixOS

Marc Weber
___
nix-dev mailing list
nix-dev@lists.science.uu.nl
http://lists.science.uu.nl/mailman/listinfo/nix-dev