Disabling http tests for guix

Pjotr Prins pjotr.public12 at thebird.nl
Fri Feb 16 06:13:05 UTC 2018


On Monday, 12 February 2018 at 21:19:35 UTC, Thomas Mader wrote:
> I am packaging ldc for NixOS and I was having the same problem 
> there. I solved it by putting the tests with special needs into 
> a fixed output derivation.
> That's how it is called in Nix world. Fixed output derivation's 
> always produce the same output and are therefore allowed to 
> access the network. They are also used to implement all kinds 
> of fetchers to get the source archives from GitHub and the like.

That is an interesting approach and I will discuss it with 
others. So an output derivation is an output that gets generated 
and allows for running it after the installation phase - giving 
it an opportunity to run tests. It is an interesting approach and 
works because the store is 'immutable'.

Two downsides: (1) is you can not assume there is a network on 
the build machine. We need to be able to build and test packages 
in isolation on restricted computers to make sure no one can 
tamper. (2) it allows pulling software, as you state, which 
changes the state of test system and makes it potentially 
non-reproducible. I don't think the Guix folks thing that this is 
the way forward. Impurity is a big no.

> guix sure has something equal because it basically is the same 
> system. They even use parts of Nix.

Currently Nix and Guix share the build daemon. Otherwise Nix and 
Guix are different animals altogether. I moved from Nix to Guix a 
few years back and know both systems intimately.

> Here you can take a look into the current package: 
> https://github.com/NixOS/nixpkgs/blob/master/pkgs/development/compilers/ldc/default.nix

here is mine (almost done, I need to remove some lines):

     
https://gitlab.com/genenetwork/guix/blob/dlang/gnu/packages/ldc.scm#L183

to me the difference is that (if you think away the LISP braces) 
Guix looks a lot more readable and the logic is clear from the 
expression (some of it is probably a matter of taste). I also 
note that the Nix package does not to build shared phobos libs 
and is not running all ldc tests.

But, admittedly, both package descriptions are short and clear.


More information about the digitalmars-d-ldc mailing list