[Nix-dev] Installing manpages
Hi! Is there a possibility to install manpages for all packages I have in NixOS. Possibly, a combinator which would convert a list of `with pkgs; [foo bar]` to `with pkgs; [foo foo.man bar bar.man]` with checks of .man existing ? Regards, Sergey PS Sorry If I am missing the topic in documentation ___ nix-dev mailing list nix-dev@lists.science.uu.nl https://mailman.science.uu.nl/mailman/listinfo/nix-dev
Re: [Nix-dev] NixOS and nix 1.12
Where can I read more about new features of nix-1.12 ? Regards, Sergey 2017-04-25 11:26 GMT+03:00 zimbatm : > At some point but there is no timeline yet. We don't even have a list of > regressions to fix before release yet. > > > On Thu, 13 Apr 2017, 15:12 Volth, wrote: >> >> Hi >> >> Is nix-1.12 going to replace traditional nix command line utilities on >> NixOS ? >> If yes, when it is going to happen, approximately? >> With NixOS-17.09, 18.03 or later? >> ___ >> nix-dev mailing list >> nix-dev@lists.science.uu.nl >> https://mailman.science.uu.nl/mailman/listinfo/nix-dev > > > ___ > nix-dev mailing list > nix-dev@lists.science.uu.nl > https://mailman.science.uu.nl/mailman/listinfo/nix-dev > ___ nix-dev mailing list nix-dev@lists.science.uu.nl https://mailman.science.uu.nl/mailman/listinfo/nix-dev
Re: [Nix-dev] For go-wizards: Building the geth using buildGoPackage
I recently tried to upgrade the go compiler up to 1.8 by cherry-picking all related commits. The error now looks like the following: # github.com/ethereum/go-ethereum/vendor/github.com/karalabe/hid cgo-dwarf-inference:2:8: error: enumerator value for '__cgo_enum__0' is not an integer constant cgo-dwarf-inference:10:8: error: enumerator value for '__cgo_enum__7' is not an integer constant cgo-dwarf-inference:18:2: error: initializer element is not constant cgo-dwarf-inference:18:2: note: (near initialization for '__cgodebug_data[0]') cgo-dwarf-inference:25:2: error: initializer element is not constant cgo-dwarf-inference:25:2: note: (near initialization for '__cgodebug_data[7]') Upstream maintainer pointed out to https://github.com/golang/go/issues/14669 problem. I've tried adding preBuild='' export CGO_CFLAGS='-O0' ''; without success.. Regards, Sergey 2017-04-21 0:40 GMT+03:00 Profpatsch : > On 17-04-19 09:50pm, Sergey Mironov wrote: >> building the geth > > I had a short fear of sentinent AI robots, but it’s (just?) > a go package. > >> # github.com/ethereum/go-ethereum/vendor/github.com/karalabe/hid >> go/src/github.com/ethereum/go-ethereum/vendor/github.com/karalabe/hid/wchar.go:44:8: >> error: enumerator value for '__cgo_enum__0' is not an integer constant >>return stringToWchar4(s) // Unix >> ^ > > That’s normal go compile errors. > Are you using a very old version of the go compiler? > > Have you tried building it on unstable/master? > You can check out nixpkgs with git > and run `nix-build -A ` from there. > > -- > Proudly written in Mutt with Vim on NixOS. > Q: Why is this email five sentences or less? > A: http://five.sentenc.es > May take up to five days to read your message. If it’s urgent, call me. ___ nix-dev mailing list nix-dev@lists.science.uu.nl https://mailman.science.uu.nl/mailman/listinfo/nix-dev
[Nix-dev] For go-wizards: Building the geth using buildGoPackage
Hi. I'm trying to build the latest version of the geth package. Unfortunately, the current (v1.3.0) expression doesn't work anymore, so I tried to use the buildGoPackage function. The build process starts but the compiler issues errors listed below, all regarding github.com/karalade/hid dependency. I'm not a Go expert so may miss some vital knowledge. Could you please recommend me a possible next move regarding the problem? Maybe changing Go compiler or specifying some build flags? Note, I'm using quite old version of nixpkgs so may miss some newer fix. Regards, Sergey # github.com/ethereum/go-ethereum/vendor/github.com/karalabe/hid go/src/github.com/ethereum/go-ethereum/vendor/github.com/karalabe/hid/wchar.go:44:8: error: enumerator value for '__cgo_enum__0' is not an integer constant return stringToWchar4(s) // Unix ^ go/src/github.com/ethereum/go-ethereum/vendor/github.com/karalabe/hid/wchar.go:52:8: error: enumerator value for '__cgo_enum__7' is not an integer constant case 2: ^ go/src/github.com/ethereum/go-ethereum/vendor/github.com/karalabe/hid/wchar.go:60:2: error: initializer element is not constant go/src/github.com/ethereum/go-ethereum/vendor/github.com/karalabe/hid/wchar.go:60:2: note: (near initialization for '__cgodebug_data[0]') go/src/github.com/ethereum/go-ethereum/vendor/github.com/karalabe/hid/wchar.go:67:2: error: initializer element is not constant ___ nix-dev mailing list nix-dev@lists.science.uu.nl https://mailman.science.uu.nl/mailman/listinfo/nix-dev
Re: [Nix-dev] [Nix-Dev] Packaging a Haskell project using Stack
Hi. I've just fixed and completed the ./unstack.sh script, allowing users to generate Nix expressions for entire Haskell stack project (and its dependencies). The URL is the same https://github.com/grwlf/nixcfg/blob/unstable/ideas/unstack.sh Regards, Sergey PS Please let me know if there is another tool for this task (cabal2nix? stack itself?) 2017-01-10 13:20 GMT+03:00 Sergey Mironov : >>> I am to package Stack project which >>> >>> 1) depends on old lts-2.21 package set from stackage >>> 2) doesn't have .cabals anymore, only .yamls. >>> >>> The question is basically How to do it? >> >> Run "hpack" to generate the Cabal files. Then run "cabal2nix" to >> generate the Nix files. Add those Nix builds to Nixpkgs as explained in >> the user's manual at: >> >> >> http://nixos.org/nixpkgs/manual/#how-to-create-nix-builds-for-your-own-private-haskell-packages >> > > OK, I've managed to create a prototype nix-shell script to packaging > (not simply building) dependencies for a Stack project. Parameters are > explained in its header. > > https://github.com/grwlf/nixcfg/blob/unstable/ideas/unstack.sh > > It works by > 1) Calling stack list-dependencies > 2) Calling cabal2nix for every dependency > 3) Producing top-level all.nix expression > > The script is not for end-users yet, it doesn't produce final > expression to build the Stack project, only its dependencies. Also, > small modification of pkgs/development/haskell-modules/default.nix is > required: One should replace line `inherit mkDerivation callPackage;` > with `inherit mkDerivation callPackage callPackageWithScope;`. Thus, > callPackageWithScope function will be accessible for the script. > > Regards, > Sergey ___ nix-dev mailing list nix-dev@lists.science.uu.nl http://lists.science.uu.nl/mailman/listinfo/nix-dev
Re: [Nix-dev] [Nix-Dev] Packaging a Haskell project using Stack
>> I am to package Stack project which >> >> 1) depends on old lts-2.21 package set from stackage >> 2) doesn't have .cabals anymore, only .yamls. >> >> The question is basically How to do it? > > Run "hpack" to generate the Cabal files. Then run "cabal2nix" to > generate the Nix files. Add those Nix builds to Nixpkgs as explained in > the user's manual at: > > > http://nixos.org/nixpkgs/manual/#how-to-create-nix-builds-for-your-own-private-haskell-packages > OK, I've managed to create a prototype nix-shell script to packaging (not simply building) dependencies for a Stack project. Parameters are explained in its header. https://github.com/grwlf/nixcfg/blob/unstable/ideas/unstack.sh It works by 1) Calling stack list-dependencies 2) Calling cabal2nix for every dependency 3) Producing top-level all.nix expression The script is not for end-users yet, it doesn't produce final expression to build the Stack project, only its dependencies. Also, small modification of pkgs/development/haskell-modules/default.nix is required: One should replace line `inherit mkDerivation callPackage;` with `inherit mkDerivation callPackage callPackageWithScope;`. Thus, callPackageWithScope function will be accessible for the script. Regards, Sergey ___ nix-dev mailing list nix-dev@lists.science.uu.nl http://lists.science.uu.nl/mailman/listinfo/nix-dev
[Nix-dev] [Nix-Dev] Packaging a Haskell project using Stack
Hi. As far as I understand it correctly, https://github.com/commercialhaskell/stack/issues/2259 says that Stack mirroring in Nix is not supported anymore. Instead, per-compiler-version package sets are (re-)introduced, which are mostly Hackage-oriented. So compiling Haskell projects is still possible, as long as .cabal files are provided. Unfortunately, this is not always the case. Stack toolset seems to going in the direction of replacing .cabal entirely. Among other steps, it provides 'hpack' tool which is in fact a .yaml parser, a replacement for good old .cabals. More, it supports project hierarchies, making it possible to specify one .yaml file describing several .cabal-like projects. This approach has its benefits, so there are users who chose it instead of traditional cabal. This is exactly the case I have. I am to package Stack project which 1) depends on old lts-2.21 package set from stackage 2) doesn't have .cabals anymore, only .yamls. The question is basically How to do it? Modern nixpkgs provides `buildStackProject` function which seems to do the job, but at a closer look, it works only with nix-shell, since it doesn't prevents stack going online to grab its stuff from the Internet during build process. Could you please suggest the method of splitting the stack build process into 'online' and 'offline' parts to run the build in nix-build environment? Regards, Sergey ___ nix-dev mailing list nix-dev@lists.science.uu.nl http://lists.science.uu.nl/mailman/listinfo/nix-dev
[Nix-dev] [Nix-Dev] Problem building Haskell-lts2.21 (ghc784)
Hi. I have a problem while building Haskell packages for ghc-7.8.4. I am using the following expression: { config, pkgs, ... } : let mypkgs = a : with a ; [ cabal-install alex happy parsec optparse-applicative hasktags]; in { nixpkgs.config = { packageOverrides = pkgs: { haskell-lts221 = (pkgs.haskell.packages.lts-2_21.override { overrides = config.haskellPackageOverrides or (self: super: {}); }).ghcWithPackages mypkgs; } } lts-2.21 eventually points out to expression declared in `configuration-ghc-7.8.x.nix`. The error is as follows: [1 of 1] Compiling Main ( Setup.hs, /tmp/nix-build-hackage-security-0.5.2.2.drv-0/Main.o ) Linking Setup ... configuring configureFlags: --verbose --prefix=/nix/store/677fi9nsc7kspqfilhqz029i75pg9lr5-hackage-security-0.5.2.2 --libdir=$prefix/lib/$compiler --libsubdir=$pkgid --with-gcc=gcc --package-db=/tmp/nix-build-hackage-security-0.5.2.2.drv-0/package.conf.d --ghc-option=-optl=-Wl,-rpath=/nix/store/677fi9nsc7kspqfilhqz029i75pg9lr5-hackage-security-0.5.2.2/lib/ghc-7.8.4/hackage-security-0.5.2.2 --enable-split-objs --disable-library-profiling --disable-executable-profiling --enable-shared --enable-library-vanilla --enable-executable-dynamic --enable-tests Configuring hackage-security-0.5.2.2... Warning: The flag --disable-executable-profiling is deprecated. Please use --disable-profiling instead. Setup: Encountered missing dependencies: mtl ==2.2.*, transformers >=0.4 && <0.6 builder for ‘/nix/store/yv2zdwniyypc2fdqmmcfgqq02wqcgwkd-hackage-security-0.5.2.2.drv’ failed with exit code 1 I checked versions, and it is true: all versions of hackage-security depends on mtl-2.2.*. I've tried to change this dependency to plain `mtl` by patching the sources, but it didn't help: looks like hackage-security really does depend on mtl 2.2 and issue compiler errors on older versions. So my decision was to force NIx use older version of hackage-security itself. I think I can just modify haskell-packages.nix but there is /*DO NOT EDIT*/ header, so my question is: what is correct way of adding specific versions of Haskell packages? Why do we have both, say, 'transformers' and 'transformers_0_3_1' but only one (latest) version of many other pacakges, including hackage-security? Regards, Sergey ___ nix-dev mailing list nix-dev@lists.science.uu.nl http://lists.science.uu.nl/mailman/listinfo/nix-dev
Re: [Nix-dev] [NixDev] buildFHSUserEnv, network problems
I solved my problem (2). The solution was to add "iana_etc" package to the list of 'buildFHSUserEnv'. It creates file /etc/protocols which stack reads. > Side note about Buildroot + buildFHSUserEnv. I hit an issue with > fakeroot, which Buildroot uses near the end of the build process, due > to user namespace. Upstream bug: > > https://bugs.debian.org/cgi-bin/bugreport.cgi?bug=802612 > Bjorn, you are right, now I am hitting this issue too. Since I have not option of switching to another build system, Is there any workaround for this bug? Maybe using buildFHSChrootEnv which looks more generic? At what point do we use "unshare" ? Regards, Sergey ___ nix-dev mailing list nix-dev@lists.science.uu.nl http://lists.science.uu.nl/mailman/listinfo/nix-dev
Re: [Nix-dev] [NixDev] buildFHSUserEnv, network problems
Nikolay, I made more research on the issue. It turns out that I had two different problems: 1) "Connecting to nix.org (nix.org)|160.153.18.102|:80... failed:" - was the misconfigured http_proxy. Setting it correctly makes wget work. By nix.org I mean nixos.org. nix.org is a valid name too, site provides some content. 2) "FailedConnectionException2 "raw.githubusercontent.com" 443 True getProtocolByName: does not exist (no such protocol name: tcp)" message is actually produced by `stack` tool (Haskell package builder). This problem still exists. I think it is some corner case, related to gethostbyname() configuration. I will try to contact Stack maintainers. Thanks for quick response! Sergey 2016-09-22 12:21 GMT+03:00 Nikolay Amiantov : > Hi! > > This is a strange problem you have! I tested right now that at least in > `steam.env` networking works: > > nixpkgs git:(stable) ✗ TERM=xterm nix-shell -A steam.env > steam-chrootenv:ab@abbradarbook:~/nixpkgs$ > /run/current-system/sw/bin/curl nixos.org > > > > > > NixOS Linux > ... > > You seem to have tried "nix.org" instead of "nixos.org" which is indeed > unreachable for me -- just in case, try the latter instead. > > On 09/22/2016 12:04 PM, Sergey Mironov wrote: >> Hi! I tried to use buildFHSUserEnv to create chroot environment to >> build some tricky BuildRoot project. The function seems to do the >> Right Thing in general except for network behavior: calling wget from >> this environment returns following >> >> buildroot-env-chrootenv:smironov@ww2:~/proj/ks/kss-linux-demo$ >> LANG=C wget nix.org >> --2016-09-22 11:56:53-- http://nix.org/ >> Resolving nix.org (nix.org)... 160.153.18.102 >> Connecting to nix.org (nix.org)|160.153.18.102|:80... failed: >> Connection refused. >> >> Calling BuildRoot-powered Makefile (which requires access to the >> network) results in following error: >> >> FailedConnectionException2 "raw.githubusercontent.com" 443 True >> getProtocolByName: does not exist (no such protocol name: tcp) >> >> So I am guessing that the possible problem lies somewhere in the TCP >> stack setup. Is it a known issue? How can I turn the network on? >> >> Regards, >> Sergey >> ___ >> nix-dev mailing list >> nix-dev@lists.science.uu.nl >> http://lists.science.uu.nl/mailman/listinfo/nix-dev >> > > > -- > Nikolay. ___ nix-dev mailing list nix-dev@lists.science.uu.nl http://lists.science.uu.nl/mailman/listinfo/nix-dev
[Nix-dev] [NixDev] buildFHSUserEnv, network problems
Hi! I tried to use buildFHSUserEnv to create chroot environment to build some tricky BuildRoot project. The function seems to do the Right Thing in general except for network behavior: calling wget from this environment returns following buildroot-env-chrootenv:smironov@ww2:~/proj/ks/kss-linux-demo$ LANG=C wget nix.org --2016-09-22 11:56:53-- http://nix.org/ Resolving nix.org (nix.org)... 160.153.18.102 Connecting to nix.org (nix.org)|160.153.18.102|:80... failed: Connection refused. Calling BuildRoot-powered Makefile (which requires access to the network) results in following error: FailedConnectionException2 "raw.githubusercontent.com" 443 True getProtocolByName: does not exist (no such protocol name: tcp) So I am guessing that the possible problem lies somewhere in the TCP stack setup. Is it a known issue? How can I turn the network on? Regards, Sergey ___ nix-dev mailing list nix-dev@lists.science.uu.nl http://lists.science.uu.nl/mailman/listinfo/nix-dev
[Nix-dev] Bug(?) in derivation/hashing
Hi. I recently faced a strange behavior of nix, wiich resulted in installation of package with incorrect name. Here I'd like to describe the steps I performed. There is an compilers/urweb/default.nix expression containing the expression for building Ur/Web compiler. Originally, it contained the following header ``` stdenv.mkDerivation rec { name = "urweb-${version}"; version = "20151220"; src = fetchurl { url = "http://www.impredicative.com/ur/${name}.tgz";; sha256 = "155maalm4l1ni7az3yqs0lrgl5f2xr3pz4118ag1hnk82qldd4s5"; }; ``` As you can see, name depends on version, and src depends on name. I decided to bump a version. Since there is 20160805 version available, I wanted to 1) replace "20151220" with "20160805", 2) run `nix-env -i urweb` to see a 'Hash mismatch' error, and finaly 3) copy correct hash to she sha256 field. Surprisingly, `nix-env -i urweb` finished without errors. It reported that installation of urweb-20160805 was successful, but in fact it was old urweb-20151220 with new name. (urweb --version showed it clearly). In order to install _real_ 20160805, I had to replace sha256 with all zeroes, to force `nix-env -i urweb` to download correct source. Now what do you think about it? (Besides the fact that copying hashes from error messages is bad practice) Does nix-build really count URLs when check fixed-hash derivations? If no (AFAIK), why is it correct? Regards, Sergey ___ nix-dev mailing list nix-dev@lists.science.uu.nl http://lists.science.uu.nl/mailman/listinfo/nix-dev
[Nix-dev] infinite recursion on newer nixpkgs
Hi. I've updated my nixpkgs up to 8983df7 and faced an infinite recursion on the following peace of config: services = pkgs.lib.mkIf config.services.postgresql.enable { postgresql.initialScript = pkgs.writeText "postgreinit.sql" '' create role grwlf superuser login createdb createrole replication; ''; }; It worked with previous versions, what would you recommend me to do? Regards, Sergey ___ nix-dev mailing list nix-dev@lists.science.uu.nl http://lists.science.uu.nl/mailman/listinfo/nix-dev
Re: [Nix-dev] firefox + Nix + sha512
Let me also note, that all Hydra links are 404 on the Wiki page, which is referenced by the nix command line tools: https://nixos.org/wiki/How_to_update_when_Nix_is_too_old_to_evaluate_Nixpkgs I tried to add the advice Vladimir gave me, but my user (ierton) have no write permissions any more. Who can I ask to re-gain them? 2016-06-08 20:30 GMT+03:00 Sergey Mironov : > Thanks for the '--realize' command, it saved my day! > How should I know the right Nix hash to --realize in future? > > Regards, > Sergey > > 2016-05-22 10:45 GMT+03:00 Vladimír Čunát : >> Hi. >> >> On 05/21/2016 04:00 PM, Sergey Mironov wrote: >>> [...] Unfortunately, all the one-click-install packages are 404. >>> >>> Could you help me to understand what is happening? Which settings do >>> people normally use at the moment? >> >> I've got no idea about what people normally use. Perhaps most of them >> update more often. >> >> Instead of one-click-install, I'd use the desired path directly >> nix-store --realize /nix/store/mf9ha2d0yz599wx3aw5r0wdzyk5f8lf7-nix-1.11.2 >> (That should be possible since using binary caches.) >> >> >> I expect it isn't enough to have new nix to evaluate the expressions but >> also running as nix-daemon. Therefore, I suggest you first update your >> system without firefox, getting rid of the error and then you can >> continue normally, adding it, etc. >> >> That should be possible in revisions after util-linux using sha256 again >> https://github.com/NixOS/nixpkgs/pull/15048#issuecomment-219149502 >> >> >> --Vladimir >> >> ___ nix-dev mailing list nix-dev@lists.science.uu.nl http://lists.science.uu.nl/mailman/listinfo/nix-dev
Re: [Nix-dev] firefox + Nix + sha512
Thanks for the '--realize' command, it saved my day! How should I know the right Nix hash to --realize in future? Regards, Sergey 2016-05-22 10:45 GMT+03:00 Vladimír Čunát : > Hi. > > On 05/21/2016 04:00 PM, Sergey Mironov wrote: >> [...] Unfortunately, all the one-click-install packages are 404. >> >> Could you help me to understand what is happening? Which settings do >> people normally use at the moment? > > I've got no idea about what people normally use. Perhaps most of them > update more often. > > Instead of one-click-install, I'd use the desired path directly > nix-store --realize /nix/store/mf9ha2d0yz599wx3aw5r0wdzyk5f8lf7-nix-1.11.2 > (That should be possible since using binary caches.) > > > I expect it isn't enough to have new nix to evaluate the expressions but > also running as nix-daemon. Therefore, I suggest you first update your > system without firefox, getting rid of the error and then you can > continue normally, adding it, etc. > > That should be possible in revisions after util-linux using sha256 again > https://github.com/NixOS/nixpkgs/pull/15048#issuecomment-219149502 > > > --Vladimir > > ___ nix-dev mailing list nix-dev@lists.science.uu.nl http://lists.science.uu.nl/mailman/listinfo/nix-dev
[Nix-dev] firefox + Nix + sha512
Hi. I faced error: assertion failed at /home/grwlf/proj/nixcfg/nixpkgs/pkgs/build-support/fetchurl/default.nix:90:1 when tried to upgrade NixOS from older release to d541e0d. After examining the assert condition I decided to upgrade Nix from 1.10 to nix-1.12pre4591_c879a20. The error changed from above assert to [error: unknown hash algorithm ‘sha512’]. Looks like only firefox packages are affected (probably, because other packages still use sha256) There is a Wiki page https://nixos.org/wiki/How_to_update_when_Nix_is_too_old_to_evaluate_Nixpkgs which contains a link to Hydra report page containing the latest built of Nix. https://hydra.nixos.org/job/nixos/trunk-combined/nixpkgs.nix.x86_64-linux/latest-finished Unfortunately, all the one-click-install packages are 404. Could you help me to understand what is happening? Which settings do people normally use at the moment? Also, is there a possibility to install new Nix directly from latest nixpkgs? Regards, Sergey ___ nix-dev mailing list nix-dev@lists.science.uu.nl http://lists.science.uu.nl/mailman/listinfo/nix-dev
[Nix-dev] Etherium software status
Hi. I'd like to ask the status of expressions Etherium (a crypto-currency platform) software. Looks like their main application Mist is hosted at https://github.com/ethereum/mist. Were there any attempts to package it? Regards, Sergey ___ nix-dev mailing list nix-dev@lists.science.uu.nl http://lists.science.uu.nl/mailman/listinfo/nix-dev
Re: [Nix-dev] Why is there no way to run `nix-shell` in a chroot and without the user's .bashrc?
Hi. +1 from my side. I noticed that in nix-shell mode, Haskell setup reads global package database, so I had to write a script containing `rm -rf /run/user/1000/package.conf.d` Regards, Sergey 2016-05-16 20:20 GMT+03:00 zimbatm : > Yes, we should not load the `.bashrc` unless the nix-shell is interactive > *and* non-pure. If it's not interactive then the user doesn't need to load > his favorite environment. If it's pure then then it's causing problems > because the assumptions of available software made in the .bashrc are > usually wrong. > > I submitted a PR a long time ago regarding this issue but it never got any > traction (and probably needs a bit more work): > https://github.com/NixOS/nix/pull/605 > > > On Mon, 16 May 2016 at 15:34 Ryan Newton wrote: >> >> (I posted this question as an issue here, before realizing its more of a >> mailing list question.) >> >> I'm using the Haskell stack tool's nix integration, which launches >> everything through a nix-shell. >> >> Even running with --pure, nix-shell seems really impure compared to >> nix-build. It not only mounts directories, it sources the bashrc from the >> host system! >> >> Is there any way to lock down nix-shell more using current configuration >> options? If not, is there any plan to make nix-shell more pure? >> >> This is especially concerning because I thought that shebang lines with >> nix-shell were a great way to get reproducible scripts. But now I realize >> that those scripts are much more impure and less reproducible than I >> thought. >> >> >> Thanks, >> -Ryan >> >> >> Ryan R. Newton >> (812) 856-4205 >> Asst. Professor >> Indiana University - School of Informatics & Computing >> Lindley Hall 230H >> http://www.cs.indiana.edu/~rrnewton/ >> ___ >> 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 mailing list nix-dev@lists.science.uu.nl http://lists.science.uu.nl/mailman/listinfo/nix-dev
Re: [Nix-dev] Packaging Torch
Hello. After recent segfault I have re-designed Nix expression building Torch the machine learning framework. New build2.nix doesn't use all-in-one install script from the upstream, but builds one package after another in form of separate derivations. This way turns out to be successful, so we have a Torch which passes the segfault test from the previous letter. As a side effect, the expression contains function dealing with luarocks (they think every language should have its own package manager))). It would be nice to integrate it into nixpkgs. AFAIK top-level/lua-packages doesn't really support luarocks builds at the moment. To check it out: $ git clone https://github.com/grwlf/torch-distro --recursive $ cd torch-distro $ nix-build build2.nix -A trepl $ ./result/bin/th There are less than a half of the total number of packages. Still many things to do.. Regards, Sergey 2016-02-24 16:25 GMT+03:00 Sergey Mironov : > Unfortunately, the Torch build from > https://github.com/grwlf/torch-distro has a Segfault problem. > > $ th > th> N = 5 > > [0.s] > th> A = torch.rand(N, N) > > [0.0002s] > th> A = A*A:t() > Segmentation fault (core dumped) > > Core dump shows that it is the luajit who cause the fault. The source > of a problem is still a mystery. > Regards, > > > 2016-02-19 16:27 GMT+03:00 Sergey Mironov : >> Hi again. I come to a runnable version of Torch package. Not sure it >> works correctly, but I can see its colored command prompt. >> >> $ git clone https://github.com/grwlf/torch-distro --recursive >> $ cd torch-distro >> $ nix-build build.nix >> >> Install.log says that some optional packages (namely, iTorch) have >> failed to build. Also, the package has many Lua dependencies >> incorporated, one have to switch them to lua-packages.nix somehow. >> >> Regards, >> Sergey >> >> >> 2016-02-17 18:11 GMT+03:00 Sergey Mironov : >>> Thanks! >>> >>> I'll report the progress here :) >>> >>> 2016-02-16 22:04 GMT+03:00 Jonn Mostovoy : >>>> I just want to point out that I wanted to build a neural network engine in >>>> lua with some auxiliary dependencies and faced unpleasant problems with >>>> 'cc' >>>> binary pointing not where the author's cmake file expected to point. >>>> Didn't research, much, but if anything, I'd be interested to contribute to >>>> little things when it comes to lua packaging. >>>> >>>> On Feb 16, 2016 7:06 PM, "William Casarin" wrote: >>>>> >>>>> On Tue, Feb 16, 2016 at 5:30 AM, Sergey Mironov wrote: >>>>> > Hi, List. I'd like to use Torch (http://torch.ch/) on NixOS and it >>>>> > looks like I have to package it first. >>>>> >>>>> I was looking into this awhile back. On the lua side, some pre-reqs >>>>> would make this a lot easier: >>>>> >>>>> * luarocks2nix (https://luarocks.org/manifest.zip) >>>>> * packaging these https://github.com/torch/rocks >>>>> >>>>> This would be useful for things outside Torch as well, but looks like >>>>> a lot of work... >>>>> ___ >>>>> 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
Re: [Nix-dev] Packaging Torch
Unfortunately, the Torch build from https://github.com/grwlf/torch-distro has a Segfault problem. $ th th> N = 5 [0.s] th> A = torch.rand(N, N) [0.0002s] th> A = A*A:t() Segmentation fault (core dumped) Core dump shows that it is the luajit who cause the fault. The source of a problem is still a mystery. Regards, 2016-02-19 16:27 GMT+03:00 Sergey Mironov : > Hi again. I come to a runnable version of Torch package. Not sure it > works correctly, but I can see its colored command prompt. > > $ git clone https://github.com/grwlf/torch-distro --recursive > $ cd torch-distro > $ nix-build build.nix > > Install.log says that some optional packages (namely, iTorch) have > failed to build. Also, the package has many Lua dependencies > incorporated, one have to switch them to lua-packages.nix somehow. > > Regards, > Sergey > > > 2016-02-17 18:11 GMT+03:00 Sergey Mironov : >> Thanks! >> >> I'll report the progress here :) >> >> 2016-02-16 22:04 GMT+03:00 Jonn Mostovoy : >>> I just want to point out that I wanted to build a neural network engine in >>> lua with some auxiliary dependencies and faced unpleasant problems with 'cc' >>> binary pointing not where the author's cmake file expected to point. >>> Didn't research, much, but if anything, I'd be interested to contribute to >>> little things when it comes to lua packaging. >>> >>> On Feb 16, 2016 7:06 PM, "William Casarin" wrote: >>>> >>>> On Tue, Feb 16, 2016 at 5:30 AM, Sergey Mironov wrote: >>>> > Hi, List. I'd like to use Torch (http://torch.ch/) on NixOS and it >>>> > looks like I have to package it first. >>>> >>>> I was looking into this awhile back. On the lua side, some pre-reqs >>>> would make this a lot easier: >>>> >>>> * luarocks2nix (https://luarocks.org/manifest.zip) >>>> * packaging these https://github.com/torch/rocks >>>> >>>> This would be useful for things outside Torch as well, but looks like >>>> a lot of work... >>>> ___ >>>> 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
Re: [Nix-dev] Packaging Torch
Hi again. I come to a runnable version of Torch package. Not sure it works correctly, but I can see its colored command prompt. $ git clone https://github.com/grwlf/torch-distro --recursive $ cd torch-distro $ nix-build build.nix Install.log says that some optional packages (namely, iTorch) have failed to build. Also, the package has many Lua dependencies incorporated, one have to switch them to lua-packages.nix somehow. Regards, Sergey 2016-02-17 18:11 GMT+03:00 Sergey Mironov : > Thanks! > > I'll report the progress here :) > > 2016-02-16 22:04 GMT+03:00 Jonn Mostovoy : >> I just want to point out that I wanted to build a neural network engine in >> lua with some auxiliary dependencies and faced unpleasant problems with 'cc' >> binary pointing not where the author's cmake file expected to point. >> Didn't research, much, but if anything, I'd be interested to contribute to >> little things when it comes to lua packaging. >> >> On Feb 16, 2016 7:06 PM, "William Casarin" wrote: >>> >>> On Tue, Feb 16, 2016 at 5:30 AM, Sergey Mironov wrote: >>> > Hi, List. I'd like to use Torch (http://torch.ch/) on NixOS and it >>> > looks like I have to package it first. >>> >>> I was looking into this awhile back. On the lua side, some pre-reqs >>> would make this a lot easier: >>> >>> * luarocks2nix (https://luarocks.org/manifest.zip) >>> * packaging these https://github.com/torch/rocks >>> >>> This would be useful for things outside Torch as well, but looks like >>> a lot of work... >>> ___ >>> 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
Re: [Nix-dev] Packaging Torch
Thanks! I'll report the progress here :) 2016-02-16 22:04 GMT+03:00 Jonn Mostovoy : > I just want to point out that I wanted to build a neural network engine in > lua with some auxiliary dependencies and faced unpleasant problems with 'cc' > binary pointing not where the author's cmake file expected to point. > Didn't research, much, but if anything, I'd be interested to contribute to > little things when it comes to lua packaging. > > On Feb 16, 2016 7:06 PM, "William Casarin" wrote: >> >> On Tue, Feb 16, 2016 at 5:30 AM, Sergey Mironov wrote: >> > Hi, List. I'd like to use Torch (http://torch.ch/) on NixOS and it >> > looks like I have to package it first. >> >> I was looking into this awhile back. On the lua side, some pre-reqs >> would make this a lot easier: >> >> * luarocks2nix (https://luarocks.org/manifest.zip) >> * packaging these https://github.com/torch/rocks >> >> This would be useful for things outside Torch as well, but looks like >> a lot of work... >> ___ >> 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] Packaging Torch
Hi, List. I'd like to use Torch (http://torch.ch/) on NixOS and it looks like I have to package it first. The task is not going to be easy due to (lots of) Lua and NodeJS dependencies. Also, they require what Ubuntu guys call webkit-qt. Do we have this package? I've established a forked repo https://github.com/grwlf/torch-distro containing ./build.nix file of initial declarations (doesn't work yet) I'll be glad to receive advice/contributions from anyone. Regards, Sergey ___ nix-dev mailing list nix-dev@lists.science.uu.nl http://lists.science.uu.nl/mailman/listinfo/nix-dev
Re: [Nix-dev] An issue regarding the default parameters of a function
Thanks, It is clear. I would also vote for shorter code here. Sergey 2016-02-12 14:21 GMT+03:00 Vladimír Čunát : > Hi. > > On 02/12/2016 12:11 PM, Sergey Mironov wrote: >> I have an issue regarding the combination of two Nix features: >> default parameters ( f = {arg ? def } : ...) and arbitrary length >> parameters (f = args@{arg, ...} : ...). > > @-pattern binds exactly what was *passed* to the function. Eelco > considers that a feature IIRC. There's been a discussion about this on a > couple of nix issues on github. > > Personally, I would prefer to bind the attrmap after substituting > defaults, as that seems much more useful, but that would be a > non-compatible change to nix... > > --Vladimir > > ___ nix-dev mailing list nix-dev@lists.science.uu.nl http://lists.science.uu.nl/mailman/listinfo/nix-dev
[Nix-dev] Using Nix as a package manager (for yet another language)
Hi, List. I've just noticed a long topic regarding using NIx as a package manager for a language. Сoincidentally, I use Nix for the same purpose: I am working on packaging UrWeb libraries using Nix. Here is the combinators library I wrote [1] - https://github.com/grwlf/urweb-build/blob/master/default.nix Here is an example of package recipe script [2] - https://github.com/grwlf/urweb-soup/blob/master/build.nix Nix-build works fine as a replacement for GNU Make. But here comes an interesting question. What if I want to package a Nix-driven library for NixOS ?? I don't know how to do it at the moment. The problem is at the line 7 of [1]: I import here. Packaging this 'build-script' for NixOS means running nix-build from the builder of mkDerivation, in pure environment where we do not have NIX_PATH (am I right?). And AFAIK it is a top of an iceberg. So what do you think, how to call nix-build from the mkDerivation's build script and make it aware of the same Nixpkgs tree the top-level nix-build (which runs current mkDerivation) uses? Regards, Sergey ___ nix-dev mailing list nix-dev@lists.science.uu.nl http://lists.science.uu.nl/mailman/listinfo/nix-dev
[Nix-dev] An issue regarding the default parameters of a function
Hi. I have an issue regarding the combination of two Nix features: default parameters ( f = {arg ? def } : ...) and arbitrary length parameters (f = args@{arg, ...} : ...). It looks like they doesn't work together silently. Here is the example from my code. I'd like the function make-nk-parser to tweak some of it's arguments and pass them downstream to the makeHaskell function. In particular, I want it to add 'nk' to the list of dependencies or make it the only dependency. make-nk-parser = args@{buildDepends ? [], ...} : makeHaskell (args // { pname = "nk-parser"; buildDepends = args.buildDepends ++ [nk]; isExecutable = true; }); Unfortunately, this code doesn't work. I call make-nk-parser with empty arguments and Nix errors with "error: attribute ‘buildDepends’ missing" near the args.buildDepends. In contrast, the following workaround works: make-nk-parser = args@{...} : let buildDepends = if args ? buildDepends then args.buildDepends else []; in makeHaskell (args // { pname = "nk-parser"; buildDepends = buildDepends ++ [nk]; isExecutable = true; }); Is it a known bug or feature? Regards, Sergey ___ nix-dev mailing list nix-dev@lists.science.uu.nl http://lists.science.uu.nl/mailman/listinfo/nix-dev
Re: [Nix-dev] Link to NixOS package
Hi again. Is it possible to link also to a page with basic package description? The http://nixos.org/nixos/packages.html provides such information after I type name of package into "Search" input, but I can't extract the static link. Binary packages like http://hydra.nixos.org/job/nixos/trunk-combined/nixpkgs.urweb.x86_64-linux are IMHO rarely used and thus nix-env -iA nixos.urweb should be more informative than `nix-install-package --non-interactive --url http://hydra.nixos.org/build/4308763/nix/pkg/urweb-20120807-i686-linux.nixpkg` Regards, Sergey 2016-01-28 23:50 GMT+03:00 Sergey Mironov : > Ah, Thanks. Hydra jobsets are really tricky thing to understand. I > picked a Haskell package link from Hackage as an example and tried > http://hydra.nixos.org/job/nixpkgs/trunk/urweb. It is 4 years old, > thats why I thought there is no binary for urweb. > > 2016-01-28 23:20 GMT+03:00 Vladimír Čunát : >> On 01/28/2016 08:45 PM, Sergey Mironov wrote: >>> AFAIK, Hydra doesn't build the package I mean (urweb) >> >> It does build urweb >> http://hydra.nixos.org/job/nixos/trunk-combined/nixpkgs.urweb.x86_64-linux >> >> --Vladimir >> >> ___ nix-dev mailing list nix-dev@lists.science.uu.nl http://lists.science.uu.nl/mailman/listinfo/nix-dev
Re: [Nix-dev] Link to NixOS package
Ah, Thanks. Hydra jobsets are really tricky thing to understand. I picked a Haskell package link from Hackage as an example and tried http://hydra.nixos.org/job/nixpkgs/trunk/urweb. It is 4 years old, thats why I thought there is no binary for urweb. 2016-01-28 23:20 GMT+03:00 Vladimír Čunát : > On 01/28/2016 08:45 PM, Sergey Mironov wrote: >> AFAIK, Hydra doesn't build the package I mean (urweb) > > It does build urweb > http://hydra.nixos.org/job/nixos/trunk-combined/nixpkgs.urweb.x86_64-linux > > --Vladimir > > ___ nix-dev mailing list nix-dev@lists.science.uu.nl http://lists.science.uu.nl/mailman/listinfo/nix-dev
[Nix-dev] Link to NixOS package
Hi, Is it possible to get a link pointing to a package page on NixOS Website? AFAIK, Hydra doesn't build the package I mean (urweb) so hydra.nixos.org/job/.. is not representative in this case. The package is functioning and can be compiled locally. It would be nice to let users know that they can type `nix-env -i -A pkgs.urweb' to install it. What options do I have? Regards, Sergey ___ nix-dev mailing list nix-dev@lists.science.uu.nl http://lists.science.uu.nl/mailman/listinfo/nix-dev
Re: [Nix-dev] NixCon St. Petersburg 2016
Hi! I am very glad to read news like this. It is a good place for meeting from my point of view, since it is close to Moscow where I am from. I'll probably visit the conference and tell friends about it. Regards, Sergey 2016-01-22 0:19 GMT+03:00 stewart mackenzie : > Generally, as long as you stick with networks of good people you'll be fine. > I'm sure everyone in the LGBTQS community will have a grand time! > > St. Petersburg!? What a fine place travel destination! > > On 22 Jan 2016 03:39, "Aaron Levin" wrote: >> if any > > > ___ > 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
Re: [Nix-dev] [nix-dev] private NixOS modules
Oh, Thanks. I really should re-read the manual :) Sergey 2015-11-18 12:16 GMT+03:00 Nicolas Pierron : > Hi Sergey, > > We have a some documenation in the NixOS Manual [1] which explains how > to do that. To make it short, your configuration.nix file should have > an import attribute which is a list of additional modules that you > want to include. > So if you file configuration.nix looks something like (a), you want to > convert it to something similar to (b) > > ** (a): > { > services.openssh.enable = true = …; > … > } > > ** (b): > > { > imports = [ ./custom-service.nix ]; > services.openssh.enable = true = …; > … > } > > [1] http://nixos.org/nixos/manual/index.html#sec-modularity > > On Wed, Nov 18, 2015 at 8:14 AM, Sergey Mironov wrote: >> Nicolas, I didn't know about NIXOS_EXTRA_MODULE_PATH, thanks. >> Could you explain other possible solution in a bit more details? How >> can we include modified module list in configuration.nix? >> >> Regards, >> Sergey >> >> 2015-11-17 17:43 GMT+03:00 Nicolas Pierron : >>> Hi Sergey, >>> >>> I think you can set the NIXOS_EXTRA_MODULE_PATH [1] environment >>> variable to achieve that. >>> Otherwise, you can change your configuration.nix file to always >>> include your new module list, and to include your own real-config.nix >>> >>> [1] >>> https://github.com/NixOS/nixpkgs/blob/master/nixos/lib/eval-config.nix#L30 >>> >>> >>> On Tue, Nov 17, 2015 at 2:04 PM, Sergey Mironov wrote: >>>> Hi. I'd like to write a couple of NixOS modules which probably don't >>>> look meaningful for large audience. Normally, we keep modules in >>>> nixpkgs/nixos/modules directory and list them in module-list.nix file. >>>> In my case, I'd like to put module in a private place (which is my git >>>> repo which keeps nixpkgs as a Git submodule). Is it possible to >>>> 'include' them in the public list to make them accessible from >>>> per-system.nix files? >>>> >>>> As a result, I'd like to be able to write in configuration.nix >>>> something like the following: >>>> >>>> services.my-custom-service = { >>>> enable = true; >>>> ... >>>> } >>>> >>>> without including expression for my-custom-service in the public tree. >>>> >>>> Regards, >>>> Sergey >>>> ___ >>>> nix-dev mailing list >>>> nix-dev@lists.science.uu.nl >>>> http://lists.science.uu.nl/mailman/listinfo/nix-dev >>> >>> >>> >>> -- >>> Nicolas Pierron >>> http://www.linkedin.com/in/nicolasbpierron - http://nbp.name/ > > > > -- > Nicolas Pierron > http://www.linkedin.com/in/nicolasbpierron - http://nbp.name/ ___ nix-dev mailing list nix-dev@lists.science.uu.nl http://lists.science.uu.nl/mailman/listinfo/nix-dev
Re: [Nix-dev] Pass arguments to 'required' configs
Sorry, I just noticed that you have modified my example radically. Looks like this is the answer to my question regarding custom modules, thanks! Sergey 2015-11-18 12:11 GMT+03:00 Sergey Mironov : > Nicolas, this solution makes sense if I understand how to include > private modules to local configuration. (We are discussing this in a > separate thread). > > Regards, > Sergey > > 2015-11-17 17:55 GMT+03:00 Nicolas Pierron : >> Hi Sergey, >> >> If you are not using the proxy_port and proxy_host values for >> selecting the modules, I suggest you use the module system instead. >> This means that your previous example would become something like the >> example below. This solution is a bit more verbose, but you might be >> able to introspect these options with nixos-option command line tool >> and NixUI. >> >> // configuration.nix >> { >> require = [ >> /etc/nixos/configuration.nix >> ./include/global_bash_aliases.nix >> ]; >> >> custom.go.proxy.port = 4343; >> custom.go.proxy.host = "myproxy.local"; >> … >> } >> >> // ./include/global_bash_aliases.nix >> >> { config, pkgs, lib, ... } : >> >> with lib; >> { >> options = { >> custom.go.proxy.port = mkOption { >> default = 4242; >> example = 4343; >> type = types.uniq types.int; >> description = '' >> port number used by the goproxy shell alias command. >> ''; >> }; >> >> custom.go.proxy.host = mkOption { >> example = "example.com"; >> type = types.uniq types.str; >> description = '' >> host name used by the goproxy shell alias command. >> ''; >> }; >> }; >> >> config = { >> environment = { >> >> extraInit = with config.custom.go.proxy '' >> alias goproxy "nc ${port} ${host} >> ''; >> }; >> }; >> } >> >> >> On Tue, Nov 17, 2015 at 2:17 PM, Sergey Mironov wrote: >>> Hi. This is a follow-up to my previous letter about Private NixOS modules. >>> >>> Another thing I am missing is the ability to pass arguments to >>> 'required' configuration modules. Below is the illustration of the >>> idea. Could you please give me some advice on this? >>> >>> Regards, >>> Sergey >>> >>> >>> // configuration.nix >>> >>> {config, pkgs, ...}: >>> let >>> proxy_port = "4343"; >>> proxy_host = "myproxy.local"; >>> in >>> { >>> require = [ >>> /etc/nixos/hardware-configuration.nix >>> .. >>> (withArguments ./include/global_bash_aliases.nix { inherit >>> proxy_port proxy_host; }) >>> .. >>> ]; >>> ... >>> >>> } >>> >>> >>> //./include/global_bash_aliases.nix >>> >>> { proxy_port, proxy_host} : >>> { config, pkgs, ... } : >>> { >>> environment = rec { >>> >>> extraInit = '' >>>alias goproxy "nc ${proxy_port} ${proxy_host} >>> ''; >>> }; >>> >>> } >>> ___ >>> nix-dev mailing list >>> nix-dev@lists.science.uu.nl >>> http://lists.science.uu.nl/mailman/listinfo/nix-dev >> >> >> >> -- >> Nicolas Pierron >> http://www.linkedin.com/in/nicolasbpierron - http://nbp.name/ ___ nix-dev mailing list nix-dev@lists.science.uu.nl http://lists.science.uu.nl/mailman/listinfo/nix-dev
Re: [Nix-dev] Pass arguments to 'required' configs
Nicolas, this solution makes sense if I understand how to include private modules to local configuration. (We are discussing this in a separate thread). Regards, Sergey 2015-11-17 17:55 GMT+03:00 Nicolas Pierron : > Hi Sergey, > > If you are not using the proxy_port and proxy_host values for > selecting the modules, I suggest you use the module system instead. > This means that your previous example would become something like the > example below. This solution is a bit more verbose, but you might be > able to introspect these options with nixos-option command line tool > and NixUI. > > // configuration.nix > { > require = [ > /etc/nixos/configuration.nix > ./include/global_bash_aliases.nix > ]; > > custom.go.proxy.port = 4343; > custom.go.proxy.host = "myproxy.local"; > … > } > > // ./include/global_bash_aliases.nix > > { config, pkgs, lib, ... } : > > with lib; > { > options = { > custom.go.proxy.port = mkOption { > default = 4242; > example = 4343; > type = types.uniq types.int; > description = '' > port number used by the goproxy shell alias command. > ''; > }; > > custom.go.proxy.host = mkOption { > example = "example.com"; > type = types.uniq types.str; > description = '' > host name used by the goproxy shell alias command. > ''; > }; > }; > > config = { > environment = { > > extraInit = with config.custom.go.proxy '' > alias goproxy "nc ${port} ${host} > ''; > }; > }; > } > > > On Tue, Nov 17, 2015 at 2:17 PM, Sergey Mironov wrote: >> Hi. This is a follow-up to my previous letter about Private NixOS modules. >> >> Another thing I am missing is the ability to pass arguments to >> 'required' configuration modules. Below is the illustration of the >> idea. Could you please give me some advice on this? >> >> Regards, >> Sergey >> >> >> // configuration.nix >> >> {config, pkgs, ...}: >> let >> proxy_port = "4343"; >> proxy_host = "myproxy.local"; >> in >> { >> require = [ >> /etc/nixos/hardware-configuration.nix >> .. >> (withArguments ./include/global_bash_aliases.nix { inherit >> proxy_port proxy_host; }) >> .. >> ]; >> ... >> >> } >> >> >> //./include/global_bash_aliases.nix >> >> { proxy_port, proxy_host} : >> { config, pkgs, ... } : >> { >> environment = rec { >> >> extraInit = '' >>alias goproxy "nc ${proxy_port} ${proxy_host} >> ''; >> }; >> >> } >> ___ >> nix-dev mailing list >> nix-dev@lists.science.uu.nl >> http://lists.science.uu.nl/mailman/listinfo/nix-dev > > > > -- > Nicolas Pierron > http://www.linkedin.com/in/nicolasbpierron - http://nbp.name/ ___ nix-dev mailing list nix-dev@lists.science.uu.nl http://lists.science.uu.nl/mailman/listinfo/nix-dev
Re: [Nix-dev] [nix-dev] private NixOS modules
Nicolas, I didn't know about NIXOS_EXTRA_MODULE_PATH, thanks. Could you explain other possible solution in a bit more details? How can we include modified module list in configuration.nix? Regards, Sergey 2015-11-17 17:43 GMT+03:00 Nicolas Pierron : > Hi Sergey, > > I think you can set the NIXOS_EXTRA_MODULE_PATH [1] environment > variable to achieve that. > Otherwise, you can change your configuration.nix file to always > include your new module list, and to include your own real-config.nix > > [1] https://github.com/NixOS/nixpkgs/blob/master/nixos/lib/eval-config.nix#L30 > > > On Tue, Nov 17, 2015 at 2:04 PM, Sergey Mironov wrote: >> Hi. I'd like to write a couple of NixOS modules which probably don't >> look meaningful for large audience. Normally, we keep modules in >> nixpkgs/nixos/modules directory and list them in module-list.nix file. >> In my case, I'd like to put module in a private place (which is my git >> repo which keeps nixpkgs as a Git submodule). Is it possible to >> 'include' them in the public list to make them accessible from >> per-system.nix files? >> >> As a result, I'd like to be able to write in configuration.nix >> something like the following: >> >> services.my-custom-service = { >> enable = true; >> ... >> } >> >> without including expression for my-custom-service in the public tree. >> >> Regards, >> Sergey >> ___ >> nix-dev mailing list >> nix-dev@lists.science.uu.nl >> http://lists.science.uu.nl/mailman/listinfo/nix-dev > > > > -- > Nicolas Pierron > http://www.linkedin.com/in/nicolasbpierron - http://nbp.name/ ___ nix-dev mailing list nix-dev@lists.science.uu.nl http://lists.science.uu.nl/mailman/listinfo/nix-dev
[Nix-dev] Pass arguments to 'required' configs
Hi. This is a follow-up to my previous letter about Private NixOS modules. Another thing I am missing is the ability to pass arguments to 'required' configuration modules. Below is the illustration of the idea. Could you please give me some advice on this? Regards, Sergey // configuration.nix {config, pkgs, ...}: let proxy_port = "4343"; proxy_host = "myproxy.local"; in { require = [ /etc/nixos/hardware-configuration.nix .. (withArguments ./include/global_bash_aliases.nix { inherit proxy_port proxy_host; }) .. ]; ... } //./include/global_bash_aliases.nix { proxy_port, proxy_host} : { config, pkgs, ... } : { environment = rec { extraInit = '' alias goproxy "nc ${proxy_port} ${proxy_host} ''; }; } ___ nix-dev mailing list nix-dev@lists.science.uu.nl http://lists.science.uu.nl/mailman/listinfo/nix-dev
[Nix-dev] [nix-dev] private NixOS modules
Hi. I'd like to write a couple of NixOS modules which probably don't look meaningful for large audience. Normally, we keep modules in nixpkgs/nixos/modules directory and list them in module-list.nix file. In my case, I'd like to put module in a private place (which is my git repo which keeps nixpkgs as a Git submodule). Is it possible to 'include' them in the public list to make them accessible from per-system.nix files? As a result, I'd like to be able to write in configuration.nix something like the following: services.my-custom-service = { enable = true; ... } without including expression for my-custom-service in the public tree. Regards, Sergey ___ nix-dev mailing list nix-dev@lists.science.uu.nl http://lists.science.uu.nl/mailman/listinfo/nix-dev
[Nix-dev] Encrypted partition via loop device, syncronization
Hi, List. I have an idea of setting up a small encrypted partition for storing things like passwords, wallets etc. The additional feature I want is synchronization: I'd like to use syncthing or rsync or whatever to synchronize the encrypted binary file with the whole partition between several machines. Of cause, I know little about kernel behavior when syncing data to disk. I am afraid it is non-atomic so there is a risk of damaging partition file during synchronization. But are there any technologies which address this issue? Did anybody solve this or similar task? If so, please, drop me a related reading. Thanks in advance, Sergey ___ nix-dev mailing list nix-dev@lists.science.uu.nl http://lists.science.uu.nl/mailman/listinfo/nix-dev
Re: [Nix-dev] syncthing questions
OK, I have solved my syncthing-related problems. It turns out that I misused service.syncthing.dataDir config option. I thought it is pre-defined data directory to syncronize, but it is configuration-only directory in reality! Regards, Sergey 2015-09-21 22:28 GMT+03:00 Sergey Mironov : > 2015-09-21 14:39 GMT+03:00 zimbatm : >> Hi Sergey, >> >> Have you setup syncthing using the config.services.syncthing.enable = true >> in /etc/nixos/configuration.nix ? >> The service is creating /var/lib/syncthing by default. This is a better >> place to put the files, home folders should be private. >> >> Cheers, >> z >> >> On Mon, 21 Sep 2015 at 12:19 Sergey Mironov wrote: >>> >>> Hi, List! I have two questions regarding Syncthing synchronization >>> service. They may be not strongly related to Nix but I'd like to ask >>> here before going to the upstream's forum. >>> >>> 1) I've upgraded NixOS installations on both desktop and server >>> workstations recently. After the upgrade I noticed that syncthing IDs >>> were changed, so I had to re-setup the connection using Web-GUI. Is it >>> possible to preserve the IDs ? Or should we think about making this >>> type of configuration static by providing NixOS wrappers for >>> 'device'/'folders' options? (I am not sure if it is possible or not) >>> >>> 2) I keep my synced data in the /home/syncthing folder and I want it >>> to be of 'syncthing:users' user/group with 770 permissions. Older >>> NixOS setup seems to handle it well, but the new one seems to reset >>> the permissions to 'syncthing:root' 700 every hour. Could it be a >>> systemd new behavior or it's the syncthing who does this? >>> >>> Regards, >>> Sergey >>> ___ >>> nix-dev mailing list >>> nix-dev@lists.science.uu.nl >>> http://lists.science.uu.nl/mailman/listinfo/nix-dev > > > Zimbatm, I would have faced another kind of problems with disabled > syncthing :) Yes, I set syncthing.enable to true. Here is my config > > { config, pkgs, ... } : > { > services.syncthing.enable = true; > services.syncthing.dataDir = "/home/syncthing"; > > users.extraUsers = { > > syncthing = { > group = "users"; > home = "/home/syncthing"; > useDefaultShell = true; > }; > > }; > } > > I use /home as a storage for two reasons: 1) I run syncthing as a > separate user, I think its not bad to put it in its own home. 2) /home > is mounted on separate hard drive partition, and this partition is > large. / (root) lives in a limited amount of space, so I don't want to > garbage it with user data. > > Regards, > Sergey ___ nix-dev mailing list nix-dev@lists.science.uu.nl http://lists.science.uu.nl/mailman/listinfo/nix-dev
[Nix-dev] syncthing questions
Hi, List! I have two questions regarding Syncthing synchronization service. They may be not strongly related to Nix but I'd like to ask here before going to the upstream's forum. 1) I've upgraded NixOS installations on both desktop and server workstations recently. After the upgrade I noticed that syncthing IDs were changed, so I had to re-setup the connection using Web-GUI. Is it possible to preserve the IDs ? Or should we think about making this type of configuration static by providing NixOS wrappers for 'device'/'folders' options? (I am not sure if it is possible or not) 2) I keep my synced data in the /home/syncthing folder and I want it to be of 'syncthing:users' user/group with 770 permissions. Older NixOS setup seems to handle it well, but the new one seems to reset the permissions to 'syncthing:root' 700 every hour. Could it be a systemd new behavior or it's the syncthing who does this? Regards, Sergey ___ nix-dev mailing list nix-dev@lists.science.uu.nl http://lists.science.uu.nl/mailman/listinfo/nix-dev
Re: [Nix-dev] Haskell: Stackage and Nix
Hi! I am also interested in handling Stackage packages with NixOS. I personally think that NixOS itself does all the things Stackage do and more. Unfortunately, I am to build several existing projects which use Stackage and not Nix. Nikita, are you going to patch Stack with patchelf or construct a chroot env instead? Regards, Sergey 2015-07-14 1:57 GMT+03:00 Nikita Karetnikov : > Is there a way to build packages from Stackage? It'd be cool to have a > separate namespace for that, so I could refer to a package as > stackagePackages.something. > > That's the only relevant post I've found: > http://article.gmane.org/gmane.linux.distributions.nixos/15724 > > But it seems to require a lot of work. > > For the record, I'm aware of Stack and trying it now, but it's also not > pleasant because you have to manage non-Haskell libs yourself. > > ___ > 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
Re: [Nix-dev] Nix expression for OpenModelica
New instance of OpenModelica pull request is here. This one has some environment fixes included which make it possible to actually run the simulation. https://github.com/NixOS/nixpkgs/pull/8949 2015-07-21 14:39 GMT+03:00 Sergey Mironov : > I agree, adding OM expression to nixpkgs is the preferred way. The > reason I started with standalone expression is the complexity of OM > building scenario. The major problem arises from the fact, that > Makefile calls GIT and SVN to fetch additional sources (more than 70 > libraries are fetched this way!). Standalone expression allowed me to > debug the generic build process with nix-shell. > > Today I finished the complete expression, the pull request is available at > https://github.com/NixOS/nixpkgs/pull/8918 > > Github already reports about Travis CI build failure. In the details > section one could find: > > Auto-merging pkgs/top-level/all-packages.nix > error: while querying the derivation named ‘pypy2.6-rainbowstream-1.2.7’: > while evaluating the attribute ‘postPatch’ of the derivation > ‘pypy2.6-rainbowstream-1.2.7’ at > /home/travis/.nox/nixpkgs/pkgs/development/python-modules/generic/default.nix:65:3: > attribute ‘sitePackages’ missing, at > /home/travis/.nox/nixpkgs/pkgs/top-level/python-packages.nix:7515:19 > > What does Travis try to make? What can I do to fix it? > > Regards, > Sergey > > > > 2015-06-18 15:28 GMT+03:00 Rok Garbas : >> Quoting Sergey Mironov (2015-06-14 00:38:05) >>> Hi! I've started to write Nix expression for building OpenModelica >>> (https://openmodelica.org/index.php) the open source simulation >>> environment. Currently, I have several 'standalone' nix expressions located >>> at >>> https://github.com/grwlf/nixcfg/tree/openmodelica/src/pkgs/OpenModelica >>> >>> At the moment, builder is able to pass configuration stage, but >>> it runs out of memory somewhere in the middle of compilation: >>> OpenModelica is a big thing, but my machine is not. If anyone has >>> interest in building the tool, you are welcome to join the initiative! >>> >> >> i would suggest you open a pull request against github.com/NixOS/nixpkgs so >> that others can test it easier. >> >> >> -- >> Rok Garbas - http://www.garbas.si ___ nix-dev mailing list nix-dev@lists.science.uu.nl http://lists.science.uu.nl/mailman/listinfo/nix-dev
Re: [Nix-dev] Nix expression for OpenModelica
I agree, adding OM expression to nixpkgs is the preferred way. The reason I started with standalone expression is the complexity of OM building scenario. The major problem arises from the fact, that Makefile calls GIT and SVN to fetch additional sources (more than 70 libraries are fetched this way!). Standalone expression allowed me to debug the generic build process with nix-shell. Today I finished the complete expression, the pull request is available at https://github.com/NixOS/nixpkgs/pull/8918 Github already reports about Travis CI build failure. In the details section one could find: Auto-merging pkgs/top-level/all-packages.nix error: while querying the derivation named ‘pypy2.6-rainbowstream-1.2.7’: while evaluating the attribute ‘postPatch’ of the derivation ‘pypy2.6-rainbowstream-1.2.7’ at /home/travis/.nox/nixpkgs/pkgs/development/python-modules/generic/default.nix:65:3: attribute ‘sitePackages’ missing, at /home/travis/.nox/nixpkgs/pkgs/top-level/python-packages.nix:7515:19 What does Travis try to make? What can I do to fix it? Regards, Sergey 2015-06-18 15:28 GMT+03:00 Rok Garbas : > Quoting Sergey Mironov (2015-06-14 00:38:05) >> Hi! I've started to write Nix expression for building OpenModelica >> (https://openmodelica.org/index.php) the open source simulation >> environment. Currently, I have several 'standalone' nix expressions located >> at >> https://github.com/grwlf/nixcfg/tree/openmodelica/src/pkgs/OpenModelica >> >> At the moment, builder is able to pass configuration stage, but >> it runs out of memory somewhere in the middle of compilation: >> OpenModelica is a big thing, but my machine is not. If anyone has >> interest in building the tool, you are welcome to join the initiative! >> > > i would suggest you open a pull request against github.com/NixOS/nixpkgs so > that others can test it easier. > > > -- > Rok Garbas - http://www.garbas.si ___ nix-dev mailing list nix-dev@lists.science.uu.nl http://lists.science.uu.nl/mailman/listinfo/nix-dev
Re: [Nix-dev] [nix-dev] fetchsvn fails to go via proxy
Looks like I've found the key to the problem. Fetchsvn expression is not able to parse my $http_proxy var correctly. It extracts only host/port from it, while in my case username and password are also encoded. The correct implementation in my case should form the 4 fields in the .subversion/servers file generated: http-proxy-host = proxy.avp.ru http-proxy-port = 3128 http-proxy-username=Mironov_S http-proxy-password=Password The conclusion is: fetchsvn has to be updated in order to handle more common cases Regards, Sergey 2015-07-21 11:13 GMT+03:00 Sergey Mironov : > Hi! I am (forced into) using a proxy server. I have configured it as > shown at the end of the letter. In general, almost everything works. > Unfortunately, it seems that fetchsvn is not the case. I have the > following errors while trying to build the package from sources stored > in an SVN repository: > > exporting > https://svn.modelica.org/projects/Modelica_ElectricalSystems/InstantaneousSymmetricalComponents > (r7978) into > /nix/store/cfqczyh4imw9i8k7ickgaaxrvrlf4hi3-InstantaneousSymmetricalComponents-r7978 > svn: E670002: Unable to connect to a repository at URL > 'https://svn.modelica.org/projects/Modelica_ElectricalSystems/InstantaneousSymmetricalComponents' > svn: E670002: Could not resolve proxy server > 'Mironov_S:@proxy.avp.ru': Name or service not known > builder for > ‘/nix/store/96kgnmzpi2c82gp89q5mbcahzv0qmmd1-InstantaneousSymmetricalComponents-r7978.drv’ > failed with exit code 1 > cannot build derivation > ‘/nix/store/q8mhi07n5rs3rxji1x8bz2q1v4361n42-fakegit.drv’: 1 > dependencies couldn't be built > > Git and other fetchers seem to work fine, As far as I know, it is the > SVN-specific problem. What can be wrong with it? > > Regards, > Sergey > > PS > > my working proxy is configured like this: > > networking = { > hostName = "ww2"; > networkmanager.enable = true; > proxy.default = "Mironov_S:${import }@proxy.avp.ru:3128"; > }; ___ nix-dev mailing list nix-dev@lists.science.uu.nl http://lists.science.uu.nl/mailman/listinfo/nix-dev
[Nix-dev] [nix-dev] fetchsvn fails to go via proxy
Hi! I am (forced into) using a proxy server. I have configured it as shown at the end of the letter. In general, almost everything works. Unfortunately, it seems that fetchsvn is not the case. I have the following errors while trying to build the package from sources stored in an SVN repository: exporting https://svn.modelica.org/projects/Modelica_ElectricalSystems/InstantaneousSymmetricalComponents (r7978) into /nix/store/cfqczyh4imw9i8k7ickgaaxrvrlf4hi3-InstantaneousSymmetricalComponents-r7978 svn: E670002: Unable to connect to a repository at URL 'https://svn.modelica.org/projects/Modelica_ElectricalSystems/InstantaneousSymmetricalComponents' svn: E670002: Could not resolve proxy server 'Mironov_S:@proxy.avp.ru': Name or service not known builder for ‘/nix/store/96kgnmzpi2c82gp89q5mbcahzv0qmmd1-InstantaneousSymmetricalComponents-r7978.drv’ failed with exit code 1 cannot build derivation ‘/nix/store/q8mhi07n5rs3rxji1x8bz2q1v4361n42-fakegit.drv’: 1 dependencies couldn't be built Git and other fetchers seem to work fine, As far as I know, it is the SVN-specific problem. What can be wrong with it? Regards, Sergey PS my working proxy is configured like this: networking = { hostName = "ww2"; networkmanager.enable = true; proxy.default = "Mironov_S:${import }@proxy.avp.ru:3128"; }; ___ nix-dev mailing list nix-dev@lists.science.uu.nl http://lists.science.uu.nl/mailman/listinfo/nix-dev
[Nix-dev] Nix expression for OpenModelica
Hi! I've started to write Nix expression for building OpenModelica (https://openmodelica.org/index.php) the open source simulation environment. Currently, I have several 'standalone' nix expressions located at https://github.com/grwlf/nixcfg/tree/openmodelica/src/pkgs/OpenModelica At the moment, builder is able to pass configuration stage, but it runs out of memory somewhere in the middle of compilation: OpenModelica is a big thing, but my machine is not. If anyone has interest in building the tool, you are welcome to join the initiative! Regars, Sergey ___ nix-dev mailing list nix-dev@lists.science.uu.nl http://lists.science.uu.nl/mailman/listinfo/nix-dev
[Nix-dev] bluetooth status query
Hi! I'd like to buy Bluetooth keyboard and headset but I have no experience of setting them up with Linux. What is current status of bluez5, does anybody try to use it? What is the status of pulseaudioFull I saw in nixpkgs? Does it work? Regards, Sergey ___ nix-dev mailing list nix-dev@lists.science.uu.nl http://lists.science.uu.nl/mailman/listinfo/nix-dev
[Nix-dev] NetworkManager Ad-Hoc problem
Hi! I've got a trouble connecting to my mobile phone's Ad-Hoc network with NetworkManager. The log contains the following [1]. Quick googling [2] shows that it may be a WPA problem, or the driver problem. Could you please advice how to fix it? Dow we use WPA or WPA2? I forked from 96d6344b131cad5af56ecef5cef7b4fd515e1982 Regards, Sergey [1] фев 18 16:58:24 greyblade kernel: IPv6: ADDRCONF(NETDEV_UP): wlp1s0: link is not ready фев 18 16:58:23 greyblade kernel: iwlwifi :01:00.0: Radio type=0x2-0x1-0x0 фев 18 16:58:23 greyblade kernel: iwlwifi :01:00.0: L1 Enabled; Disabling L0S фев 18 16:58:23 greyblade NetworkManager[18901]: Activation (wlp1s0) failed for connection 'Nokia_N9' фев 18 16:58:23 greyblade NetworkManager[18901]: Activation (wlp1s0/wireless): Ad-Hoc network creation took too long, failing activation. (Note, the log messages order is reversed) [2] https://mail.gnome.org/archives/networkmanager-list/2014-October/msg00020.html ___ nix-dev mailing list nix-dev@lists.science.uu.nl http://lists.science.uu.nl/mailman/listinfo/nix-dev
Re: [Nix-dev] Bash completion makes bash startup awefully slow
+1 from here. I remember, in Gentoo one could select the groups of completion scripts to include into file Regards, Sergey 2015-02-14 14:54 GMT+03:00 Wout Mertens : > Err, can you quantify how slow bash starts up? > > Anyway, Marc Weber has been working on modular bash completion, see > http://permalink.gmane.org/gmane.linux.distributions.nixos/15757 > > Maybe that should be part of NixOS. > > Wout. > > On Sat Feb 14 2015 at 11:55:46 AM Matthias Beyer > wrote: >> >> Hi! >> >> On 13-02-2015 11:23:07, Wout Mertens wrote: >> > I'd start by finding out what is slow. The bash completion reads a bunch >> > of >> > files iirc, so copy the package and insert time measurements. >> >> I know, it reads the whole completion stuff, right? Maybe we should >> make this part more modular, so one can include what's required and >> exclude what's not. >> >> > >> > Also, you could upgrade to SSD for your root disk... >> > >> >> I _have_ an SSD for my root disk! And an octocore processor and 16GB >> Ram. It takes too long anyways! >> >> > Also, maybe zsh is faster? >> > >> >> Sorry, but I won't switch shell as long as there is a way to improve >> things! >> >> > On Tue Feb 10 2015 at 10:21:46 PM Matthias Beyer >> > wrote: >> > >> > > Hi, >> > > >> > > we already had this on this ML, but the question which was posted (not >> > > by me, btw) got no answer. >> > > >> > > I can't live withou bash completion. But using it makes bash awefully >> > > slow at startup. Is there a way to enhance this situation? >> > > >> > > >> > > -- >> > > Mit freundlichen Grüßen, >> > > Kind regards, >> > > Matthias Beyer >> > > >> > > Proudly sent with mutt. >> > > Happily signed with gnupg. >> > > ___ >> > > nix-dev mailing list >> > > nix-dev@lists.science.uu.nl >> > > http://lists.science.uu.nl/mailman/listinfo/nix-dev >> > > >> >> -- >> Mit freundlichen Grüßen, >> Kind regards, >> Matthias Beyer >> >> Proudly sent with mutt. >> Happily signed with gnupg. > > > ___ > 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
Re: [Nix-dev] NixOS 14.12 released
Thanks and happy new year! 2014-12-31 17:19 GMT+03:00 Luca Bruno : > Thanks a lot to everybody for the effort. Will be a great release. > > On Wed, Dec 31, 2014 at 2:13 PM, Rok Garbas wrote: >> >> Awesome news! tnx everybody. >> Domen you rock! >> >> On Wed, Dec 31, 2014 at 1:29 PM, Jascha Geerds wrote: >> > Awesome! Thanks to everyone and especially Domen. >> > >> > -- >> > Jascha Geerds >> > j...@ekby.de >> > ___ >> > nix-dev mailing list >> > nix-dev@lists.science.uu.nl >> > http://lists.science.uu.nl/mailman/listinfo/nix-dev >> >> >> >> -- >> Rok Garbas >> http://www.garbas.si >> r...@garbas.si >> ___ >> nix-dev mailing list >> nix-dev@lists.science.uu.nl >> http://lists.science.uu.nl/mailman/listinfo/nix-dev > > > > > -- > NixOS Linux > > ___ > 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
Re: [Nix-dev] NixOps, managing virtual hardware and network
2014-12-01 16:30 GMT+04:00 Wout Mertens : > You'll have to create bridged networks in Virtualbox, one for each > interface. Then you assign them to each VM. > > I'd just make an extra interface configurable and give your VMs a third > interface. The other two are used for internet access and connecting from > the host. > > To connect to a virtualbox host with nixops, just do "nixops ssh name>" > > Wout. > Hi Wout! I've finished the minimal setup I need using the design you have suggested. The modifications allow virtual machines to effectively 'monopolize' certain Host's adapters. I don't see any notable interference between Host's and Guest's networking stacks. The branch located at https://github.com/grwlf/nixops/tree/vb-bridged-interface contains the following modifications: 1) deployment.virtualbox.hostBridgedInterface - accepts host's interface name to be bridged with interface #3 of a particular virtual machine 2) deployment.virtualbox.guestBridgedMac - accepts MAC address of the guest's adapter #3. I think I should test the setup more closely before merge. For now I will be glad to receive any comments (choice of names for parameters, etc). Thanks, Sergey ___ nix-dev mailing list nix-dev@lists.science.uu.nl http://lists.science.uu.nl/mailman/listinfo/nix-dev
Re: [Nix-dev] Nix as a dotfiles manager
> 2014-12-01 13:28 GMT+03:00 Sergey Mironov : >> >> Hi. I've adopted the following compromise solution: >> 1) Add the file include/templatecfg.nix with the following contents >> { config, pkgs, ... } : >> >> { >> environment.etc."template_XResources".source = ../cfg/Xresources; >> environment.etc."template_vimrc".source = ../cfg/vimrc; >> environment.etc."template_ssh_config".source = ../cfg/ssh_config; >> >> /* note, it should be possible to define inplace config here like >> following: >> environment.etc."template_ssh_config".source = textFile "dotbla" '' >> [dotbla config contents] >> ''; >> */ >> } >> >> 2) put template configs mentioned there in the ../cfg folder >> >> 3) For every machine, add >> >> require = [ >> ... >> ./include/templatecfg.nix >> ...]; >> >> Now, every time I want to update my $HOME/.dotfiles I copy them from >> /etc/template_* files. From the other side, sometimes I want to commit >> my changed .dotfiles back into Nix repository. In this case I copy >> them from $HOME to the $HOME/proj/mynixcfg//cfg/ > > Your solution is really nice, but I want to automate it (esp the process of > deploying my env on new machine), I can copy files now and manage them by > git.. This is a tricky thing. I don't know what is your task exactly, but typically, we deploy multy-user systems and we want supply users with _default_ configs, for example, when we create their HOMEs. But after that, users begin to manage their configs at their own. Managing .dotfiles via git is one possible solution. Another solution - to include cron task to copy /etc/template* to every user's HOME every time system starts (for example). In this case you would have to re-deploy whole system (make grub menu entry and so on) every time you want to change your .bashrc. ___ nix-dev mailing list nix-dev@lists.science.uu.nl http://lists.science.uu.nl/mailman/listinfo/nix-dev
Re: [Nix-dev] NixOps, managing virtual hardware and network
Hi, Wout! > yup, NixOps fits the bill, but I'm not sure what you mean with being bound > to the host's physical adapter. > When you deploy virtualboxes with NixOps it gives the VM 2 interfaces: One > host-local and one on vboxnet0. If you want a different setup you'll have to > tweak nixops here: > https://github.com/NixOS/nixops/blob/41cf9ed862c13a4171c77e3494f9b7ca59a8adc0/nixops/backends/virtualbox.py#L363-L369 > > (if you do, make it configurable and send a PR please :-) ) Great! I've tested the NixOps and I think I'll take it:) By bounding I mean that VM should control one of my Host's interfaces, not just hide behind NAT. Currently, my Host machine has 4 unused network adapters installed, so I will be able to create up to 4 VMs featuring this option. I hope it is possible to do using VBoxManage. After deploying trivial-vbox-based setup I really found a VM with 2 interfaces: one connected to Hosts's vboxnet0, and another, set to IP of 10.0.2.15. It's not clear for me yet how to access it. > As for specifying configuration of host and vboxen in one go, NixOps doesn't > do that. It only runs virtualboxes on localhost. > You can write a systemd service that starts the nixops network if you > like... > OK, I think I'll go with just a set of virtualboxes for now. Thanks a lot, Sergey ___ nix-dev mailing list nix-dev@lists.science.uu.nl http://lists.science.uu.nl/mailman/listinfo/nix-dev
Re: [Nix-dev] Nix as a dotfiles manager
Hi. I've adopted the following compromise solution: 1) Add the file include/templatecfg.nix with the following contents { config, pkgs, ... } : { environment.etc."template_XResources".source = ../cfg/Xresources; environment.etc."template_vimrc".source = ../cfg/vimrc; environment.etc."template_ssh_config".source = ../cfg/ssh_config; /* note, it should be possible to define inplace config here like following: environment.etc."template_ssh_config".source = textFile "dotbla" '' [dotbla config contents] ''; */ } 2) put template configs mentioned there in the ../cfg folder 3) For every machine, add require = [ ... ./include/templatecfg.nix ...]; Now, every time I want to update my $HOME/.dotfiles I copy them from /etc/template_* files. From the other side, sometimes I want to commit my changed .dotfiles back into Nix repository. In this case I copy them from $HOME to the $HOME/proj/mynixcfg//cfg/ Here is the whole thing: https://github.com/grwlf/nixcfg/tree/master/src Regards, Sergey 2014-12-01 2:50 GMT+04:00 Nicolas Pierron : > Hi, > > On Sun, Nov 30, 2014 at 9:29 PM, Arseniy Seroka wrote: >> Hello! >> I want to do smth like >> `if networking.name = "foo" >> then writeFile "/home/user/.dorfile" >> else if networking.name = "bar" then ...`. > > What do you mean by networking.name, are you referring to the NixOS option? > >> But it turnes out that I have no idea how to do it. >> So the questions are: is it a good idea to use nix as a dotfiles manager? > > I do not yet know. I know I have been doing so without Nix for a > while, and as this was a requested feature, I started making NixUP [1] > (see the corresponding pull request) > >> And what is a best way to do it? > > If you are under NixOS, then you should use the activation script to > copy it to the home directory of the user. Nix is deliberately not > capable of writing out-side the Nix store, but we can create & execute > scripts which are sym-linking the files of the Nix store. > >> I thought smth like: now we are making pkgs and making symlinks to their >> executable to ls `~/.nix-profile/bin/`. >> Maybe there is a way for some derivation set the "output path" as a `~/` and >> do smth like (write it in a ~/.nixpkgs/config.nix): > > No, the ~/ is replaced while building the derivations, such as we do > not pollute user environment, and such that builds can be reproduced > when multiple users are requesting the same derivation. > >> `configs = buildConfigEnv "~/" [ >> { name = ".zshrc"; contents = ''#zshrc config'' >> } >> ]` >> If it is possible, please give me some hints or smth and I will try to >> implement it (if it is a good idea). > > The cleanest approach is what is done in NixOS for environment.etc, > and identically for user.resourceFiles in NixUP. > >> This way, IMO, we would provide a good mechanism for a dotfiles managing at >> several machines. > > > [1] https://github.com/NixOS/nixpkgs/pull/4594 > > -- > Nicolas Pierron > http://www.linkedin.com/in/nicolasbpierron - http://nbp.name/ > ___ > 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] NixOps, managing virtual hardware and network
Hi, List! Please, help me to decide what deployment tools (NixOps?) to use for the following task: I'd like to build a test server for testing a hardware NAT device. The server should be a Host machine hosting 2-4 Virtual machines. Every Virtual machine should have 2 ethernet adapters: first one should be bound to Host's physical adapter (the network traffic emulator), the second one should be connected to the internal virtual network (the management interface). The exact set of software deployed onto Virtual machines depends on particular test scenario, but it typically includes some http, ftp, voice, video broadcasting servers and clients. Does NixOps have required functionality to fit into this task? Does it allow specifying configuration for the Host and it's guest machines in one expression (I assume VirtualBox to be a virtualization container)? What about tweaking VirtualBox hardware? Should I consider looking at other deployment tools? Thanks in advance, Sergey ___ nix-dev mailing list nix-dev@lists.science.uu.nl http://lists.science.uu.nl/mailman/listinfo/nix-dev
Re: [Nix-dev] fetching tarballs recursively
Replacing --import/--export instead of --dump/--restore also leads to problems. This time, the error is $ cat dump | nix-store --import importing path `/nix/store/n69kz335c800n2b6izsjbw60rlnvp87c-binutils-2.23.1.tar.bz2' error: imported archive of `/nix/store/n69kz335c800n2b6izsjbw60rlnvp87c-binutils-2.23.1.tar.bz2' lacks a signature what kind of signature does nix-store expect? 2014-10-30 5:59 GMT+04:00 James Cook : > I don't have a concrete answer, but two things come to mind: > > - /nix/store is mounted read-only by default on NixOS, so it might not > be a permissions issue. (The nix tools do something clever every time > the want to write to it.) > > - Looking at the man page for nix-store, the --import and --export > options might make more sense than --dump and --restore, but I haven't > used any of this myself. > > James > > > On 29 October 2014 06:58, Sergey Mironov wrote: >> Hi! I have one more question regarding the topic: how to restore the >> collected tarballs back into /nix/store? I've tried to --dump them and >> later --restore , but the nix-store errored with errors like >> >> $ cat dump | nix-store --restore >> /nix/store/zwp4iadr91lbfynn61vnzs8i1fv003gj-bash42-016 >> error: creating file >> `/nix/store/zwp4iadr91lbfynn61vnzs8i1fv003gj-bash42-016': Read-only >> file system >> >> I expected nix-store to create the target path as nixbldX user, but >> looks like it is not the case. Is it expected behavior for nix-store >> --restore? >> >> Regards, >> Sergey >> >> PS >> My current nixpkgs is quite old at the moment. >> >> >> >> 2014-05-30 13:53 GMT+04:00 Wout Mertens : >>> I turned that into a wiki page with bad formatting (on phone) >>> >>> https://nixos.org/wiki/Download_all_sources >>> >>> I hope my explanation is correct. >>> >>> Wout. >>> >>> On May 30, 2014 10:59 AM, "Eelco Dolstra" >>> wrote: >>>> >>>> Hi, >>>> >>>> On 30/05/14 09:48, Sergey Mironov wrote: >>>> >>>> > Hi! I am managing an nixpkgs branch and this branch become more and >>>> > more older. There already were issues where I had to change mirror >>>> > urls because of missing sources. I'd like to store as much as possible >>>> > into local repository in order to protect myself from such situations. >>>> > Is there a way to recursively traverse nix expression tree and collect >>>> > (and fetch) all the 'src' tarballs automatically? >>>> >>>> See here: >>>> >>>> http://lists.science.uu.nl/pipermail/nix-dev/2013-January/010438.html >>>> >>>> -- >>>> Eelco Dolstra | LogicBlox, Inc. | http://nixos.org/~eelco/ >>>> ___ >>>> 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 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
Re: [Nix-dev] fetching tarballs recursively
Hi! I have one more question regarding the topic: how to restore the collected tarballs back into /nix/store? I've tried to --dump them and later --restore , but the nix-store errored with errors like $ cat dump | nix-store --restore /nix/store/zwp4iadr91lbfynn61vnzs8i1fv003gj-bash42-016 error: creating file `/nix/store/zwp4iadr91lbfynn61vnzs8i1fv003gj-bash42-016': Read-only file system I expected nix-store to create the target path as nixbldX user, but looks like it is not the case. Is it expected behavior for nix-store --restore? Regards, Sergey PS My current nixpkgs is quite old at the moment. 2014-05-30 13:53 GMT+04:00 Wout Mertens : > I turned that into a wiki page with bad formatting (on phone) > > https://nixos.org/wiki/Download_all_sources > > I hope my explanation is correct. > > Wout. > > On May 30, 2014 10:59 AM, "Eelco Dolstra" > wrote: >> >> Hi, >> >> On 30/05/14 09:48, Sergey Mironov wrote: >> >> > Hi! I am managing an nixpkgs branch and this branch become more and >> > more older. There already were issues where I had to change mirror >> > urls because of missing sources. I'd like to store as much as possible >> > into local repository in order to protect myself from such situations. >> > Is there a way to recursively traverse nix expression tree and collect >> > (and fetch) all the 'src' tarballs automatically? >> >> See here: >> >> http://lists.science.uu.nl/pipermail/nix-dev/2013-January/010438.html >> >> -- >> Eelco Dolstra | LogicBlox, Inc. | http://nixos.org/~eelco/ >> ___ >> 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 mailing list nix-dev@lists.science.uu.nl http://lists.science.uu.nl/mailman/listinfo/nix-dev
[Nix-dev] Skype drops support for ALSA
Hi, I've discovered that Skype doesn't see my audio devices any more. Investigation shows that no ALSA support exist in Skype any more so I had to install PulseAudio service to make it work again. Should we declare somehow this new dependency? Regards, Sergey ___ nix-dev mailing list nix-dev@lists.science.uu.nl http://lists.science.uu.nl/mailman/listinfo/nix-dev
Re: [Nix-dev] Moving /nix/store to another partition
Thanks! I'll try to relocate it this way. Regards, Sergey 2014-07-28 14:41 GMT+04:00 Eelco Dolstra : > Hi, > > On 28/07/14 11:54, Sergey Mironov wrote: > >> Hi, List! Looks like I've made not wise choice of locating /nix/store >> in root (/) partition on my build server. Now all 'no space left on a >> device' are my friends. Is it possible to relocate /nix/store's >> contents into /home (located on a much larger partition) without >> re-installing the entire system? In other words, I want my /nix/store >> to be a symlink pointing to /home/nix/store. Is it safe to just boot >> from the CD, move /nix/store to /home and drop the symlink ? > > /nix/store or /nix cannot be symlinks, but they can be bind mounts. So you can > boot from the CD, move /nix to /home, and add an entry like: > > fileSystems."/nix" = > { device = "/home/nix"; > fsType = "none"; > options = "bind"; > }; > > to configuration.nix. Also set the neededForBoot option on the /home > filesystem > to true, otherwise it won't be mounted in stage 1 of the boot, and the bind > mount will fail. > > You can then run nixos-install to rebuild the configuration (which shouldn't > take long since the only change was to fileSystems). > > You can probably also do this without the CD by: 1) updating configuration.nix > as above; 2) running "nixos-rebuild boot"; 3) copying /nix to /home/nix; 4) > rebooting. > > -- > Eelco Dolstra | LogicBlox, Inc. | http://nixos.org/~eelco/ > ___ > 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] Fwd: Moving /nix/store to another partition
Sorry, forgot to CC to all. -- Forwarded message -- From: Sergey Mironov Date: 2014-07-28 14:34 GMT+04:00 Subject: Re: [Nix-dev] Moving /nix/store to another partition To: Luca Bruno 2014-07-28 13:59 GMT+04:00 Luca Bruno : > On 28/07/2014 11:54, Sergey Mironov wrote: > Relocating means rebuilding everything from scratch. > The other possibility is to bind mount /home/nix/store to /nix/store. > The problem is that the nix store is needed in initrd. So the bind mount > is not easy, you may end up with the system not booting. Interestingly. I didn't think about initrd. In theory, I may try to customize the initrd script to do bind mount (I hope I have HDD driver compiled in kernel). What do you think, will it be sufficient? Should I do the bind mount once again during stage2 ? Regards, Sergey ___ nix-dev mailing list nix-dev@lists.science.uu.nl http://lists.science.uu.nl/mailman/listinfo/nix-dev
[Nix-dev] Moving /nix/store to another partition
Hi, List! Looks like I've made not wise choice of locating /nix/store in root (/) partition on my build server. Now all 'no space left on a device' are my friends. Is it possible to relocate /nix/store's contents into /home (located on a much larger partition) without re-installing the entire system? In other words, I want my /nix/store to be a symlink pointing to /home/nix/store. Is it safe to just boot from the CD, move /nix/store to /home and drop the symlink ? Is there a well-known algorithm of solving this administration task? Store symlink management is the main thing I am worrying about. Regards, Sergey PS Currently, mount | grep /dev/sda1 outputs the following: /dev/sda1 on / type ext4 (rw,relatime,data=ordered) /dev/sda1 on /nix/store type ext4 (ro,relatime,data=ordered) ___ nix-dev mailing list nix-dev@lists.science.uu.nl http://lists.science.uu.nl/mailman/listinfo/nix-dev
Re: [Nix-dev] eval or in-place expression execution
I agree, design is questionable, bu I keep automatic tests together with system being developed. Tests should know the original password so I store it as plain Nix string. But my main question relates to the fact that `import' can read the calculated path from /nix/store and `builtins.readFile' can not. Is it a bug or a feature? Maybe import also should block such attempts and I've just found an exploit? 2014-07-11 12:04 GMT+04:00 Luca Bruno : > On 11/07/2014 09:46, Sergey Mironov wrote: >> Hi. I need to do non-trivial string calculations (encrypt the password >> with openssl) which AFAIK can't be written in Nix at the moment. >> That's why I think about Nix `eval` equivalent. I wonder if it goes >> against Nix concepts or not? My implementation looks like the >> following: >> >> encryptPassword = salt: pass : let >> p = runCommand "encryptPassword" {} '' >> printf '"%s"\n' `${openssl}/bin/openssl passwd -1 -salt ${salt} >> ${pass}` > $out >> ''; >> in >> import p; # <=== (1) >> >> It works but note the `import' expression. I tried builtins.readFile >> instead of it in previous attempt but failed: Nix issued [error: >> string `... (1)' cannot refer to other paths] error. What is the >> reason of such a difference between readFile and import? > readFile is plain reading the contents of the file. import parses the > file as a nix expression. > However putting plain passwords in nix configurations is not a good > thing. It's better if you write the password already encrypted in a > file, and read it with readFile. > > Best regards > ___ > 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] eval or in-place expression execution
Hi. I need to do non-trivial string calculations (encrypt the password with openssl) which AFAIK can't be written in Nix at the moment. That's why I think about Nix `eval` equivalent. I wonder if it goes against Nix concepts or not? My implementation looks like the following: encryptPassword = salt: pass : let p = runCommand "encryptPassword" {} '' printf '"%s"\n' `${openssl}/bin/openssl passwd -1 -salt ${salt} ${pass}` > $out ''; in import p; # <=== (1) It works but note the `import' expression. I tried builtins.readFile instead of it in previous attempt but failed: Nix issued [error: string `... (1)' cannot refer to other paths] error. What is the reason of such a difference between readFile and import? Regards, Sergey ___ nix-dev mailing list nix-dev@lists.science.uu.nl http://lists.science.uu.nl/mailman/listinfo/nix-dev
Re: [Nix-dev] Compile Haskell program on nixos that works on ubuntu server
Hi! My 2 cents: I create /nix/store on standalone server and copy all the dependencies (as listed by nix-store -qR app) there in order to run NixOS application. Of cause, I use root access in order to do it. Refards, Sergey 2014-07-06 15:56 GMT+04:00 Vladimír Čunát : > On 07/05/2014 11:38 PM, Cody Goodman wrote: >> >> How would I go about packaging the libs needed to do static linking? > > > Like this, for example: https://github.com/NixOS/nixpkgs/pull/3194 > > You can cherry-pick this on top of your preferred branch by > $ curl https://github.com/NixOS/nixpkgs/pull/3194.patch | git am > > Rebuilding gmp and ghc takes some time, but I took care to avoid changing > stdenv (which does depend on gmp). > > > Vlada > > > > ___ > 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
Re: [Nix-dev] string vs path hell
Wow, Nix strings are not that simple at all. I'll now go and make my own copy of splitString with '==' replaced by 'lib.eqSttring' as you have suggested. Thanks for the explanation! Sergey 2014-06-10 13:27 GMT+04:00 Kirill Elagin : > So, here is what I found. > > Strings in nix have contexts: > https://github.com/NixOS/nix/blob/master/src/libexpr/value.hh#L45. > When you compare strings with `==`, those contexts also get compared. > > So, `lib.splitString`, obviously, uses `==` internally to compare substrings > with the separator, and since `"/"` doesn't have any context the comparison > will never yield true. > > I'm not really sure what is the proper workaround here. I guess, in your > case this might be the right thing to do: > > ~~~ > nix-repl> lib.splitString "/" a > [ "/nix/store/nn00kn1fa0154qa1szszijw825cha8ps-busybox-1.22.1/foo/bar" ] > > nix-repl> lib.splitString "/" (builtins.unsafeDiscardStringContext a) > > [ "" "nix" "store" "nn00kn1fa0154qa1szszijw825cha8ps-busybox-1.22.1" "foo" > "bar" ] > ~~~ > > Another option is changing `splitString` to use `lib.eqString` which > basically concatenates contexts before doing `==`. But I'm not sure, that > might break something. > > So, as another workaround, you can concatenate the contexts yourself: > > ~~~ > nix-repl> lib.splitString "/" a > [ "/nix/store/nn00kn1fa0154qa1szszijw825cha8ps-busybox-1.22.1/foo/bar" ] > > nix-repl> lib.splitString (lib.substring 0 0 a + "/") a > > [ "" "nix" "store" "nn00kn1fa0154qa1szszijw825cha8ps-busybox-1.22.1" "foo" > "bar" ] > ~~~ > > > -- > Кирилл Елагин > > > On Tue, Jun 10, 2014 at 1:11 PM, Kirill Elagin wrote: >> >> Going further: >> >> ~~~ >> nix-repl> a = "${pkgs.busybox}/foo/bar" >> >> nix-repl> b = >> "/nix/store/nn00kn1fa0154qa1szszijw825cha8ps-busybox-1.22.1/foo/bar" >> >> nix-repl> a >> "/nix/store/nn00kn1fa0154qa1szszijw825cha8ps-busybox-1.22.1/foo/bar" >> >> nix-repl> b >> "/nix/store/nn00kn1fa0154qa1szszijw825cha8ps-busybox-1.22.1/foo/bar" >> >> nix-repl> lib.substring 0 1 a >> "/" >> >> nix-repl> lib.substring 0 1 b >> "/" >> >> nix-repl> lib.substring 0 1 a == "/" >> false >> >> nix-repl> lib.substring 0 1 b == "/" >> true >> ~ >> >> >> -- >> Кирилл Елагин >> >> >> On Tue, Jun 10, 2014 at 1:04 PM, Kirill Elagin >> wrote: >>> >>> Oh yeah, I've managed to reproduce this: >>> >>> ~ >>> nix-repl> :l >>> Added 3863 variables. >>> >>> nix-repl> lib.splitString "/" "${pkgs.busybox}/foo/bar" >>> [ "/nix/store/nn00kn1fa0154qa1szszijw825cha8ps-busybox-1.22.1/foo/bar" ] >>> >>> nix-repl> lib.splitString "/" (toString "${pkgs.busybox}/foo/bar") >>> [ "/nix/store/nn00kn1fa0154qa1szszijw825cha8ps-busybox-1.22.1/foo/bar" ] >>> >>> nix-repl> lib.splitString "/" >>> "/nix/store/nn00kn1fa0154qa1szszijw825cha8ps-busybox-1.22.1/foo/bar" >>> [ "" "nix" "store" "nn00kn1fa0154qa1szszijw825cha8ps-busybox-1.22.1" >>> "foo" "bar" ] >>> ~ >>> >>> Total weirdness. >>> >>> >>> -- >>> Кирилл Елагин >>> >>> >>> On Tue, Jun 10, 2014 at 12:58 PM, Kirill Elagin >>> wrote: >>>> >>>> >>>> let lib = (import {}).lib; >>>> exe = { >>>> foo = "/some/path/to/foo"; >>>> bar = "/other/path/to/bar"; >>>> }; >>>> in >>>> { >>>> contents = >>>> >>>> map (v : >>>> let >>>> takeFileName = p : >>>> let fl = lib.splitString "/" p; in lib.last fl; >>>> fn = takeFileName "${v}"; >>>> dummy = takeFileName "/a/string/encoded/path/dummy"; >>>> in >>>> >>>> #builtins.trace fn >>>> #builtins.trace dummy >>>> >>
Re: [Nix-dev] string vs path hell
OK, you are right. My code snippet really works fine. So I feel I must post a part of my real code which still doesn't work for me. It is a bit long, but maybe you will be able to help me find a mistake. Here it is (below). This expression takes a set of paths to the executables (exe // setuids) and builds the initrd image. Every attribute of (exe // setuids) is either a string like [adduser = "${busybox}/sbin/adduser";] or the result of mkDerivation producing the single binary in it's $out. Note the "dummy" expression. If I uncomment "builtins.trace dummy" line, it will show me the expected result (string "dummy" for every list item). But in the same time, "builtins.trace fn" shows that fn is evaluated incorrectly. Every time it contains full Nix path ("/nix/strote/...", see example at the end of the letter) instead of the filename part. It looks like 'splitString' doesn't recognize it's argument as a string. Please, comment! Sergey -- the code ... img = makeInitrd { compressor = "${gzip}/bin/gzip --fast"; contents = with all.ipkgs; [{ symlink = "/init"; object = exe.init; } { symlink = "/bin/sh"; object = exe.shell; }] ++ map (v : let takeFileName = p : let fl = lib.splitString "/" p; in lib.last fl; fn = takeFileName "${v}"; dummy = takeFileName "/a/string/encoded/path/dummy"; in # builtins.trace fn # < see example output below # builtins.trace dummy { symlink = "/bin/${fn}"; object = v; }) (lib.attrValues (exe // setuids)); }; -- example output of "builtins.trace fn": trace: /nix/store/sx19dvnv3wi2j8pvyra8npl9vdwdbmrk-busybox-1.21.1/sbin/addgroup trace: /nix/store/sx19dvnv3wi2j8pvyra8npl9vdwdbmrk-busybox-1.21.1/sbin/adduser trace: /nix/store/sx19dvnv3wi2j8pvyra8npl9vdwdbmrk-busybox-1.21.1/bin/false trace: /nix/store/sx19dvnv3wi2j8pvyra8npl9vdwdbmrk-busybox-1.21.1/bin/true trace: /nix/store/sx19dvnv3wi2j8pvyra8npl9vdwdbmrk-busybox-1.21.1/bin/awk trace: /nix/store/sx19dvnv3wi2j8pvyra8npl9vdwdbmrk-busybox-1.21.1/bin/cat trace: /nix/store/sx19dvnv3wi2j8pvyra8npl9vdwdbmrk-busybox-1.21.1/bin/chmod trace: /nix/store/sx19dvnv3wi2j8pvyra8npl9vdwdbmrk-busybox-1.21.1/bin/chown trace: /nix/store/sx19dvnv3wi2j8pvyra8npl9vdwdbmrk-busybox-1.21.1/bin/cp trace: /nix/store/h8rs91fjivsh6wakmwmpkca31wfp38g0-msr-tools-1.3/bin/cpuid ___ nix-dev mailing list nix-dev@lists.science.uu.nl http://lists.science.uu.nl/mailman/listinfo/nix-dev
Re: [Nix-dev] string vs path hell
2014-06-09 16:34 GMT+04:00 Luca Bruno : > On 09/06/2014 14:32, Sergey Mironov wrote: >> lib.splitString "-" (toString (./some/valid/path)) > Perhaps you should split by "/" instead of "-"? Sorry, this is my copypaste mistake. I've meant another file name. The correct code is lib.splitString "/" (toString (./some/valid/path)) the problem does exist for me. ___ nix-dev mailing list nix-dev@lists.science.uu.nl http://lists.science.uu.nl/mailman/listinfo/nix-dev
[Nix-dev] string vs path hell
Hi. I've faced a path/string problem. Looks like the code lib.splitString "-" (toString (./some/valid/path)) returns [ "./some/valid/path" ] instead of [ "some" "valid" "path" ] in other words, looks like paths are treated in a some special way. Is it a known issue? Regards, Sergey ___ nix-dev mailing list nix-dev@lists.science.uu.nl http://lists.science.uu.nl/mailman/listinfo/nix-dev
[Nix-dev] fetching tarballs recursively
Hi! I am managing an nixpkgs branch and this branch become more and more older. There already were issues where I had to change mirror urls because of missing sources. I'd like to store as much as possible into local repository in order to protect myself from such situations. Is there a way to recursively traverse nix expression tree and collect (and fetch) all the 'src' tarballs automatically? Thanks in advance, Sergey PS Once I have the sources, I'll probably do something like for s in $ALL_SOURCES ; do nix-store --add $s done in order to build my tree without accessing mirrors/upstream ftps ___ nix-dev mailing list nix-dev@lists.science.uu.nl http://lists.science.uu.nl/mailman/listinfo/nix-dev
[Nix-dev] builtins.toXML vs nix-instantiate --xml
Hi! nix-instantiate's manpage says that xml schema used by --xml flag .. is the same as that used by the toXML built-in. From the other hand, simple test shows that format is different (see below). --xml adds additional attributes 'column', 'line' and 'type'. Is it a design bug? I'd like to compare such XMLs (I'm writing some auto-tests) and thus I'd be happy if both ways produce identical XML output for the same NIX expression. Regards, Sergey -- 1) builtins.toXML $ printf "`nix-instantiate --eval --strict -E 'builtins.toXML (rec { x = "foo"; y = x; })'`" " " 2) nix-instantiate --xml $ nix-instantiate --eval --xml --strict -E 'rec { x = "foo"; y = x; }' ___ nix-dev mailing list nix-dev@lists.science.uu.nl http://lists.science.uu.nl/mailman/listinfo/nix-dev
Re: [Nix-dev] xfce: 'lock screen' button
Thanks! Didn't know i3lock. It works fine. For the dm-tool, it doesn't work as expected $ dm-tool lock command does nothing and /var/log/lightdm.log contains [see below]. Could you please compare this snippet with your own? Regards, Sergey -- /var/log/lightdm.log (after dm-tool) [+1287786.07s] DEBUG: Seat: Locking [+1287786.07s] DEBUG: Seat: Creating greeter session [+1287786.07s] DEBUG: Seat: Setting XDG_SEAT=seat0 [+1287786.07s] DEBUG: Seat: Creating display server of type x [+1287786.07s] DEBUG: Seat: Starting local X display [+1287786.07s] DEBUG: Using VT 8 [+1287786.07s] DEBUG: DisplayServer x-1: Logging to /var/log/x-1.log [+1287786.07s] DEBUG: DisplayServer x-1: Writing X server authority to /run/root/:1 [+1287786.07s] DEBUG: DisplayServer x-1: Launching X Server [+1287786.07s] DEBUG: Launching process 11047: /nix/store/393nb5f1kg32f5m2z388ab2rfdny2q7d-xserver-wrapper :1 -auth /run/root/:1 -nolisten tcp vt8 -novtswitch [+1287786.07s] DEBUG: DisplayServer x-1: Waiting for ready signal from X server :1 [+1287786.08s] DEBUG: Process 11047 exited with return value 1 [+1287786.08s] DEBUG: DisplayServer x-1: X server stopped [+1287786.08s] DEBUG: Releasing VT 8 [+1287786.08s] DEBUG: DisplayServer x-1: Removing X server authority /run/root/:1 [+1287786.08s] DEBUG: Seat: Display server stopped [+1287786.08s] DEBUG: Seat: Stopping session [+1287786.08s] DEBUG: Seat: Session stopped [+1287786.08s] DEBUG: Seat: Stopping display server, no sessions require it 2014-05-16 17:32 GMT+04:00 Kirill Elagin : > Yeah, and to ask lightdm to lock your session you do `dm-tool lock`. > > > -- > Кирилл Елагин > > > On Fri, May 16, 2014 at 11:06 AM, Domen Kožar wrote: >> >> That's how I override default: >> >> $ type -P xflock4 >> /home/ielectric/bin/xflock4 >> >> $ cat /home/ielectric/bin/xflock4 >> scrot /tmp/screen_locked.png >> convert /tmp/screen_locked.png -scale 10% -scale 1000% >> /tmp/screen_locked.png >> killall -SIGUSR1 dunst >> DISPLAY=:0.0 i3lock -i /tmp/screen_locked.png --nofork -d >> killall -SIGUSR2 dunst >> >> >> >> On Fri, May 16, 2014 at 8:56 AM, Sergey Mironov wrote: >>> >>> Hi. A question to Xfce gurus: >>> >>> In my current config the 'lock screen' button performs no action. If I >>> install xscreensaver, the button will run it, but the login prompt >>> window looks a bit .. Xy. Does anybody know how to connect 'lock >>> screen' button with lightdm display manager? >>> >>> Regards, >>> Sergey >>> ___ >>> 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 mailing list nix-dev@lists.science.uu.nl http://lists.science.uu.nl/mailman/listinfo/nix-dev
[Nix-dev] xfce: 'lock screen' button
Hi. A question to Xfce gurus: In my current config the 'lock screen' button performs no action. If I install xscreensaver, the button will run it, but the login prompt window looks a bit .. Xy. Does anybody know how to connect 'lock screen' button with lightdm display manager? Regards, Sergey ___ nix-dev mailing list nix-dev@lists.science.uu.nl http://lists.science.uu.nl/mailman/listinfo/nix-dev
Re: [Nix-dev] Nix language: converting an attribute set to a list
Thanks, looks like I didn't notice this possibility! Works just how I expected. Sergey 2014-04-14 13:13 GMT+04:00 Cameron Turner : > The implementation of this would be: > > users = { > root = { name = "root"; group = groups.root; }; > ssh = { name = "ssh" ; group = groups.nogroup ; severity = 33; }; > }; > userList = (map (key: getAttr key users) (attrNames users)); > > Roughly based on some code in Disnix's lib.nix. I'm sure you could split this > out into a library function (maybe that's already been done), but there's no > need for it to be a built-in. > > Shell > > Sergey Mironov wrote: > Hi. Nix language has a built-in function builtins.listToAttrs which > converts list to the Attrs. I'm searching a way to make an opposite > thing - convert attrs to a list. Say, I'd like to convert > > users = { > root = { name = "root"; group = groups.root; }; > ssh = { name = "ssh" ; group = groups.nogroup ; severity = 33; }; > }; > > to a list like this: > > [ > { name = "root"; group = groups.root; } > { name = "ssh" ; group = groups.nogroup ; severity = 33; } > ]; > > to use it later both in shell scripting, as list > > lib.map (toList users) (u: '' > adduser ${u.name} ${u.group} > ''); > > .. and in derivations, by reference > > stdenv.mkDerivation "ssh" { > user = users.ssh; > }; > > In order to workaround the problem I have to add additional field > `list' (like below) but this way I have to duplicate field names which > is not good (easy to forget). So Is it possible to do the > transformation in a more > safe way? > > Regards, > Sergey > > # A workaround > > users = rec { > root = { name = "root"; group = groups.root; }; > ssh = { name = "ssh" ; group = groups.nogroup ; severity = 33; }; > list = [ root ssh ]; > }; > ___ > 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 mailing list nix-dev@lists.science.uu.nl http://lists.science.uu.nl/mailman/listinfo/nix-dev
[Nix-dev] Nix language: converting an attribute set to a list
Hi. Nix language has a built-in function builtins.listToAttrs which converts list to the Attrs. I'm searching a way to make an opposite thing - convert attrs to a list. Say, I'd like to convert users = { root = { name = "root"; group = groups.root; }; ssh = { name = "ssh" ; group = groups.nogroup ; severity = 33; }; }; to a list like this: [ { name = "root"; group = groups.root; } { name = "ssh" ; group = groups.nogroup ; severity = 33; } ]; to use it later both in shell scripting, as list lib.map (toList users) (u: '' adduser ${u.name} ${u.group} ''); .. and in derivations, by reference stdenv.mkDerivation "ssh" { user = users.ssh; }; In order to workaround the problem I have to add additional field `list' (like below) but this way I have to duplicate field names which is not good (easy to forget). So Is it possible to do the transformation in a more safe way? Regards, Sergey # A workaround users = rec { root = { name = "root"; group = groups.root; }; ssh = { name = "ssh" ; group = groups.nogroup ; severity = 33; }; list = [ root ssh ]; }; ___ nix-dev mailing list nix-dev@lists.science.uu.nl http://lists.science.uu.nl/mailman/listinfo/nix-dev
Re: [Nix-dev] NiJS package manager
OK, april 1st? 2014-04-01 23:11 GMT+04:00 Sergey Mironov : > Hi! Interesting project, but I mostly agree with Colin: asynchronous > programming is hard and in my opinion wouldn't become a 'killer > feature'. More, I am sure there are concepts in functional languages > which will overcome the callback-passing approach of JavaScript. I > think, Haskell's continuation monad is one of such concepts since it > allows writing code with callbacks in a plain imperative manner. > > From the other side, Nix language has some uniq features which I found > to be very strong. > > First one is recursive records which allows us to 'tie the knot' so > easily. Various `callPackage' functions use it and it is easy to > define new custom versions for different needs. > > The second one is ' ' ... ' ' (string notation sugar) with > anti-quotations. I don't know other languages supporting this thing > (Haskell is close with it's Template Haskell facilities) and I now > think it is a must have thing for a package management language. I use > this notation here and there for writing safer shell scripts and even > for in-nix C programming. The example [at the end of the letter] may > looks too complicated but it works flawlessly in Nix. In contrast, I > think JavaScript wouldn't give me enough flexibility to allow such > style. > > Regards, > Sergey > > -- > > > let > > mount = "${busybox}/bin/mount"; > > data_partition = rec { > name = "Data"; > device = "/dev/sda3"; > mountpoint = "/mnt/${name}"; > }; > > # Shell script snippet > with_mounted_partition = p: fn : '' > ${mount} ${p.mountpoint} > ( ${fn p.mountpoint} ) > ret=$? > ${umount} ${p.mountpoint} > (exit $ret) > ''; > > > # A 'safer' shell script > installation_script = writeText "install.sh" '' > #!${shell} > > #.. a larger script ... > > ${with_mounted_partition data_partition (mp: '' > cp bzImage ${mp}/kernel/bzImage > '')} > > #.. continue larger script .. > > ''; > > in > > makeIsoImage { > > buildCommand = '' > cp ${installation_script} $out > ''; > > } > > > > > > 2014-04-01 14:11 GMT+04:00 Sander van der Burg - EWI > : >> Hello Nixers, >> >> After a year of hard work, I proudly want to present you NiJS: the >> asynchronous package manager. >> >> In NiJS, you can use the more popular, innovating and future proof >> JavaScript language to specify package build specifications while still >> having most of the useful goodies that Nix has. >> >> Furthermore, because it's asynchronous and I/O events are non-blocking, it's >> also very fast and highly scalable. >> >> More info: >> >> http://sandervanderburg.blogspot.com/2014/04/asynchronous-package-management-with.html >> >> Best, >> >> Sander >> >> >> ___ >> 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
Re: [Nix-dev] NiJS package manager
Hi! Interesting project, but I mostly agree with Colin: asynchronous programming is hard and in my opinion wouldn't become a 'killer feature'. More, I am sure there are concepts in functional languages which will overcome the callback-passing approach of JavaScript. I think, Haskell's continuation monad is one of such concepts since it allows writing code with callbacks in a plain imperative manner. >From the other side, Nix language has some uniq features which I found to be very strong. First one is recursive records which allows us to 'tie the knot' so easily. Various `callPackage' functions use it and it is easy to define new custom versions for different needs. The second one is ' ' ... ' ' (string notation sugar) with anti-quotations. I don't know other languages supporting this thing (Haskell is close with it's Template Haskell facilities) and I now think it is a must have thing for a package management language. I use this notation here and there for writing safer shell scripts and even for in-nix C programming. The example [at the end of the letter] may looks too complicated but it works flawlessly in Nix. In contrast, I think JavaScript wouldn't give me enough flexibility to allow such style. Regards, Sergey -- let mount = "${busybox}/bin/mount"; data_partition = rec { name = "Data"; device = "/dev/sda3"; mountpoint = "/mnt/${name}"; }; # Shell script snippet with_mounted_partition = p: fn : '' ${mount} ${p.mountpoint} ( ${fn p.mountpoint} ) ret=$? ${umount} ${p.mountpoint} (exit $ret) ''; # A 'safer' shell script installation_script = writeText "install.sh" '' #!${shell} #.. a larger script ... ${with_mounted_partition data_partition (mp: '' cp bzImage ${mp}/kernel/bzImage '')} #.. continue larger script .. ''; in makeIsoImage { buildCommand = '' cp ${installation_script} $out ''; } 2014-04-01 14:11 GMT+04:00 Sander van der Burg - EWI : > Hello Nixers, > > After a year of hard work, I proudly want to present you NiJS: the > asynchronous package manager. > > In NiJS, you can use the more popular, innovating and future proof > JavaScript language to specify package build specifications while still > having most of the useful goodies that Nix has. > > Furthermore, because it's asynchronous and I/O events are non-blocking, it's > also very fast and highly scalable. > > More info: > > http://sandervanderburg.blogspot.com/2014/04/asynchronous-package-management-with.html > > Best, > > Sander > > > ___ > 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] Fwd: Installing wireless drivers
Probably, you have made a mistake in the configuration.nix. Here is my config which enables wicd, please re-check your layout. https://github.com/grwlf/nixpkgs/blob/local/machines/samsung-np900x3c.nix And here is another config, this time containing NetworkManager https://github.com/grwlf/nixpkgs/blob/local/machines/samsung-np900x3c-v2.nix Hope, they help. Regards, Sergey 2014-04-01 5:39 GMT+04:00 Raahul Kumar : > I have Sergey, unfortunatley nixos is saying it doesn't recognize those > options. > > error: user-thrown exception: The option `wicd' defined in > `/etc/nixos/configuration.nix' does not exist. > (use `--show-trace' to show detailed location information) > building the system configuration... > error: The option `wicd' defined in `/etc/nixos/configuration.nix' does not > exist. > > Looks like all the options have changed. So how do I setup using > NetworkMangager? > > > On Mon, Mar 31, 2014 at 9:27 PM, Sergey Mironov wrote: >> >> Hi. Have you checked this wiki? >> >> https://nixos.org/wiki/WICD >> >> By the way, NetworkManager or KDE's equivalent may be a better choice >> for managing wireless networks. Wicd worked for me too, but it looks >> abandoned by it's developers. >> >> Regards, >> Sergey >> >> >> 2014-03-31 10:10 GMT+04:00 Raahul Kumar : >> > Hi guys, >> > >> > i've recently switched to a wireless configuration. Where can I download >> > the >> > WICD and other wireless packages? I'm on 64bit nixos. And after >> > downloading, >> > how do I install them? I do have a windows laptop to download packages >> > with. >> > >> > Aloha, >> > RK. >> > >> > ___ >> > 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
Re: [Nix-dev] Installing wireless drivers
(Sorry, forgot to reply to all) Hi. Have you checked this wiki? https://nixos.org/wiki/WICD By the way, NetworkManager or KDE's equivalent may be a better choice for managing wireless networks. Wicd worked for me too, but it looks abandoned by it's developers. Regards, Sergey 2014-03-31 10:10 GMT+04:00 Raahul Kumar : > Hi guys, > > i've recently switched to a wireless configuration. Where can I download the > WICD and other wireless packages? I'm on 64bit nixos. And after downloading, > how do I install them? I do have a windows laptop to download packages with. > > Aloha, > RK. > > ___ > 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] login: Cannot make/remove an entry for the specified session
Hi. A question to PAM wizards: what may be wrong with my login setup? `login' returns the [topic] error when I start it from the console. Is this method still supported or maybe systemd denies it? I'm trying to setup the shellinaboxd server (a web console), and it uses `login' in this way to start user session. Regards, Sergey -- Sample session: (root) # login MyMachine login: grwlf Password: Cannot make/remove an entry for the specified session (root) # ___ nix-dev mailing list nix-dev@lists.science.uu.nl http://lists.science.uu.nl/mailman/listinfo/nix-dev
Re: [Nix-dev] Compiling Thunar from git
> I actually started with copying Thunar from nixpkgs, and > https://nixos.org/wiki/Howto_develop_software_on_nixos#Example_1:_Using_nix-shell_to_Initialize_a_Development_Shell > I have made a small change in Thunar source and I wanted to test it, and it > seems appropriate to do it with git HEAD. > > Sergey, I have used your .nix file, and it is still breaking make when in > nix-shell. > However, when using nix-build, it is working until the point when Thunar.1 > should be generated. I have added docbook_xsl to buildInputs, but it seems > that it is not in xml catalog. > > xsltproc -nonet > http://docbook.sourceforge.net/release/xsl/current/manpages/docbook.xsl > Thunar.xml > I/O error : Attempt to load network entity > http://docbook.sourceforge.net/release/xsl/current/manpages/docbook.xsl > > Why is it working for nix-build and not for nix-shell, and how to manage xml > catalog inside build envirioment? I've reproduced the xslt situatiuon ("upstream error" I talked about earlier was actually my machine's problem). It is a typical 'impurity' we are trying to eliminate here in NixOS. According to NixOS idea, build outputs of an expression should depend on it's build inputs only. Thunar's build system, in contrast, tries to add a new dependency - the mysterious docbook.xsl taken somewhere from the Internet. I think, the best solution will be to patch the build system, for example, provide it with pre-build man pages. I am not skilled in docbook cooking so I will not post the recipe. But probably, you don't need the docs for your task. Below is the expression which is able to build thunar without docs. It simply removes the docs/ folder from the SUBDIRS list. For the nix-shell - I don't know for sure. Looks like it still can't emulate precisely enough nix build environment. The problem lies somewhere near gcc (AFAIK NixOS uses it's own patched version) and NIX_CFLAGS_COMPILE environment variable. Regards, Sergey PS nix-shell --pure thunar.nix is in fact able to start the 'good' shell. Typing configurePhase && buildPhase from there allows me to build my expression. -- # thunar.nix let pkgs = import {}; inherit (pkgs) xfce; inherit (xfce) thunar; stdenv = pkgs.stdenv; in rec { thunarEnv = stdenv.mkDerivation rec { name = "thunar-999"; src = ./.; buildInputs = with pkgs; [ pkgconfig intltool gtk dbus_glib libstartup_notification libnotify libexif pcre udev xfce.exo xfce.libxfce4util xfce.xfconf xfce.xfce4panel xfce.xfce4_dev_tools git gtk_doc ]; configureFlags = [ "--enable-maintainer-mode" ]; preConfigure = '' sed -i '/docs/d' ./Makefile.am ./autogen.sh ''; }; } ___ nix-dev mailing list nix-dev@lists.science.uu.nl http://lists.science.uu.nl/mailman/listinfo/nix-dev
Re: [Nix-dev] Compiling Thunar from git
2014-03-17 16:25 GMT+04:00 Vladimír Čunát : > Hi. > > On 03/17/2014 12:55 PM, Strahinja Popovic wrote: >> I have tried all that, it is still not working. >> Like it is not looking at all inside dbus_libs package. >> I have attached thunar.nix and make output. > > OMG, this thunar expression... that's a completely wrong approach. > > You can do it easiest by copying our expression for thunar and doing > minor changes. You may need to read the basics of nix, e.g. from nix > manual to manage it, I suppose. > > BTW, is there some significant problem with our Thunar that makes you > try git? > IMHO the approach is nice in general. I am thinking about automatic generation of expressions having src set to ./. when I need to build something from local source. But yes, the initial thunar.nix is broken. I've tried to fix it, see the new expression below. It still can't build the thunar, but probably it is because of an upstream error. Regards, Sergey # thunar.nix let pkgs = import {}; inherit (pkgs) xfce; inherit (xfce) thunar; stdenv = pkgs.stdenv; in rec { thunarEnv = stdenv.mkDerivation rec { name = "thunar-env"; version = "1.1.1.1"; src = ./.; buildInputs = with pkgs; [ pkgconfig intltool gtk dbus_glib libstartup_notification libnotify libexif pcre udev xfce.exo xfce.libxfce4util xfce.xfconf xfce.xfce4panel xfce.xfce4_dev_tools git gtk_doc ]; preConfigure = '' ./autogen.sh ''; }; preFixup = "rm $out/share/icons/hicolor/icon-theme.cache"; } ___ nix-dev mailing list nix-dev@lists.science.uu.nl http://lists.science.uu.nl/mailman/listinfo/nix-dev
Re: [Nix-dev] Compiling Thunar from git
Probably you need more dependencies. Try adding dbus_glib. See nixpkgs/pkgs/desktops/xfce/core/thunar.nix for the whole list. Probably you need all dependencies listed in this file plus autoreconfHook. Regards, Sergey 2014-03-16 23:26 GMT+04:00 Strahinja Popovic : > Thank you so much, it makes ./configure now. > > Now my problem is when compiling, it terminates with following: > > /nix/store/55cajnd5wbli8vapmwx6ywi3yafld28b-dbus-glib-0.100.2/include/dbus-1.0/dbus/dbus-glib.h:28:30: > fatal error: dbus/dbus-shared.h: No such file or directory > > Any ideas? How could I see in which package is dbus-shared.h? > > > On Sun, Mar 16, 2014 at 6:11 PM, Vladimír Čunát wrote: >> >> On 03/16/2014 05:52 PM, Sergey Mironov wrote: >>> >>> Try adding [pkgs.autoconf pkgs.automake pkgs.m4] to the buildInputs. >> >> >> Maybe try adding autoreconfHook into buildInputs instead. That should add >> the deps and run that reconf phase automatically. >> >> Vlada >> >> >> >> ___ >> 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 mailing list nix-dev@lists.science.uu.nl http://lists.science.uu.nl/mailman/listinfo/nix-dev
Re: [Nix-dev] Compiling Thunar from git
Didn't know about autoreconfHook, thanks! 2014-03-16 21:11 GMT+04:00 Vladimír Čunát : > On 03/16/2014 05:52 PM, Sergey Mironov wrote: >> >> Try adding [pkgs.autoconf pkgs.automake pkgs.m4] to the buildInputs. > > > Maybe try adding autoreconfHook into buildInputs instead. That should add > the deps and run that reconf phase automatically. > > Vlada > > > > ___ > 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
Re: [Nix-dev] Compiling Thunar from git
Hi! Maybe, here is what is going on: Existing thunar expression builds Thunar from a tarball which already has ./configure script. In contrast, you don't have it in your git-tree so you need more dependencies to let ./autogen.sh to build it. Try adding [pkgs.autoconf pkgs.automake pkgs.m4] to the buildInputs. Regards, Sergey 2014-03-16 17:01 GMT+04:00 Strahinja Popovic : > Hi everyone! > > I'm quite green about Nix, but I'm using NixOS few days and I'm quite happy > for now. > Anyway, I am trying to compile Thunar from git, to test few changes, and I > have problem with ./autogen.sh. > I have attached output of ./autogen.sh. Also I have attached thunar.nix I > have tried - unsuccessfully - to use with nix-shell. > I might hack something around this, but I would love to hear how to do this > the RightWay(tm). > Of course, any help is appreciated. > > Best, > Strahinja > > ___ > 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
Re: [Nix-dev] Building linux kernle with manual-config.nix
Thanks, I understand. I decided to enable the support for modules in my kernel for now. Here is a new wiki section regarding the topic: https://nixos.org/wiki/How_to_tweak_Linux_kernel_config_options Regards, Sergey 2014-03-07 13:06 GMT+04:00 Shea Levy : > Hey Sergey, > > On Fri, Mar 07, 2014 at 12:17:50PM +0400, Sergey Mironov wrote: >> Hi. I am trying to build my own minimalistic kernel with `buildLinux' >> defined in kernel/manual-config.nix. I've written the wrapper >> expression as follows: >> >> # linuxHandMade.nix >> { stdenv, fetchurl, buildLinux } : >> >> buildLinux rec { >> >> version = "3.10.28"; >> >> src = fetchurl { >> url = "mirror://kernel/linux/kernel/v3.x/linux-${version}.tar.xz"; >> sha256 = "1blzvr3qywi8wxgl28zsn5djwgvw70yh3i6qjh2sz3zk9gnpd6mq"; >> }; >> >> configfile = ./linux-config; >> >> allowImportFromDerivation = true; >> } >> >> where ./linux-config is the .config I have built manually by unpacking >> kernel sources and doing 'make menuconfig'. Everything was OK until I >> disabled the loadable modules support. The ./linux-config now contains >> "# CONFIG_MODULES is not set" and kernel/manual-config.nix doesn't >> work. The error is quite obscure: >> >> $ nix-build econat.nix -A linuxHandMade --show-trace >> error: while evaluating `callPackageWith' at >> `/home/grwlf/proj/nixpkgs-econat/lib/customisation.nix:95:35': >> while evaluating `makeOverridable' at >> `/home/grwlf/proj/nixpkgs-econat/lib/customisation.nix:56:24': >> while evaluating an anonymous function at >> `/home/grwlf/proj/nixpkgs-econat/econat/apps/kernel.nix:1:1': >> while evaluating an anonymous function at >> `/home/grwlf/proj/nixpkgs-econat/pkgs/os-specific/linux/kernel/manual-config.nix:13:4': >> while evaluating `mkDerivation' at >> `/home/grwlf/proj/nixpkgs-econat/pkgs/stdenv/generic/default.nix:55:24': >> while evaluating `addPassthru' at >> `/home/grwlf/proj/nixpkgs-econat/lib/customisation.nix:100:22': >> while evaluating an anonymous function at >> `/nix/store/mf69pq5r5948h2q4wj4zfx69rn6zcfk4-nix-1.6.1/share/nix/corepkgs/derivation.nix:4:1': >> value is null while a list was expected >> > > That error is rubbish, and we'll fix that, but currently NixOS is not > intended to support non-modular kernels. See [1] for where the > restriction is specified. Lifting that would take only a little bit of > work, just no one has gotten around to it. > > Cheers, > Shea > > [1]: > https://github.com/NixOS/nixpkgs/blob/6572708d3914a07a1c58f6162b25ee3d695e/nixos/modules/system/boot/kernel.nix#L289 >> >> I think I've already entered the purely-tested areas of Nixos but >> still could anybody give me a clue of what may go wrong? >> >> Regards, >> Sergey >> ___ >> 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
Re: [Nix-dev] Building linux kernle with manual-config.nix
Just after sending the previous letter I've discovered that setting outputs to ["out"] in the manual-config.nix [1] hides the error. Still I don't know if it works correctly or not. Regards, Sergey [1] - https://github.com/NixOS/nixpkgs/blob/master/pkgs/os-specific/linux/kernel/manual-config.nix#L77 2014-03-07 12:17 GMT+04:00 Sergey Mironov : > Hi. I am trying to build my own minimalistic kernel with `buildLinux' > defined in kernel/manual-config.nix. I've written the wrapper > expression as follows: > > # linuxHandMade.nix > { stdenv, fetchurl, buildLinux } : > > buildLinux rec { > > version = "3.10.28"; > > src = fetchurl { > url = "mirror://kernel/linux/kernel/v3.x/linux-${version}.tar.xz"; > sha256 = "1blzvr3qywi8wxgl28zsn5djwgvw70yh3i6qjh2sz3zk9gnpd6mq"; > }; > > configfile = ./linux-config; > > allowImportFromDerivation = true; > } > > where ./linux-config is the .config I have built manually by unpacking > kernel sources and doing 'make menuconfig'. Everything was OK until I > disabled the loadable modules support. The ./linux-config now contains > "# CONFIG_MODULES is not set" and kernel/manual-config.nix doesn't > work. The error is quite obscure: > > $ nix-build econat.nix -A linuxHandMade --show-trace > error: while evaluating `callPackageWith' at > `/home/grwlf/proj/nixpkgs-econat/lib/customisation.nix:95:35': > while evaluating `makeOverridable' at > `/home/grwlf/proj/nixpkgs-econat/lib/customisation.nix:56:24': > while evaluating an anonymous function at > `/home/grwlf/proj/nixpkgs-econat/econat/apps/kernel.nix:1:1': > while evaluating an anonymous function at > `/home/grwlf/proj/nixpkgs-econat/pkgs/os-specific/linux/kernel/manual-config.nix:13:4': > while evaluating `mkDerivation' at > `/home/grwlf/proj/nixpkgs-econat/pkgs/stdenv/generic/default.nix:55:24': > while evaluating `addPassthru' at > `/home/grwlf/proj/nixpkgs-econat/lib/customisation.nix:100:22': > while evaluating an anonymous function at > `/nix/store/mf69pq5r5948h2q4wj4zfx69rn6zcfk4-nix-1.6.1/share/nix/corepkgs/derivation.nix:4:1': > value is null while a list was expected > > I think I've already entered the purely-tested areas of Nixos but > still could anybody give me a clue of what may go wrong? > > Regards, > Sergey ___ nix-dev mailing list nix-dev@lists.science.uu.nl http://lists.science.uu.nl/mailman/listinfo/nix-dev
[Nix-dev] Building linux kernle with manual-config.nix
Hi. I am trying to build my own minimalistic kernel with `buildLinux' defined in kernel/manual-config.nix. I've written the wrapper expression as follows: # linuxHandMade.nix { stdenv, fetchurl, buildLinux } : buildLinux rec { version = "3.10.28"; src = fetchurl { url = "mirror://kernel/linux/kernel/v3.x/linux-${version}.tar.xz"; sha256 = "1blzvr3qywi8wxgl28zsn5djwgvw70yh3i6qjh2sz3zk9gnpd6mq"; }; configfile = ./linux-config; allowImportFromDerivation = true; } where ./linux-config is the .config I have built manually by unpacking kernel sources and doing 'make menuconfig'. Everything was OK until I disabled the loadable modules support. The ./linux-config now contains "# CONFIG_MODULES is not set" and kernel/manual-config.nix doesn't work. The error is quite obscure: $ nix-build econat.nix -A linuxHandMade --show-trace error: while evaluating `callPackageWith' at `/home/grwlf/proj/nixpkgs-econat/lib/customisation.nix:95:35': while evaluating `makeOverridable' at `/home/grwlf/proj/nixpkgs-econat/lib/customisation.nix:56:24': while evaluating an anonymous function at `/home/grwlf/proj/nixpkgs-econat/econat/apps/kernel.nix:1:1': while evaluating an anonymous function at `/home/grwlf/proj/nixpkgs-econat/pkgs/os-specific/linux/kernel/manual-config.nix:13:4': while evaluating `mkDerivation' at `/home/grwlf/proj/nixpkgs-econat/pkgs/stdenv/generic/default.nix:55:24': while evaluating `addPassthru' at `/home/grwlf/proj/nixpkgs-econat/lib/customisation.nix:100:22': while evaluating an anonymous function at `/nix/store/mf69pq5r5948h2q4wj4zfx69rn6zcfk4-nix-1.6.1/share/nix/corepkgs/derivation.nix:4:1': value is null while a list was expected I think I've already entered the purely-tested areas of Nixos but still could anybody give me a clue of what may go wrong? Regards, Sergey ___ nix-dev mailing list nix-dev@lists.science.uu.nl http://lists.science.uu.nl/mailman/listinfo/nix-dev
Re: [Nix-dev] [Nix-pkgs] man pages for C functions
Didn't know about this! Thanks! 2014-02-18 21:05 GMT+04:00 Lluís Batlle i Rossell : > On Tue, Feb 18, 2014 at 08:52:17PM +0400, Sergey Mironov wrote: >> I've noticed that NixOS doesn't provide man pages for well-known C >> functions from it's stdlib. Probably most of the users don't need >> them, but I'd prefer to install it on my system. Do we have such an >> option? If not, I probably can write a separate expression. What >> package does contain them? glibc? > > man-pages. > > http://www.kernel.org/doc/man-pages/ ___ nix-dev mailing list nix-dev@lists.science.uu.nl http://lists.science.uu.nl/mailman/listinfo/nix-dev
[Nix-dev] [Nix-pkgs] man pages for C functions
I've noticed that NixOS doesn't provide man pages for well-known C functions from it's stdlib. Probably most of the users don't need them, but I'd prefer to install it on my system. Do we have such an option? If not, I probably can write a separate expression. What package does contain them? glibc? Regards, Sergey ___ nix-dev mailing list nix-dev@lists.science.uu.nl http://lists.science.uu.nl/mailman/listinfo/nix-dev
Re: [Nix-dev] nix-shell NetworkManager
Sorry, irc is not accessible for me at the moment.. id says [grwlf@greyblade ~ ]$ id uid=1000(grwlf) gid=100(users) группы=100(users),1(wheel),57(networkmanager),499(vboxusers) Regards, Sergey 2014-02-17 16:42 GMT+04:00 Domen Kožar : > what's the output of: $ id > > PS: would be easier to debug this on irc FreeNode #nixos > > > On Mon, Feb 17, 2014 at 1:41 PM, Sergey Mironov wrote: >> >> Yes, it pops up the error when I try to connect to protected wifi. My >> configuration has nothing special in the area of networking, but I am >> using Xfce as a window manager (I guess most of the people use nixos >> with KDE). My Nixos tree is forked from >> >> >> https://github.com/NixOS/nixpkgs/commit/cec700aab058db238176f591e1b919f30da54ce2 >> >> Another detail: If I run nm-applet as root, no error is displayed. So >> this thing is probably related somehow to the polkit. >> >> Sergey. >> >> >> >> 2014-02-17 15:18 GMT+04:00 Domen Kožar : >> > Hi Sergey, >> > >> > what rev of nixpkgs are you using? Anything special about your >> > configuration? I guess this happens when you try to connect on protected >> > wifi, right? >> > >> > d. >> > >> > >> > On Mon, Feb 17, 2014 at 12:15 PM, Sergey Mironov >> > wrote: >> >> >> >> 2014-02-17 14:38 GMT+04:00 Cillian de Róiste >> >> : >> >> > Hi, >> >> > >> >> > I don't know the answer to your question, but just in case you >> >> > overlooked >> >> > it, your user needs to be a member of the networkmanager group to be >> >> > able to >> >> > use NetworkManager. >> >> > >> >> > Cheers, >> >> > Cillian >> >> > >> >> >> >> Yes, I know about this, thanks. My problem is probably closer to [1], >> >> but I don't know how to translate the solution to NixOS. Lools like >> >> policykit has changed it's config format. Also, pkaction shows that my >> >> user has all the org.freedesktop.NetworkManager.* permissions. >> >> >> >> Regards, >> >> Sergey >> >> >> >> >> >> [1] - >> >> >> >> http://jeffhoogland.blogspot.ru/2012/05/howto-give-network-manager-sufficient.html >> >> ___ >> >> 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
Re: [Nix-dev] nix-shell NetworkManager
Yes, it pops up the error when I try to connect to protected wifi. My configuration has nothing special in the area of networking, but I am using Xfce as a window manager (I guess most of the people use nixos with KDE). My Nixos tree is forked from https://github.com/NixOS/nixpkgs/commit/cec700aab058db238176f591e1b919f30da54ce2 Another detail: If I run nm-applet as root, no error is displayed. So this thing is probably related somehow to the polkit. Sergey. 2014-02-17 15:18 GMT+04:00 Domen Kožar : > Hi Sergey, > > what rev of nixpkgs are you using? Anything special about your > configuration? I guess this happens when you try to connect on protected > wifi, right? > > d. > > > On Mon, Feb 17, 2014 at 12:15 PM, Sergey Mironov wrote: >> >> 2014-02-17 14:38 GMT+04:00 Cillian de Róiste : >> > Hi, >> > >> > I don't know the answer to your question, but just in case you >> > overlooked >> > it, your user needs to be a member of the networkmanager group to be >> > able to >> > use NetworkManager. >> > >> > Cheers, >> > Cillian >> > >> >> Yes, I know about this, thanks. My problem is probably closer to [1], >> but I don't know how to translate the solution to NixOS. Lools like >> policykit has changed it's config format. Also, pkaction shows that my >> user has all the org.freedesktop.NetworkManager.* permissions. >> >> Regards, >> Sergey >> >> >> [1] - >> http://jeffhoogland.blogspot.ru/2012/05/howto-give-network-manager-sufficient.html >> ___ >> 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
Re: [Nix-dev] nix-shell NetworkManager
2014-02-17 14:38 GMT+04:00 Cillian de Róiste : > Hi, > > I don't know the answer to your question, but just in case you overlooked > it, your user needs to be a member of the networkmanager group to be able to > use NetworkManager. > > Cheers, > Cillian > Yes, I know about this, thanks. My problem is probably closer to [1], but I don't know how to translate the solution to NixOS. Lools like policykit has changed it's config format. Also, pkaction shows that my user has all the org.freedesktop.NetworkManager.* permissions. Regards, Sergey [1] - http://jeffhoogland.blogspot.ru/2012/05/howto-give-network-manager-sufficient.html ___ nix-dev mailing list nix-dev@lists.science.uu.nl http://lists.science.uu.nl/mailman/listinfo/nix-dev
Re: [Nix-dev] nix-shell NetworkManager
2014-02-16 22:44 GMT+04:00 Sergey Mironov : > Hi! I tried debug a nasty NetworkManager "(32) insufficient > privileges" problem by building my own hacked version of the package. > I called nix-shell and tried to build the sources. Both patchPhase and > configurePhase run without problems, but buildPhase stoppes with an > error saying > > /nix/store/k4bh0a5rffwa9xhxfzld1fvr0z628klz-dbus-glib-0.100.2/include/dbus-1.0/dbus/dbus-glib.h:28:30: > fatal error: dbus/dbus-shared.h: No such file or directory > > > That is strange because nix-shell set the NIX_CFLAGS_COMPILE variable > correctly (it contains > -I/nix/store/k4bh0a5rffwa9xhxfzld1fvr0z628klz-dbus-glib-0.100.2/include > -I/nix/store/mv8dsy1q29ph6hdk6c96f252ww89z27m-dbus-libs-1.6.14/include > among others) > > What may go wrong? Who are in charge of reading the NIX_CFLAGS_COMPILE? > > Regards, > Sergey I think I need to clarify my previous letter: In order to hack NetworkManager, I start nix-shell and then call the pases directly, like $ patchPahse $ configurePhase $ buildPhase ... /nix/store/k4bh0a5rffwa9xhxfzld1fvr0z628klz-dbus-glib-0.100.2/include/dbus-1.0/dbus/dbus-glib.h:28:30: fatal error: dbus/dbus-shared.h: No such file or directory $ echo $NIX_CFLAGS_COMPILE -Ithis -Ithat -I/nix/store/k4bh0a5rffwa9xhxfzld1fvr0z628klz-dbus-glib-0.100.2/include ... Regards, Sergey ___ nix-dev mailing list nix-dev@lists.science.uu.nl http://lists.science.uu.nl/mailman/listinfo/nix-dev
[Nix-dev] nix-shell NetworkManager
Hi! I tried debug a nasty NetworkManager "(32) insufficient privileges" problem by building my own hacked version of the package. I called nix-shell and tried to build the sources. Both patchPhase and configurePhase run without problems, but buildPhase stoppes with an error saying /nix/store/k4bh0a5rffwa9xhxfzld1fvr0z628klz-dbus-glib-0.100.2/include/dbus-1.0/dbus/dbus-glib.h:28:30: fatal error: dbus/dbus-shared.h: No such file or directory That is strange because nix-shell set the NIX_CFLAGS_COMPILE variable correctly (it contains -I/nix/store/k4bh0a5rffwa9xhxfzld1fvr0z628klz-dbus-glib-0.100.2/include -I/nix/store/mv8dsy1q29ph6hdk6c96f252ww89z27m-dbus-libs-1.6.14/include among others) What may go wrong? Who are in charge of reading the NIX_CFLAGS_COMPILE? Regards, Sergey ___ nix-dev mailing list nix-dev@lists.science.uu.nl http://lists.science.uu.nl/mailman/listinfo/nix-dev
Re: [Nix-dev] nix-store -q --references in more details
Thanks, it works! I didn't know about strings as well. Small addition: Its better to execute strings with -a option to really discover all stings. Sergey 2014-02-12 15:08 GMT+04:00 Vladimír Čunát : > On 02/12/2014 11:32 AM, Eelco Dolstra wrote: >> >> I use "grep -r" to find the binaries that contain , > > > grep -rl is meant, I think > > Thanks for "strings", I didn't know that. > > > Vlada > > > > ___ > 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] nix-store -q --references in more details
Hi. I'd like to automatically filter out gcc from my hand-made initrd image created with make-initrd.nix. The problem is that some packages depend on gcc package, but we know that they probably need libgcc_s.so.1 only. So I plan to know is it really true or not. Unfortunately, `nix-store -q --references ...' prints paths in `/nix/store/-name' format, it doesn't show the tail of the reference. Is there a method to extract the whole reference strings, like `/nix/store/-name/lib/liblib.so', from a package ? If no, could you recommend a binary grep tool which may help me to do so? Regards, Sergey ___ nix-dev mailing list nix-dev@lists.science.uu.nl http://lists.science.uu.nl/mailman/listinfo/nix-dev
Re: [Nix-dev] boot problem: stage1 repair console doesn't work under VirtualBox
AFAIK, there is a fail call in the initrd's ./stage1.sh which sits before module loading [1]. This means that boot.debug1 will only works with "KEYBOARD_ATKBD y" [1] - https://github.com/NixOS/nixpkgs/blob/master/nixos/modules/system/boot/stage-1-init.sh#L125 2014-02-05 Vladimír Čunát : > On 02/05/2014 11:34 AM, Sergey Mironov wrote: >> >> linux_3_10 = pkgs.linux_3_10.override { >> extraConfig = '' >>KEYBOARD_ATKBD y >> ''; >>}; > > > Adding the module to boot.initrd.kernelModules should work the same without > rebuilding the kernel, won't it? > > Vlada > > > > ___ > 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
Re: [Nix-dev] boot problem: stage1 repair console doesn't work under VirtualBox
Hi. Including atkbd helps, thanks! Sergey. -- linux_3_10 = pkgs.linux_3_10.override { extraConfig = '' KEYBOARD_ATKBD y ''; }; 2014-02-05 Sergey Mironov : > On my real machine I've tried > nixos-minimal-13.10.35608.1e7192a-x86_64-linux.iso from the official > site. In VirtualBox test I used manually built image, sources were > forked from 5898d854da459526ef032db1ad081a6eebbd772d. > > Regards, > Sergey > > 2014-02-05 Lluís Batlle i Rossell : >> On Wed, Feb 05, 2014 at 12:00:05PM +0400, Sergey Mironov wrote: >>> I've tried this approach on a real machine, the result is the same. >> >> Does it happen with a master iso image? At some point, we missed the atkbd >> module in stage 1. >> >> In case of a USB keyboard, something similar may happen. >> >>> 2014-02-05 Sergey Mironov : >>> > Hi! Looks like stage1 repair console can't read user input, at least >>> > under VirtualBox. Here is how to reproduce the problem: >>> > 1. Boot VirtualBox with NixOS minimal installation CD attached >>> > 2. Press 'e' in the grub to edit kernel command line >>> > 3. Add bood.debug1 kernel argument >>> > 4. Boot >>> > >>> > Repair console appears but It doesn't react on key presses. It feels >>> > like /dev/tty1 hangs while trying to read something (bash 'read' >>> > operator). Note that system doesn't hang in general, other processes >>> > continue to work (I have carried out some experiments with inserting >>> > "( while true ; do echo -n . ; sleep 1; done) &" into stage-1 script) >>> > >>> > Any ideas on how to fix it? >>> > >>> > Regards, >>> > Sergey >>> ___ >>> 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
Re: [Nix-dev] boot problem: stage1 repair console doesn't work under VirtualBox
On my real machine I've tried nixos-minimal-13.10.35608.1e7192a-x86_64-linux.iso from the official site. In VirtualBox test I used manually built image, sources were forked from 5898d854da459526ef032db1ad081a6eebbd772d. Regards, Sergey 2014-02-05 Lluís Batlle i Rossell : > On Wed, Feb 05, 2014 at 12:00:05PM +0400, Sergey Mironov wrote: >> I've tried this approach on a real machine, the result is the same. > > Does it happen with a master iso image? At some point, we missed the atkbd > module in stage 1. > > In case of a USB keyboard, something similar may happen. > >> 2014-02-05 Sergey Mironov : >> > Hi! Looks like stage1 repair console can't read user input, at least >> > under VirtualBox. Here is how to reproduce the problem: >> > 1. Boot VirtualBox with NixOS minimal installation CD attached >> > 2. Press 'e' in the grub to edit kernel command line >> > 3. Add bood.debug1 kernel argument >> > 4. Boot >> > >> > Repair console appears but It doesn't react on key presses. It feels >> > like /dev/tty1 hangs while trying to read something (bash 'read' >> > operator). Note that system doesn't hang in general, other processes >> > continue to work (I have carried out some experiments with inserting >> > "( while true ; do echo -n . ; sleep 1; done) &" into stage-1 script) >> > >> > Any ideas on how to fix it? >> > >> > Regards, >> > Sergey >> ___ >> 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
Re: [Nix-dev] boot problem: stage1 repair console doesn't work under VirtualBox
I've tried this approach on a real machine, the result is the same. 2014-02-05 Sergey Mironov : > Hi! Looks like stage1 repair console can't read user input, at least > under VirtualBox. Here is how to reproduce the problem: > 1. Boot VirtualBox with NixOS minimal installation CD attached > 2. Press 'e' in the grub to edit kernel command line > 3. Add bood.debug1 kernel argument > 4. Boot > > Repair console appears but It doesn't react on key presses. It feels > like /dev/tty1 hangs while trying to read something (bash 'read' > operator). Note that system doesn't hang in general, other processes > continue to work (I have carried out some experiments with inserting > "( while true ; do echo -n . ; sleep 1; done) &" into stage-1 script) > > Any ideas on how to fix it? > > Regards, > Sergey ___ nix-dev mailing list nix-dev@lists.science.uu.nl http://lists.science.uu.nl/mailman/listinfo/nix-dev
[Nix-dev] boot problem: stage1 repair console doesn't work under VirtualBox
Hi! Looks like stage1 repair console can't read user input, at least under VirtualBox. Here is how to reproduce the problem: 1. Boot VirtualBox with NixOS minimal installation CD attached 2. Press 'e' in the grub to edit kernel command line 3. Add bood.debug1 kernel argument 4. Boot Repair console appears but It doesn't react on key presses. It feels like /dev/tty1 hangs while trying to read something (bash 'read' operator). Note that system doesn't hang in general, other processes continue to work (I have carried out some experiments with inserting "( while true ; do echo -n . ; sleep 1; done) &" into stage-1 script) Any ideas on how to fix it? Regards, Sergey ___ nix-dev mailing list nix-dev@lists.science.uu.nl http://lists.science.uu.nl/mailman/listinfo/nix-dev