<ToxicFrog>
Oh weird, nix-shell gives me bash even if my shell is set to zsh. Wonder if I should file a bug report for that.
<clever>
griff_: does it have internet access?
<clever>
ToxicFrog: nix-shell has so source a bunch of bash scripts, a lot of its features are bash functions
<JonReed>
Is there a way to pass some attribute from configuration.nix to a package?
<clever>
JonReed: store it in a packageOverride or nixpkgs.config ?
<ToxicFrog>
clever: that worked perfectly, thank you. Next question -- how do I tell whether a given .so is installed, and if not, what package it's in?
<ToxicFrog>
On SUSE I can do the former just by looking in /bin* and /usr/bin*, but that obviously doesn't work here.
<griff_>
clever: yes and using nix locally it uses the cache just fine. It is only hydra that doesn’t want to substitute
<clever>
ToxicFrog: programs on nix will never find an so that is "installed", you must give it an absolute path to every library
<clever>
griff_: weird, mine just uses the cache automaticaly
<griff_>
clever: on a related note do you know how to turn on debug logging for nix-daemon on nixos?
<clever>
griff_: it might be the cached state of the cache
<ToxicFrog>
clever: er what? Doesn't nix automatically patch the ELF at exec time to find the libraries in the currently active configuration?
<clever>
ToxicFrog: thats done by the build process for stuff in nixpkgs, but it wont happen to ELF files you just download
<ToxicFrog>
this explains why the error message is so unhelpful -- it's not that it can't find the DSOs it depends on, it can't find the *dynamic linker* that would even let it get to the point of being unable to find the libraries.
<ToxicFrog>
(this also means that to do things "properly", I should write a DoomRL nix package)
<clever>
ToxicFrog: this is a util i wrote that helps speed up some steps
<clever>
ToxicFrog: if you run nix-build on that nix file, it will generate a shell script
<clever>
and if you run that shell script on an ELF file, it will fix the dynamic linker, and make zlib available at runtime
<ToxicFrog>
clever: yeah, the wiki page I linked has instructions for both doing that and integrating it into a package definition
<clever>
this allows you to quickly test things out, either just to make it work, or as a step leading up to making a package
<clever>
one case where i can see the above being usefull on its own, one of the games ive played in steam, downloads .exe and ELF files, when running under wine
<clever>
so i could then use the above gist to re-patch the ELF every time steam updates it
* ToxicFrog
nods
<clever>
without making a proper package
<ToxicFrog>
Fortunately I don't anticipate having to do this often
<clever>
and as an added benefit, nix believes that the shell script depends on zlib
<clever>
so nix will never garbage collect zlib
<ToxicFrog>
But this is a server that hosts (or rather, will host, once I finish bringing it up) a public doomrl server, and doomrl is closed source, sooooo
<clever>
and by extension, it wont break the ELF file nix isnt aware of
<clever>
ah
<clever>
i would make a proper package for it, and add it to the configuration.nix
<ToxicFrog>
Yeah, that's the plan
<ToxicFrog>
Then I just need to do a bunch of symlink juggling to get it into a place where the launcher can find it, since in reality it's going to end up in /nix/store/<hash>-doomrl/opt/doomrl/*, isn't it...
<clever>
if you put the package into environment.systemPackages, it will wind up in /run/current-system/sw/opt/doomrl
<clever>
and if you use $out/bin, then it will be in /run/current-system/sw/bin, which is part of $PATH
<ToxicFrog>
(I suspect this is going to end up with me adding --doomrl-path and --player-path args to doomrl-server, which it should probably have anyways, really)
<ToxicFrog>
(I'm just lazy~)
<ToxicFrog>
clever: right, but at the moment the launcher blindly assumes that the doomrl install is in $(dirname $0)/doomrl/ and the players in $(dirname $0)/players
<clever>
ah
<ToxicFrog>
It's not exactly a well polished and productionized piece of kit
<clever>
you could then package the launcher, and have it depend on doomrl
<clever>
and at build-time, it creates those symlinks
filterfish_ has quit [(Remote host closed the connection)]
<ToxicFrog>
Yeah, that's my current thinking
<ToxicFrog>
Either that or just add those command line options, which it really should have anyways, I just haven't bothered yet
filterfish has joined #nixos
eacameron has quit [(Remote host closed the connection)]
<ToxicFrog>
And then in the doomrl-server package, emit something like "${pkgs.telnet}/bin/in.telnetd ${pkgs.doomrl-server}/bin/doomrl-server --data-path=/srv/doomrl --doomrl-path={pkgs.doomrl}/opt/doomrl/"
<glines>
strace says that it's looking for /lib64/ld-linux-x86-64.so.2 when it tries to run
<glines>
I've tried to run it with ld-linux-x86-64.so.2 manually (with ./Teensyduino.linux64 as an argument), but ld-linux-x86-64.so.2 gets a segfault when it tries to do some dynamic linking
<clever>
glines: that sounds very strange, is there an execve anywhere in the strace?
<glines>
here, I'll just upload the strace.. one second...
amarsman has quit [(Read error: Connection reset by peer)]
<clever>
glines: it basicaly brute-force searches every byte offset of the file with "file" to find things like a tar inside the ELF
<benley>
so kinda like file --keep-going --harder --no-seriously
<clever>
benley: yeah
<benley>
that sounds extremely useful
<clever>
you can then use those with dd to extract the tar from inside the elf, and do sane things with it
<glines>
I'm mostly curious at this point. In all honesty, I could just install it in an ubuntu VM and then copy the files. (It has already been packaged this way on Arch in the AUR)
<glines>
but binwalk sounds more fun
<benley>
you could probably get away using a FhsUserEnv
amarsman has joined #nixos
markus1199 has joined #nixos
<benley>
(I'm not sure if that's the correct name of that, but you probably know what I mean)
xadi has joined #nixos
markus1189 has quit [(Ping timeout: 245 seconds)]
<glines>
I was just about to ask about FhsUserEnv
<glines>
I think it's just extracting itself and /then/ calling the linker
<glines>
I'm not very good at using FhsUserEnv though. I've never gotten it to work :/
acertain has quit [(Ping timeout: 244 seconds)]
<clever>
glines: can you paste a link of where you downloaded that ELF?
<clever>
glines: yep, its a valid UPX self-extracting-archive
<clever>
glines: running upx -d on it turns it into a 246mb elf dynamic elf file
<glines>
haha I'm getting much closer
<glines>
now I just need to uh, run it in an environment with all of the libraries it needs
[0x4A6F]1 has joined #nixos
<clever>
yeah, now you can patchelf that version
<clever>
what i believe UPX does, is it unpacks the 246mb copy to ram, then internaly re-executes that version
<clever>
without using the execve syscall
<glines>
yeah
<clever>
so you needed to patchelf the binary in ram
<glines>
which makes the strace pretty confusing
<clever>
eek
<clever>
XftFontOpenPattern
<clever>
glines: i see xorg functions in the new binary
<clever>
glines: best case, it has a CLI mode, worst case, it needs a full x server to unpack the rest
<glines>
eh, I think it is worst case
<glines>
the arch package actually uses xdotool to install it xD
Wizek has joined #nixos
<glines>
hrm, it requires libstdc++.so.6 but I forgot which nixpkgs attribute has that...
<clever>
glines: gcc.cc.lib
<glines>
awesome, thanks
[0x4A6F]1 has quit [(Ping timeout: 260 seconds)]
<glines>
ugh, this thing won't run without X11
<glines>
wow, I have it running
eacameron has quit [(Remote host closed the connection)]
<benley>
woot
herzmeister has quit [(Quit: Leaving)]
herzmeister has joined #nixos
Fare has joined #nixos
agjacome has quit [(Quit: leaving)]
<simpson>
Stupid question: Is it possible to *parameterize* NixOS modules? I want to basically have modules which take parameters and return templated configuration with those parameters.
<kier>
whoops, that's a package, not a nixos module
<kier>
what do you mean by parameters?
<kier>
i.e. in what way do they differ from NixOS config options?
angerman has joined #nixos
iyzsong has joined #nixos
xadi has quit [(Quit: Leaving.)]
proteus-guy has quit [(Ping timeout: 256 seconds)]
<simpson>
kier: Basically instead of `imports = [ ./cool.nix ];` I want to pass a parameter into cool.nix and receive a specialized module back.
eacameron has joined #nixos
<kier>
simpson: i don't know of a way to do that i'm afraid. i'm no expert though - it might be possible
<clever>
simpson: i suspect you can do imports = [ (import ./cool.nix { foo = "bar": }) ];
<clever>
simpson: and then inside that, { foo }: { pkgs, config, ... }: { normal junk }
<clever>
simpson: but it might be simpler to just use a proper config+option pair like everything else, if your only going to have a single cool.nix loaded
eacameron has quit [(Ping timeout: 258 seconds)]
<simpson>
clever: I was thinking about that.
<simpson>
clever: Basically I want to write library code. I know how I'd do it in e.g. Puppet or Ansible.
<simpson>
Maybe I just need to continue factoring.
eacameron has joined #nixos
mguentner has quit [(Read error: Connection reset by peer)]
<nekroze>
it renders the gitlab service module useless
herzmeister has quit [(Quit: Leaving)]
herzmeister has joined #nixos
iyzsong has quit [(Read error: Connection reset by peer)]
<Ralith>
how can I manually reset a TCP connection?
iyzsong has joined #nixos
filterfish has quit [(Ping timeout: 245 seconds)]
mguentner has quit [(Quit: WeeChat 1.6)]
thc202 has quit [(Ping timeout: 265 seconds)]
mguentner has joined #nixos
PragCyphr has joined #nixos
PragCyph1 has quit [(Ping timeout: 240 seconds)]
<samueldr>
are there any common tools, or tips for bisecting nix-channel update issues?
<samueldr>
I'm checking out (manually) nixpkgs and rebuild switch, testing
stepcut has quit [(Remote host closed the connection)]
<samueldr>
not that big of a deal since there are only ~40 commits
justanotheruser has joined #nixos
<simpson>
samueldr: Do you know how to use git-bisect?
<simpson>
I last bisected nixpkgs yesterday; it works great.
<samueldr>
good
<samueldr>
though, nothing nix-specific?
justan0theruser has quit [(Ping timeout: 260 seconds)]
<simpson>
Nah, not that I know of.
<samueldr>
(though, no, never actually used git-bisect before, reading the fine manual while the the binary cache is loading)
filterfish has joined #nixos
<samueldr>
I'm not used to nixos yet, but is it possible to hit revisions from the release-16.09 branch where there seems to be almost no binary-cache archives available?
<samueldr>
The revision is not more recent than the latest one available from a nix-channel --update
<simpson>
Yeah, you might have to build some stuff.
<samueldr>
I wouldn't call it "some" ;)
<samueldr>
the cache works on the inputs, right?
<samueldr>
a revision where nothing major changed would keep using the same cached archives?
<simpson>
Yes. Your Nix store will prevent most of the stuff from being rebuilt in most cases.
<samueldr>
as I thought
<samueldr>
I must have it a revision where (almost) nothing was built
<samueldr>
that's a desktop system, which means (I believe) so many interdependent depdencies
<saintromuald>
Hello, so I started using Nix, and I installed NixOS on a virtual machine. So I am pretty happy that I got it working now. one thing though I used to be able to on the nix.org website to see packages.
<saintromuald>
Is there somewhere where I can see the 6500 packages that there are available categorized for me?
<saintromuald>
I want to check the names of the software I want to install, in my Ubuntu i3 system. Essentially I see nix as a solution to some of the problems I have with Ubuntu. There are some common packages that break ubuntu all the time, like java for me.
<saintromuald>
I would like to be able to install some of those, so that I don't have to worry in the future from dependency hell essentially.
<c74d>
saintromuald: you mean nixos.org? I'm told the website you referenced is pornographic and has no relation to NixOS
<NixOS_GitHub>
[nixpkgs] Mic92 pushed 2 new commits to master: https://git.io/v1kzl
<c74d>
saintromuald: <https://nixos.org/nixos/packages.html> may be what you want, although it only shows packages for the stable version and has a limited interface
yodeler has quit [(Remote host closed the connection)]
<LnL>
spacekitteh: yup it seems to work, a bare checkout almost the same size as the compressed tarball
<spacekitteh>
cool :) i'm also thinking about how squashfs could similiarly be used
<spacekitteh>
since it has xattr support it'd allow a lot of neat stuff to be included in the archive. e.g. cryptographic hashing of each inode; this could then be used to check the integrity and identity, reguardless of layout on "disk"
<NixOS_GitHub>
[nixpkgs] FRidh pushed 2 new commits to master: https://git.io/v1kzb
<NixOS_GitHub>
nixpkgs/master f7ad022 Frederik Rietdijk: pythonPackages.ipywidgets: fix tests
<NixOS_GitHub>
nixpkgs/master 868bd67 Frederik Rietdijk: pythonPackages.jupyter_console: disable tests
filterfish has joined #nixos
newNixos has joined #nixos
<newNixos>
"hci0: BCM: Patch brcm/BCM20702A1-0a5c-21e6.hcd not found"
<newNixos>
no bluetooth
<newNixos>
on a thinkpad
newNixos has quit [(Ping timeout: 245 seconds)]
Lowl3v3l_ has quit [(Remote host closed the connection)]
MichaelRaskin has joined #nixos
simendsjo has joined #nixos
<NixOS_GitHub>
[nixpkgs] 7c6f434c pushed 2 new commits to master: https://git.io/v1kgM
<NixOS_GitHub>
nixpkgs/master fcf9f5d Michael Raskin: julia: 0.4.6 -> 0.4.7
<NixOS_GitHub>
nixpkgs/master 5d5346d Michael Raskin: julia_05: init at 0.5.0; right now backtrace-related tests are disabled because they fail in this configuration, but the rest works
ambro718 has joined #nixos
justbeingglad has joined #nixos
justbeingglad has left #nixos []
CrashOverride has joined #nixos
mguentner has joined #nixos
RchrdB has quit [(Ping timeout: 268 seconds)]
goibhniu has joined #nixos
matthewbauer has quit [(Ping timeout: 256 seconds)]
RchrdB has joined #nixos
pi3r has joined #nixos
cfricke has joined #nixos
CrashOverride has quit [(Quit: My MacBook has gone to sleep. ZZZzzz…)]
<NixOS_GitHub>
[nixpkgs] vcunat deleted staging-16.09 at da8c5d9: https://git.io/v1kaG
systemfault has quit [(Quit: Bye!)]
NEo4v8_ has quit [(Ping timeout: 256 seconds)]
ebzzry has joined #nixos
<jluttine>
hi! i'm writing my first nix expression/package. for some reason, i can't get configuration phase to run properly. for testing, i just set simple echos to preConfigure and configureScript but only the echo from preConfigure gets printed..
<hyper_ch>
unfortunately we haven't mastered the ability to mind-read-over-the-internet yet
<jluttine>
any ideas how i could write the following command without by using configureFlags and other options, as configureScript doesn't work: configureScript = ''./configure <<< $'\nN\nN\n' ''; (the configure script is interactive so i'm trying to pass answers to it in order to make it run non-interactively)
<jluttine>
s/without //
<NixOS_GitHub>
[nixpkgs] gnidorah opened pull request #20749: genymotion: 2.7.2 -> 2.8.0 and add menu item (master...master3) https://git.io/v1kwT
<tokudan>
iMatejC, thanks, I'll have a look and see if i can figure that out
<iMatejC>
sendmail: am.. maybe ... something in the lines of... systemd.services.jenkins.environment.PATH = "/var/setuid-wrappers:${systemd.services.jenkins.environment.PATH}"
<iMatejC>
havent tried it
JagaJaga has joined #nixos
matthewbauer has joined #nixos
Guest29073 has joined #nixos
<sendmail>
iMatejC: Good suggestion, just tried it, unfortunately it does not work.
matthewbauer has quit [(Ping timeout: 260 seconds)]
<Guest29073>
hello, does anybody use emacs org mode src blocks and nix-shell together? I would like to use run the code in my org mode src blocks with temporary dependencies I installed in the nix-shell. I would like a workflow like: 1) use nix-shell in a sh src block to install dependencies, 2) run other blocks in the given nix-shell
griff_ has joined #nixos
<sphalerite>
`nix-collect-garbage --help` says that there are the options --print-roots | --print-live | --print-dead, but none of them seem to be recognised if I try actually using them
<sphalerite>
hm, nix-store --gc --print-roots works
cfricke has quit [(Quit: WeeChat 1.6)]
ixxie has joined #nixos
Shou has joined #nixos
<m`>
hi! anyone writing nix expression lang in emacs? I'm using Nix-Mode, which works fine for the syntax highlighting, however it seems that some automatic indentation is making me a hard time... Anyone faced the same?
<chris|>
is there a way to set -x on the default builder? I am trying to debug a build and having a hard time trying to figure out what the builder is doing.
matthewbauer has quit [(Ping timeout: 252 seconds)]
pi3r has quit [(Ping timeout: 250 seconds)]
edvorg has joined #nixos
derjohn_mobi has quit [(Ping timeout: 256 seconds)]
RchrdB has quit [(Ping timeout: 265 seconds)]
sdothum has joined #nixos
xadi has quit [(Quit: Leaving.)]
cfricke has joined #nixos
eacameron has joined #nixos
xadi has joined #nixos
ebzzry has quit [(Ping timeout: 252 seconds)]
filterfish_ has joined #nixos
edvorg has quit [(Ping timeout: 260 seconds)]
eacameron has quit [(Ping timeout: 260 seconds)]
filterfish has quit [(Ping timeout: 256 seconds)]
slack1256 has joined #nixos
JagaJaga has quit [(Ping timeout: 258 seconds)]
viric has joined #nixos
slack1256 has quit [(Remote host closed the connection)]
viric_ has quit [(Ping timeout: 246 seconds)]
mguentner has quit [(Ping timeout: 265 seconds)]
MarceColl_ has joined #nixos
derjohn_mob has joined #nixos
<MarceColl_>
hey! I just did a fresh instalation of NixOS, I boot and after a bit it goes into emergency shell, the only thing I see in journalctl - xb is Dependency failed for /boot
matthewbauer has joined #nixos
athan has quit [(Ping timeout: 250 seconds)]
simendsjo has quit [(Ping timeout: 256 seconds)]
<lassulus>
MarceColl_: maybe he can't mount your /boot device? you could try again to boot live and look at your configuration.nix and hardware-configuration.nix
matthewbauer has quit [(Ping timeout: 250 seconds)]
<MarceColl_>
lassulus, was checking now, it seems the uuid that is defined in hardware config doesnt exist
mguentner has joined #nixos
sigmundv has joined #nixos
derjohn_mob has quit [(Ping timeout: 250 seconds)]
<lassulus>
MarceColl_: and did you fix it to an existing uuid?
eacameron has joined #nixos
<MarceColl_>
lassulus, yes, but was doing it from inside the emergency shell and rebuilding there, but apparently that didnt work, just changed it in the normal login
<MarceColl_>
now mount shows that it is mounted properly
<MarceColl_>
it hasnt fallbacked into emergency, so i assume it has gone fine
eacameron has quit [(Remote host closed the connection)]
rardiol has joined #nixos
mizu_no_oto has joined #nixos
lverns has joined #nixos
xadi has quit [(Ping timeout: 268 seconds)]
mizu_no_oto has quit [(Ping timeout: 258 seconds)]
mguentner has quit [(Ping timeout: 248 seconds)]
lverns has quit [(Quit: Konversation terminated!)]
<sendmail>
MarceColl_: I had this happen as well, twice, on different hardware, last week, the boot device just disappeared
<NixOS_GitHub>
[nixpkgs] Mic92 closed pull request #20733: pyload: add send2trash as dep (master...master) https://git.io/v1TbF
matthewbauer has joined #nixos
MarceColl_ has quit [(Ping timeout: 260 seconds)]
griff_ has quit [(Quit: griff_)]
matthewbauer has quit [(Ping timeout: 245 seconds)]
<sendmail>
iMatejC: Just so you know, I ended up fixing the path using a similar trick as you proposed, namely by adding a indirection with a bash script that does nothing more than re-exporting the PATH with /var/setuid-wrappers prepended and calling the actually command
roconnor has joined #nixos
<sphalerite>
Is it possible to install firefox addons (not plugins) via nix as well, like in debian?
pi3r has joined #nixos
rardiol has quit [(Remote host closed the connection)]
yamafaktory has joined #nixos
rardiol has joined #nixos
<NixOS_GitHub>
[nixpkgs] pSub pushed 1 new commit to master: https://git.io/v1kyc
mizu_no_oto has quit [(Quit: Computer has gone to sleep.)]
eacameron has quit [(Ping timeout: 256 seconds)]
<LnL>
yamafaktory: it's the src attribute, check out chromium/update.nix
derjohn_mob has joined #nixos
<yamafaktory>
LnL: thanks!
seppellll has joined #nixos
<seppellll>
Hi i would import a nix expression from a git(hub) repo. I know that i can do that via "import (pkgs.fetchgit {...}) {}". My problem is that the nix expression is stored in a subdirectory called "nix". How can I do that in nix?
<avn>
seppellll: `import ("${pkgs.fetchgit {...}}/nix") {}` should work
<seppellll>
avn: nice. thanks
<avn>
seppellll: not tried it, just typed in chat -- so check syntax carefully
<seppellll>
avn: works like a charm :)
xadi has joined #nixos
xadi has quit [(Client Quit)]
pi3r has quit [(Ping timeout: 250 seconds)]
<avn>
seppellll: just keep on mind, that ${....} can be any expression
xadi has joined #nixos
xadi has quit [(Client Quit)]
matthewbauer has joined #nixos
xadi has joined #nixos
xadi has quit [(Client Quit)]
herzmeister has quit [(Quit: Leaving)]
herzmeister has joined #nixos
derjohn_mob has quit [(Ping timeout: 258 seconds)]
yegods has quit [(Remote host closed the connection)]
yegods has joined #nixos
takle has quit [(Ping timeout: 260 seconds)]
<iMatejC>
clever: thanks! basically I need binary cache.. I am following https://nixos.org/wiki/Bootstrapping_NixOS_on_ARM .. and thanks to your cache the "installing the installers" part finished 1min ago (yesterday, nix was compiling gcc for 4hours+, and then I hit Ctrl+C) :)
takle has joined #nixos
takle has quit [(Ping timeout: 240 seconds)]
takle has joined #nixos
justanotheruser has quit [(Ping timeout: 246 seconds)]
glines has joined #nixos
roconnor__ has quit [(Quit: Konversation terminated!)]
mguentner has quit [(Ping timeout: 246 seconds)]
m0rphism has quit [(Quit: WeeChat 1.4)]
Dezgeg has joined #nixos
slack1256 has quit [(Ping timeout: 256 seconds)]
<athan>
iMatejC: Thank you! Sorry i was afk. I thought it was down at first too, but downforeveryoneorjustme gave me the OK. Thank you for the heads up!
matthewbauer has quit [(Ping timeout: 248 seconds)]
<iMatejC>
np
mguentner has joined #nixos
matthewbauer has joined #nixos
ixxie has joined #nixos
systemfault has joined #nixos
bennofs1 has joined #nixos
justanotheruser has joined #nixos
seppellll has joined #nixos
civodul has joined #nixos
pi3r has joined #nixos
Itkovian has joined #nixos
athan_ has joined #nixos
AppAraat has joined #nixos
ixxie has quit [(Ping timeout: 252 seconds)]
<AppAraat>
hello, does this mean that I locally built kwin or just got binaries from nixos cache? http://ix.io/1Iuk
Itkovian has quit [(Client Quit)]
ixxie has joined #nixos
yodeler has joined #nixos
Itkovian has joined #nixos
<c74d>
AppAraat: that looks like a large number of pre-built packages being downloaded to me; I don't see any local builds in there.
Sonarpulse has joined #nixos
Sonarpulse has quit [(Remote host closed the connection)]
<AppAraat>
ah cool, yeah it took quite a while (just under an hour) so I started thinking it was building but not showing up in the output.
Sonarpulse has joined #nixos
<clever>
iMatejC: let me fetch my binary cache info
<clever>
iMatejC: with this, you can leech things ive built on my hydra
<clever>
iMatejC: its following nixos-unstable-small if you want to match your nix-channel up
johnsonav has joined #nixos
<iMatejC>
clever: already done that, board is compiling my custom kernel already
<clever>
i should have the rpi fork of the kernel in there, but when i tested it recently i couldnt get it to boot
<c74d>
AppAraat: as I understand it, Nix will print both "these paths will be fetched" and "these paths will be built" lists before starting to fetch and build stuff, and the absence of the latter means that nothing will be built
<clever>
yep, that build is following the nixos-unstable-small channel
<iMatejC>
ok
<iMatejC>
clever: btw, I am building on olimex-lime2, not rpi
<clever>
ahh, then you will need a more customized kernel
<clever>
but if you get it into nixpkgs, i can add it to my jobsets and pre-build it
justanotheruser has quit [(Ping timeout: 250 seconds)]
johnsonav has quit [(Remote host closed the connection)]
<ToxicFrog>
How do I declare runtime dependencies in a mkDerivation{}? The wiki page on "packaging closed-source software" says that I should use libPaths, but that doesn't seem to be doing anything -- after being patchelf'd it's finding libraries that are already installed, but the additional ones listed in libPaths aren't getting installed as dependencies.
<clever>
ToxicFrog: you need to --set-rpath with a list of the runtime deps
<ToxicFrog>
Per the manual there's buildInputs, but that's for build time dependencies, not runtime dependencies.
<ToxicFrog>
clever: so, there's two sources of confusion here
johnsonav has joined #nixos
<AppAraat>
is it possible to "nix-env --rollback" only a specific nix package?
<clever>
when compiling stuff from source, the rpath is just set correctly by the compiler (via buildInputs)
<clever>
for closed-source stuff, buildInputs is only usefull to get things in $PATH at build time
<ToxicFrog>
clever: First of all, without doing --set-rpath, only --set-interpreter, it successfully finds and links most of its dependencies -- libm, libdl, libpthread, and libc
<ToxicFrog>
At least according to ldd
Itkovian has quit [(Quit: My MacBook has gone to sleep. ZZZzzz…)]
<ToxicFrog>
It does not find libz or libX11
<ToxicFrog>
Possibly because they aren't installed (libX11 definitely isn't, libz might not be although I'd be surprised)
<clever>
it will never find "installed" libraries
<ToxicFrog>
And I can't figure out how to reference libX11 in the derivation such that installing doomrl also installs libX11
<clever>
you must point it to the path of everything
<ToxicFrog>
Well, I didn't do that and it's finding a bunch of stuff
<clever>
not sure how its finding the others, but xorg.libX11 is the package for libX11
<ToxicFrog>
Right. And I did "libPath = stdenv.lib.mkLibraryPath [ xorg.libX11 ]", following the docs on the wiki
<ToxicFrog>
And it builds fine, but libX11 does not get installed
<clever>
all that does is set a variable called libPath
<clever>
you must use libPath in --set-rpath
<ToxicFrog>
...oh, I see. I completely missed that the call to patchelf changed between those examples
<iMatejC>
clever: I was using to boot from this image http://nixos-arm.dezgeg.me/installer/sd-image-armv7l-linux.img but systemd stalled at boot on the board, so i am building with armv7l-hf-multiplatform platform with extra kernel config option which _might_ help
<ToxicFrog>
Ok, let's try that
johnsonav has quit [(Ping timeout: 240 seconds)]
<clever>
iMatejC: ah
<ToxicFrog>
It works!
<ToxicFrog>
I mean, it doesn't actually work, because it tries to manually dlopen() a bunch of stuff
<ToxicFrog>
But it starts up
<clever>
ToxicFrog: i think dlopen can only be solved via LD_LIBRARY_PATH
<clever>
so you will want a second variable made via mkLibraryPath for those, and then use wrapProgram
<clever>
iMatejC: just following along with what your saying
johnsonav has joined #nixos
<ToxicFrog>
clever: yeah. I'm going to need a wrapper script for it anyways to go in $out/bin, since it makes some linux-unfriendly assumptions about where save files go and suchlike
<iMatejC>
:)
frankpf has quit [(Quit: Leaving)]
<ToxicFrog>
Thank you for your help!
<clever>
yep
<ToxicFrog>
Although I'm still confused as to how it's able to find e.g. libpthread and libXdmcp without being patchelf'd to look for them.
<clever>
yeah, i'm not sure on that part either
Itkovian has joined #nixos
Itkovian has quit [(Client Quit)]
<joepie91>
"it works and I have no idea why"
<joepie91>
the worst kind of bug :D
<clever>
and also why nix is designed to avoid looking in global paths
<clever>
so it breaks for everybody, rather then just those who forgot to install X
<joepie91>
yeah, I <3 deterministic failures
<ToxicFrog>
I mean, it would make sense, kinda, if e.g. libc, libpthread, and libm were in the LD_LIBRARY_PATH for everything by default, although it would seem to contradict nix's "all dependencies explicit" philosophy
Itkovian has joined #nixos
<ToxicFrog>
but libXdmcp? libXau?
<clever>
LD_LIBRARY_PATH is only setup like that inside nix-shell
<clever>
based on buildInputs
zraexy has quit [(Ping timeout: 256 seconds)]
<ToxicFrog>
I'm definitely not inside a nix-shell and LD_LIBRARY_PATH isn't set
newhoggy has joined #nixos
<joepie91>
(on which note - in my experience, software failing in a non-deterministic manner is a very reliable, bright red flag indicating that the software in question has code quality problems...)
<clever>
ToxicFrog: nixos or another distro?
<joepie91>
(there are a few possible explanations for non-deterministic failures, but most of the time it runs back to some form of either a) implicitly dependent code, or b) unnecessary global state manipulation)
Guest3001 has quit [(Quit: Lost terminal)]
<ToxicFrog>
clever: nixos.
<clever>
not what i was thinking of then
<ToxicFrog>
And it's finding them in the nix store, per the gist I posted
<clever>
yeah
<ToxicFrog>
oh wait
<ToxicFrog>
I just looked at it again and I think I see what's happening
<ToxicFrog>
Those are all part of glibc
<ToxicFrog>
And I bet linux-vdso.so depends on glibc itself
<ToxicFrog>
Or makes it implicitly available in some other way
<clever>
nope, linux-vdso.so is part of the kernel itself
<ToxicFrog>
welp
<ToxicFrog>
it is still a mystery then
<clever>
its a weird hack to make syscalls perform better
<clever>
basicaly, every cpu has a different trick to switch to kernel mode
<clever>
and you need to use the right one for syscalls, to get the best performance
<clever>
the kernel injects linux-vdso.so into every process, so the userland can get the best performance without having to care about what the cpu is
<MichaelRaskin>
I think the mystery is about running under X
<ToxicFrog>
MichaelRaskin: it's not running under X.
<MichaelRaskin>
You have /run/opengl-driver in $LD_LIBRARY_PATH
<MichaelRaskin>
Ah
<MichaelRaskin>
Hm
<ToxicFrog>
LD_LIBRARY_PATH is empty.
<MichaelRaskin>
And patchelf --print-rpath also doesn't say anything obvious?
<ToxicFrog>
Let me install patchelf and get back to you on that!~
<clever>
and you usualy dont want to install things like patche
<clever>
lf
<clever>
nix-shell -p patchelf
<ToxicFrog>
Right. I keep forgetting you can do that.
cfricke has quit [(Quit: WeeChat 1.6)]
<ToxicFrog>
On the old version (the one that finds everything but libz and libX11), --print-rpath outputs nothing.
<ToxicFrog>
On the new one, /nix/store/69z1pislpsflvjh6s4ipargmjg0jd3w3-libX11-1.6.4/lib:/nix/store/wz7l2zqdsa78jxnzkigv5gy2c7hxnbxh-zlib-1.2.8/lib
<taktoa>
anyone know how how to add a native (e.g.: non-ruby) dependency to a derivation when using bundler/bundix as described in the nixpkgs manual
<AppAraat>
anyone got kwin running successfully? When I try to run "kwin_x11 --replace" I get "FATAL ERROR: KWin could not find the KWinX11Platform plugin", this code seems to be relevant: https://github.com/KDE/kwin/blob/master/main_x11.cpp#L450
<AppAraat>
(I'm trying this on Xubuntu 16.04)
<Leo`>
nm-applet won't prompt me for my 3G modem's PIN, neither does it show me the GSM connection in the menu... Whereas nmtui does. Any idea what's going on? Maybe an additional configure flag is needed for nm-applet?
copumpkin has quit [(Quit: My MacBook Pro has gone to sleep. ZZZzzz…)]
<AppAraat>
heh, I think kwin seems to have a dependency on KDE (Plasma). I can only assume that isolating kwin is not a straight-forward thing to do.
takle has quit [(Remote host closed the connection)]
Itkovian has quit [(Quit: My MacBook has gone to sleep. ZZZzzz…)]
Fare has quit [(Ping timeout: 245 seconds)]
griff_ has joined #nixos
Itkovian has joined #nixos
spacekitteh has quit [(Ping timeout: 240 seconds)]
<seanparsons>
joepie91: Yeah, I think what I actually need is to just create a custom build that drives Stack.
tokudan has quit [(Quit: Leaving)]
mizu_no_oto has quit [(Quit: Computer has gone to sleep.)]
glines has quit [(Ping timeout: 240 seconds)]
<joepie91>
seanparsons: note that I have *no clue* about Haskell, I just ran across that post a few days ago while researching some other NixOS things :)
<joepie91>
and it seems to answer your question to at least some degree
glines has joined #nixos
jarlg has joined #nixos
Shou has quit [(Ping timeout: 244 seconds)]
viric_ has joined #nixos
<gchristensen>
hello NixOS
<johnw>
hello!
<johnw>
although, I'm technically not an operating system, so I'm answering on its behalf
<MichaelRaskin>
Wow. I tried to use NixOS code to just generate fontconfig settings that change nothing vs makeFontsConf except set the default fonts. I have failed and I don't even understand which conf.d entry is the problem. Ended up just symlinking a single config snippet…
<AppAraat>
hi, just want to check. If I can't get kwin nix package running on xubuntu 16.04, does this mean it's a bug?
<AppAraat>
(because it's missing a dependency I think)
<MichaelRaskin>
If you know how to fix it, then it's a bug, otherwise a missing feature
<gchristensen>
MichaelRaskin: is that true?
<AppAraat>
heh, interesting way of looking at things, so this will be noted down as a missing feature for now.
civodul has quit [(Quit: ERC (IRC client for Emacs 25.1.1))]
<MichaelRaskin>
gchristensen: for WM of a DE on a different distro where the Nix DBus and native DBus could have a mismatch?
<gchristensen>
ugh, lol
<gchristensen>
ok
<MichaelRaskin>
I mean, for gfortran or urxvt it would be a clear bug, but for KDE parts…
<c74d>
DE components seem like OS-level things that I'd not try to install from a non-OS-level package-manager
<MichaelRaskin>
Well, if there is a known solution for running KWin outside-everything and we don't ship it, it can still be called a bug.
<gchristensen>
but if it is complicated or error prone, perhaps would be tagged wontfix
<MichaelRaskin>
If error prone, maybe could be set optional
<MichaelRaskin>
Complicated — well, yes, effort-payoff tradeoff is always there
<AppAraat>
yeah KDE parts seem to be woefully interconnected. I did manage to get kwin from xubuntu's repos running, so I guess I have my research cut out for me.
itorres has quit [(Ping timeout: 260 seconds)]
justanotheruser has joined #nixos
matthewbauer has quit [(Ping timeout: 260 seconds)]
griff_ has quit [(Quit: griff_)]
CrashOverride has quit [(Ping timeout: 256 seconds)]
<gchristensen>
it strikes me that if you want nix managing the window manager, you might just want nixos
herzmeister has quit [(Quit: Leaving)]
herzmeister has joined #nixos
kampfschlaefer has quit [(Ping timeout: 258 seconds)]