Re: [Nix-dev] Developing R modules with nix
Hi Peter, Currently I have in my `.nixpkgs/config.nix` an entry with rToolsEnv = pkgs.buildEnv { name = rTools; paths = with rPackages; [ devtools ggplot2 ]; }; and I am installing it with `nix-env -i rTools` interesting ... why do you prefer that approach? I would have used rWrapper = super.rWrapper.override { packages = with self.rPackages; [ devtools ggplot2 ] }; In the first place I was trying the approach listed on the mailing list [1]: { packageOverrides = pkgs: { rWrapper = pkgs.rWrapper.override { packages = with pkgs.rPackages; [ Defaults data_table ]; }; }; } which didn't immediately work out; this is why I used John's [2] approach, which did. [1]: http://www.mail-archive.com/nix-dev%40lists.science.uu.nl/msg11757.html [2]: https://github.com/jwiegley/nix-config/blob/master/config.nix I'm not much of an R developer, so I cannot say much about this subject. A default.nix that you could use to build your local project with Nix is: | let | | pkgs = import nixpkgs {}; | buildRPackage = import nixpkgs/pkgs/development/r-modules/generic-builder.nix pkgs.R; | | in | | with pkgs.rPackages; | | { | foobar = buildRPackage { | name = your-package-name-1.0; | src = ./.; | propagatedBuildInputs = [/* required dependencies go here */]; | }; | } The command nix-build . -A foobar would then compile it. I hope this helps, Thanks a lot; this helped, Michel ___ nix-dev mailing list nix-dev@lists.science.uu.nl http://lists.science.uu.nl/mailman/listinfo/nix-dev
Re: [Nix-dev] Developing R modules with nix
Hi Michel, In the first place I was trying the approach listed on the mailing list [1], which didn't immediately work out. what do you mean by didn't work out? What exactly didn't work? Best regards, Peter ___ nix-dev mailing list nix-dev@lists.science.uu.nl http://lists.science.uu.nl/mailman/listinfo/nix-dev
Re: [Nix-dev] a lot of staging changes from me, shout if I broke something! :)
On Sun, Sep 14, 2014 at 10:25:51PM +0100, Mateusz Kowalczyk wrote: On 09/14/2014 09:37 PM, Gergely Risko wrote: Hello, I've pushed some stdenv changes to staging. [snip] - having a glibc that actually includes libgcc_s.so, making pthread_cancel work without package specific hacks. Cool, dealing with libgcc_s.so wasted too many hours of my life. Very good idea :) ___ nix-dev mailing list nix-dev@lists.science.uu.nl http://lists.science.uu.nl/mailman/listinfo/nix-dev
Re: [Nix-dev] Developing R modules with nix
Hi Peter, what do you mean by didn't work out? What exactly didn't work? I guess I mixed up my config; I already had John's *ToolsEnv-pattern for haskell in my config: { pkgs }: { packageOverrides = self: with pkgs; rec { haskellToolsEnv = pkgs.buildEnv { name = haskellTools; paths = with haskellPackages; [ ghc cabalInstall_1_20_0_3 ghcMod_5_0_1_2 hlint hasktags cabal2nix stylishHaskell pandoc hindent ghcServer ]; }; rWrapper = pkgs.rWrapper.override { packages = with pkgs.rPackages; [ Defaults data_table ]; }; }; } Then using `rWrapper` lead to error: infinite recursion encountered (use ‘--show-trace’ to show detailed location information) Greetings, Michel ___ nix-dev mailing list nix-dev@lists.science.uu.nl http://lists.science.uu.nl/mailman/listinfo/nix-dev
Re: [Nix-dev] Developing R modules with nix
Hi Michel, packageOverrides = self: with pkgs; rec { rWrapper = pkgs.rWrapper.override { packages = with pkgs.rPackages; [ Defaults data_table ]; }; } if you write that code like so instead: packageOverrides = super: let self = super.pkgs; in { rWrapper = super.rWrapper.override { packages = with self.rPackages; [ Defaults data_table ]; }; }; then it should work just fine. 'super' refers to the package set before the overrides are applied and 'self' is the package set after the overrides have been applied. This distinction is important, because an override like rWrapper = self.rWrapper.override { ...} tries to replace itself with its value after having replaced itself with its value after having replaced itself ... a.k.a. infinite recursion. :-) Best regards, Peter ___ nix-dev mailing list nix-dev@lists.science.uu.nl http://lists.science.uu.nl/mailman/listinfo/nix-dev
[Nix-dev] chromium widevine CDM
Hi all, Recently, netflix enabled support for the chrome browser, running on linux. This means it should now be possible to watch netflix without silverlight in pure HTML5 video. This became possible because w3c's controversial EME (encrypted media extensions) which enables netflix to enforce DRM schemes. Chrome 37 and higher have full support for EME, but EME is only an interface which plugs into the actual DRM component. The key component for this scheme is called widevine CDM, which is also used by youtube for some content. It turns out that the widevine technology was acquired by google and also used for android and chromeOS video streaming. This CDM component is part of the official chrome distribution, but from googling a bit I found it should have been part of chromium by default as well now. I checked our stable, beta and dev releases, but chrome://components does not show it. I suspect we need to (optionally) enable extra flags during building, but I'm not familiar with the build process. Can someone please give me some pointers? it appears there is a third_party/widevine/cdm/widevine_cdm.gyp file in our sources, so that should probably be included somehow. Thanks, Mathijs ___ nix-dev mailing list nix-dev@lists.science.uu.nl http://lists.science.uu.nl/mailman/listinfo/nix-dev
Re: [Nix-dev] chromium widevine CDM
Circumstantial evidence : my netflix started working lots better on Mac, because it switched to HTML5 playing. I indeed have the widevine plugin now. Wout. On Sep 15, 2014 3:36 PM, Mathijs Kwik math...@bluescreen303.nl wrote: Hi all, Recently, netflix enabled support for the chrome browser, running on linux. This means it should now be possible to watch netflix without silverlight in pure HTML5 video. This became possible because w3c's controversial EME (encrypted media extensions) which enables netflix to enforce DRM schemes. Chrome 37 and higher have full support for EME, but EME is only an interface which plugs into the actual DRM component. The key component for this scheme is called widevine CDM, which is also used by youtube for some content. It turns out that the widevine technology was acquired by google and also used for android and chromeOS video streaming. This CDM component is part of the official chrome distribution, but from googling a bit I found it should have been part of chromium by default as well now. I checked our stable, beta and dev releases, but chrome://components does not show it. I suspect we need to (optionally) enable extra flags during building, but I'm not familiar with the build process. Can someone please give me some pointers? it appears there is a third_party/widevine/cdm/widevine_cdm.gyp file in our sources, so that should probably be included somehow. Thanks, Mathijs ___ nix-dev mailing list nix-dev@lists.science.uu.nl http://lists.science.uu.nl/mailman/listinfo/nix-dev ___ nix-dev mailing list nix-dev@lists.science.uu.nl http://lists.science.uu.nl/mailman/listinfo/nix-dev
[Nix-dev] Add /var/setuid-wrappers to $PATH for systemd service
Hi all, How does one put /var/setuid-wrappers first in $PATH for a systemd service? The option systemd.services.name.path adds /bin and /sbin to the given paths, so it cannot be used. Another possibility could be using systemd.services.name.environment.PATH. But I failed to make it work: 1. systemd.services.jenkins.environment.PATH = /var/setuid-wrappers; 2. systemd.services.jenkins.environment = pkgs.lib.mkForce { PATH = /var/setuid-wrappers; }; 1) is completely ignored (nixos module wins over configuration.nix) and 2) sort-of works...but now I have to rebuild the full PATH manually (not a good idea!) What I really want is for the value from configuration.nix to be merged (preferrably in front) of the value(s) from nixos modules. Any suggestions? Best regards, Bjørn Forsman ___ nix-dev mailing list nix-dev@lists.science.uu.nl http://lists.science.uu.nl/mailman/listinfo/nix-dev
Re: [Nix-dev] Add /var/setuid-wrappers to $PATH for systemd service
Try systemd.services.jenkins.path = [ /var/setuid-wrappers ]; On Mon, Sep 15, 2014 at 7:44 PM, Bjørn Forsman bjorn.fors...@gmail.com wrote: Hi all, How does one put /var/setuid-wrappers first in $PATH for a systemd service? The option systemd.services.name.path adds /bin and /sbin to the given paths, so it cannot be used. Another possibility could be using systemd.services.name.environment.PATH. But I failed to make it work: 1. systemd.services.jenkins.environment.PATH = /var/setuid-wrappers; 2. systemd.services.jenkins.environment = pkgs.lib.mkForce { PATH = /var/setuid-wrappers; }; 1) is completely ignored (nixos module wins over configuration.nix) and 2) sort-of works...but now I have to rebuild the full PATH manually (not a good idea!) What I really want is for the value from configuration.nix to be merged (preferrably in front) of the value(s) from nixos modules. Any suggestions? Best regards, Bjørn Forsman ___ nix-dev mailing list nix-dev@lists.science.uu.nl http://lists.science.uu.nl/mailman/listinfo/nix-dev -- www.debian.org - The Universal Operating System ___ nix-dev mailing list nix-dev@lists.science.uu.nl http://lists.science.uu.nl/mailman/listinfo/nix-dev
Re: [Nix-dev] Need help with virtualenv and python2.6
Any update on this topic? Same traceback occurs with vanilla virtualenv (and not virtualenvwrapper). -- Jascha Geerds j...@ekby.de ___ nix-dev mailing list nix-dev@lists.science.uu.nl http://lists.science.uu.nl/mailman/listinfo/nix-dev
Re: [Nix-dev] Need help with virtualenv and python2.6
Hi Jascha, I wonder how you have python2.7 stuff in the traceback. It seems to work fine for me: $ nix-shell -p python26Packages.virtualenv -p python26 [nix-shell:~]$ virtualenv --python=python2.6 venv2.6test/ Already using interpreter /nix/store/awjf2yn2gfsg0ai9klnpa29a1yx0g8wa-python-2.6.9/bin/python2.6 New python executable in venv2.6test/bin/python2.6 Also creating executable in venv2.6test/bin/python Installing setuptools, pip...done. [nix-shell:~]$ venv2.6test/bin/python Python 2.6.9 (unknown, Aug 12 2014, 14:10:05) [GCC 4.8.3] on linux3 Type help, copyright, credits or license for more information. On Tue, Sep 16, 2014 at 12:02 AM, Jascha Geerds j...@ekby.de wrote: Any update on this topic? Same traceback occurs with vanilla virtualenv (and not virtualenvwrapper). -- Jascha Geerds j...@ekby.de ___ nix-dev mailing list nix-dev@lists.science.uu.nl http://lists.science.uu.nl/mailman/listinfo/nix-dev -- NixOS: The Purely Functional Linux Distribution http://nixos.org ___ nix-dev mailing list nix-dev@lists.science.uu.nl http://lists.science.uu.nl/mailman/listinfo/nix-dev
Re: [Nix-dev] Need help with virtualenv and python2.6
On Tue, Sep 16, 2014 at 12:23 AM, Cillian de Róiste cillian.deroi...@gmail.com wrote: Hi Jascha, I wonder how you have python2.7 stuff in the traceback. It seems to work fine for me: $ nix-shell -p python26Packages.virtualenv -p python26 [nix-shell:~]$ virtualenv --python=python2.6 venv2.6test/ Already using interpreter /nix/store/awjf2yn2gfsg0ai9klnpa29a1yx0g8wa-python-2.6.9/bin/python2.6 New python executable in venv2.6test/bin/python2.6 Also creating executable in venv2.6test/bin/python Installing setuptools, pip...done. [nix-shell:~]$ venv2.6test/bin/python Python 2.6.9 (unknown, Aug 12 2014, 14:10:05) [GCC 4.8.3] on linux3 Type help, copyright, credits or license for more information. Also, when I run nix-shell as in your example: $ nix-shell -p pythonPackages.virtualenvwrapper -p python26 -p python27Packages.pip [nix-shell:~]$ virtualenv --python=python2.6 venv2.6test2 Running virtualenv with interpreter /nix/store/awjf2yn2gfsg0ai9klnpa29a1yx0g8wa-python-2.6.9/bin/python2.6 New python executable in venv2.6test2/bin/python2.6 Also creating executable in venv2.6test2/bin/python Installing setuptools, pip...done. [nix-shell:~]$ venv2.6test2/bin/python Python 2.6.9 (unknown, Aug 12 2014, 14:10:05) [GCC 4.8.3] on linux3 Type help, copyright, credits or license for more information. On Tue, Sep 16, 2014 at 12:02 AM, Jascha Geerds j...@ekby.de wrote: Any update on this topic? Same traceback occurs with vanilla virtualenv (and not virtualenvwrapper). -- Jascha Geerds j...@ekby.de ___ nix-dev mailing list nix-dev@lists.science.uu.nl http://lists.science.uu.nl/mailman/listinfo/nix-dev -- NixOS: The Purely Functional Linux Distribution http://nixos.org -- NixOS: The Purely Functional Linux Distribution http://nixos.org ___ nix-dev mailing list nix-dev@lists.science.uu.nl http://lists.science.uu.nl/mailman/listinfo/nix-dev
Re: [Nix-dev] Need help with virtualenv and python2.6
ah, I've always created an environment with python27Packages.virtualenv (and not 2.6). I think this is a very stupid mistake by me... :-) -- Jascha Geerds j...@ekby.de ___ nix-dev mailing list nix-dev@lists.science.uu.nl http://lists.science.uu.nl/mailman/listinfo/nix-dev
[Nix-dev] [nix-dev] Re: Developing R modules with nix
if you write that code like so instead: packageOverrides = super: let self = super.pkgs; in { rWrapper = super.rWrapper.override { packages = with self.rPackages; [ Defaults data_table ]; }; }; then it should work just fine. 'super' refers to the package set before the overrides are applied and 'self' is the package set after the overrides have been applied. This distinction is important, because an override like rWrapper = self.rWrapper.override { ...} tries to replace itself with its value after having replaced itself with its value after having replaced itself ... a.k.a. infinite recursion. :-) Thanks Peter for clarification; is this the preferred way to declare user-packages? Could you argue about benefits or drawbacks of the *Wrapper vs *ToolsEnv approach? -Michel ___ nix-dev mailing list nix-dev@lists.science.uu.nl http://lists.science.uu.nl/mailman/listinfo/nix-dev