[Nix-commits] [NixOS/nixpkgs] aa3f37: pythonPackages.intelhex init at 2.1
Branch: refs/heads/master Home: https://github.com/NixOS/nixpkgs Commit: aa3f37ceed582c8cb6e871db528b7216d17b474f https://github.com/NixOS/nixpkgs/commit/aa3f37ceed582c8cb6e871db528b7216d17b474f Author: Peter Jones <pjo...@devalot.com> Date: 2017-06-23 (Fri, 23 Jun 2017) Changed paths: A pkgs/development/python-modules/intelhex/default.nix M pkgs/top-level/python-packages.nix Log Message: --- pythonPackages.intelhex init at 2.1 ___ nix-commits mailing list nix-comm...@lists.science.uu.nl https://mailman.science.uu.nl/mailman/listinfo/nix-commits
Re: [Nix-dev] glibc issues from a proprietary binary distributed as an RPM
Bjørn Forsman <bjorn.fors...@gmail.com> writes: > On 25 May 2017 at 20:19, Peter Jones <mli...@pmade.com> wrote: >> I find myself in the (sickening) position of needing to use a >> closed-source tool on NixOS. I have an overlay package that almost >> works. After using patchelf, most of the binaries seem to work. But >> one of them is being a pain: >> >> JLinkGDBServer: relocation error: JLinkGDBServer: symbol , version >> GLIBC_2.2.5 not defined in file libc.so.6 with link time reference >> >> The collective wisdom of the web suggests this might have something to >> do with the binary using symbols from libc that are not in my version of >> glibc. As far as I can tell the company that makes this just has an RPM >> with no system requirements so I can't tell which glibc I should be >> using. Also, strace wasn't much help here either. >> >> I would love some help figuring this out. The derivation that I'm >> working on can be found here: >> >> https://github.com/pjones/nixpkgs-jlink > > I know it's not what you asked, but as a workaround perhaps you can > use openocd instead? That's a perfectly reasonable solution. I'm attempting to go down that route as well because it would be easier than using J-Link. But I thought I would ask here too just in case other tools are a dead end. Thank you. -- Peter Jones, Founder, Devalot.com Defending the honor of good code ___ nix-dev mailing list nix-dev@lists.science.uu.nl https://mailman.science.uu.nl/mailman/listinfo/nix-dev
[Nix-dev] glibc issues from a proprietary binary distributed as an RPM
I find myself in the (sickening) position of needing to use a closed-source tool on NixOS. I have an overlay package that almost works. After using patchelf, most of the binaries seem to work. But one of them is being a pain: JLinkGDBServer: relocation error: JLinkGDBServer: symbol , version GLIBC_2.2.5 not defined in file libc.so.6 with link time reference The collective wisdom of the web suggests this might have something to do with the binary using symbols from libc that are not in my version of glibc. As far as I can tell the company that makes this just has an RPM with no system requirements so I can't tell which glibc I should be using. Also, strace wasn't much help here either. I would love some help figuring this out. The derivation that I'm working on can be found here: https://github.com/pjones/nixpkgs-jlink -- Peter Jones, Founder, Devalot.com Defending the honor of good code ___ nix-dev mailing list nix-dev@lists.science.uu.nl https://mailman.science.uu.nl/mailman/listinfo/nix-dev
Re: [Nix-dev] Question regarding my attempt to set up a ruby environment.
Mustard Seed <supercriticalfl...@gmail.com> writes: > I'm trying to use NixOS as a dev environment for Ruby. I found the > following > > https://github.com/areina/nix-new-rails-app > > That's helped me have an idea of how to go about setting up a ruby project > (I have almost zero ruby experience) but I am running into an issue on the > third of the first four manual tasks prior to opening up the nix-shell. > > When I try to run > > nix-shell --command "rails new . --force --skip-bundle; bundler lock" > > it gets to the point in the screen shot (you can see such here in an issue > I opened with the git repo > https://github.com/areina/nix-new-rails-app/issues/1) and then NixOS logs me > out. > > I'm at a bit of a loss as to where to go from here as I'm hitting some > significant barriers with my limited understanding of Nix AND of Ruby. I find that writing a default.nix file or a shell.nix file for each project that I work on gives me the best results. As an example, below are some files that I've hacked up. I don't work with Ruby that often anymore so my motivation to make these files better isn't really there. First, a function that uses its arguments to build a package/environment for each application that I work on: https://github.com/pjones/nix-utils/blob/master/lib/ruby/default.nix And here is an example application using that function: https://github.com/pjones/nix-utils/blob/master/envs/rfa/cltc-phoenix.nix The way I use this is by running `nix-shell`, giving it the above file, while in the directory of the application. It drops me into a shell that has everything I need to work on a Ruby/Rails application. -- Peter Jones, Founder, Devalot.com Defending the honor of good code ___ nix-dev mailing list nix-dev@lists.science.uu.nl https://mailman.science.uu.nl/mailman/listinfo/nix-dev
[Nix-commits] [NixOS/nixpkgs] 376bda: logcheck: 1.3.17 -> 1.3.18
Branch: refs/heads/release-17.03 Home: https://github.com/NixOS/nixpkgs Commit: 376bda65fddeab3fc1cebc112a54a46c4abc84d6 https://github.com/NixOS/nixpkgs/commit/376bda65fddeab3fc1cebc112a54a46c4abc84d6 Author: ndowens <ndowen...@gmail.com> Date: 2017-04-17 (Mon, 17 Apr 2017) Changed paths: M pkgs/tools/system/logcheck/default.nix Log Message: --- logcheck: 1.3.17 -> 1.3.18 logcheck: Added hyphen (cherry picked from commit 1dcb0bbc39b1b58484c8aad7e0748c3fdb8423ab) Commit: d55d1ff1998d27013ba71933e1a63339f8a7be3b https://github.com/NixOS/nixpkgs/commit/d55d1ff1998d27013ba71933e1a63339f8a7be3b Author: Joachim Fasting <joach...@fastmail.fm> Date: 2017-04-17 (Mon, 17 Apr 2017) Changed paths: M pkgs/tools/system/logcheck/default.nix Log Message: --- logcheck: point homepage to alioth.debian.org The page at logcheck dot org contains questionable links and it is unclear whether it is controlled by the logcheck project at all. Fix by using the homepage debian points to instead. Fixes https://github.com/NixOS/nixpkgs/issues/24952 (cherry picked from commit c2130eca44633d716aa005c566b63a6952b2600d) Commit: 058b89992b801a590dea0cc282b52da3783f5680 https://github.com/NixOS/nixpkgs/commit/058b89992b801a590dea0cc282b52da3783f5680 Author: Tobias Pflug <tobias.pf...@gmail.com> Date: 2017-04-17 (Mon, 17 Apr 2017) Changed paths: M pkgs/os-specific/linux/broadcom-sta/default.nix Log Message: --- broadcom-sta: fix linux-4.8 patch sha (cherry picked from commit d857b2d2fa2fb35969e3be087d776dfb3287ec55) Note also the change to a stable url. Commit: 67c6638b089a5766435e07057ff73b35c82440cc https://github.com/NixOS/nixpkgs/commit/67c6638b089a5766435e07057ff73b35c82440cc Author: Peter Jones <pjo...@devalot.com> Date: 2017-04-17 (Mon, 17 Apr 2017) Changed paths: M nixos/modules/services/misc/plex.nix Log Message: --- plex: Don't overwrite primary database on restart This change fixes two major issues: 1. If you don't use SIGQUIT to stop Plex it will corrupt its own database :( 2. Newer versions of Plex keep metadata in the `com.plexapp.plugins.library.db` database. This is the file that we copy into `/var/lib/plex/.skeleton`. If we copy the empty database on top of this one the user will lose their entire library metadata. This change skips the copy if the file already exists. (cherry picked from commit 5a50b266624bceee5243c6eadf86d958768bfa6c) See https://github.com/NixOS/nixpkgs/pull/24900#issuecomment-294513707 Compare: https://github.com/NixOS/nixpkgs/compare/24ce0db06a72...67c6638b089a___ nix-commits mailing list nix-comm...@lists.science.uu.nl https://mailman.science.uu.nl/mailman/listinfo/nix-commits
Re: [Nix-dev] Managing /home during system activation
David Izquierdo <theco...@gmail.com> writes: > That's stupid genius in my eyes. What I'd been doing is to find a way > to make software look in /etc/xdg before ~/.config, with... varying > degrees of success. Is there anywhere we could read your > implementation? I haven't actually written any code yet. I wanted to make sure there weren't any obvious problems with my idea first. The biggest obstacle I see right now is that I'm going to have to override home directories for users. If I use overlayfs then I need to have two source directories and a destination directory. I was thinking of creating fake home directories in /var/lib/home. So, for example, the following directories would be overlaid on /var/lib/home/pjones: /nix/store/xxx-home-pjones # Symlinks to config files /home/pjones # Real home directory And then I would override the home directory for pjones to be /var/lib/home/pjones where the overlay is. If you have any other suggestions I'd love to hear them. > > On 15/04/17 19:36, Peter Jones wrote: >> I'd like to manage files in my home directory during system activation. >> Sort of like nix-home[1] but during activation so NixOps can also deploy >> things such as my shell configuration. I have an idea, and I'm >> wondering how terrible it is. >> >> Based on the way etc activation works, I would build a directory in the >> nix store and fill it with symlinks to other parts of the store: >> >> /nix/store/xxx-home-pjones/.zshrc -> /nix/store/xxx-zshrc/zshrc >> >> Then, set up a UnionFS mount so that /nix/store/xxx-home-pjones gets >> overlaid on top of /home/pjones. This means I don't have to search >> through /home looking for links to an old generation to deactivate it, >> and rolling back just mounts a previous generation on top of /home. >> >> So, how bad is this idea? >> >> Thanks! >> >> >> [1]: https://github.com/sheenobu/nix-home> > -- Peter Jones, Founder, Devalot.com Defending the honor of good code ___ nix-dev mailing list nix-dev@lists.science.uu.nl https://mailman.science.uu.nl/mailman/listinfo/nix-dev
[Nix-dev] Managing /home during system activation
I'd like to manage files in my home directory during system activation. Sort of like nix-home[1] but during activation so NixOps can also deploy things such as my shell configuration. I have an idea, and I'm wondering how terrible it is. Based on the way etc activation works, I would build a directory in the nix store and fill it with symlinks to other parts of the store: /nix/store/xxx-home-pjones/.zshrc -> /nix/store/xxx-zshrc/zshrc Then, set up a UnionFS mount so that /nix/store/xxx-home-pjones gets overlaid on top of /home/pjones. This means I don't have to search through /home looking for links to an old generation to deactivate it, and rolling back just mounts a previous generation on top of /home. So, how bad is this idea? Thanks! [1]: https://github.com/sheenobu/nix-home -- Peter Jones, Founder, Devalot.com Defending the honor of good code ___ nix-dev mailing list nix-dev@lists.science.uu.nl https://mailman.science.uu.nl/mailman/listinfo/nix-dev
[Nix-commits] [NixOS/nixpkgs] f231b2: slic3r: Add LWP for "Send to printer"
Branch: refs/heads/release-16.03 Home: https://github.com/NixOS/nixpkgs Commit: f231b2b3f79020025eaabe4e8fae53e81651914c https://github.com/NixOS/nixpkgs/commit/f231b2b3f79020025eaabe4e8fae53e81651914c Author: Peter Jones <pjo...@devalot.com> Date: 2016-07-18 (Mon, 18 Jul 2016) Changed paths: M pkgs/applications/misc/slic3r/default.nix Log Message: --- slic3r: Add LWP for "Send to printer" This patch adds a dependency on the LWP perl module so that Slic3r can make HTTP connections to Octoprint and send G-code to a remote printer. (cherry picked from commit f303a072c02d5659abc8b03e69f98f789745b4ab) ___ nix-commits mailing list nix-comm...@lists.science.uu.nl http://lists.science.uu.nl/mailman/listinfo/nix-commits
[Nix-commits] [NixOS/nixpkgs] f303a0: slic3r: Add LWP for "Send to printer"
Branch: refs/heads/master Home: https://github.com/NixOS/nixpkgs Commit: f303a072c02d5659abc8b03e69f98f789745b4ab https://github.com/NixOS/nixpkgs/commit/f303a072c02d5659abc8b03e69f98f789745b4ab Author: Peter Jones <pjo...@devalot.com> Date: 2016-07-18 (Mon, 18 Jul 2016) Changed paths: M pkgs/applications/misc/slic3r/default.nix Log Message: --- slic3r: Add LWP for "Send to printer" This patch adds a dependency on the LWP perl module so that Slic3r can make HTTP connections to Octoprint and send G-code to a remote printer. ___ nix-commits mailing list nix-comm...@lists.science.uu.nl http://lists.science.uu.nl/mailman/listinfo/nix-commits
Re: [Nix-dev] Change owner and permissions of a file in nix-store
Luca Bruno <lethalma...@gmail.com> writes: > I think a good workaround to avoid using absolute paths in general (which > thus allows for exchanging derivations between machines) may work as > follows: > 1. The derivation creates a tar. In a tar, you can set the permissions and > ownership you want. > 2. Create some activation script that untars the archive preserving the > permissions under some path. Wouldn't the tar be world-readable in the nix store? -- Peter Jones, Founder, Devalot.com Defending the honor of good code ___ nix-dev mailing list nix-dev@lists.science.uu.nl http://lists.science.uu.nl/mailman/listinfo/nix-dev
Re: [Nix-dev] loopback.cfg grub ISO boot
pille <pille+nixos+mailingl...@struction.de> writes: > i recently configured my grub2 to boot some linux live-CD/DVD-ISOs via > its loopback capability. while figuring out the parameters to get them > booted is extremly painful and error-prone. but i found a nice > "standard", which i'm asking you to implement. > > it's boils down to provide a loopback.cfg inside the ISO that can be > sourced by grub's config and has access to some prepared variables. > i guess it can be generated without much overhead, since you need to > maintain your isolinux.cfg anyway. Actually, this is really easy to do: 1) Configure grub to load a NixOS ISO via loopback 2) Make sure the ISO has a disk label, in my example it's ISOHOST 3) Set up boot.initrd.postDeviceCommands so that NixOS boots off the ISO I have an example nix file here: https://github.com/pjones/nixpkgs/blob/gpg-iso/nixos/modules/installer/cd-dvd/gpg-iso.nix Some additional notes can be found here: https://github.com/pjones/encryption-utils/blob/master/doc/offline-usb-drive.md -- Peter Jones, Founder, Devalot.com Defending the honor of good code ___ nix-dev mailing list nix-dev@lists.science.uu.nl http://lists.science.uu.nl/mailman/listinfo/nix-dev
Re: [Nix-dev] nix-shell for a custom haskell library
Dmitry Malikov malikov@gmail.com writes: I'm trying to setup a development environment for a custom haskell library basing on a tutorial by Oliver Charles (http://wiki.ocharles.org.uk/Nix). FWIW I've been playing with Nix and Haskell a lot lately trying to come up with the perfect development environment. This is what I have so far. Everything below is done with a recent copy of nixpkgs. I have a shell function called nix-hs-build that does the following: # Create a default.nix for the Haskell project in $PWD: nix-shell -p haskellPackages.cabal2nix \ --command cabal2nix $PWD $@ default.nix # Build the project: nix-hs-shell --command $(which hsbuild.sh) $@ The contents of hsbuild.sh can be found here: https://gist.github.com/pjones/7a6023d3567ff2ed49bf The `nix-hs-shell` command is another shell function that just runs nix-shell with cabal-install and hlint in the environment so that hsbuild.sh can work. Here are the details: function nix-hs-shell () { override=~/.nixpkgs/envs/dev/haskell-cabal.nix nix-shell -I pwd=$PWD --pure $@ $override } Where haskell-cabal.nix contains: { nixpkgs ? import nixpkgs {} , compiler ? ghc7101 }: let pkgs = nixpkgs.pkgs; ghc = pkgs.haskell.packages.${compiler}; f= import pwd; drv = ghc.callPackage f {}; in (pkgs.haskell.lib.addBuildTools drv [ ghc.cabal-install ghc.hlint ]).env With those pieces I can just run `nix-hs-build` without having to create any sort of *.nix file by hand. If I change the project's cabal file and run `nix-hs-build` it will work since it generates the default.nix again. I can also change compilers with a flag: nix-hs-build --compiler ghc784 How to get Network.EngineIO available inside a nix-shell in this case? Using my setup above, the library would be installed in ./dist -- Peter Jones, Founder, Devalot.com Defending the honor of good code -- Peter Jones, Founder, Devalot.com Defending the honor of good code ___ nix-dev mailing list nix-dev@lists.science.uu.nl http://lists.science.uu.nl/mailman/listinfo/nix-dev
Re: [Nix-dev] Haskell packages that use curses don't build
Peter Simons sim...@cryp.to writes: Peter Jones writes: It doesn't look like any of the Haskell bindings to curses currently build. They all give an error something like this: Setup: Missing dependency on a foreign library: * Missing C library: curses there errors are probably related to: https://github.com/NixOS/nixpkgs/issues/7810 The current master branch contains a fix (5a89a87c). I fetched master and confirmed that I pulled in that commit. Then I cleared out all Haskell related stuff in /nix/store via a garbage collection. After that I tried installing the three curses bindings that I know about: nix-shell -p haskellPackages.hscurses * Missing C library: curses nix-shell -p haskellPackages.ncurses error: Package ‘c2hs-0.20.1’ in ‘...’ is marked as broken nix-shell -p haskellPackages.nanocurses * Missing C library: curses Am I missing something? -- Peter Jones, Founder, Devalot.com Defending the honor of good code ___ nix-dev mailing list nix-dev@lists.science.uu.nl http://lists.science.uu.nl/mailman/listinfo/nix-dev
Re: [Nix-dev] Getting cabal2nix to add a cabal flag
Peter Simons sim...@cryp.to writes: Hi Peter, I'd like to use cabal2nix together with nix-build in a way that my package is configured with `-fmaintainer`. Is there a way to do this? call cabal2nix with -fmaintainer. I'm citing from the --help output: -f FLAG --flag=FLAG Cabal flag (may be specified multiple times) Well, I feel like a fool. Thanks! -- Peter Jones, Founder, Devalot.com Defending the honor of good code ___ nix-dev mailing list nix-dev@lists.science.uu.nl http://lists.science.uu.nl/mailman/listinfo/nix-dev
[Nix-dev] Getting cabal2nix to add a cabal flag
I'm experimenting with different ways of building Haskell projects using Nix. I like the idea of using cabal2nix so I don't have to write the nix files by hand and keep them in sync with my cabal file. However, on my personal projects, I like to have a `maintainer` cabal flag that turns on `-Werror`. I'd like to use cabal2nix together with nix-build in a way that my package is configured with `-fmaintainer`. Is there a way to do this? Thanks! -- Peter Jones, Founder, Devalot.com Defending the honor of good code ___ nix-dev mailing list nix-dev@lists.science.uu.nl http://lists.science.uu.nl/mailman/listinfo/nix-dev
Re: [Nix-dev] Haskell packages that use curses don't build
Peter Simons sim...@cryp.to writes: Hi Peter, nix-shell -p haskellPackages.hscurses * Missing C library: curses nix-shell -p haskellPackages.ncurses error: Package ‘c2hs-0.20.1’ in ‘...’ is marked as broken nix-shell -p haskellPackages.nanocurses * Missing C library: curses I ran some tests, too, and added fixes in my branch [1] that fix the ncurses library. I tried fixing the others, too, but unfortunately these are broken in a way that's got nothing to do with us and that ought to be fixed upstream. Anyway, once I merge [1] into master, the ncurses library will build fine. [1] https://github.com/peti/nixpkgs/tree/haskell-updates Thanks! I might be bugging the authors of the other packages. -- Peter Jones, Founder, Devalot.com Defending the honor of good code ___ nix-dev mailing list nix-dev@lists.science.uu.nl http://lists.science.uu.nl/mailman/listinfo/nix-dev
[Nix-dev] Haskell packages that use curses don't build
It doesn't look like any of the Haskell bindings to curses currently build. They all give an error something like this: Setup: Missing dependency on a foreign library: * Missing C library: curses I'm guessing it's because the correct flags aren't being given to cabal so it can find curses/ncurses/whatever. How do we fix this? -- Peter Jones, Founder, Devalot.com Defending the honor of good code ___ nix-dev mailing list nix-dev@lists.science.uu.nl http://lists.science.uu.nl/mailman/listinfo/nix-dev
Re: [Nix-dev] Haskell-env (via nix-shell) - am I doing this right?
Peter Simons sim...@cryp.to writes: I use the following shell.nix to switch between compiler versions: { compiler ? ghc7101 }: with (import nixpkgs {}).pkgs; let ghc = haskell.packages.${compiler}.ghcWithPackages (pkgs: with pkgs; [ aeson lens monad-par ]); in stdenv.mkDerivation { name = my-haskell-env-0; buildInputs = [ ghc ]; shellHook = eval $(grep export ${ghc}/bin/ghc); } Now run nix-shell --argstr compiler ghc784 to select a compiler other than the default. Neat trick! Thanks for sharing. -- Peter Jones, Founder, Devalot.com Defending the honor of good code ___ nix-dev mailing list nix-dev@lists.science.uu.nl http://lists.science.uu.nl/mailman/listinfo/nix-dev
Re: [Nix-dev] Haskell-env (via nix-shell) - am I doing this right?
Ricardo M. Correia rcorr...@wizy.org writes: On Fri, May 22, 2015 at 8:16 PM, Peter Jones mli...@pmade.com wrote: To start out, I'm using HaskellNG and a recent version of nixpkgs where HaskellNG is the default. Here are the components I use with some examples: 1) I write a default.nix that describes my dependencies: https://github.com/pjones/byline/blob/master/default.nix Thanks for the example! Out of curiosity, why is that shellHook stuff needed on every package? Couldn't ghcWithPackages export those variables instead (as a setupHook )? I stole those lines from someone else and haven't taken the time to verify that they are actually needed. Maybe someone with more knowledge than me can speak to this point. -- Peter Jones, Founder, Devalot.com Defending the honor of good code ___ nix-dev mailing list nix-dev@lists.science.uu.nl http://lists.science.uu.nl/mailman/listinfo/nix-dev
Re: [Nix-dev] Haskell-env (via nix-shell) - am I doing this right?
Matthias Beyer m...@beyermatthias.de writes: I want to develop a haskell package, but I need haskell packages from haskellngPackages (what's the matter with haskellPackages vs. haskellngPackages?). So, I'm a bit insecure about my environment definition here, because I had to mix the non-ng-packages with the ng-packages to get the cabalInstall and everything (I'm rather new to Haskell, so maybe I completely messed up here. I thought I'd chime in with how I'm developing Haskell package on NixOS. I wouldn't say this is the correct way to do things, and I'm completely open to feedback. To start out, I'm using HaskellNG and a recent version of nixpkgs where HaskellNG is the default. Here are the components I use with some examples: 1) I write a default.nix that describes my dependencies: https://github.com/pjones/byline/blob/master/default.nix 2) I write a shell.nix that pulls in default.nix using import: https://github.com/pjones/byline/blob/master/shell.nix 3) The ghc argument in shell.nix allows me to specify different versions of GHC so I can test with multiple versions. (I'd love some feedback on how to make this more flexible.) This can be used from the command line like so: nix-shell --argstr ghc 7.10.1 # or nix-shell --argstr ghc 7.8.4 4) Once I'm inside nix-shell I use the buildPhase variable to build my package: eval $buildPhase Again, any suggestions on how to improve this workflow are appreciated. -- Peter Jones, Founder, Devalot.com Defending the honor of good code ___ nix-dev mailing list nix-dev@lists.science.uu.nl http://lists.science.uu.nl/mailman/listinfo/nix-dev
Re: [Nix-dev] Pulseaudio broken in 14.12: Daemon already running
Kirill Elagin kirela...@gmail.com writes: Do you use a desktop manager or start your X session manually? The important thing is to make sure that your X server is running on _the same virtual terminal_ your logind session was opened on, otherwise you won’t get permissions to access hardware. Desktop managers take care of this and recent versions of `startx` (starting from xinit-1.3.4 IIRC) also do. `loginctl show-session session-id -p VTNr` tells you what logind thinks is your session’s terminal. I believe that the default of X is still to choose the first available terminal, so you have to explicitly pass it `vtyour-session-terminal-number` (`startx` does exactly this). From what I understand, there's no way to use `startx' with systemd. That's my preference, but I don't know how to configure NixOS to allow that. For DMs, I've tried both slim and lightdm. I have the same pulseaudio issues under both. `loginctl' reports that I have a seat and that my session's terminal is 7. X is also running on VT 7, but it's running as *root*! Could X running as root be the problem here? $ nixos-version 14.12.343.47c741f (Caterpillar) $ X -version X.Org X Server 1.16.2.901 (1.16.3 RC 1) -- Peter Jones, Founder, Devalot.com Defending the honor of good code ___ nix-dev mailing list nix-dev@lists.science.uu.nl http://lists.science.uu.nl/mailman/listinfo/nix-dev
[Nix-dev] pulseaudio not reading /etc/pulse/default.pa [Was: pulseaudio broken in 14.12: Daemon already running]
Peter Jones mli...@pmade.com writes: Pulseaudio stopped working for me after upgrading to 14.12. It seems that all PA clients start their own server, which eventually fails because the pulseaudio daemon is already running. I believe I've tracked down the root problem. It appears that if you have a ~/.config/pulse/default.pa file then pulseaudio will not read /etc/pulse/default.pa. This wasn't the case in previous versions. Even an empty ~/.config/pulse/default.pa file will prevent pulseaudio from reading the one in /etc and thus it will start with no cards. Sounds like a bug in pulseaudio. -- Peter Jones, Founder, Devalot.com Defending the honor of good code ___ nix-dev mailing list nix-dev@lists.science.uu.nl http://lists.science.uu.nl/mailman/listinfo/nix-dev
Re: [Nix-dev] Pulseaudio broken in 14.12: Daemon already running
Peter Jones mli...@pmade.com writes: Peter Jones mli...@pmade.com writes: Pulseaudio stopped working for me after upgrading to 14.12. It seems that all PA clients start their own server, which eventually fails because the pulseaudio daemon is already running. I just noticed that pulseaudio doesn't see my sound cards: This appears to be some sort of permission issue. If I run pulseaudio as root then everything works as expected. Running it under my user account somehow prevents pulseaudio from seeing any of the sound cards. I did have my user account in the audio group. I've since removed it after reading some documentation, rebooted, and still no sound cards detected by pulseaudio. Using strace, I don't see pulseaudio failing to open any files or even trying to access /dev/snd/*. I do see several errors coming from setrlimit though. What's the next step in debugging this? -- Peter Jones, Founder, Devalot.com Defending the honor of good code ___ nix-dev mailing list nix-dev@lists.science.uu.nl http://lists.science.uu.nl/mailman/listinfo/nix-dev
Re: [Nix-dev] Pulseaudio broken in 14.12: Daemon already running
Kirill Elagin kirela...@gmail.com writes: What exactly do you mean by “disabling” pulseaudio? Do you have a system-wide instance of pulseaudio running (e.g. by setting `pulseAudio.systemWide = true` in the configuration.nix)? If yes, then do you have any good reasons for doing so? If no, then disable the system-wide instance. By disable I meant `hardware.pulseaudio.enable = false;'. Normally, there is exactly one instance of pulseaudio per user and it is spawned automatically (to be precise, it is spawned automatically iff it is not already running; and most likely your DE starts one during initialisation). I'm only running the one (user) instance and don't use a DE so one isn't started when I log in. When I start an audio application pulseaudio is started automatically. The problem seems to be that pulseaudio is started even if another one is running. Clients can't seem to detect the running pulseaudio thus they start a new daemon which immediately dies after seeing an existing PID file. How do clients check for a running pulseaudio daemon? I'm wondering if that process is broken. -- Peter Jones, Founder, Devalot.com Defending the honor of good code ___ nix-dev mailing list nix-dev@lists.science.uu.nl http://lists.science.uu.nl/mailman/listinfo/nix-dev
Re: [Nix-dev] Pulseaudio broken in 14.12: Daemon already running
Peter Jones mli...@pmade.com writes: Pulseaudio stopped working for me after upgrading to 14.12. It seems that all PA clients start their own server, which eventually fails because the pulseaudio daemon is already running. I just noticed that pulseaudio doesn't see my sound cards: $ pacmd list-cards 0 card(s) available. But aplay does: $ aplay -L null Discard all samples (playback) or generate zero samples (capture) default Default Audio Device (via PulseAudio) hdmi:CARD=HDMI,DEV=0 HDA Intel HDMI, HDMI 0 HDMI Audio Output hdmi:CARD=HDMI,DEV=1 HDA Intel HDMI, HDMI 1 HDMI Audio Output hdmi:CARD=HDMI,DEV=2 HDA Intel HDMI, HDMI 2 HDMI Audio Output sysdefault:CARD=PCH HDA Intel PCH, CX20756 Analog Default Audio Device front:CARD=PCH,DEV=0 HDA Intel PCH, CX20756 Analog Front speakers surround21:CARD=PCH,DEV=0 HDA Intel PCH, CX20756 Analog 2.1 Surround output to Front and Subwoofer speakers surround40:CARD=PCH,DEV=0 HDA Intel PCH, CX20756 Analog 4.0 Surround output to Front and Rear speakers surround41:CARD=PCH,DEV=0 HDA Intel PCH, CX20756 Analog 4.1 Surround output to Front, Rear and Subwoofer speakers surround50:CARD=PCH,DEV=0 HDA Intel PCH, CX20756 Analog 5.0 Surround output to Front, Center and Rear speakers surround51:CARD=PCH,DEV=0 HDA Intel PCH, CX20756 Analog 5.1 Surround output to Front, Center, Rear and Subwoofer speakers surround71:CARD=PCH,DEV=0 HDA Intel PCH, CX20756 Analog 7.1 Surround output to Front, Center, Side, Rear and Woofer speakers Could this be part of the problem? -- Peter Jones, Founder, Devalot.com Defending the honor of good code ___ nix-dev mailing list nix-dev@lists.science.uu.nl http://lists.science.uu.nl/mailman/listinfo/nix-dev
[Nix-dev] Pulseaudio broken in 14.12: Daemon already running
Pulseaudio stopped working for me after upgrading to 14.12. It seems that all PA clients start their own server, which eventually fails because the pulseaudio daemon is already running. For example, if I kill pulseaudio and then start it by hand with -vvv, I can see it start correctly and write its PID into a file. Then, if I run anything that needs to access pulse, like speaker-test, alsamixer, pavucontrol, etc., I can see in journalctl that another instance of pulseaudio is started and then dies with the error Daemon already running. The client usually dies with connection refused. I've turned off autospawning, and that doesn't change anything. Disabling pulseaudio and rebooting gives me sound again. Any idea why each client is trying to start their own pulseaudio daemon? -- Peter Jones, Founder, Devalot.com Defending the honor of good code ___ nix-dev mailing list nix-dev@lists.science.uu.nl http://lists.science.uu.nl/mailman/listinfo/nix-dev
[Nix-dev] Hard-coded dlload paths in .so [was: Nix expression for closed-source scanner driver]
Bjørn Forsman bjorn.fors...@gmail.com writes: On 16 December 2014 at 02:09, Peter Jones mli...@pmade.com wrote: I'm working on a Nix expression to install a proprietary scanner driver that is available as a Debian package. After using `nix-env' to install the package I'm still not able to see my scanner in the list produced by `scanimage -L' or `sane-find-scanner'. Here's the expression (WIP): https://github.com/pjones/nixpkgs/blob/pkg/brother/pkgs/misc/drivers/brother/dsseries.nix Something interesting to note is that device files for the scanner show up in /dev/bsg/ instead of the usual /dev/sg*. I think that has something to do with the scanner being detected as a disk. I did have this working under Debian before switching to NixOS. I also still have a Debian install if I need to test anything or figure out what's going on. Any hint/tips would be appreciated. Thanks. Maybe you must patchelf some binaries? See if this finds something that points to (nonexisting) /usr/... or similar: find $out | while read f; do patchelf --print-rpath $f; done None of the .so files in the binary package have an RPATH set. I was able to use strace and strings to discover that the main .so for the scanner driver tries to dlload two other .so files using hard-coded paths. Can I alter the strings in the .so or do I need to make some sort of wrapper that intercepts the dlload calls and loads the correct libraries? If the latter, is there an example somewhere I can use as a guide? -- Peter Jones, Founder, Devalot.com Defending the honor of good code ___ nix-dev mailing list nix-dev@lists.science.uu.nl http://lists.science.uu.nl/mailman/listinfo/nix-dev