[Nix-commits] [NixOS/nixpkgs] fb4a53: saga: 2.2.2 -> 2.3.1
Branch: refs/heads/master Home: https://github.com/NixOS/nixpkgs Commit: fb4a53b1c14def4490a9e8af559e432008f3 https://github.com/NixOS/nixpkgs/commit/fb4a53b1c14def4490a9e8af559e432008f3 Author: Michel Kuhlmann Date: 2016-07-21 (Thu, 21 Jul 2016) Changed paths: M pkgs/applications/gis/saga/default.nix Log Message: --- saga: 2.2.2 -> 2.3.1 ___ nix-commits mailing list nix-comm...@lists.science.uu.nl http://lists.science.uu.nl/mailman/listinfo/nix-commits
[Nix-dev] Documenting the R language (was: Using R with Bioconductor)
Hi, I started to write something up [1], which needs to be extended. There was also a discussion [2], if we should use a README and splice it into the documentation with pandoc. Indeed, a section on how to handle personal packages would be great. Greetings, Michel [1]: https://github.com/michelk/nixpkgs/blob/a0b93d7959bc1fba65aa08d8cc8d03f78e44da09/pkgs/development/r-modules/README.md [2]: https://github.com/NixOS/nixpkgs/pull/8154 ___ nix-dev mailing list nix-dev@lists.science.uu.nl http://lists.science.uu.nl/mailman/listinfo/nix-dev
[Nix-dev] Adding documentation to nixpkgs
Hi, I just wanted to update the R-CRAN-packages and I always forget how to check if the resulting expression could be evaluated. Therefor I created a basic README.md [1] directly within nixpkgs. So is this desirable or do you think this clutters up the source-tree? Greetings, Michel P.S.: For me, the wiki is not really accessible (I like to work offline in the train) and despite of that I don't like to write in mediawiki markup. [1]: https://raw.githubusercontent.com/michelk/nixpkgs/r-modules/update/pkgs/development/r-modules/README.md ___ nix-dev mailing list nix-dev@lists.science.uu.nl http://lists.science.uu.nl/mailman/listinfo/nix-dev
[Nix-dev] QGIS: Mismatch between compiled and running libpng
Hi, I'm just trying to update QGIS to version 2.6 [1]. I have two issues, when running the compiled executable: -libpng warning: Application was compiled with png.h from libpng-1.6.13 Application is running with png.c from libpng-1.2.50 error: Incompatible libpng version in application and library - an error: python ImportError: No module named _sysconfigdata_nd The first issue is also present in the current version. Could anyone assist? Thanks, Michel [1]: https://github.com/michelk/nixpkgs/commit/2097a72f8e6ed3f4ef2f16bd09f2643b61285975 ___ 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
Thanks Peter for the very helpful answers. I have some follow-up questions: - Is it possible to make the package-executables available in the search-PATH, when installing with `nix`? For example me, I put the executables which are based on the package-library into the `exec`-folder (see 1.1.5 [1]). My scripts usually use `#!/usr/bin/env Rscript`; I guess this would have to be patched. [1]: http://cran.r-project.org/doc/manuals/R-exts.html - Workflow for developing personal R-package projects. In Haskell I've seen the following pattern: /projects/foobar/shell.nix let pkgs = import {}; haskellPackages = pkgs.haskellPackages.override { extension = self: super: { foobar = self.callPackage ./. {}; }; }; in pkgs.lib.overrideDerivation haskellPackages.foobar(attrs: { buildInputs = [ haskellPackages.cabalInstall ] ++ attrs.buildInputs; }) /projects/foobar/default.nix { cabal, text, attoparsec }: cabal.mkDerivation (self: { pname = "foobar"; src = ./.; version = "1.0"; buildDepends = [ text attoparsec ]; }) $HOME/.nixpkgs/config.nix haskellProjects = { self, super, callPackage }: rec { foobar = callPackage /projects/foobar {}; }; haskellPackages_wrapper = hp: self.recurseIntoAttrs (hp.override { extension = this: super: haskellProjects { self = this; super = super; callPackage = self.lib.callPackageWith this; }; }); haskellPackages_ghc783 = haskellPackages_wrapper (recurseIntoAttrs haskell.packages_ghc783.noProfiling); Then I could install foobar with nix-env -iA nixpkgs.haskellPackages.foobar Could you give me a hint how to accomplish an analog behavior for my personal R-packages? Thanks, Michel ___ 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
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 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 {}; > | buildRPackage = import > 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
[Nix-dev] Developing R modules with nix
Hi, I have two issues related to using R with nix: - Fixing the CRAN-mirror - a `default.nix`-file for an R-package. Fixing the CRAN-mirror -- 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` Could I somehow fix the CRAN-mirror to use eg. with `cranMirror = "http://stat.ethz.ch/CRAN/src/contrib/"` default.nix --- I'm looking for an example default.nix file, which I can put into my R-package directory; could someone suggest me a common workflow for developing the R-package? Thanks, Michel ___ nix-dev mailing list nix-dev@lists.science.uu.nl http://lists.science.uu.nl/mailman/listinfo/nix-dev