taktoa has quit [(Remote host closed the connection)]
<noobly_>
spinus: sounds so cool, hopefully I'll understand it more thoroughly afterward. I don't really know what is meant by "default.nix" or "project"
<noobly_>
thansk
erictapen has quit [(Ping timeout: 260 seconds)]
odites has quit [(Quit: Konversation terminated!)]
<noobly_>
spinus: this is all very over my head, but in my instance of using the cs50 C library, this library would be my "package" that I need to write an expression for and build?
<Infinisil>
noobly_: Well if it's not already packaged you're highly encouraged to do it yourself :)
<noobly_>
crap lol
<Infinisil>
Nix has a concept of "derivations" which is like a recipe on how to build an output path
<Infinisil>
fetchFromGitHub is a function that takes an owner, repo, revision and sha256 and produces a derivation which when built puts the github contents into the output path
<noobly_>
what does output path mean here?
<Infinisil>
A derivation has an attribute outPath which tells you where it would end up when built
<spinus>
noobly_: default.nix in your project is basically kind of "makefile"
<spinus>
also, doing a "package" is 5 lines
<spinus>
not like in other distros :)
<spinus>
especially if you want only to have c sources
<noobly_>
spinus: ha, I might just be able to handle 5 lines
<Infinisil>
I haven't done too much just yet, but it usually ends up in more than 5 lines :P
<noobly_>
Infinisil: "where it would end up"?
<Infinisil>
If I'm packaging somebody elses program at least
<Infinisil>
noobly_: During the derivations buildPhase and such, you have the environment variable $out available, that's where you need to put something for it to be a valid build
<Infinisil>
I'll make an example
<noobly_>
ok, thank you
<noobly_>
when you say build, what does that mean? like a running program?
<manveru>
took me like 2 hours to figure out that it ain't
<spinus>
noobly_: you cannot
<Infinisil>
noobly_: What your derivation looks like determines the output path
<Infinisil>
Same derivation -> same output path
<noobly_>
Infinisil: And how does that relate back to libraries and such? You make the output path for all the depencies ?
<manveru>
it just ignores absolute paths in NODE_PATH :P
<noobly_>
ok
<spinus>
noobly_: you can create derivation per dependency
ebzzry has joined #nixos
<spinus>
and than in "main" derivation you can do buildInputs=[mydependency1 mydependency2];
<noobly_>
oh ok
<spinus>
it's like make :)
<noobly_>
OH
Wizek_ has joined #nixos
<noobly_>
ha, ok, piecing together a little bit here and there now
<spinus>
derivation=target
<spinus>
but in nix, derivation (output of it) is usually directory or file but in make usually a file
<noobly_>
so if you were in my shoes with an unpackaged library you downloaded from github, what's my fastest way to start using it for some C programs? Is it not so straightforward as calling it?
<spinus>
heh, so if you want just to use it just use gcc :)
<spinus>
and add gcc params to point to the directory with library
<noobly_>
Oh ok, so just like in Debian and such?
<spinus>
but adding nix layer will give you nice builds (and gcc magic is usually hidden)
<spinus>
yes
<Infinisil>
noobly_: What's the library you trying to use?
<spinus>
I mean, nix gives you a choice to use nix, but you don't have to :)
<noobly_>
ok, I'm trying to spend 20% of my computer time learning NixOS and 80% programming, so I'm taking lot's of shortcuts :)
<noobly_>
Infinisil: The library is cs50
<noobly_>
spinus: I don't even quite now how to install though, I keep getting told I don't have the make command
<Infinisil>
noobly_: By CoreData?
<spinus>
noobly_: doing nix derivation for you program will save you a lot of time I think (at least it's doing in all my cases)
<noobly_>
cs50 is from Harvard's online course, I don't know if CoreData is or is not attached to it though, I've hnever heard of them so I'm inclined to say no
<spinus>
any body has working qemu setup? I can produce qemu vms, but I have problems with networking
<Infinisil>
noobly_: Send us a link to the library
<Infinisil>
spinus: Did you import the qemu module?
<Infinisil>
spinus: I don't know much, I'd just try to fiddle around with the networking option (networking.interfaces networking.usePredictableInterfaceNames maybe)
<noobly_>
is make or install not default commands in NixOS?
<Infinisil>
noobly_: Well you can't make install just like that in nix
<noobly_>
That's what my trial and error has lead me to believe :p
<spinus>
Infinisil: it's not that I think, when you run qemu you need to add some params to connect it to the network or what, I'm trying to figure out how to do that
<noobly_>
but I couldn't find anything earlier when searching, and so maybe the problem isn't just syntax but my install philosophy being incompatible
<noobly_>
is mkDerivation closer to what I'm looking for?
<spinus>
noobly_: do you need only sources or you want a library to link against?
<noobly_>
I don't really know how to answer that. All I want from the library is compatibility with the course (like using the function get_string)
<noobly_>
were most of you rather experienced linux users before switching over?
<spinus>
noobly_: do they give you the command to build the thing?
<spinus>
noobly_: this is just pure C question
<noobly_>
To build what?
<noobly_>
Oh, as in do they provide the function behind "get
<spinus>
do you need only header file or you need to build library and you will be linking against it
<noobly_>
In debian, all I needed was the header and I would include something in the gcc call like -lsc50
<spinus>
great
<Infinisil>
noobly_: Put that file in a folder and call nix-build in it
<noobly_>
Infinisil: holy cow thank you!
<noobly_>
I feel so unworthy lol
<Infinisil>
Well it doesn't work yet, but I'd like to walk through the process with you
<Infinisil>
hehe
<noobly_>
Oh perfect, thank you so much. I'm all ears
<noobly_>
or... eyes and fingers?
<Infinisil>
so what do you see when you run nix-build
<Infinisil>
when it's done
<noobly_>
Ok, backing up a bit, where exactly do I place this text?
<Infinisil>
Just in a file, usually called default.nix
<Infinisil>
just anywhere really
<spinus>
noobly_: probably something like "cc50.nix"
<noobly_>
Ok, I'm saving it in a file in my home directory as cs50.nix
<spinus>
I think it's better to use default.nix for your code
<Infinisil>
Alright, then you run nix-build cs50.nix
<spinus>
but actually doesn't matter
<Infinisil>
If you call it default.nix you just don't need to tell it what to use, it'll default to that
<Infinisil>
(duh)
<noobly_>
ok, it ran but unfortunately I had an error
<noobly_>
"/bin/sh: asciidoctor: command not found make: *** [Makefile:34: docs] Error 127 builder for ‘/nix/store/791fhvf1hbwrhlhnpkxiypxz5lqyb03j-test.drv’ failed with exit code 2 error: build of ‘/nix/store/791fhvf1hbwrhlhnpkxiypxz5lqyb03j-test.drv’ failed"
<Infinisil>
Alright, you need to figure out what the error is
<Infinisil>
Ahaa
<Infinisil>
we need the asciidoctor command
<noobly_>
oh ok, so sudo nix-env -i asciidoctor?
<noobly_>
my install process is far from respectable
<Infinisil>
Nope, that would install it in your user environment, but the nix-build command creates a whole now environment just for the build
<Infinisil>
You need to edit the file and add the section `buildInputs = [ asciidoctor ]`
<Infinisil>
We're lucky that the package is called the same as the executable
<spinus>
noobly_: and nix-build prevent global environment and user profile to leak to build :] so even if you do that it won't be accessible (welcome to reproducible world)
<noobly_>
do I need to change any names (to cs50.nix) in their while I'm at it?
bennofs has quit [(Ping timeout: 276 seconds)]
<Infinisil>
noobly_: The filename doesn't matter at all
<spinus>
have to go, good luck :)
<manveru>
noobly_: for the future, error 127 means that a command|executable wasn't found :)
spinus has quit [(Remote host closed the connection)]
<Infinisil>
If we change DESTDIR to our $out, it's gonna write there instead
<noobly_>
Infinisil: Ok, that must be something we include in the command line?
<Infinisil>
And the way you do that is by changing the make install to `make install DESTDIR=$out`
<Infinisil>
Pretty simple, eh
nevermind has joined #nixos
<noobly_>
Ok, so I'm cd'ing to the directory and running make install DESTDIR=$?
<Infinisil>
Nope
<Infinisil>
aaalways change the file
<Infinisil>
the file is the only thing you wanna touch
<noobly_>
Oh! ok
<Infinisil>
you have everything you need to create this package in your file
<Infinisil>
Change that line and then run nix-build again
<noobly_>
got it doing that now
<noobly_>
"builder for ‘/nix/store/b1k9llzkhn2hyl9wnhspni2qhlkx9k5b-test.drv’ failed to produce output path ‘/nix/store/c4x4f68gx8zmks0vkyfpgqfr944a5pgf-test’ error: build of ‘/nix/store/b1k9llzkhn2hyl9wnhspni2qhlkx9k5b-test.drv’ failed"
<Infinisil>
The whole expression we used before (the whole derivation) is now assigned to `cs50` which we can reuse later
cpennington has joined #nixos
jgertm has quit [(Ping timeout: 276 seconds)]
<Infinisil>
let cs50 = <foo>; in <bar> lets you use `cs50` in `<bar>`
<Infinisil>
Your program you want to compile is a derivation as well, we're using stdenv.mkDerivation just as we did before. But as our buildInput, we now want our dependency, the cs50 library
<Infinisil>
And as the source we just want the current directory (the ./. part)
<Infinisil>
Are you following?
<noobly_>
Infinisil: trying to, looking over file now
<noobly_>
ok
aneeshusa has joined #nixos
<noobly_>
so are you saying in buildInput, I should be replacing cs50? should my path to the library go there?
<Infinisil>
noobly_: Nope, cs50 is all you need
<tilpner>
aneeshusa - Hey, uhh, would you mind showing me your config anyways? :)
<noobly_>
ok, do I need to be making any personal edits then or am I safe to continue?
<Infinisil>
Well I don't know what your project looks like
drakonis has joined #nixos
<noobly_>
When you say "project", what exactly is meant by that?
MP2E has joined #nixos
<Infinisil>
In the current directory, where this nix file is, you can now write your program
<noobly_>
Oh wow
pxc has quit [(Ping timeout: 268 seconds)]
<Infinisil>
Importing libraries by just `#include <cs50.h>`
<noobly_>
So if I were to reproduce what we did today, I could make similar enviroments for each project? Do I need to include the linker when using gcc?
<noobly_>
And they're all nestled within a directory?
<Infinisil>
noobly_: I don't think you need to set any linker flags manually, maybe in the makefile im not sure, just try without at first
<noobly_>
Oh I probably need to run nix-build again though right? since it's been edited?
<Infinisil>
Yeah, nix-build builds it again
<Infinisil>
But there's something you really need to use instead
mudri has quit [(Ping timeout: 276 seconds)]
<aneeshusa>
tilpner: I actually have to run now soorry! Will try to post it tonight or tomorrow though. 11% battery
<Infinisil>
nix-build always does a full build, which means it starts from zero, builds it all, then deletes the build artifacts
<noobly_>
what?
<Infinisil>
Yup
<tilpner>
aneeshusa - Oh, okay, thanks anyway for the approach :)
<Infinisil>
noobly_: What you want to develop instead is a faster pipeline, and there's where nix-shell comes to play
tmaekawa has joined #nixos
<Infinisil>
Running nix-shell cs50.nix gives you a shell with the envorinment configured just as nix-build would do, but nix-shell doesn't build it, it just puts you in a shell
<noobly_>
Ahh I have used nix-shell just once!
<noobly_>
that's nice though, I love the ideas of Nix
s33se_ has joined #nixos
<Infinisil>
Now within the nix-shell you can call make or whatever you need and the environment including the dependencies is all set up for you
<Infinisil>
noobly_: Yeah it's pretty cool :D
<Infinisil>
One last thing to that
<Infinisil>
If your build produces a program to run (which is probably the case), you want to copy that to $out/bin
<Infinisil>
So you need to change the installPhase to somethig like `mkdir -p $out/bin; mv .build/program $out/bin`
aneeshusa has quit [(Ping timeout: 276 seconds)]
s33se has quit [(Ping timeout: 268 seconds)]
<noobly_>
Infinisil: Trying to follow but am currently battling some interesting memory problems, one minute :-)
drakonis has quit [(Read error: Connection reset by peer)]
<Infinisil>
You can run it with `result/bin/hello` after nix-build
<noobly_>
Infinisil: do you know what this might mean / how to remedy it? warning: dumping very large path (> 256 MiB); this may run out of memory error: out of memory
<Infinisil>
Ohh yeah you should stop that
<noobly_>
I don't get it
<Infinisil>
You remember the ./. thing I mentioned before? Every path in your nix file gets copied to your store, a full copy
<disasm>
can we please end with the mailing list patch shaming people? This is getting slightly ridiculous.
<Infinisil>
So if you put /home in your nix file (not in a string), your whole /home directory would be copied to the store
<noobly_>
oh, ok..
<noobly_>
crap
<Infinisil>
noobly_: What are you trying to do?
<noobly_>
trying to run nix-build on that very last edit of default.nix
<Infinisil>
Ohhh
<disasm>
If we want people to contribute and they aren't familiar with github, I really don't see what the big deal is with reviewing patches over e-mail.
<Infinisil>
right you put it in your /home
<Infinisil>
noobly_: Usually you'll put all your source files and stuff in a single directory
<Infinisil>
then ./. only includes the source files
<noobly_>
And my source file in this case is the library?
<Infinisil>
noobly_: *your* sourcecode is the one *you* write
<Infinisil>
a program which uses cs50 for example
<noobly_>
ha, yes *my* sourcecode. Ok, but I haven't done that yet, I've only been updating default.nix and running nix-build?
<Infinisil>
Yeah, well source code you need to write yourself obviously
<Infinisil>
nix only helps you with the build process
<noobly_>
So then the error code relating to memory is coming from what?
<noobly_>
Running nix-build too many times and copying my home directory?
phreedom has quit [(Quit: No Ping reply in 180 seconds.)]
<Infinisil>
noobly_: Ah, yeah it comes from the nix-build which tries to put every path in the nix file (not ones in strings) into the nix store
<Infinisil>
and if ./. is your /home, then it obviously contains a lot of stuff and you don't want that
<Infinisil>
so nix is smart and reminds you that you probably made a mistake
<Infinisil>
Just make a new folder `mkdir project && cd project`
<Infinisil>
and move the file there `mv cs50.nix project`
roconnor has quit [(Ping timeout: 240 seconds)]
<Infinisil>
well it's `mv ../cs50.nix .` if you're in the new folder
zeus_ has quit [(Read error: No route to host)]
zeus_ has joined #nixos
<noobly_>
ha, I got it after a couple attempts :^)
<noobly_>
ok re nix-building
<noobly_>
succes1
<noobly_>
*
<noobly_>
!
<noobly_>
crap sorry, but it did succeed.
<Infinisil>
:P
* manveru
punches node some more
<noobly_>
So now, within this directory, I am able to produce and execute C source code?
<noobly_>
gotta go back and reread what you said about nix-shell
<Infinisil>
One last thing: Now you can run the program you got by doing result/bin/<name>, but what you can also do is directly install it into the user environment by doing nix-env -if .
<Infinisil>
which means you can run it with just `<name>` now
lambdamu_ has joined #nixos
<Infinisil>
I'll show you an example with some c source
<Infinisil>
Like I'm pretty sure theres like a standard Makefile structure that would do that
zeus__ has joined #nixos
mkoenig has quit [(Ping timeout: 240 seconds)]
zeus_ has quit [(Read error: Connection reset by peer)]
darlan has joined #nixos
<noobly_>
standard makefile structure?
<noobly_>
Infinisil:6
<noobly_>
Infinisil:^
<adisbladis>
Why is /tmp not mounted as tmpfs by default?
nevermind has joined #nixos
<catern>
hey #nixos, what is the best conference, of a technical nature, that is happening in 2017, and has not happened yet? are there any conferences that are relevant to Nix?
<catern>
or related at all... or at least might be interesting to someone interested in Nix...
<Infinisil>
noobly_: Well regarding the makefile and loading libraries stuff i can't help you much, have a look at `env` inside a `nix-shell --pure`, which has NIX_LDFLAGS and NIX_CFLAGS_COMPILE set to some relevant stuff
<catern>
simpson: oho!!!
<catern>
perfect
<catern>
I'll just go to splash
<Infinisil>
catern: NixCon obviously, duhh
<catern>
Infinisil: oh I didn't see it was happening this year :)
justan0theruser has joined #nixos
justan0theruser has quit [(Client Quit)]
<Infinisil>
catern: :OOO
<Infinisil>
(I only heard about it last week)
eacameron has quit [(Ping timeout: 276 seconds)]
justan0theruser has joined #nixos
<Infinisil>
I may be going there, still to be decided
justanotheruser has quit [(Ping timeout: 240 seconds)]
<Infinisil>
Oh damn, already 4am... I haven't slept since like 36 hours lol
<Infinisil>
s/since/for
Decoy_ has joined #nixos
<Infinisil>
Good night then ;) Have fun with NixOS, noobly_
tmaekawa has quit [(Ping timeout: 260 seconds)]
Infinisil has quit [(Quit: leaving)]
sary has quit [(Quit: Lost terminal)]
cpennington has quit [(Remote host closed the connection)]
<DavidEGr1yson>
What if I want to use a Nix expression to build a variety of derivations based on source code that is sitting on my computer. Is there an easy way to refer to a director on my computer in a Nix expression so I can do that?
<DavidEGr1yson>
*directory
<tilpner>
Just a sanity check, what is <nixos> usually set to?
<DavidEGr1yson>
I know I can write ./src.tar.gz in a Nix expression to refer to a single file, relative to the .nix file.
<DavidEGr1yson>
tilpner: It resolves to whatever "nixos" is set to in your NIX_PATH environment variable.
<DavidEGr1yson>
echo $NIX_PATH
<vaibhavsagar>
you can have multiple sources, look at 'srcs'
roconnor has joined #nixos
<tilpner>
DavidEGr1yson - What's your value of <nixos>?
<DavidEGr1yson>
vaibhavsagar: If that is a response so me, thanks, but I'm afraid it doesn't help much. I'd like to somehow use the source code on my computer without instrumenting a way to put it in an archive file, copy the archive file to the Nix store, and then extract the archive file.
<tilpner>
(I know it resolves like that, but I don't know what NIX_PATH should contain for it)
<DavidEGr1yson>
tilpner: <nixos> would not be found for me; I'm just running Nix as an application on Manjaro Linux.
<DavidEGr1yson>
not using NixOS
DavidEGr1yson is now known as DavidEGrayson
<tilpner>
Specifically, I'm sure whether it points to nixpkgs/ or nixpkgs/nixos
<vaibhavsagar>
DavidEGrayson: you can specify the directory as the 'src' attribute
<tilpner>
*unsure
<vaibhavsagar>
no need to put it in an archive
<DavidEGrayson>
vaibhavsagar: Oh, like "src = ./.;" maybe?
<DavidEGrayson>
I'll try
<DavidEGrayson>
vaibhavsagar: OK, thanks, that does work.
<DavidEGrayson>
vaibhavsagar: It's not so great because it copies the whole directory into the Nix store, including my .git directory. Won't work well for large projects but for my scale of thing I suppose it works.
<DavidEGrayson>
vaibhavsagar: I guess a future version of Nix could have fancy features for excluding .git directories.
<vaibhavsagar>
DavidEGrayson: look up filterSrc
<vaibhavsagar>
actually called 'filterSource'
ison111 has joined #nixos
<vaibhavsagar>
"This function allows you to copy sources into the Nix store while filtering certain files."
<DavidEGrayson>
hey, looking nice! thanks a lot
<vaibhavsagar>
no worries, I had the same questions a few months ago
<ison111>
What could be the cause of me being unable to start nix-shell? Whether it's in a script or just right on the command line it just prints "error: getting status of ____: no such file or directory"? If I run nix-shell by itself the blank part is "default.nix" in the current directory, and if I run it with -i python then it's "python".
endformationage has joined #nixos
<DavidEGrayson>
vaibhavsagar: Cool, filterSource seems to do exactly the right thing, after some testing.
<clever>
DavidEGrayson: there is also lib.cleanSource
nevermind has quit [(Quit: My MacBook has gone to sleep. ZZZzzz…)]
fnlkj has quit [(Quit: ?)]
NixOS_GitHub has joined #nixos
<NixOS_GitHub>
[nixpkgs] NeQuissimus pushed 1 new commit to master: https://git.io/vQ4gI
<NixOS_GitHub>
nixpkgs/master 3130f3e Tim Steinbach: linux-copperhead: 4.11.7.a -> 4.11.8.a...
NixOS_GitHub has left #nixos []
nevermind has joined #nixos
StuK[m] has joined #nixos
<DavidEGrayson>
clever: thanks
zeus__ has quit [(Remote host closed the connection)]
eacameron has joined #nixos
<noobly_>
test
<noobly_>
damn goodnight Infinisil, you need it :)
ndrei has joined #nixos
<DavidEGrayson>
Just goes to show, there are a bunch of useful features of Nix that you won't find in nixpkgs
<DavidEGrayson>
or at least not commonly
jgertm has joined #nixos
<noobly_>
Ok, I recently tried to set up a development enviroment (courtesy of Infinisil) and created a default.nix file that I think had the depencies I need, but when I try to compile some C source code inside the relevant directory, I can't effictively link the library
Decoy_ has quit [(Ping timeout: 276 seconds)]
<DavidEGrayson>
Yeah, thanks to clever and vaibhavsagar, I can now run "nix-build" and it cross-compiles the program whose source is on my computer for two different operating systems :)
nevermind has quit [(Quit: My MacBook has gone to sleep. ZZZzzz…)]
Decoy_ has joined #nixos
<noobly_>
any takers?
zeus_ has joined #nixos
seanparsons has quit [(Remote host closed the connection)]
zeus_ has quit [(Ping timeout: 276 seconds)]
seanparsons has joined #nixos
<noobly_>
how do I make install in NixOs?
<noobly_>
say, after unzipping or such?
<nixy>
Are you trying to run make install outside of a nix build process?
<hyper_ch>
(usually I bother clever until he fixes my own .nix installer script)
<noobly_>
nixy: I don't really know what I'm trying to do. Initially I was trying to set up a C enviroment to use a library, and I think I'm super close to doing it
<noobly_>
haha yeah, clever's the man
<noobly_>
nixy: but using make install specifically, what I did was download a zip, unzip it, navigate to the new folder then ran make install
<nixy>
noobly_: The way I understand things, that won't work
<nixy>
You would need to write a Nix expression that declares all the dependencies of whatever you are trying to install and then use `nix-build` or `nix-env` to build it
<noobly_>
I did that, but I'm not sure how having the nix-expression relates to the make install.
<noobly_>
I have a folder "project" that has default.nix that is what you describe, while the library sits in my downloads folder unzipped
<noobly_>
do I need to move the unzipped library folder to the "project" folder that contains my nix expression?
<noobly_>
I imagine it's for the library, all I want to be able to do is us functions from the cs50.h library in C
<nixy>
noobly_: Oh okay. It looks like you already have a nix expression there, `cs50`, which describes the library. You shouldn't need to download or run make install or anything
<noobly_>
So I put that in it's own directory and nix-build'd that, but when I link the library it doesn't work. However, in the instructions for the library (https://github.com/cs50/libcs50), they mention having to cd into the directory after unzipping and making installing, but I don't know how to translate that into Nix
<noobly_>
nixy: but when I link the library in a simply "hello world" C program, it fails. Why might this be then?
<nixy>
Nix would automatically `cd` into the directory before running make install, so I don't think that is your issue
jgertm has quit [(Ping timeout: 240 seconds)]
<noobly_>
nixy: Hmm, well thanks for the info. If you'd like any more info from me, I'm gonna be here awhile trying to figure this out :-)
<nixy>
noobly_: How are you trying to link the library? It looks like the nix expression you gave us has filler content for the build and install phase.
<noobly_>
nixy: Hmm, interesting question. I was only including it in the header of my program ("#include <cs50.h>"), I'll expirement with some other strategies right now
<nixy>
You pretty muh shouldn't be trying to use a c compiler or make on the command line and should only be using nix-build
<noobly_>
I shoulnd't be using GCC but instead nix-build?
<nixy>
That is my understanding, albeit as someone who doesn't do C development with Nix.
<nixy>
NixOS is pretty unconventional for development as a lot of normal ways of doing things don't work
mog has quit [(Ping timeout: 255 seconds)]
<noobly_>
nixy: well, I think I'm closer using that. It's now pointing out some confusing syntax error rather than claiming the library doesn't work
<noobly_>
however, the syntax error isn't any less confusing :^)
jgertm has joined #nixos
<nixy>
Can you pastebin the error you're getting?
mog has joined #nixos
<noobly_>
Well, it's only hello world, so it's rather tiny: error: syntax error, unexpected ')', at /home/alice/project/hellow_world.c:4:10
<noobly_>
but the error is simply wrong, it must be
<DavidEGrayson>
Yeah, it's OK to run gcc on the command line if you're just writing hello world. If you want to write something and package it up for other people to use, the whole point of Nix to put all invocations of GCC and other build tools in a Nix expression and accompanying shell script.
<noobly_>
DavidEGrayson: Yeah I'm just trying to program for purely selfish reasons :^) Still don't get why I can't get it to compile though
<noobly_>
Does anyone know why this may not be working
<noobly_>
?
<DavidEGrayson>
post a link to hellow_world.c, preferably with the error line highlighted
reinzelmann has joined #nixos
Decoy_ has quit [(Ping timeout: 240 seconds)]
mkoenig has joined #nixos
NixOS_GitHub has joined #nixos
<NixOS_GitHub>
[nix] rimmington opened pull request #1428: Clearer error message when regex exceeds space limit (master...clearer-regex-space-error) https://git.io/vQ4VZ
NixOS_GitHub has left #nixos []
akiselev has joined #nixos
<akiselev>
is there a way to run nvidia-docker on nixos?
<akiselev>
i cant seem to find it in nixpkgs
eacameron has quit [(Remote host closed the connection)]
alx741 has quit [(Quit: alx741)]
<clever>
$ nix-build hello_world.c
<clever>
error: syntax error, unexpected ')', at /home/clever/iohk/iohk-nixops/hello_world.c:1:10
<clever>
DavidEGrayson: i believe i found the problem
mog has quit [(Ping timeout: 276 seconds)]
<clever>
noobly_: you are supposed to be running nix-build on a nix file, and then the nix file runs gcc for you
akiselev has quit [(Quit: Page closed)]
mog has joined #nixos
Biappi has quit [(Ping timeout: 255 seconds)]
qknight has quit [(Ping timeout: 255 seconds)]
noam__ has joined #nixos
isHavvy has joined #nixos
noam has quit [(Write error: Connection reset by peer)]
Rotaerk_ has joined #nixos
qknight has joined #nixos
Rotaerk has quit [(Ping timeout: 268 seconds)]
Havvy has quit [(Ping timeout: 268 seconds)]
ison111 has quit [(Ping timeout: 260 seconds)]
mkoenig has quit [(Remote host closed the connection)]
isHavvy is now known as Havvy
riclima has joined #nixos
mkoenig has joined #nixos
mkoenig has quit [(Remote host closed the connection)]
justanotheruser has joined #nixos
justan0theruser has quit [(Ping timeout: 240 seconds)]
riclima has quit [(Quit: My MacBook has gone to sleep. ZZZzzz…)]
faffolter has joined #nixos
faffolter has quit [(Changing host)]
faffolter has joined #nixos
freusque has joined #nixos
<raunov>
what am i doing wrong when defining local nixpkgs path as: nix.nixPath = [ "/etc/nixos" "nixos-config"=/etc/nixos/configuration.nix" ]; (would like to avoid -I parameter for nixos-rebuild)
katyucha is now known as Guest55372
Guest55372 has quit [(Killed (verne.freenode.net (Nickname regained by services)))]
katyucha_ is now known as katyucha
katyucha_ has joined #nixos
ericsagnes has quit [(Ping timeout: 240 seconds)]
<tilpner>
raunov - I have nixpkgs=..., but yours might work too. Make sure to nixos-rebuild switch and login again
marsel has quit [(Ping timeout: 260 seconds)]
<raunov>
tilpner: you have it like: nix.nixPath = [ "nixpkgs=/etc/nixos/nixpkgs" "nixos-config=/etc/nixos/configuration.nix" ]; ?
reinzelmann has quit [(Quit: Leaving)]
<tilpner>
Just with different paths, but yes, like that
<raunov>
weird, it still tries to install wrong packages
Decoy_ has joined #nixos
<tilpner>
What does echo $NIX_PATH say?
<raunov>
it's wrong yep
<raunov>
ill try to change env var manually first
<tilpner>
Did you "Make sure to nixos-rebuild switch and login again"?
<raunov>
well i couldn't rebuild cause it was going to mess things up with wrong packages :D
<raunov>
but seems manually changing NIX_PATH and then doing rebuild + relogin did the trick
nmikhailov has quit [(Ping timeout: 240 seconds)]
nmikhailov has joined #nixos
aszlig has quit [(Ping timeout: 240 seconds)]
aszlig has joined #nixos
marcinkuzminski has quit [(Ping timeout: 240 seconds)]
bara has quit [(Ping timeout: 240 seconds)]
bara has joined #nixos
justbeingglad has joined #nixos
<raunov>
tilpner: thx for the env var hint
marcinkuzminski has joined #nixos
MP2E has quit [(Quit: leaving)]
raunov has quit [()]
raunov has joined #nixos
Decoy_ has quit [(Quit: leaving)]
NixOS_GitHub has joined #nixos
<NixOS_GitHub>
[nixpkgs] Ma27 opened pull request #26983: i3: add `configFile` to enable cutom configuration locations (master...i3/allow-custom-configuration) https://git.io/vQ46w
NixOS_GitHub has left #nixos []
justbeingglad has left #nixos []
pxc has joined #nixos
Itkovian has joined #nixos
Wizek has joined #nixos
Wizek_ has joined #nixos
marsel has joined #nixos
<sphalerite>
Decoy_: re saving crashing chromium — I think someone described a similar issue a couple of days ago but I can't remember who it was or any other details unfortunately — sorry — but at least I'm pretty sure you're not alone in having that issue
<sphalerite>
aw bummer, missed them
NixOS_GitHub has joined #nixos
<NixOS_GitHub>
[nixpkgs] lheckemann opened pull request #26984: xserver: check case of multiple keyboard layouts (master...xkb-multiple) https://git.io/vQ4PP
<lemmmy_>
hi everyone, I'm having an issue with networking. I'm under a strict firewall so can't connect via ethernet, and I'm trying to connect to an eap WiFi ssid with wpa supplicant
<lemmmy_>
the problem is I can't run dhcpcd or dhclient because they are not installed
<lemmmy_>
and I have no Internet connection to download them with, any ideas?
<bennofs>
kuznero: can you describe "not working" in more detail? (what do you expect, what do you see instead)
roconnor has quit [(Ping timeout: 276 seconds)]
<kuznero>
bennofs: when I try to `nixos-rebuild switch` it still is trying to run tests on ghc-syb-utils package. It fails currently and I would like to avoid it.
<bennofs>
kuznero: i think youi need to move the override from haskellPackages to myHaskellPackages
<bennofs>
kuznero: as you're using haskell802Packages later on
<kuznero>
hm, I will try... just a moment
faffolter has joined #nixos
faffolter has quit [(Changing host)]
faffolter has joined #nixos
<kuznero>
bennofs: I am not sure how exactly to do that. Can I do it inside mkDerivation somehow?
<bennofs>
kuznero: add the ghc-syb-utils = line directly before the mkDerviation = line
<kuznero>
bennofs: that worked! thanks a lot! I feel that I am missing a lot on some basic nix. Can you by chance recommend any good resource on that? I am a little intimidated by official nix/manual...
<ZoomZoomZoom>
Hey guys, How do I substitute a date into a string (systemd service command)? Is launching the whole thing as a '/bin/sh -c "..."' and using regular substitution inside the only option?
<gchristensen>
ZoomZoomZoom: you can't do ${pkgs.bash -c ...} but you can do $(${pkgs.bash} -c "date")
<viric>
but anyone is a better maintainer than me, these days
<gchristensen>
(which is regular bash substitution, as you noted)
<bennofs>
viric: so i guess it is fine if I just do some basic sanity checks (build + doesn't crash when started) and then merge it?
<viric>
bennofs: exactly
<viric>
I wonder who the maintainer of stageNative is :)
<bennofs>
viric: git blame?
mudri has joined #nixos
<viric>
bennofs: it even does not evaluate, so go wonder
<viric>
bennofs: couldn't be more abandoned :)
jtojnar has joined #nixos
<ZoomZoomZoom>
gchristensen, thanks, but the regular substitution doesn't work. It just unwraps as a command.
<viric>
so I guess that nixpkgs master does not work at all on bsds and cygwin, for example
arjen-jonathan has quit [(Ping timeout: 240 seconds)]
<gchristensen>
ZoomZoomZoom: what do you mean? can you provide some context?
johann__ has joined #nixos
johann__ has quit [(Client Quit)]
<ZoomZoomZoom>
gchristensen, so it goes: ''${pkgs.borgbackup}/bin/borg ... backupname-$(${pkgs.bash}/bin/bash -c "...")'';
<ZoomZoomZoom>
So, the substitution doesn't work, because there's no shell actually launching the command?
johann__ has joined #nixos
<gchristensen>
right, you'll have to wrap that in a bash substitution
<ZoomZoomZoom>
Oh, it's such a lame question.
<MoreTea>
ikwildrpepper, I'm not 100% sure, but it appears that Terraform is quite eager to kill machines
<ZoomZoomZoom>
gchristensen, Ok, so I was right, the only way is to launch everything as a shell command. Thanks.
<gchristensen>
yep! you're welcome :)
mudri has quit [(Ping timeout: 240 seconds)]
<nixy>
So I want to wok on adding some stuff to the Nix manual, but am having a hard time building the manual itself
<adisbladis>
grahamc: Running into some issues with your manual PR (26940) http://ix.io/y8f
<nixy>
Seems like there is some pretty good documentation for the manuals within nixpkgs, that is the NixOS and Nixpkgs manual, but I have no idea how to build the regular ol Nix manual
<gchristensen>
adisbladis: O.O did a break that? :o
<adisbladis>
gchristensen: Sure seems like it. Not had a proper look at it yet
bennofs has quit [(Ping timeout: 255 seconds)]
<gchristensen>
adisbladis: wait, what are you reporting is the problem?
johann__ has quit [(Quit: Leaving.)]
<gchristensen>
adisbladis: that it isn't easy to debug? or that the manual doesn't compile?
<MoreTea>
nix-shell in a buildGoPackage is supposed to create a proper go path in a tmp dir, right?
<MoreTea>
I see that it appends a tmpdir to $GOPATH, but it's completely empty
<ZoomZoomZoom>
gchristensen, I still have some problems, not strictly Nix-related. Now something eats a part of my command. :) Dunno, Systemd or sh. I have the following string inside a service: "/backup/serv::srv-$(date +%F-%R) \". When launched, %R substitutes for nothing, %H (if used) gets substituted for the host name. This is not what Date should do.
<gchristensen>
heheh yes
<gchristensen>
this is in a systemd service?
<ZoomZoomZoom>
Yep
<gchristensen>
yeah I think you need to escape them, like %%F and %%R
<gchristensen>
although, depending on how it is in there, I'm not certain subshells are processed by systemd
<ZoomZoomZoom>
The whole ExecStart is /bin/sh -c "...". Oh, ok. But what part of the chain is changing the %H for a host name? Didn't found anything like it in Systemd manual.
<adisbladis>
gchristensen: And I'm not sure if this is actually a regression in nixpkgs or if it's a bug in that management tool
phreedom has joined #nixos
cpennington has joined #nixos
<gchristensen>
adisbladis: ok another way to debug is add cat ./manual-combined.xml | head -n2568 | tail -n20 right before where you added the jing command
roconnor has joined #nixos
Magnap[m] has joined #nixos
<icetan>
wrong nick?
<gchristensen>
sorry, icetan?
glines has joined #nixos
<icetan>
sorry, I think I'm drunk or got worms or something :|
<glines>
I've gotten really close, but now I get this: libUE4Editor-UnrealEd.so: undefined symbol: _ZNSs4_Rep20_S_empty_rep_storageE
<glines>
I suspect something got linked in there that depends on gcc's c++ library: :s
arjen-jonathan has quit [(Ping timeout: 240 seconds)]
<glines>
flox: are you behind a proxy or something+
<glines>
*?
<glines>
oh, 500 is internal server error. Maybe the server broke? :/
<flox>
glines: no, I'm not
<flox>
the strange thing is, a whole bunch of other files download just fine
magnetophon1 has joined #nixos
tmaekawa has joined #nixos
NixOS_GitHub has joined #nixos
<NixOS_GitHub>
[nixpkgs] peti opened pull request #26987: R: update to version 3.4.1 (master...r-updates) https://git.io/vQBJY
NixOS_GitHub has left #nixos []
pie_ has quit [(Ping timeout: 276 seconds)]
andymandias has quit [(Quit: ZNC 1.6.5 - http://znc.in)]
peacememories has joined #nixos
andymandias has joined #nixos
simukis has joined #nixos
pie_ has joined #nixos
<dtzWill>
glines: if you're interested in de-gcc-dep'ing llvm/clang on Nix-linux I can help
<dtzWill>
in probably most of the ways you might want to do it xD
<dtzWill>
but dep'ing on gcc's libstdc++ isn't necessarily bad; clang works great with it. Problems are when trying to convince clang to not use anything gcc (like, say, libc++ or musl or..)
<glines>
dtzWill: I have made some progress. it used to complain about duplicate c++ symbols at link time
<glines>
UE4 is bundled with libc++.a
<dtzWill>
we're also overdue for teaching clang to do reasonable things on NixOS-- we have wrappers but especially after clang's toolchain rewrite it's.. well it's a lot easier to make distro-specific changes that would make our lives a lot easier
<dtzWill>
glines: ooh, okay. yep that'd do it.
pie_ has quit [(Ping timeout: 260 seconds)]
<glines>
the NIX_DEBUG=1 flag is very handy with clang++
pie_ has joined #nixos
<glines>
but yeah, I've been hacking at the wrapper script just to get it to stop linking to gcc's library
MoreTea has joined #nixos
<glines>
I wonder how those symbols are still sneaking in... UE4 is a huge build, so it might take me a while to figure it out @_@
<dtzWill>
lol *yep*. Also it bakes in the gcc paths into the clang binary
<glines>
oh jeez
<dtzWill>
so you have to a)not do that and b)work hard to kludge them out
<glines>
hmm
<dtzWill>
oh yeah it's hilariously bad; said differently it's incredibly good at finding /some/ gcc to work
<glines>
that's good to know
<dtzWill>
i think years of "how come clang sucks and doesn't amgically work with my random gcc install" are responsible
<dtzWill>
it's better recently, but still reuqires some build options and I haven't revisited some of the kludges that were needed, say, a year ago
<glines>
I suspect that UE4 only recently began bundling libc++. I didn't used to have this problem
<dtzWill>
sorry that I don't have patches/wrappers immediately avail for use, I would love to it's just a bit tangled in my own mess atm O:)
<glines>
heh, I have to go to work soon. they don't pay me to compile UE4 ;)
<dtzWill>
but yeah glad you found NIX_DEBUG--that does a lot to bring some sanity
<dtzWill>
d'oh
sigmundv_ has quit [(Ping timeout: 240 seconds)]
<glines>
if I find more time to plumb the clang derivation, I'll let you know how it goes
<dtzWill>
@everyone: there was some stat about Nixpkgs (I think) being in the top repositories by activity or pull requests or something, but I'm having trouble tracking that down... anyone have a link/reference?
<ertes-w>
the 'lean' package seems to be incomplete: the library is missing the whole 'algebra' part, for example
<ertes-w>
does anyone know why that is?
linarcx has left #nixos []
peacememories has quit [(Quit: My MacBook has gone to sleep. ZZZzzz…)]
NixOS_GitHub has joined #nixos
<NixOS_GitHub>
[nixpkgs] NeQuissimus pushed 1 new commit to release-17.03: https://git.io/vQBte
<NixOS_GitHub>
nixpkgs/release-17.03 8a8bc4f Tim Steinbach: Merge pull request #26988 from taku0/firefox-bin-54.0.1...
NixOS_GitHub has left #nixos []
<dtzWill>
jophish: I usuallly just run "genericBuild" and then control-c when it gets to the part I want :P
nslqqq has quit [(Ping timeout: 276 seconds)]
<dtzWill>
because I always forget all the phases and/or hooks, and/or the invocation for each eval-bash-magic, so I save that for when I need to /only/ do a particular phase for w/e reason
faffolter has quit [(Ping timeout: 240 seconds)]
faffolter has joined #nixos
faffolter has quit [(Changing host)]
faffolter has joined #nixos
peacememories has joined #nixos
cpennington has joined #nixos
<qknight>
ln: die symbolische Verknüpfung '/run/user/1000/tmp.DpeLdLfiVE-nixcloud-backend-0.0.1/src/github.com/lib/pq/0g6yrisq8dsid473ygkpgw7ywlvgzd3g-pq-3cd0097' konnte nicht angelegt werden: Read-only file system
<qknight>
i see this on all my 'nix-shell' usages
<qknight>
i'm on nixos unstable
LinArcX has joined #nixos
LinArcX has left #nixos []
<qknight>
i get this error using `nix-shell`
disasm has joined #nixos
nslqqq has joined #nixos
bennofs has joined #nixos
<jophish>
dtzWill: thanks!
justelex_ has joined #nixos
LinArcX has joined #nixos
<jophish>
So, I have some derivations which require a system with an nvidia gpu. I can set the required features for these builds, but what's the easiest way of running builds requiring these derivations on systems without a nvidia gpu?
<jophish>
(remoting out to a system which does have a gpu for that part of the build)
disasm has quit [(Client Quit)]
<jophish>
I'd like to run as much as possible on an beefy server, but use the office computers for this one derivation which requires an nvidia gpu
<jophish>
I'm sure that this is possible, but I'm not sure of quite how to do it
<jophish>
iirc there was something about requiredFeatures being ignored for some builds
LinArcX has left #nixos []
<qknight>
oh, seems this is a shellHook speciality issue for 'nix-shell' with buildGoPackage
<qknight>
and i can fix that
<qknight>
sorry, thought it was a more generic issue related to nix-shell
<manveru>
man i finally figured out this node-gyp stuff
<LnL>
gyp is super annoying
<manveru>
yeah...
<manveru>
just managed to get bcrypt and node-sass to build in yarn2nix
Itkovian has quit [(Quit: Textual IRC Client signing off)]
arianvp2 has joined #nixos
Wizek_ has joined #nixos
tvon has quit [(Remote host closed the connection)]
arianvp2 has quit [(Client Quit)]
tvon has joined #nixos
vanrein has joined #nixos
vanrein has left #nixos []
disasm has joined #nixos
earldouglas has joined #nixos
raunov has quit [(Ping timeout: 240 seconds)]
Wizek_ has quit [(Ping timeout: 255 seconds)]
tvon has quit [(Ping timeout: 260 seconds)]
<gchristensen>
jophish: use a requiredfeature?
Itkovian has joined #nixos
Itkovian has quit [(Client Quit)]
tvon has joined #nixos
tvon has quit [(Remote host closed the connection)]
tvon has joined #nixos
tvon has quit [(Read error: Connection reset by peer)]
Rotaerk_ has quit [(Quit: Leaving)]
tvon has joined #nixos
eacameron has joined #nixos
Wizek_ has joined #nixos
linarcx has joined #nixos
cpennington has quit [(Ping timeout: 240 seconds)]
MoreTea has joined #nixos
linarcx has quit [(Remote host closed the connection)]
jensens has quit [(Ping timeout: 240 seconds)]
<joepie91>
manveru: do you maintain yarn2nix or are you just a user?
<MoreTea>
joepie91, I started it as a PoC, but there are more people interested in it
linarcx has joined #nixos
<MoreTea>
I should give it some time soon.
NixOS_GitHub has joined #nixos
<NixOS_GitHub>
[nixpkgs] Ericson2314 closed pull request #26881: Make hash-breaking cleanups avoided in #26007 (staging...cross-hashbreak) https://git.io/vQGYS
NixOS_GitHub has left #nixos []
<MoreTea>
There are some things that I'm not sure that we can fix properly (like running the postInstall hooks)
<joepie91>
MoreTea: two questions: 1) what does yarn2nix provide that node2nix/npm2nix do not? given that it all still installs the same packages, and 2) are there issues with node-gyp support? if yes, I might be able to help
linarcx has left #nixos []
<manveru>
joepie91: yarn2nix is massively faster atm
<manveru>
that's why i switched my projects to use it, didn't contribute much yet
<MoreTea>
1) it piggybacks on yarn, which actually is used a lot in upstream projects. So you'd be able to get their pinned transitive deps, like how one would use the Gemfile.lock deps for ruby projects.
<MoreTea>
I do not want my dependencies to change from one `npm install` run to another.
LinArcX has quit [(Remote host closed the connection)]
<joepie91>
MoreTea: because there's a significant security cost. locking vs. not locking is a tradeoff where 'locking' results in not automatically receiving security updates, and 'not locking' results in occasional (but very rare) breakage
LinArcX has joined #nixos
<joepie91>
MoreTea: this tradeoff can favour "locking", *if* you have the manpower to constantly watch and immediately update dependencies after testing.
kriztw has quit [(Ping timeout: 240 seconds)]
<MoreTea>
I care to disagree ;)
<joepie91>
MoreTea: the problem is that most developers do not, therefore they default to just never updating anything, which causes a lot of security issues.
<MoreTea>
One can have scanning tools (like gemnasium for ruby) that solve this problem.
so has quit [(Ping timeout: 240 seconds)]
<joepie91>
MoreTea: this is not a problem that is solvable using tools.
Fuuzetsu has quit [(Ping timeout: 240 seconds)]
nmikhailov has quit [(Ping timeout: 260 seconds)]
<joepie91>
MoreTea: all a tool can do is 1) notify you and 2) run tests, neither of which are all the work that is required for a reliable dependency update.
<MoreTea>
Well, node2nix actually implements exactly this behaviour as well.
<joepie91>
if you want to audit updates for compatibility before applying them, you *must* invest human effort.
<disasm>
trying to get printing working with an HP printer... http://sprunge.us/dcKA -- it appears /nix/store/cikybp12m9j146za1p18lgv7cmh2hl4k-hplip-3.16.5/lib/cups/filter/.hpps-wrapped is calling Popen in a python script that runs hostname -s which returns no such file or directory. Any thoughts at how to fix this?
<joepie91>
this is not circumventable no matter what tools you apply.
kriztw has joined #nixos
<joepie91>
and that's precisely why locking should be an option but not the default; because most developers DO NOT have the manpower to do that, and for them the occasional breakage makes much more sense.
<MoreTea>
joepie91, and now you're arguing in favor of having locked deps :) Because you say that you manually want to verify that an update is correct.
<joepie91>
(if any, because semver-violating breakage is very rare, and wasn';t even really perceived as a problem until Yarn came into existence)
<joepie91>
MoreTea: no, I'm not.
<MoreTea>
ok, let's agree to disagree then :)
<joepie91>
MoreTea: I'm saying that *if* you want to manually verify that an update is correct, *then* you need to invest effort.
<joepie91>
MoreTea: most developers *do not* want to manually verify that updates are correct.
<joepie91>
(and therefore don't)
pxc has joined #nixos
<joepie91>
when you're locking, that means you have unpatched security issues.
<joepie91>
when you're not locking, that means that occasionally something will break.
<joepie91>
the latter is very clearly preferable.
<MoreTea>
I've been in ecosystems before that did not have this, and silent breakage of transitive deps is horrible ;)
<joepie91>
MoreTea: I've been developing in Node for several years now, actively answering thousands of questions on IRC, doing private tutoring and code review. semver breakage in Node was never a significant issue.
<joepie91>
what happened in other ecosystems isn't really relevant, because they're structured fundamentally different.
<joepie91>
semver breakage is an invented problem for the most part.
cpennington has joined #nixos
<joepie91>
it is certainly not significant enough to warrant the massive security implications of locking all the deps by default, as well as the implications it will have for semver usage in the ecosystem
<joepie91>
the problem here is the same as with every Facebook project: Facebook's projects are designed to satisfy Facebook's usecases.
<joepie91>
and yes, FB will prefer manual update audits over occasional breakage, but that doesn't mean that this is a sensible tradeoff for the rest of the ecosystem.
<joepie91>
MoreTea: further datapoint: chalker (who is probably the most active person in both Node core and the wider community in terms of remedying security issues in the ecosystem) agrees on the "people simply will not update dependencies, and locking is harmful to security" assessment.
<MoreTea>
I fully agree with steveklabnik in that thread ;)
<joepie91>
MoreTea: steveklabnik never actually addressed my point head-on.
<joepie91>
(nor does it cover any of the issues described above)
<MoreTea>
and IMHO it also fits the philosophy of Nix, where we are very precise about what we specify as deps.
<MoreTea>
But I don't think that we're going to convince each other ;)
<joepie91>
MoreTea: the Nix model in no way precludes semver installations.
<joepie91>
(quite the opposite, in fact)
<joepie91>
MoreTea: also, whether I can be convinced depends entirely on whether sound and valid arguments are presented -- so far, they have not been.
<joepie91>
I would hope that, in a technical channel, that is generally the bar that people use.
peti has quit [(Quit: WeeChat 1.7)]
<MoreTea>
I'm just wondering then, how do you use `npm install` in nix, without making sure that it will have exactly the same inputs?
<joepie91>
MoreTea: ideally, one wouldn't use `npm install` at all, but rather produce the node_modules directory in Nix directly
<MoreTea>
having an `npm install` that potentially does something different every time --and generating a different output SHA-- will break directly.
<MoreTea>
But then how do you control updates?
<joepie91>
MoreTea: by having a semantic versioning abstraction, for example, that selects whichever is currently the latest range-matching version for a given dependency input
<joepie91>
at that point, a rebuild will use whichever is the latest satisfactory version of a dependency
<MoreTea>
but how do you force a rebuild then?
<joepie91>
what do you mean?
<MoreTea>
because if you're just including a semver range in the build inputs, it will remain cached on your laptop/hydra
<joepie91>
MoreTea: you're not including a semver range in the build inputs; you're *producing* the build inputs based on a semver range
<joepie91>
ie. once the latest version changes, so does the input
<joepie91>
(this is not likely to be compatible out of the box with the npm2nix/node2nix approach; I'm working on an implementation, but it's going slowly due to the relative lack of documentation for nixpkgs and such)
<MoreTea>
correct me if I see this wrong, how can you trigger build then with e.g. hydra?
<MoreTea>
One of the cool things about hydra is that it will only rebuild if a dep has changed
simukis has quit [(Quit: simukis)]
NixOS_GitHub has joined #nixos
<NixOS_GitHub>
[nixpkgs] bennofs pushed 3 new commits to master: https://git.io/vQBCA
<NixOS_GitHub>
nixpkgs/master a24960d Chris Hodapp: autotrace: init at 0.31.1...
<NixOS_GitHub>
nixpkgs/master 98bd25a Benno Fünfstück: autotrace: build with pstoedit
telotortium has quit [(Read error: Connection reset by peer)]
<joepie91>
I have no idea about Hydra specifically, but it would work fine in eg. a nixos-rebuild scenario. whether Hydra checks for changed dependencies in the same way or not, I don't know.
<joepie91>
or rather
simukis has joined #nixos
<joepie91>
changed inputs
<MoreTea>
so where/how do you check for updates?
telotortium has joined #nixos
<MoreTea>
do you use a my-nixos-rebuild script, that does the impure step of checking if there is an update available, and then passing that as an input to nixos-rebuild?
nckx has quit [(Quit: restarting my GuixSD server)]
LinArcX has quit [(Remote host closed the connection)]
<joepie91>
MoreTea: no; the 'turn a semver range into a build input of the latest version' process would be implemented as an expression in and of itself. I'm still figuring out the implementation details, but haven't found any evidence that this wouldn't be possible.
NixOS_GitHub has joined #nixos
<NixOS_GitHub>
[nixpkgs] bennofs pushed 1 new commit to master: https://git.io/vQBWW
<joepie91>
MoreTea: in other words: it'd update the same way anything else on your system updates.
<MoreTea>
you can't access the network in builds
<MoreTea>
if you're packaging stuff, you should set `nix.useSandbox = true;` in your configuration.nix
LinArcX has joined #nixos
ThatDocsLady_afk has quit [(Quit: Arma-geddin-outta-here!)]
<MoreTea>
This will create a chroot with _only_ your specified build inputs in there, and will start a namespace without network access.
nevermind has quit [(Quit: My MacBook has gone to sleep. ZZZzzz…)]
LinArcX has quit [(Remote host closed the connection)]
LinArcX has joined #nixos
<MoreTea>
The idea here is to have fully reproducible builds
ThatDocsLady has joined #nixos
<joepie91>
MoreTea: yes, I am well aware. build-time network access would not be necessary.
ThatDocsLady has quit [(Read error: Connection reset by peer)]
nckx has joined #nixos
JagaJaga has joined #nixos
ThatDocsLady has joined #nixos
<joepie91>
MoreTea: it's no less reproducible than nixpkgs currently is, with sources being changed as updates to software are released.
<MoreTea>
I honestly don't see a way to do this, except by having a fixed output derivation, that would fail to build if one of your deps is updated.
<MoreTea>
You'd need to update the hash manually then.
<MoreTea>
But the problem there is that it will stay cached, until one of the nix inputs is changed, or if it happened to get garbage collected and is needed afterward again.
<MoreTea>
Anyhow, I'm a guy that likes to have pinned (transitive) dependencies, and updates them when necessary.
<joepie91>
sure, and that's fine - like I said, the option should be there
<joepie91>
and that is the ideal scenario; pinned dependencies with update audits
<joepie91>
I just feel that making it the *default* fails to account for the non-optimal scenarios and makes the worst-case scenario a lot worse than it needs to be
<hodapp>
joepie91: I have a vague feeling you are talking about something that is exactly what I was pondering the other day
* hodapp
reads backlog
<MoreTea>
In the time when I did lots of app development in ruby, I regulary updated the deps, ran the test suite, and pushed the new Gemfile.lock. We never got caught by surprise, and had a dashboard that showed when there were out-of-date deps.
NixOS_GitHub has joined #nixos
<NixOS_GitHub>
[nixpkgs] joachifm pushed 2 new commits to master: https://git.io/vQBll
<MoreTea>
(I'm willing to organize one somewhere else in NL if there is interest)
<MoreTea>
ttyl
<joepie91>
maaaaybe. I have very limited travel funds :) I'll likely be at the next C3 though
<MoreTea>
c3?
<adisbladis>
C3 :)
<MoreTea>
CCC?
<adisbladis>
MoreTea: Chaos Communication Congress
<MoreTea>
I see.
<joepie91>
yep, congress
mitchty has quit [(Remote host closed the connection)]
<adisbladis>
Easily worth flying over half the world for
<MoreTea>
Is Utrecht feasible?
mitchty has joined #nixos
<manveru>
adisbladis: you know when they'll start selling tickets?
<MoreTea>
We could try to do a small meetup at Eelco's and Rob's office in Utrecht.
<adisbladis>
manveru: When they are ready :P
<manveru>
finally wanna go there this year :)
<MoreTea>
OTOH, going by train to Amsterdam takes the same amount of time as taking the bus to go to their office :)
<MoreTea>
ok, have to run
<joepie91>
MoreTea: *very* limited travel funds :P I wouldn't bother trying to move meetups because of that -- usually I either have a reasonable disposable amount of funds, or almost none at all and even a bus ticket is questionable
<joepie91>
(freelancer...)
cpennington has quit [(Ping timeout: 260 seconds)]
<hodapp>
joepie91: oh gawd. another JS package manager?
Guest24587 has quit [(Read error: Connection reset by peer)]
<joepie91>
adisbladis: how so? there'll be a much larger venue this year, and it'll be relatively difficult to travel there so interest will probably be a bit limited
<joepie91>
hodapp: Yarn, you mean?
<hodapp>
yeah, reading the HN link
<joepie91>
hodapp: Yarn did actually serve a purpose
NixOS_GitHub has joined #nixos
<NixOS_GitHub>
[nixpkgs] joachifm pushed 2 new commits to master: https://git.io/vQB4O
<NixOS_GitHub>
nixpkgs/master 226aadd romildo: monoid: init at 2016-07-21
<NixOS_GitHub>
nixpkgs/master e0528c2 Joachim F: Merge pull request #26928 from romildo/new.monoid...
NixOS_GitHub has left #nixos []
<joepie91>
hodapp: although that purpose was more "give NPM a kick in the butt to fix their shit" and less "manage packages"
<adisbladis>
joepie91: I just mean that they will probably sell to CCC members first. Not tickets running out quick :>
<hodapp>
meh. most tools serve a purpose
NixOS_GitHub has joined #nixos
<NixOS_GitHub>
[nixpkgs] joachifm pushed 2 new commits to master: https://git.io/vQB43
<NixOS_GitHub>
nixpkgs/master e118171 Joachim F: Merge pull request #26979 from sifmelcara/update/crystal-0.23.0...
NixOS_GitHub has left #nixos []
<joepie91>
(NPM has since fixed a good part of their shit)
<manveru>
adisbladis: hm, 72 euro a year doesn't sound bad... i enjoy most of the stuff they put out anyway :)
<joepie91>
adisbladis: that measure was only instituted because of the expected popularity of the tickets :)
<joepie91>
and only last year afaik
<joepie91>
unless there was an unadvertised internal presale that I somehow didn't hear of
<adisbladis>
manveru: My trip will be substantially more expensive because of long haul :/
<joepie91>
(the regular presale also saw tickets distributed amongst hackerspaces and such)
peacememories has quit [(Quit: My MacBook has gone to sleep. ZZZzzz…)]
tvon has quit [(Remote host closed the connection)]
<joepie91>
hodapp: anyhow, basically Yarn fixed a bunch of stuff that NPM got really really wrong, unfortunately also threw default locking into the mix, but now NPM 5 is roughly feature-equivalent with Yarn so there's not really a unique selling point for Yarn anymore
<manveru>
hmh
<adisbladis>
joepie91: We'll see how it turns out this year. Confident I'll manage to get a ticket somehow
<hodapp>
joepie91: The thing I was wondering about was something along the lines of, "How could I use Nix to pin the versions of all dependencies to something specific" but pretty much the only use-case I had for that was so that I could get a really awful build/install to work properly
<joepie91>
hodapp: but I'd still like to see NPM replaced, although not only the client
<hodapp>
completely not in a JavaScript context
JagaJaga has quit [(Ping timeout: 240 seconds)]
<joepie91>
hodapp: well, the simplest way is to simply do what the WINE package does in nixpkgs, except with more versions
<joepie91>
you'll note that it sets a specific WINE version, installs specific dependencies, and so on
nevermind has joined #nixos
<joepie91>
specific overrides
<joepie91>
multiple install methods
<hodapp>
huh, so it's doing a lot of stuff ad-hoc that something like Nix could already handle
<joepie91>
hodapp: exactly! :)
anelson has quit [(Ping timeout: 246 seconds)]
<hodapp>
of course, I say that about basically everything :P
<joepie91>
this is basically a perfect fit for Nix
LinArcX has quit [(Remote host closed the connection)]
<joepie91>
lots of weird edgecases that you want isolated environments for
<avn>
joepie91: I am definelly interesting in creating/managing "readonly" wineprefixes in /nix/store ;)
<joepie91>
avn: the readonly bit is going to be the painful bit I think
LinArcX has joined #nixos
<joepie91>
especially older Windows software has a tendency to assume it can write wherever the hell it feels like
<joepie91>
(which, back then, it indeed could)
<hodapp>
older Windows software makes me cry.
<joepie91>
I'm not entirely sure yet how to resolve this issue
<hodapp>
hit me and tell me to stop crying.
<avn>
joepie91: bindfs+unionfs make it working
<joepie91>
avn: have a reference for me to read on that?
<hodapp>
I guess I've run into things here from some of the nasty Python stuff that comes up in machine learning libraries, particularly when I try to get someone's TensorFlow code to run
<joepie91>
also, I've been practicing with packaging proprietary games lately...
<hodapp>
but every API has broken at once. or something.
<joepie91>
dependency hell was one of the big reasons I left Python-land
<hodapp>
I still use Python a lot, but mainly because it ends up being the only "practical" language for a lot of things
<hodapp>
it's the go-to glue language for a lot of libraries
<LinArcX>
Guys, why the wiki is shut down?
cpennington has joined #nixos
<joepie91>
hodapp: I've been steadily moving the stuff I used to do in Python to JS, and the only things I've really found lacking so far are 1) non-webkit-y GUI library bindings, and 2) bindings to more system-y things
<joepie91>
hodapp: in exchange for missing those, there's a *lot* more of everything else, and no more dependency hell \o/
<adisbladis>
joepie91: 3) Sanity ;)
<joepie91>
adisbladis: nope, quite the opposite
kthnnlg has quit [(Ping timeout: 255 seconds)]
<hodapp>
joepie91: I avoid GUI stuff like the plague, so (1) probably matters little to me, but (2) could be an issue for the sorts of libraries I'm talking about
<adisbladis>
joepie91: It was just a snide remark, not a serious comment :)
<hodapp>
they aren't "system libraries" per se but for some of the machine learning stuff it assumes a lot of low-level access to things
peacememories has joined #nixos
<joepie91>
adisbladis: unfortunately it can be difficult to tell the difference; a significant amount of people legitimately try to argue things that might have been true 10 years ago but are no longer true now (or they just grossly misunderstand the dependency model and complain about things that aren't an issue, based on assumptions about other languages)
<joepie91>
it's a bit of a pain :)
<joepie91>
hodapp: oh, yeah, on that note, you'll find less of the more scientific-y libraries in JS-land
<joepie91>
not that Python is *particularly* suitable for those things, but it has the momentum of that community
<adisbladis>
joepie91: I write both python and javascript every day :) I do like the latter much much more though
<LinArcX>
joepie91. Thanks for reply. But, is any plan to come back? And why there is no big wiki like arch Linux?
<joepie91>
hodapp: so for machine learning, JS is probably a bad choice, at least today
<hodapp>
it's pretty much only suitable in the same way that the bottle of glue that's already on my shelf happens to be suitable.
<joepie91>
right, no disagreement there
<hodapp>
there's also R, but I hate R with a passion
<avn>
joepie91: I drop you part of mount config to PM
<joepie91>
not that JS is more suitable for that kind of usecase, but come on, there are better options than Python
<hodapp>
though, there are some good Haskell bindings for some of these libraries, and I'd like to learn Rust or Julia
<joepie91>
LinArcX: no, afaik it's permanent; and I have a number of issues with the current state of documentation of Nix, but that's not a rant I should be going into tonight ;)
<avn>
joepie91: a bit of personal feeling -- but I like python more than JS
<joepie91>
avn: thanks, I'll have a look at it some time soon
<joepie91>
avn: for any specific reason?
<ToxicFrog>
LinArcX: it was shut down because of a persistent belief that everything (a) should and (b) is optimally located in the manual >.<
<joepie91>
(of course there are going to be subjective preferences on syntax and stuff like that, but I find that in a lot of cases where people consider Python more pleasant than JS, they're trying to write JS like they write Python and that's where it goes wrong)
<avn>
I found python more expressive, and I just dislike JS infrastructure. So I looking on purescript for frontend stuff atm
<joepie91>
avn: what do you mean with "JS infrastructure" exactly?
<hodapp>
I find the scoping in both JS and Python to be a bit janky.
<adisbladis>
I find that the libraries available for python are often of much higher quality than the equivalent js libraries
<ToxicFrog>
I thought JS used conventional block scope?
<joepie91>
hodapp: aside from the `var` mistake (which is rectified with `let`), scoping in JS is rather simple/predictable -- or are you referring to `this`?
<avn>
joepie91: npm, gulp, bower, etc. Separate libraries to split trailing dots, or spaces, etc...
<adisbladis>
ToxicFrog: It's not that simple...
<joepie91>
(which technically is context, not scoping)
<joepie91>
avn: right, then I think that's the "trying to write JS like it's Python" problem :P
<LinArcX>
ToxicFrog, JOEPIE91 thanks :)
<joepie91>
avn: hold on, let me try to summarize the problem
<joepie91>
need to think about wording for a bit
peacememories has quit [(Quit: My MacBook has gone to sleep. ZZZzzz…)]
<joepie91>
avn: so in Python, and most other languages for that matter, monolithically designed libraries are the norm; that means that when you start a project, you start by thinking "okay, which few libraries should I use for this project?", and then your first step is usually to glue together those libraries to set up the skeleton of your application, and only *then* do you actually start writing your application.
<joepie91>
avn: however, if you try to do that in JS, you'll run into problems - because the JS ecosystem is, for the most part, designed modularly. you're not expected to define your dependencies upfront; you're expected to start working on your application, and add dependencies as you find yourself having a problem to solve that a dependency can solve.
Infinisil has joined #nixos
<joepie91>
avn: if you take the Python approach in JS, you'll get overwhelmed by all the piles of dependencies that everybody is talking about and the interactions between them. if you take the 'correct' approach, then instead of being an overwhelming burden for starting a project, it's an ongoing part of the development process (which has a number of big technical advantages, but I'm just sticking to the developer experience for the moment)
<joepie91>
ie. you should start with nothing, and add dependencies *when it makes sense to do so*, to solve concrete, individually identifiable problems
<joepie91>
put simply: do not add a dependency unless you can explain precisely what problem it solves for you.
<joepie91>
and what dependencies other people use, is at most a data point to get an idea of which dependencies are commonly used; it doesn't tell you what dependencies *you* should use for *your* project.
<joepie91>
</ramble>
ejoy has quit [(Ping timeout: 260 seconds)]
<joepie91>
hodapp: btw, if you can clarify what you were referring to with scoping in JS, I can probably explain it :P
<hodapp>
joepie91: reading about 'let' now and trying to figure out why I still see so much 'var'
<manveru>
is there some way to use ssh agent in a systemd service?
<joepie91>
hodapp: `let` was added recently-ish, in ES6
<joepie91>
so all pre-ES6 code will be using `var`
<joepie91>
in practice: always use `let` or `const`, never `var`
marsel has quit [(Ping timeout: 240 seconds)]
<hodapp>
ES6 isn't exactly new, though, is it?
<joepie91>
hodapp: sorta kinda is, it took a while for the various runtimes to gain support for it
<joepie91>
and browser support is still a bit iffy
<joepie91>
(which is why Babel exists)
<hodapp>
Babel?
erasmas has joined #nixos
<joepie91>
it's new enough that there's a considerable pile of codebases that are pre-ES6
<joepie91>
hodapp: Babel is a tool for converting ES6 code to ES5
<joepie91>
(at the cost of some performance and some missing features, usually)
<joepie91>
it's used as a temporary solution for using newer JS features without breaking runtime compatibility
kthnnlg has joined #nixos
<joepie91>
*strictly speaking* it's a generic tool for modifying a JS AST, but ES6 -> ES5 is what people use it for in practice
magnetophon1 has quit [(Ping timeout: 240 seconds)]
<joepie91>
hodapp: anyway, the tl;dr of the difference between `var` and `let` is that `var` is always function-scoped, whereas `let` is always block-scoped
<joepie91>
there's some more subtle differences but that's the big one
<joepie91>
hodapp: just looked it up, ES6 spec was published in 2015 :P
<avn>
joepie91: I actually do same with python, start with 2-3 libraries, and add more by real requirements.
<joepie91>
manveru: so I guess that you can just set environment vars?
<joepie91>
avn: I've found that approach untenable in Python due to its dependency model :P
<manveru>
joepie91: yeah, got it working
<manveru>
basically eval $(ssh-agent) at the top
<joepie91>
avn: that is, a flat dependency namespace, which means that every dependency you add exponentially increases the chance of dependency conflicts, which translates to "dependencies are expensive"
<joepie91>
kinda the same issue as with non-NixOS Linux deps, really :P
tvon has joined #nixos
<avn>
joepie91: lol, then I just dislike "negative zero" and all other JS tricks ;)
<joepie91>
avn: it's one example of many. I absolutely agree that JS has a number of quirks that really shouldn't exist in the first place, but 1) they exist and that's the reality of it, and will likely never go away, and 2) the benefit of small composable modules extends far beyond "papering over crappy design decisions" :)
<Infinisil>
joepie91: I just think it's gonna take a while for it to go away, but eventually it will
<joepie91>
(and it's not like Python doesn't have its share of quirks either :D)
<joepie91>
Infinisil: backwards compatibility breaks are basically forbidden in languages / stdlibs, that's why Python 2/3 is such an issue
pie_ has quit [(Changing host)]
pie_ has joined #nixos
<joepie91>
Infinisil: incidentally it's also why in eg. Node the standard library is so small, despite complaints from people who are used to big standard libraries - it means that almost all functionality can be versioned independently from the runtime
<joepie91>
(and even *then* I consider the Node stdlib to be too big, containing a number of things it doesn't need to contain)
<avn>
joepie91: actually with js you do the same, picking your fav framework first ;)
<joepie91>
avn: ... no, you don't? where are you getting that idea?
alx741 has joined #nixos
LinArcX has quit [(Remote host closed the connection)]
FRidh has joined #nixos
FRidh has quit [(Client Quit)]
erictapen has joined #nixos
<srhb>
Should packaged c libraries somehow add to LD_LIBRARY_PATH so ld can pick it up automatically?
<avn>
joepie91: well, when I wrote last app I was know from beginning, that I need pyramid+cornice for rest, tdbus for dbus and gevent to glue them all in single app
<avn>
joepie91: with more ugly syntax (lol, and offtopic ;))
<joepie91>
srhb: I feel like maybe I'm missing some nuance to the question here, but: when you specify a library in buildInputs, it'll be made available during the build process of whatever application you're specifying it as a buildInput for
<srhb>
joepie91: I was expecting to be able to do nix-shell -p myclibrary and simply gcc whatever includes it
<joepie91>
oh, I have no idea how nix-shell handles that
<joepie91>
I know that it works for eg. native Node libraries that bind against a system library
<srhb>
No, me neither. I'm actually a bit surprised that gcc knows about the include library
<joepie91>
but idk how it plays together with gcc
<srhb>
Er, include directory
<srhb>
But ld does not know about the lib directory
<avn>
joepie91: but if you like JS, tell me about bower, and especially about fetchbower in nixpkgs ;)
<joepie91>
avn: bower never really had a reason for existence, and is now effectively dead
Itkovian has quit [(Quit: My MacBook has gone to sleep. ZZZzzz…)]
<dash>
joepie91: they'll probably say that at _my_ funeral too
<joepie91>
avn: anyhow, I'm still not really following. you say "with js you do the same, picking your fav framework first", but what are you basing that on? what you described is about Python and Bower, neither of which have anything to do with frameworks in JS
<joepie91>
ha
<joepie91>
sharp and grim, I like it
zeus_ has quit [(Ping timeout: 276 seconds)]
<jophish>
Does nix record time taken to build a derivation?
<avn>
joepie91: purescript use bower as default manager (although they work on own one)
<joepie91>
avn: that doesn't speak well for purescript, because bower is extremely poorly designed
<joepie91>
but I still don't see what any of this has to do with frameworks :P
ryanartecona has joined #nixos
ryanartecona has quit [(Remote host closed the connection)]
digitus has joined #nixos
<avn>
joepie91: so you think, that we need think carefully "what to use to make rest-service?"
<joepie91>
avn: that is not something you consider upfront, no.
<joepie91>
of course *some* dependency decisions will happen early in the process, but that's typically only a handful
<joepie91>
or even just one
Filystyn has joined #nixos
Filystyn has quit [(Changing host)]
Filystyn has joined #nixos
<joepie91>
and often they will be libraries, not 'frameworks' as such
<joepie91>
avn: for example, you might be building a webapp of some sort, and go "hm, I need to handle HTTP requests. I can use the `http` library in core, but it's very low-level and doesn't have any routing or plugin mechanisms. so I'll use Express, which provides those things"
<joepie91>
or, alternatively, use a stand-alone routing library with core `http`, which some people do
ThatDocsLady has quit [(Ping timeout: 255 seconds)]
<joepie91>
eventually, you'll want to probably talk to a database. well, you're using PostgreSQL, so you add `pg`
<joepie91>
beyond the first query you get a bit annoyed at writing out repetitive SQL queries, so you want something to build composable queries - and you add Knex
ZoomZoomZoom has quit [(Quit: Leaving)]
<joepie91>
then you want to have a number of default options somewhere, so you use `default-value`
<joepie91>
and so on
<joepie91>
you solve problems as you run across them
ryanartecona has joined #nixos
ThatDocsLady has joined #nixos
magnetophon1 has joined #nixos
ertes has joined #nixos
endformationage has joined #nixos
marsel has joined #nixos
tmaekawa has quit [(Read error: Connection reset by peer)]
NixOS_GitHub has joined #nixos
<NixOS_GitHub>
[nixpkgs] peti closed pull request #26987: R: update to version 3.4.1 (master...r-updates) https://git.io/vQBJY
NixOS_GitHub has left #nixos []
tmaekawa has joined #nixos
hydraz has joined #nixos
riclima has joined #nixos
<NickHu>
Anyone here a maintainer of texlive? Thinking about trying to update it to texlive 2017
<joepie91>
NickHu: metadata claims that vcunat is the only maintainer, and I don't think they're on IRC (at least not right now)
orivej has joined #nixos
fresheyeball has quit [(Quit: WeeChat 1.7.1)]
magnetophon1 has quit [(Ping timeout: 255 seconds)]
ebzzry has quit [(Ping timeout: 240 seconds)]
zeus_ has joined #nixos
NixOS_GitHub has joined #nixos
<NixOS_GitHub>
[nixpkgs] vcunat pushed 1 new commit to staging: https://git.io/vQBKP
<NixOS_GitHub>
nixpkgs/staging ddf864f Vladimír Čunát: Merge branch 'master' into staging...
<srhb>
I think the language is actually pretty simple.
<srhb>
It's nixpkgs that's quite complex.
<Ralith>
right
<Infinisil>
Ah yeah
ris has quit [(Ping timeout: 276 seconds)]
<Infinisil>
I'd love it to be documented better
<Infinisil>
Having to read source all the time to figure something out is annoying
<Infinisil>
When I have better understanding I'll try to contribute to the docs :)
NixOS_GitHub has joined #nixos
<NixOS_GitHub>
[nixpkgs] vbgl pushed 1 new commit to master: https://git.io/vQBXg
<NixOS_GitHub>
nixpkgs/master ea052b6 Vincent Laporte: ocamlPackages.js_of_ocaml: 2.8.3 -> 2.8.4
NixOS_GitHub has left #nixos []
<srhb>
Ralith: I had a mail from hydra earlier today, saying one of my packages broke due to a broken dependency. I was wondering why there were two more maintainers besides me that I certainly didn't list in the derivation. But after a while I figured "huh, this is probably just appended to all the python packages in nixpkgs itself".
<srhb>
Ralith: And it was! So I'm starting to get a feel for it, which is nice :-)
noobly_ has quit [(Quit: Page closed)]
anelson has joined #nixos
riclima has quit [(Ping timeout: 268 seconds)]
noobly_ has joined #nixos
apeyroux has quit [(Quit: Lost terminal)]
<noobly_>
Where is the pkgs directory?
apeyroux has joined #nixos
<noobly_>
trying to find pkgs/top-level/all-packages.nix
s33se_ has quit [(Ping timeout: 240 seconds)]
<tilpner>
noobly_ - Do you have a local nixpkgs checkout? (And how did the Racket build turn out?)
<Infinisil>
noobly_: If you want it locally you shold clone it from the github repo
<noobly_>
tilpner: hey thanks for reminding me! it failed yesterday so I tried again and got the same error message: "ake: *** [Makefile:103: install] Error 2 builder for ‘/nix/store/58r0v78gwzpz145nhvmqw6acwak3wxdw-racket-6.8.drv’ failed with exit code 2 error: build of ‘/nix/store/58r0v78gwzpz145nhvmqw6acwak3wxdw-racket-6.8.drv’ failed"
<noobly_>
tilpner: and I would assume I don't, I've never heard of a local nixpkgs checkout
<noobly_>
Infinisil: Hey there infinisil! Ok, I'll try that
<tilpner>
noobly_ - That's not enough log to tell why that didn't work. And I don't know how to easily simulate a 32-bit machine here, so I can't really reproduce that
<noobly_>
tilpner: Oh, I see I did miss a bit of the error code, here's a more complete copy paste: make[1]: *** [Makefile:178: install-3m] Error 1 make[1]: Leaving directory '/tmp/nix-build-racket-6.8.drv-0/racket-6.8/src/build' make: *** [Makefile:103: install] Error 2 builder for ‘/nix/store/58r0v78gwzpz145nhvmqw6acwak3wxdw-racket-6.8.drv’ failed with exit code 2 error: build of ‘/nix/store/58r0v78gwzpz145nhvmqw6acwak3wxdw-racket-6.8.d
<noobly_>
if it helps, if not I'll poke around with it in a bit
<tilpner>
noobly_ - No, sorry, there's usually a lot of build output above that. This just says it failed, but I can't tell why
k0001_ has quit [(Remote host closed the connection)]
<disasm>
noobly_: can you pastebin the output?
k0001_ has joined #nixos
<noobly_>
disasm: yeah I'll get on that right now
<Ralith>
tilpner: nixpkgs-overlays doesn't seem to be set by default
<Ralith>
(in NIX_PATH)
<tilpner>
Ralith - Yes
NixOS_GitHub has joined #nixos
<NixOS_GitHub>
[nixpkgs] vbgl pushed 1 new commit to master: https://git.io/vQBMA
<NixOS_GitHub>
nixpkgs/master f977665 Vincent Laporte: ocamlPackages.javalib: 2.3 -> 2.3.3...
NixOS_GitHub has left #nixos []
<Ralith>
if there's no convenient way to apply them system wide out of the box, I dunno how competitive they are >_>
<tilpner>
Huh, there are several ways. The section above details how to install them, and there's a default path
s33se has joined #nixos
<tilpner>
If you don't like that path, you can easily set nix.nixPath = ["nixpkgs-overlays=/cfg/nixos/overlays"]; or similart
<tilpner>
"In the directory ~/.config/nixpkgs/overlays/."
<Ralith>
afaict that's per-user, not system-wide as specified
zeus_ has quit [(Read error: Connection reset by peer)]
k0001_ has quit [(Remote host closed the connection)]
<tilpner>
Huh, maybe, I didn't use that one. But nixPath should be fine, right?
k0001_ has joined #nixos
zeus_ has joined #nixos
<Ralith>
won't that clobber the default nixpkgs=?
hellrazor has joined #nixos
<Ralith>
ergonomically speaking, it would be good to have an option that works out of the box, so you can tell people "just dump $FILE in $DIRECTORY"
<tilpner>
Well, you would of course have nix.nixPath = ["nixpkgs=..." "nixpkgs-config=..."]; and not just overwrite what was there before
<Ralith>
nixpkgs has "there are several ways to do it" in spades; that's not really a problem
<Ralith>
right, so from the perspective of a user who just wants to install some overlay they got from somewhere, suddenly they have to care about how to properly set up nixPath
s33se has quit [(Ping timeout: 240 seconds)]
s33se has joined #nixos
<Ralith>
*I* don't know what I sould set nixpkgs= to if I want it to continue to Just Work the way it does when I don't touch it
<Ralith>
should
<tilpner>
What's the current value of NIX_PATH?
<Ralith>
the default
k0001_ has quit [(Remote host closed the connection)]
<tilpner>
Could you just paste it please, I don't know the default
k0001_ has joined #nixos
<Ralith>
I can copy it directly, but I don't have any reason to believe that this will precisely match the logic by which the default is constructed
<Ralith>
even if I did know and was able to replicate the logic exactly, doing so would make me responsible for keeping it in sync across future updates, which if all I wanted to do is drop in an overlay is an awful lot of scope creep.
<tilpner>
Oh. I don't use channels. I would expect copying that to just work, but I haven't tried it
<Ralith>
I'm sure copying it would just work *for now*
<Ralith>
I don't want my system to work "for now" :P
Mateon3 has joined #nixos
jgertm has joined #nixos
<Ralith>
I'm not a huge fan of channels either but they're the default, and the default needs to be well supported
<noobly_>
what's the syntax for wgetpaste in NixOS? it's not /etc/X11/Xorg.conf
<gchristensen>
noobly_: what does that mean?
Mateon1 has quit [(Ping timeout: 240 seconds)]
Mateon3 is now known as Mateon1
<noobly_>
gchristensen: it's supposed to ask where my xorg.conf file is so I can wgetpaste the error output of an install to pastebin
<noobly_>
I think
<tilpner>
Ralith - You could try to import nixpkgs manually (from the current <nixpkgs>), while passing the overlays argument to it. This should work for future updates
<Ralith>
and once again I have no idea how to do that in a system-wide context without making everything fragile
<Ralith>
it's not that I am personally unable to make this work, just that imo overlays have a ways to go yet before they're user-friendly
k0001_ has quit [(Remote host closed the connection)]
ThatDocsLady has quit [(Quit: Arma-geddin-outta-here!)]
<tilpner>
And I agree with you. I'm not defending the installation method, just trying to make it work for you
<Infinisil>
noobly_: Actually there *is* already a nixpkgs directory, but you can't use it for anything other than reading, it's in /nix/var/nix/profiles/per-user/root/channels/nixos
pietranera has quit [(Ping timeout: 240 seconds)]
k0001_ has joined #nixos
ison111 has quit [(Quit: WeeChat 1.7.1)]
<copumpkin>
1) is it possible to disable NixOS documentation generation via a module? which module generates the manual?
<Ralith>
for system-wide stuff directly overriding is currently working for me and is a hell of a lot simpler than any of the overlay approaches I am aware of so I will probably stick with that for now
<copumpkin>
2) xsltproc crashes during doc creation; anyone ever seen that?
<copumpkin>
crashes with a segfault, that is
<Ralith>
they're certainly nice for user-scoped stuff though
<gchristensen>
copumpkin: is this a recent change?
<noobly_>
tilpner: what do I need to be pasting in this case?
<copumpkin>
not sure, a friend of mine is on a master from a day or two ago
<gchristensen>
copumpkin: I'm especially aware since I recently changed them
<copumpkin>
and is trying to add a service and the doc generation thing just crashed
<dtzWill>
Infinisil: sometimes master breaks, FWIW, I think that's not generally considered huge problem unless it prevents evaluation
<dtzWill>
just too many things to constantly test to require everything works on all platforms all the time :P. At least until we have this mystical hydra/hercules/something infra xD :)
<NixOS_GitHub>
[nixpkgs] joachifm pushed 2 new commits to master: https://git.io/vQRUP
<NixOS_GitHub>
nixpkgs/master 4540eaf Robin Stumm: browserpass: 2017-04-11 -> 1.0.5
<NixOS_GitHub>
nixpkgs/master 74b3a8f Joachim F: Merge pull request #26541 from dermetfan/browserpass...
NixOS_GitHub has left #nixos []
marantz has joined #nixos
Temp49873267 has joined #nixos
aneeshusa has joined #nixos
<Temp49873267>
hello, I'm trying to get my .xinitrc to work in nixos... but I haven't found a suitable solution yet. I've read a few things (an open pr to add xinit as a wm, a reddit post about renaming .xinitrc -> .xprofile or .xsession, and some config files that paste the config into their configuration.nix (I'd rather not do that), but none of them have really worked yet). Is there a good solution for using xinit in nixos?
phreedom has quit [(Ping timeout: 276 seconds)]
ryanartecona has joined #nixos
<adisbladis>
Anyone else using the mozilla-nixpkgs overlay? I want to install firefox from there but getting checksum errors and I don't get where the checksum is coming from
LinArcX has joined #nixos
<LinArcX>
Hi. How to install cinnamon instead of KDE in installation process?
<srhb>
adisbladis: Indeed, I've no idea what that hash is. Perhaps after unpackphase?
<tokudan>
Temp49873267, try the command "nixos-option"
<adisbladis>
srhb: Maybe?
<Temp49873267>
other than the xinit thing... I'm still sort of confused about package management in nix. I need to be root to `nixos-rebuild switch`... right? I thought I read at some point nix has user-managed packages. Can I do that (e.g. have a minimal few packages/services enabled as root, and everything else is managed under each user)?
<srhb>
adisbladis: Anyway,changing the f436 one to the 07k6 one works.
<Temp49873267>
tokudan: will do, thanks
<adisbladis>
srhb: Haha I tried changing it to some bogus hash to see if the mismatch changed but I didn't actually try the supposedly correct one
<srhb>
adisbladis: :)
nevermind has joined #nixos
<tokudan>
Temp49873267, unless you change the configuration every user on a nixos system can use nix-env to install his/her own packages
<adisbladis>
srhb: Thanks :)
<srhb>
adisbladis: Welcome.
<Temp49873267>
tokudan: and users can have their own configuration.nix... right?
<Temp49873267>
also.. could I run services as a specific user (e.g. /only/ enable and start xmonad for me)?
<tokudan>
Temp49873267, i don't think so, i believe some people use some tricks to get a similar feeling, but users don't have declarative profiles as far as i know
<srhb>
That's correct.
<tokudan>
Temp49873267, everything you do through configuration.nix is system-wide
<Temp49873267>
dang. it's a 1-user system (in general).. so I guess I'll keep things in /etc/nixos/configuration.nix
<srhb>
There are per-user settings though
<Temp49873267>
would be cool to ditch sudo though, even if it's only for pkgs
<srhb>
(like which wm to use)
<Temp49873267>
yeah there's like a .nix-profile, right?
<tokudan>
Temp49873267, everything you do through "nix-env" as root is system-wide, but you cannot manage services through that
<Temp49873267>
or is that just the dir nix-env operates in, and nothing declaritive (i.e. .nix files) go in there?
<tokudan>
Temp49873267, everything you do through "nix-env" as non-root is for that single user
<Infinisil>
Temp49873267: You can set up that you don't need to enter a password for sudo, and then do alias nixos-rebuild="sudo nixos-rebuild"
<Temp49873267>
yeah it's less about avoiding sudo and more about unpriviledged package management for me. would be cool to be root as little as possible (initial wm setup basically) and then do the rest of the stuff as me
<Infinisil>
I too don't really like that users don't have a configuration.nix
<Infinisil>
And I feel like there could be one
<srhb>
Temp49873267: nix-env will let you manipulate your user profile without sudo at least.
<srhb>
Infinisil: Lots of people are exploring the space in different ways :)
<Temp49873267>
what's my user profile? just the stuff in .nix-profile?
<srhb>
Temp49873267: "Just" -- but yes.
<Temp49873267>
heh
<srhb>
Temp49873267: Note that it includes bin, lib, include, share... etc :)
<Temp49873267>
while I have a captive audience... anyone have suggestions about getting xinit working?
<srhb>
Temp49873267: Not aside from what you had already been suggested.
<srhb>
Temp49873267: (I use .xsession)
<Temp49873267>
so ln -s .xinitrc .xsession should work?
<adisbladis>
Temp49873267: Not xinit but you could use something like sddm with .xsession no?
<srhb>
Temp49873267: I don't know. Try?
<srhb>
lightdm launches my .xsession
apeyroux has quit [(Quit: leaving)]
<Temp49873267>
ok trying lightdm
apeyroux has joined #nixos
<Temp49873267>
hmm.. no go. do I need to do something other than services.xserver.displayManager.lightdm.enable = true?
<Fare>
I use slim. I kind of sucks, but for a single-user with some configuration it does the trick.
<srhb>
Temp49873267: You probably need to enable a window manager as well.
Tipping_Fedora has quit [(Ping timeout: 268 seconds)]
<Temp49873267>
srhb: yeah I have windowManager.xmonad
<Fare>
slim uses the default desktop manager, so be sure to configure it properly
<Fare>
I love that stumpwm can be dynamically reconfigured.
<Temp49873267>
srhb: do you do anything other than enabling a windowManager and lightdm to get .xsession to be read?
<adisbladis>
srhb: Huh.... I was gonna send a PR to the mozilla overlay and just noticed that 07k6q5rvmiygsmrkj3r4a8hfb568is5alzw3n5zxvdw41x2b32icpj91p9hrzzhqdar3hv483c5pz6xsjm4bvl6xl0zwkrbz1i4j1kx is not even a proper sha512
<adisbladis>
That string is only 103 chars long
srhb has quit [(Quit: Quit)]
<adisbladis>
Funky
<catern>
argh
<catern>
it's really frustrating that there's no NixOS equivalent for configuring individual users
<catern>
with service configuration and everything
<catern>
configuring services globally seems in poor taste, when Nix makes it (miraculously! at last!) possible to avoid
srhb has joined #nixos
<srhb>
Ouch
<adisbladis>
catern: Yes would be fantastic to manage your user services in the same way :)
<catern>
concreteley I want to run a setup of Hydra out of my user :)
<srhb>
Temp49873267: I don't think so.
<srhb>
Temp49873267: Perhaps you could elaborate on what's failing?
<catern>
and that should be totally possible, with Nix, but it's not set up yet
<catern>
disappointing
<Fare>
catern, your next project?
<Temp49873267>
srhb: so my .xinitrc is a file with a bunch of commands in it and #!/bin/sh at the top.... it's not getting run. some of the commands may fail though... so maybe it's bailing. I'll delete some stuff and see
<Temp49873267>
sorry .xsession
<catern>
Fare: I have too many projects already!
<srhb>
Temp49873267: Do you have an ~/.xsession-errors ?
<srhb>
Temp49873267: And is it executable?
<Temp49873267>
srhb: yep, that's empty
<Temp49873267>
didn't know about it though... cool
<catern>
(for one, I need to run Hydra! :( )
<Temp49873267>
it was not... good call. I guess cp made it go from 755 -> 644?
<srhb>
Temp49873267: Sounds unlikely.
LinArcX has quit [(Remote host closed the connection)]
<Temp49873267>
yeah it does... so many symlinks and copies I probably did something wrong. maybe my .xinitrc wasn't executable
<srhb>
Might be. startx probably just reads that verbatim
<Temp49873267>
srhb: nope :(. got it down to 2 commands (just xrdb), and that's installed, so it should work
<adisbladis>
srhb: It doesn't look like any encoding I know of...
<srhb>
Temp49873267: Hmm. Okay. There should be a systemd scope unit we can check the logs from
<srhb>
Temp49873267: But I don't know how to find the correct name once it's already dead.
NixOS_GitHub has joined #nixos
<NixOS_GitHub>
[nixpkgs] peti pushed 2 new commits to release-17.03: https://git.io/vQRtX
<NixOS_GitHub>
nixpkgs/release-17.03 180bbd4 Peter Simons: haskell: copy current state from master branch (LTS 8.20)
<NixOS_GitHub>
nixpkgs/release-17.03 84eeefe Peter Simons: hackage-packages.nix: automatic Haskell package set update...
NixOS_GitHub has left #nixos []
<srhb>
Temp49873267: Usually I would do systemctl list-units -t scope and then pick the active one for journalctl -u (name here)
<Temp49873267>
srhb: good call...
<Temp49873267>
ugh pasting between VMs
<Temp49873267>
says xrdb not found
<srhb>
Yeah :/
<Temp49873267>
though it's in the path for my current user
<Temp49873267>
(e.g. which xrdb works)
<srhb>
Temp49873267: but that's before loading the nix profile, probably.
<Temp49873267>
hmmmm
<Temp49873267>
but xrdb is installed via /etc/nixos/configuration.nix
<srhb>
Temp49873267: Then try #!/run/current-system/sw/bin/bash instead
<Temp49873267>
ewwwww
<Temp49873267>
ok :P
<srhb>
Temp49873267: Learn to love it. ;-)
<Temp49873267>
that fixed most of it
<srhb>
hurrah
<Temp49873267>
sort of xD
<Temp49873267>
ideally I'd share most of this config between nixos and arch
NixOS_GitHub has joined #nixos
<NixOS_GitHub>
[nixpkgs] peti pushed 2 new commits to master: https://git.io/vQRqt
<NixOS_GitHub>
nixpkgs/master 36f52e5 Tim Steinbach: oh-my-zsh: 2017-05-03 -> 2017-06-22
<NixOS_GitHub>
nixpkgs/master e184b19 Peter Simons: Merge pull request #26996 from NeQuissimus/oh-my-zsh_2017_06_22...
NixOS_GitHub has left #nixos []
<Temp49873267>
the difference being setup
<srhb>
Temp49873267: Don't worry, you'll have converted to NixOS in a few weeks. :-)
<Temp49873267>
heh
<Temp49873267>
this _is_ the main thing
<LnL>
using #!/usr/bin/env bash is portable
<srhb>
Temp49873267: You can probably get away with something like /usr/bin/env bash then
<Temp49873267>
the other being I'm not super familiar w/the tools.. but that shouldn't take too long
<srhb>
Ah, beat to the punch...
<Temp49873267>
LnL: good idea I'll try that
<LnL>
and for stuff that's generated by nix you can use #! ${stdenv.shell}
<LnL>
to get an absolute path to the current version of bash
<clever>
and in some cases, you can #!/bin/bash, and then let the fixup phase patch it for you
<clever>
but i think the fixup phase also patches #!/usr/bin/env bash
<LnL>
yeah
<clever>
so the env method becomes pure if ran thru nix, and just works if not
<Temp49873267>
I'm sure this is in the docs... but what's a good way to test e.g. new wm service configuration. `nixos-rebuild test && reboot`?, then I can switch if that pans out?
<srhb>
Temp49873267: Just rebuild switch and restart the DM
<srhb>
switch back if it's a no-go
<Temp49873267>
but if that botches something..?
<clever>
Temp49873267: the 'test' action will activate it without making it the default
<Temp49873267>
ohh the _dm_... got it. not the machine
<clever>
Temp49873267: the reboot in the above command will then immediately restart, and undo it
<srhb>
Temp49873267: If you test and reboot, you get back to your old system. If you switch and reboot, you can pick the second to last configuration, and you're back to the old config.
<srhb>
Eithe rway
<Temp49873267>
pick the second to the last system... with grub or something?
<srhb>
Temp49873267: Yes :)
<srhb>
Temp49873267: Each time you rebuild switch, a new entry is added with the new configuration
<srhb>
(and made default)
<Temp49873267>
ideally all boot messages and boot loader would be hidden.. maybe a plymouth thing
<clever>
rebuild boot also does that, without making it active on the running system
<srhb>
Temp49873267: That's one strange ideally, to me. ;-)
<clever>
plymouth comes up after grub
<Temp49873267>
hmm
<Temp49873267>
yeah bootloaders and stuff were never something I was interested in... that's one part I always wanted to "just work" and was most frustrated with when it didn't
<srhb>
It just works. The cool thing here is it makes you a time traveller!
cpennington has quit [(Remote host closed the connection)]
<Temp49873267>
that is pretty cool
ryanartecona has quit [(Quit: ryanartecona)]
<Infinisil>
I need to know something, is grub that white-on-black text without a border, just the last few lines visible? IS that how grub looks or have I always been using something else?
<Infinisil>
Because what's weird is that when I rebuild with a name attached to the generation, it doesn't show up
<Temp49873267>
hmm using #!/usr/bin/env sh finds xrdb... but doesn't allow me to xrdb .Xresources
<Temp49873267>
(assumes .Xresources is in ~)
<clever>
Temp49873267: try running 'env' first, and see what vars are available
<Temp49873267>
also .xprofile is working now... seems to be the same as xsession
LinArcX has joined #nixos
<Temp49873267>
success! it was me being stupid with my submodules (missing files)
<Temp49873267>
cheers everyone!
<Temp49873267>
thanks for sticking w/me in this one :)
tokudan has quit [(Quit: Leaving)]
<Temp49873267>
more ???s I'm remembering... can autoUpgrade upgrade to new channels as well as packages?
<Temp49873267>
also I'm guessing autoUpgrade will add a new entry to grub just like nixos-rebuild switch?
phinxy has quit [(Read error: Connection reset by peer)]
<Temp49873267>
to be clear I'm talking about system.autoUpgrade.*
ryanartecona has joined #nixos
LinArcX has quit [(Remote host closed the connection)]
<srhb>
Temp49873267: I doubt it switches hannels.
<srhb>
Temp49873267: I do think it's equivalent to a rebuild switch
<srhb>
Temp49873267: "Whether to periodically upgrade NixOS to the latest version. If enabled, a systemd timer will run nixos-rebuild switch --upgrade once a day.
<Temp49873267>
in that case it doesn't seem good.. e.g. if it upgrades emacs and that breaks something...
<Temp49873267>
oh nice
<Temp49873267>
should've read the docs >.<
<srhb>
Temp49873267: I would certainly never use it. But then again, I don't use channels. :-P
<Temp49873267>
you use whatever edge is?
<srhb>
Temp49873267: A custom checkout of nixos-unstable on my home laptop, 17.03 on work.
<srhb>
Temp49873267: (Custom only insofar as my changes are necessary, until they're upstream)
<srhb>
Temp49873267: But it does give commit-level control.
Temp4598349088 has joined #nixos
<Temp4598349088>
ugh wifi dropped me. I think I've overstayed my welcome at this coffee shop :P
tmaekawa has quit [(Ping timeout: 240 seconds)]
Temp49873267 has quit [(Ping timeout: 260 seconds)]
drakonis has joined #nixos
carlosda1 has joined #nixos
<Temp4598349088>
thanks again everyone for your help, especially you, srhb. Before I head out... any suggestions/tips?
<srhb>
Temp4598349088: Stick with it, it keeps getting awesome ;-)
<srhb>
Temp4598349088: And do come back to the channel!
<srhb>
I learn a lot just from overhearing things. :-)
<manveru>
but yeah, this channels is pure gold
<Temp4598349088>
yeah for sure. def gonna try the autoUpgrade thing... hopefully I don't end up with anything breaking... but I suppose I can always go back in time if I do :)
<Temp4598349088>
yeah I need to lurk in irc more... maybe I'll set it up on my phone again
<Temp4598349088>
do any of you use nixos for deploying apps at work? wasn't that popular at one point?
<simpson>
Temp4598349088: I run my business on nixops, deploying NixOS to GCE.
<Temp4598349088>
also... thoughts on coreos/guixsd? I'm only aware of those on a surface level... so I don't really have an opinion yet
<Temp4598349088>
simpson: nice. any gotchas you don't really see as a desktop user or vice-versa?
<srhb>
Temp4598349088: I wish, my work doesn't allow anything but Debian. I use it for my private servers though, deploying to google cloud engine
<simpson>
Temp4598349088: Well, you have to use Nix for everything.
<Temp4598349088>
because....?
<Temp4598349088>
hmm.. can nixos run on rpi?
<simpson>
Yes, but it's very slow. I haven't been able to perform a $(nixos-switch) successfully on one. I should unbox my RPi3; it's got more firepower.
<Temp4598349088>
ohh I get it... nix the package manager... not the os. why is that a con?
<simpson>
Most things from the outside world don't work as-is.
<Temp4598349088>
hmm. what do you end up doing a lot that you wouldn't have to do elsewhere? like writing systemd startup scripts or something?
<srhb>
Temp4598349088: Packaging every missing thing rather than just ad-hoc using them from straight downloads
<srhb>
That's what happens to me at least
phinxy has joined #nixos
<simpson>
Yep.
<Temp4598349088>
gotcha
<Infinisil>
Yup same
<srhb>
Usually feels worth it though :)
<srhb>
The guilty conscience from not pushing upstream is worse though. :-P
<Infinisil>
simpson: Couldn't you do a build on your powerful machine but run it on the rpi?
<Temp4598349088>
lol that was my next question...
<Temp4598349088>
yeah that's another thing.. it'd be awesome to build a bunch of images.. then just deploy them places (rpi/desktop/vbox/ec2/whatever)
<simpson>
Infinisil: If it's not self-hosting, then I'm not prepared to manage it in my infrastructure yet.
<Temp4598349088>
I'm guessing that's pretty easy. packer or some nixos tooling?
<srhb>
Temp4598349088: We do do that :)
<Infinisil>
It's actually what makes nix so good, instead of ad-hoc fixing something for yourself, all users can benefit from it
<srhb>
Temp4598349088: Not even images, just nix stores
<Temp4598349088>
oh another thing... do you all keep a cache of packages somewhere?
<srhb>
Temp4598349088: You mean custom packages?
<Temp4598349088>
seems like it would only be useful if you had N machines running nix.. or you were building the packages... or switching between them a lot (also I'm assuming the os keeps a cache anyway)
<Infinisil>
Temp4598349088: cache.nixos.org?
<clever>
Infinisil: you would need an ARM based machine, not x86
<Temp4598349088>
well there's a way to set up your own cache... doesn't seem worth it for desktop use though
<srhb>
Temp4598349088: I generally just need the nixos cache
<clever>
Temp4598349088: nix will keep a local cache of everything in /nix/store/
<Temp4598349088>
ok cool
<Infinisil>
Temp4598349088: And regarding the deploying on machine/vbox/etc2/whatever, that's exacly what NixOps does
<Temp4598349088>
we're using amazon linux (cent) at work. it'd be cool to sell nix.. but we've already built team processes around building amazon linux images.. so I doubt it
<Temp4598349088>
so nixops is what I'd use to make e.g. an .img for a rpi?
Guest74198 has quit [(Quit: Lost terminal)]
<clever>
Temp4598349088: nixops will ssh into an existing nixos machine, and copy the missing files into /nix/store/
<Temp4598349088>
it'd be cool if you could rebuild switch and push that new config to a rpi
<Infinisil>
Temp4598349088: Maybe you could build a working demo in nix and have a good comparison between the two
<clever>
Temp4598349088: so you can deploy a pre-built programs into an existing install
<Temp4598349088>
Infinisil: that's a good idea... they /love/ PoCs
<Temp4598349088>
clever: really? that seems perfect for the pi
<clever>
Temp4598349088: but you would still need an ARM build server to actualy do the compiles
<Temp4598349088>
gonna have to experiement over the long weekend here :)
<Temp4598349088>
oh dang
<Temp4598349088>
maybe my pi can handle it... I think I have a B 2 or whatever
<Temp4598349088>
or just B
<Temp4598349088>
I don't remember. it's old. think it's the 2nd ver
<Infinisil>
Won't that have to rebuild pretty much everything?
<srhb>
Yep.
<Infinisil>
Like not a single binary is in the cache?
<srhb>
Indeed.
<Infinisil>
damn
<Infinisil>
that's gonna take a while then indeed
<clever>
i'm running my own binary cache to solve that, but its fairly behind right now
<srhb>
It'll be like 2001, compiling Gentoo
<Temp4598349088>
ok I really gotta go this time... thanks again! see you around :)
<srhb>
o/
<Infinisil>
See ya
<simpson>
I gave an RPi three days to do this earlier in the year. It didn't get very far.
<clever>
this chart lets you identify exactly which model you have
<Infinisil>
IPFS would solve that problem
<clever>
i currently have 4 i think, over a range of models
<clever>
Infinisil: IPFS stores data as hash(value)=value
<clever>
Infinisil: but nix stores data as hash(buildscript)=output
tmaekawa has joined #nixos
<Infinisil>
clever: Well the layers could be stacked, as in using IPFS only for storage
<Infinisil>
hmm but then file path and content must be encoded..
<clever>
yeah, it would still need a generic key=value db, and the existing narinfo's can handle that
<grahamc>
Infinisil, your hitting all the hot topics this week :P ipfs, better docs
<Infinisil>
heh
dmj` has quit [()]
<Infinisil>
IPFS would be a global cache, decentralized, no need for cache.nixos.org anymore
<Infinisil>
when somebody has built an arm version it can be used by others
<Infinisil>
I'm gonna dig up that discussion
<clever>
Infinisil: the ideas i have, are to store the IPFS hash in the narinfo on cache.nixos.org
Temp4598349088 has quit [(Ping timeout: 260 seconds)]
<clever>
so you still need the central cache, but it only acts as an index
<grahamc>
Problems with trust in there. Maybe clever can explain. I've gotta run.
<clever>
yeah, just because i build a binary, doesnt mean i havent packed it with trojans
<Infinisil>
clever: Meh, not a fan of that solution
<simpson>
Infinisil: I have a plan using NDN but it's not ready yet. IPFS doesn't solve the hard parts of the problem.
<clever>
you need the binary to be signed by a trusted authority
<Infinisil>
ohh right
<clever>
and in my idea, hydra.nixos.org will do the builds, sign them as safe, and compute the IPFS hash
<simpson>
Infinisil: NDN would make it easy to authenticate that each package was built by cache.nixos.org without requiring a central distribution point.
* Infinisil
doesn't know what NDN is
<clever>
then the narinfo on cache.nixos.org says where to download it normally, the IPFS hash, and the signature
<simpson>
Infinisil: NDN is like IPFS but not-bad and made by people who designed parts of the Internets a long time ago.
<clever>
simpson: in theory, the narinfo files could also be published over ipfs, and the signatures they already contain will maintain the trust
<clever>
the problem, is a key=value db, that doesnt rely on the key being a hash of the value
<Infinisil>
simpson: That sounds pretty mocking of IPFS which is being developed very carefully by (i think) smart people, how is IPFS bad?
<simpson>
clever: NDN lets you sign named data directly rather than coming up with ad-hoc integrity.
<Infinisil>
simpson: Ah yes, but that's not a guarantee on this layer, Filecoin is thought for that
<simpson>
Infinisil: Yes, and that decision to try and separate out those concerns is not a good decision.
<Infinisil>
simpson: And there would still be the nixos.org server which would pin the contents anyways (at least the most recent one)
<simpson>
Infinisil: If you have the time, http://www.youtube.com/watch?v=oCZMoY3q2uM is a very good overview of the motivation for moving to named data, and IPFS doesn't reflect a strong understanding of what's required.
<Infinisil>
simpson: I'll maybe look at that, but I'm pretty sure separation of concerns generally works, see the internet today
LinArcX has joined #nixos
<Infinisil>
(yes the internet isn't fully separated into layers, but I think we can neglect that)
<Infinisil>
or not, I'm actually not sure now
<simpson>
Infinisil: Definitely watch this video. This is one of the original TCP/IP fellows.
LinArcX has quit [(Remote host closed the connection)]
aneeshusa has quit [(Ping timeout: 255 seconds)]
<clever>
simpson: another area i think nix needs work in, is how signatures are stored client side
<simpson>
clever: Yeah.
<simpson>
Trust is hard.
<clever>
simpson: for example, if my hydra downloads something from cache.nixos.org, and then my hydra re-serves it, the nixos signature is lost
<clever>
in theory, nix could save the signature to the db.sqlite when it downloads things
<clever>
and then return the original signature
<clever>
this also opens up a new security option
<simpson>
clever: Right. You want the signature to relate the *name* and the *data*, but not to involve *you*.
<simpson>
dash: ^^^^
<clever>
if an attacker gets root on my machine, and knows how nix works, he can trojan any binary in /nix/store/
<clever>
and then update db.sqlite to have the right hash
Turion has quit [(Ping timeout: 258 seconds)]
<clever>
at this point, how do i detect it??
<clever>
if nix stored the original signature, his only option is to remove the signature, and then i can just search for anything not signed by nixos
ris has joined #nixos
<Infinisil>
Can't we just make it so that only IPFS hashes from nixos.org are used?
<Infinisil>
You just download the hashes from nixos.org first, then use IPFS
<Infinisil>
Or am I misunderstanding something
k0001_ has quit [(Remote host closed the connection)]
k0001_ has joined #nixos
_ris has quit [(Ping timeout: 240 seconds)]
<clever>
yeah, thats my basic idea
<Infinisil>
And regarding the hash(buildinput)=outputPath
<clever>
when nix wants to install /nix/store/xs7p3w2iqvv0y1d9r79wb6jrp4pm1h93-hello-2.10
<Infinisil>
But I don't think that's a problem, we don't have to have a single list with all of them, it could be separated in a logical way
<gchristensen>
Infinisil: a lot :)
<Infinisil>
gchristensen: Do you have numbers? I'm interested
<Infinisil>
And why the hell is nothing GC'd?
aneeshusa has quit [(Ping timeout: 260 seconds)]
NixOS_GitHub has joined #nixos
<NixOS_GitHub>
[nixpkgs] Balletie opened pull request #27000: pulseaudio: Resolve conflicting asound.conf of pulseaudio and alsa (master...fix/pulseaudio-alsa-conf) https://git.io/vQRce
NixOS_GitHub has left #nixos []
<gchristensen>
Infinisil: I don't have a good number, no
<clever>
Infinisil: the only thing i can think of, is to do what git does
<clever>
Infinisil: rather then have a single directory with just xs7p3w2iqvv0y1d9r79wb6jrp4pm1h93.narinfo
<clever>
make the following path, xs/7p/3w2iqvv0y1d9r79wb6jrp4pm1h93.narinfo
<clever>
so now, the first 2 levels only have 2 character filenames, and act as an index
<Infinisil>
That could work, but what against a logical grouping? Something like /<channel>/<commit>/?
<clever>
nix has no clue what channel a given derivation came from
sidpatil has joined #nixos
<gchristensen>
or commit
<gchristensen>
although that doesn't mean it couldn't be done that way
<LnL>
the cache is about 40 TB IIRC
simukis has quit [(Ping timeout: 260 seconds)]
<Infinisil>
BUt I mean on the server side, have every package nar (or a single IPFS hash) for a certain channel/commit downloadable from nixos.org/channel/commit
<Infinisil>
LnL: Well that's not too bad then :)
<Infinisil>
Maybe not exacly this, but something along those lines
<Infinisil>
I'll read through the github discussion now
jgertm has quit [(Ping timeout: 260 seconds)]
ivn has quit [(Ping timeout: 260 seconds)]
<Infinisil>
Well I concluded that I don't know enough about nix (yet) to fully understand how it could be integrated with IPFS
<clever>
Infinisil: when you eval builtins.derivation { ... } in nix, it will flatten the attribute set down to a string=string map
<clever>
Infinisil: it will then hash that map, to compute the $out path
jgertm has joined #nixos
<clever>
Infinisil: it will then generate a .drv file that serializes the map, and the $out path, and store the drv at hash(value)=value in /nix/store/foo.drv
<clever>
that drv will also reference the drv of the buildtime deps
<clever>
then when nix wants to download from the binary cache, it will take the hash from the $out path, and query cache.nixos.org/<hash>.narinfo
<clever>
and at this point, it has no clue what nix file it came from
<Infinisil>
Hmm..
<Infinisil>
Being able to find out where it came from would be really useful though, but I doubt it could work
mkoenig has quit [(Ping timeout: 240 seconds)]
<Infinisil>
Oh well, I'll learn more about nix and ipfs and then think about it some more
Tarinaky has quit [(Read error: Connection reset by peer)]
<Infinisil>
What I think would be really useful is to have every file = type + value
erictapen has quit [(Ping timeout: 276 seconds)]
<Infinisil>
where the type could be x68 executable / arm executable (would replace x flag) / text file / tar file / whatever
mkoenig has joined #nixos
<Infinisil>
would also get rid of file extensions which are really just a hack
erictapen has joined #nixos
<Infinisil>
ipfs, which should be as general as possible, could really use something like that
<dash>
yayyyy mime types for everybody
<dash>
*barf*
<Infinisil>
dash: What's so bad about that? I don't know much about mime types
<Infinisil>
I just feel the need for there to be more support for back references, it seems like a fundamental problem we'd like to have solved it many places
aneeshusa has joined #nixos
<Infinisil>
Or imagine this: A package manager (of sorts) that makes references from packages to uses of it. This would be really really useful
<Infinisil>
You could check how many % of uses this new API change breaks for example
sidpatil has quit [(Ping timeout: 276 seconds)]
<Infinisil>
Or on the programming language level even: Every function has references to where it is being used, also really useful
JagaJaga has quit [(Ping timeout: 260 seconds)]
<dash>
Infinisil: problem is that backrefs imply, at some level, a closed system
<clever>
static analasys of the code can compute such things
digitus has quit [(Quit: digitus)]
<Infinisil>
dash: Good point
sidpatil has joined #nixos
<gchristensen>
Infinisil: it does seem helpful
kthnnlg has quit [(Ping timeout: 260 seconds)]
Filystyn has quit [(Remote host closed the connection)]
mudri has joined #nixos
<Infinisil>
Another example is symlinks and their problems
<Infinisil>
Or (shrug) Windows software that installs a bunch of files somewhere on your machine and expects them to not be deleted
phinxy has quit [(Read error: Connection reset by peer)]
<Infinisil>
But then you come around a few months later, having a look through the system and finding these files, and because you have no idea where they came from you may delete them
<Infinisil>
With back references you'd get "File <foo> is required by software <bar>, can't delete"
<gchristensen>
is that a problem we have with symlinks?
<gchristensen>
the DAG in nix doesn't allow thing to be removed unless their gcroot is removed
<clever>
nix prevents such a problem by just forcing an application to put all of its junk in a single place
<clever>
and yeah, roots then keep that place alive
<Infinisil>
gchristensen: symlinks have the problem that the original can be deleted without anyone knowing there was a symlink to that
<Infinisil>
Yeah nix does solve that fairly well
<gchristensen>
Infinisil: nix doesn't allow that
<clever>
but if the symlink is in the nix store, nix keeps that backref in the db.sqlite
<clever>
and will not allow you to break its target
<Infinisil>
gchristensen: I'm not just talking about nix, problems in general
<gchristensen>
oh, but this is why I use nix :P
contrapumpkin has quit [(Quit: My MacBook Pro has gone to sleep. ZZZzzz…)]
<Infinisil>
I'm using symlinks from my ~ to my config directory for example