<judson>
I assume fetchFromGithub hashes its input and attempts the cache.nixos.org fetch first?
<clever>
judson: it takes the sha256 you give it, computes what the output path is, and then check the cache for a pre-made copy
<clever>
and if you reused the hash of another derivation, it gives you that other source
<judson>
It also explains why my patches weren't working...
<clever>
,tofu
<{^_^}>
To get a sha256 hash of a new source, you can use the Trust On First Use model: use probably-wrong hash (for example: 0000000000000000000000000000000000000000000000000000) then replace it with the correct hash Nix expected.
<judson>
It wasn't the hash of a derivation I expected, but I'd borked by prefetch
<gchristensen>
I'm getting out of memory errors adding a big file to the store with Nix 2.1.1. is there a workaround?
<aleph->
clever: So question, if I define each of the .nix files as such https://pastebin.com/Bsm9cSUh then how would I import it as such into my config.nix? Trying to do your - let pkgs = import <nixpkgs> {}; in import ./common.nix pkgs doesn't work since common.nix now returns a list
fragamus has joined #nixos
<aleph->
Which makes sense.
<clever>
aleph-: it would be better to accept pkgs as an argument with `pkgs:` or `{ pkgs }:`
<aleph->
Wait
carlosdagos has joined #nixos
<clever>
aleph-: re-importing a new copy of nixpkgs in each file will harm performance
<aleph->
Okay, so the better way would be to have each file be like pkgs: with pkgs; [] and then just import them all into a central file to be instantiated with?
<clever>
yeah
<aleph->
Okay so how would that work with stuff like python packages? Doing the later with python36Packages.requests in the list fails out with it not being a derivation, where as if I import <nixpkgs> works fine.
<aleph->
I'm assuming it's due to me not importing and having it in scope?
<clever>
aleph-: can you pastebin the exact contents that failed when you did python36Packages.requests ?
<aleph->
Sure, one sec.
<aleph->
pkgs: with pkgs; [micro python36Packages.requests python36Packages.beautifulsoup ]
<{^_^}>
[nixpkgs] @costrouc opened pull request #48187 → pythonPackages.atsim_potentials: init at 0.2.1 → https://git.io/fxWyF
<clever>
aleph-: and the file that loads this did what?
viric_ has quit [Read error: Connection reset by peer]
<{^_^}>
[nixpkgs] @peti pushed to haskell-updates « hackage-packages.nix: automatic Haskell package set update »: https://git.io/fxWyx
<aleph->
I retract this question, I was calling the wrong file with nix-env
* aleph-
sighs
viric has joined #nixos
<aleph->
clever: So last question for now I think, importing two files into packages.nix and when I nix-env -if it, I get the following error.
<drakonis>
so it should pick up the lvm setup without any trouble
<clever>
if you want to use lvm for your install, you will need to run lvcreate, and then mount the nixos rootfs to /mnt, and also mount your chosen boot partition to /mnt/boot
<clever>
then just continue with the normal install directions from the manual
<drakonis>
fair enough, i already have it from fedora
<clever>
keep in mind that nixos will probably overwrite the fedora bootloader, and you would need to add a boot option to boot it again
fragamus has quit [Quit: My MacBook has gone to sleep. ZZZzzz…]
phreedom_ has joined #nixos
phreedom has quit [Ping timeout: 256 seconds]
mic921 has quit [Ping timeout: 250 seconds]
MarkOtaris has quit [Ping timeout: 250 seconds]
tokudan[m] has quit [Ping timeout: 250 seconds]
timokau[m] has quit [Ping timeout: 250 seconds]
fgaz has quit [Ping timeout: 250 seconds]
yegortimoshenko has quit [Ping timeout: 276 seconds]
nikivi has quit [Ping timeout: 252 seconds]
MrAxilus[m] has quit [Ping timeout: 250 seconds]
<drakonis>
clever: justdoit paves block devices so i can't fire it into my hard drive as it also has windows in it
<drakonis>
maybe if i order a new hard drive :V?
roberth has quit [Ping timeout: 250 seconds]
bgamari has quit [Ping timeout: 260 seconds]
dkellner[m] has quit [Ping timeout: 260 seconds]
<clever>
drakonis: yeah, you would want to avoid justdoit in that case, and just drive it manually, normal lvcreate/fdisk/mount/nixos-install
tokudan[m] has joined #nixos
yegortimoshenko has joined #nixos
Supersonic has quit [Ping timeout: 252 seconds]
fragamus has joined #nixos
MarkOtaris has joined #nixos
fgaz has joined #nixos
* clever
heads off to bed
<drakonis>
aight, peace.
rnhmjoj[m] has quit [Ping timeout: 276 seconds]
roberth has joined #nixos
<{^_^}>
[nixpkgs] @aanderse opened pull request #48189 → redmine: refactor, cleanup, bug fix, and add functionality → https://git.io/fxW9Z
lassulus_ has joined #nixos
nikivi has joined #nixos
Supersonic has joined #nixos
lassulus has quit [Ping timeout: 246 seconds]
lassulus_ is now known as lassulus
<{^_^}>
[nixpkgs] @costrouc opened pull request #48190 → pythonPackages.scikit-bio: init at 0.5.4 → https://git.io/fxW9y
fragamus has quit [Quit: My MacBook has gone to sleep. ZZZzzz…]
silver has quit [Read error: Connection reset by peer]
IRCsum has quit [Ping timeout: 252 seconds]
monotux has quit [Ping timeout: 252 seconds]
monotux has joined #nixos
Ralith has quit [Ping timeout: 252 seconds]
ldesgoui[m] has quit [Ping timeout: 252 seconds]
bkchr[m] has quit [Ping timeout: 252 seconds]
hedning[m] has quit [Ping timeout: 252 seconds]
florianjacob has quit [Ping timeout: 252 seconds]
Mikaela- has quit [Ping timeout: 252 seconds]
sphalerit has quit [Ping timeout: 252 seconds]
siel has quit [Ping timeout: 252 seconds]
jasongrossman has quit [Ping timeout: 244 seconds]
jb55 has quit [Quit: WeeChat 2.2]
sphalerit has joined #nixos
IRCsum has joined #nixos
Mikaela- has joined #nixos
pie__ has joined #nixos
Ralith has joined #nixos
<{^_^}>
[nixpkgs] @costrouc opened pull request #48192 → pythonPackages.filterpy: init at 1.4.5 → https://git.io/fxWHo
leons has joined #nixos
florianjacob has joined #nixos
pie__ has quit [Remote host closed the connection]
pie__ has joined #nixos
Mikaela- has quit [Excess Flood]
Mikaela- has joined #nixos
kaychaks[m] has quit [Ping timeout: 250 seconds]
nyanloutre[m] has quit [Ping timeout: 250 seconds]
pie_ has quit [Ping timeout: 252 seconds]
d4g has quit [Ping timeout: 252 seconds]
fragamus has joined #nixos
bennofs[m] has quit [Ping timeout: 250 seconds]
bitmapper[m] has quit [Ping timeout: 250 seconds]
schmittlauch[m] has quit [Ping timeout: 250 seconds]
incospicuous[m] has quit [Ping timeout: 250 seconds]
bennofs[m] has joined #nixos
Ralith has quit [Ping timeout: 250 seconds]
sevanspowell[m] has quit [Ping timeout: 250 seconds]
schmittlauch[m] has joined #nixos
Ralith has joined #nixos
<{^_^}>
[nixpkgs] @brendan-hall opened pull request #48193 → now-cli: init at 11.4.6 → https://git.io/fxWQU
fragamus has quit [Quit: My MacBook has gone to sleep. ZZZzzz…]
acarrico has quit [Ping timeout: 245 seconds]
nikivi has joined #nixos
<aleph->
Question, can I set home manager to be run on a first install in my config.nix?
<elvishjerricco>
aleph-: home-manager has a NixOS module, so that home-manager is activated whenever your NixOS config is activated. Makes sure it gets activated on first boot, before you ever get to log in
<aleph->
Awesome, that makes this easier then mucking around with users.extraUsers.pkgs
<aleph->
elvishjerricco: Link to any docs on doing so?
<aleph->
Google is being sparse.
fragamus has joined #nixos
xenog_ has joined #nixos
<elvishjerricco>
aleph-: Just put `imports = [ home-manager/nixos/default.nix ];` in your nixos config, and wrap your home manager config in `home-manager.users.<user>` within your nixos config.
<aleph->
Gotcha.
<aleph->
I think,
<aleph->
I'll do some more reading and experimenting first.
xenog has quit [Ping timeout: 264 seconds]
Synthetica has quit [Quit: Connection closed for inactivity]
<aleph->
Is there an actual manual for home-manager out of curiosity? All I've found seems to be an appendice listing options.
<aleph->
So to run home-manager via config.nix I want to add "${builtins.fetchGit { url="https://github.com/rycee/home-manager"; ref="master"; }}/nixos" to imports []; and then set home-manager.users.USER = import ./home.nix; right?
<kalbasit[m]>
aleph-: yes
<kalbasit[m]>
sounds about right
<ekleog>
aleph-: you may want to pin the ref to a specific commit and specify a sha256
<ekleog>
otherwise you'll need internet to rebuild, which is painful
<aleph->
Noted, seems I need to increase swap since the daemon keeps running out
<ekleog>
for swap, I heavily recommend zramSwap = { enable = true; numDevice = [number of cores]; memoryPercent = [your pick]; }
* ekleog
discovered recently and it's great
<aleph->
Noted. just doing this on a cheap vps before I move it over to my main laptop
<emily>
makes more sense to use zswap for swap than zram
<emily>
(zswap.enabled=1 on kernel commandline, dunno if there's a nixos toggle for it)
<ekleog>
I don't need physical-disk swap, so don't see the point of zswap
<ekleog>
actually I've grown heavily biased against physical-disk swap, having computer freezing during half an hour because xorg got physically swapped led to me having no swap at all for like 2 years, until I discovered zram
<emily>
how much ram do you have?
<ekleog>
current computer is 8G
<emily>
heh
<emily>
I need plenty of swap even with 16 gigs of ram
* aleph-
has 32
<ekleog>
wat u doin
<emily>
using a web browser :(
<aleph->
...
<emily>
okay, using a web browser a lot
<ekleog>
I actually discovered zram because I had rustc compilation OOM on 8G, and linux needed some swap space to defrag memory allocations
<ekleog>
having the zramSwap settings with memoryPercent = 80 (didn't test any other value) led to me being able to compile rustc while having thunderbird, firefox and intellij ( :( ) running
<ekleog>
and with only minor freezes (like < 15s), compared to swapping to physical disk
<ekleog>
(import ./packages.nix) is really just a function that takes as argument `pkgs` and returns a list of packages taken from `pkgs`, so you can then call it / combine it like any other function :)
<aleph->
Yep and that works.
<ekleog>
(well, to be precise import ./foo.nix is really “copy-paste foo.nix between parenthesis here”)
<ekleog>
:)
<aleph->
Now I just need to have it grab my configs from git
<aleph->
ekleog: For other config types, say git, I could do - home.git = (import ./git.nix config)?
lostman has joined #nixos
endformationage has quit [Quit: WeeChat 1.9.1]
<ekleog>
you can
<lostman>
hi folks. I want to setup Hydra in such way that my buildsets can access docker. Not sure how to do it though. Is it possible?
<ekleog>
aleph-: though usually one splits the configuration across modules
<ekleog>
with imports = [ ./file.nix ];
<ekleog>
using import directly can be useful in some circumstances, but is rarely done in practice
<ekleog>
(then I'm not sure this applies to home-manager, but ISTR it uses the same module system as nixos, so it should)
<ekleog>
lostman: hydra builds are by designed sandboxed. So you'll need to either turn off the sandbox (and likely have security vulnerabilities accessible from people who can trigger builds on your hydra) or run the docker daemon inside the build
<lostman>
how do I run docker daemon inside the build?
<aleph->
Gotcha, thanks.
<ekleog>
lostman: I don't know, sorry… if docker requires root you likely can't anyway unless you spawn a full VM inside the build
<lostman>
ekleog: I suppose turning off sandbox is also fine. it's a private build server. would it be then ok to simply change the permissions of docker socket to be accessible by all nix users?
<ekleog>
(then, I must say I don't really see the point of running docker inside a nix build as nix already provides reproducibility and an isolation likely better than what docker does, but I guess you have your reasons)
<ekleog>
lostman: you'd need to 1. disable pure-eval and sandbox in hydra, 2. make docker socket accessible by nix users
<ekleog>
I'm not really sure about how to do any of those, not having deployed a hydra myself
<lostman>
I see. I'll have to look into it a bit more
Ariakenom has joined #nixos
fragamus has quit [Ping timeout: 252 seconds]
hamishmack has joined #nixos
<worldofpeace>
How can one mark a package broken on aarch64-linux ?
reinzelmann has joined #nixos
<etu>
worldofpeace: broken = stdenv.isAarch64;
<worldofpeace>
etu: Thanks :)
<aleph->
And now it's broken. Bollocks
Itkovian has joined #nixos
Itkovian has quit [Client Quit]
<aleph->
Meh this can wait till tommorow.
Itkovian has joined #nixos
aleph- has quit [Ping timeout: 252 seconds]
Itkovian has quit [Client Quit]
clefru has quit [Quit: Leaving]
Itkovian has joined #nixos
Itkovian has quit [Client Quit]
nD5Xjz has quit [Ping timeout: 246 seconds]
Ariakenom has quit [Read error: Connection reset by peer]
<srhb>
siers: No, it isn't, but it's a huge gotcha
<srhb>
siers: When nix sees that a fixed-output-derivation is already in the store, it does nothing.
<siers>
ah
<srhb>
siers: Consider the opposite case: Everything would always have to be downloaded to verify that the hash matches
<srhb>
siers: Building would take aeons.
<srhb>
_every_ time. :-)
<siers>
or just factor in the sha256 to calculate the derivation hash?
<srhb>
That sort of mangles the idea of a fixed-output-derivation
<srhb>
(Consider that we can change the url to point to any other mirror without changing the hash of every dependent)
hyper_ch2 has joined #nixos
<srhb>
FODs are about being morally pure too, after all. "I know the hash in advance, therefore fetching is morally pure."
<siers>
But the sha256 doesn't change when you change the URL, does it?
<srhb>
Not on a fixed-output-derivation. The hash is the sha256. Maybe I misunderstood your question?
<srhb>
But how can you know the hash in advance if the hash depends on the hash.
<siers>
the /nix/store path hash
<srhb>
siers: It already does. name and sha256.
<srhb>
(That's how it knows where to check whether it's already there)
<siers>
srhb, so when I changed the minorVersion the name must've stayed the same?
<srhb>
siers: Yeah :)
* siers
built the latest lilypond \o/ woo
<siers>
still has a bug
<siers>
srhb, does the name come from derivation's name?
sir_guy_carleton has quit [Ping timeout: 252 seconds]
<hyper_ch2>
hmmm, having issues with bridged networking on nixos.... on my office server pre-18.03 unstable, I use systemd to crate the bridge and it all works fine... now I've upgraded to 19.03 unstable and when I boot into it, the kvm VMs work properly (meaning they get their network addresses fine and all works) but the host system can't access anything (ping not working etc.) except for the router
<hyper_ch2>
the strange thing is, while I can't ping anything except the router (neither bei IP nor domain name), the DNS still resolved (probably because the router is set as dns resolver)
civodul has joined #nixos
<srhb>
siers: Yes. And different fetchers produce different names
<hyper_ch2>
joko: booted back into the old pre-18.03 unstable and it returns "1"
orivej has joined #nixos
jackdk has quit [Ping timeout: 246 seconds]
carlosdagos has quit [Quit: Connection closed for inactivity]
<hyper_ch2>
and as said, if I boot into latest nixos unstable, the VMs still work fine, they do get their ips and can reach everything and be reachable... only the host can access the router and nothing else
<srhb>
siers: So you'll cause a refetch if the file name changes indeed, and a new store path will be created for each combination (name, sha256) but since you're fetching 0k2jy7z58j62c5cv1308ac62d6jri17wip76xrbq8s6jq6jl7phd each time, the actual contents won't change.
<srhb>
siers: So a) store path already exist, b) tarballs.nixos.org hosts that sha256 as tarballs.nixos.org/sha256/0k2jy7z58j62c5cv1308ac62d6jri17wip76xrbq8s6jq6jl7phd
brejoc has joined #nixos
<{^_^}>
[nixpkgs] @teto opened pull request #48198 → rfc-bibtex: init at 2.2.1 → https://git.io/fxlJu
<goibhniu>
YellowOnion_: I wonder if you're looking for stdenv
<symphorien>
YellowOnion_: for most compilation related tasks, you don't instll anything, only use nix-shell
<manveru>
infinisil: thanks :D
<infinisil>
:)
<YellowOnion_>
symphorien, I'm trying to setup a Haskell dev environment and I'm using stack to build some tools for spacemacs, I guess maybe there's another way to do this.
lostman has quit [Quit: Connection closed for inactivity]
Acou_Bass has joined #nixos
<symphorien>
I don't know any haskell specific things. what is the exact error you encounter ?
<YellowOnion_>
I got gcc is missing, then ar is missing, I assume I'm gonna need a lot more of the dev stuff.
orbekk has joined #nixos
<YellowOnion_>
maybe the haskell packages exist in nixpkgs
<symphorien>
stdenv is for base stuff (gcc, binutils etc.)
ikwildrpepper has joined #nixos
<YellowOnion_>
Ahh okay.
<symphorien>
if you need some other lib, like sqlite, add it to the arguments: nix-shell -p sqlite libfoo libbar
<symphorien>
(stdenv is not implicit, but I think -p needs at least one argument)
<symphorien>
s/not//
<symphorien>
,library YellowOnion_
<{^_^}>
YellowOnion_: Don't install libraries through nix-env or systemPackages, use nix-shell instead. See https://nixos.wiki/wiki/FAQ/Libraries for details.
patrl has joined #nixos
<srhb>
YellowOnion_: Have you read the user guide to the haskell infrastructure in the nix manual?
Anton-Latukha has quit [Quit: Leaving.]
<srhb>
YellowOnion_: Working with stack might be difficult, but working without it is extremely flexible and productive.
<YellowOnion_>
srhb, ahh true, I'm just familiar with it.
<hyper_ch2>
hmmmm, samba fails to start now also... I have no idea why... neither journalctl nor the logs in /var/log/samba/ tell me somehting
<srhb>
YellowOnion_: I know people that do use stack with nix, but that generally means giving up most of the nix stuff and letting stack build everything, which means no binary caches etc.
<srhb>
YellowOnion_: I have little experience with it.
<ekleog>
stack --nix kind of works
<srhb>
\emph{kind of}
<ekleog>
but yeah, it's letting stack handle all the things
<ekleog>
well, it's been enough for me to build hledger, but not enough to build the test suite (but it seems the test suite was broken when I tried anyway, so not sure it's stack's fault)
<ekleog>
I mean, stack without --nix doesn't even find ghc, so… ^^'
<srhb>
I think on NixOS you can't even unselect --nix
<ekleog>
oh a few months ago you could
<srhb>
Oh..
<srhb>
I may be wrong. I don't use stack really. :)
<manveru>
anyone know what "Can't locate Git.pm in @INC" means when trying to clone a repo with git?
* ekleog
had a time of dismay when it didn't find ghc before finding about --nix
<ekleog>
well, I don't really do haskell dev, but had to try this patch to send to hledger, so went with hledger's build system :°
<srhb>
manveru: The perl bindings for Git aren't found, I assume.
<YellowOnion_>
Thanks for your help guys.
pie__ has joined #nixos
<infinisil>
Yeah, I'll recommend using cabal over stack
<infinisil>
Have used stack in the past and it was a pain for multiple reasons
<manveru>
srhb: it doesn't even work with gitFull :|
* ekleog
thinks the haskell build systems are one of the few that managed to be worse than the C build systems
<infinisil>
Which then works correctly on my projects if I have a direnv .envrc file with "use_nix" in them
<LnL>
manveru: it used to leak perl dependencies installed in the system, resulting in stuff like that git issue not getting noticed on nixos systems
<LnL>
manveru: yes
<__monty__>
infinisil: You've installed that globally? I use ghcid, pointfree and some others but I keep them in my environments so ghc version differences don't interfere.
<rauno>
when debugging systemd service, is there a way to simulate nix systemd environment so i could try manually running service ?
<infinisil>
__monty__: Yeah I installed hie globally, but it's a bundle of versions 8.0, 8.2 and 8.4, with my wrapper it first gets the correct ghc in the environment, then hie-wrapper auto-detects which version of hie to use based on that, then starts that hie versions
<rauno>
funny is that i dont get any real error while starting a service, just "main process exited", when starting ExecStart line manually it runs perfectly so i suspect some missing dependencies caused by the isolation
<manveru>
LnL: ok, this might be because i have a ~/.netrc file, will see if i can figure out a way to patch it :|
<LnL>
manveru: together with a global pkgconfig variable that would magically find system dependencies
<__monty__>
infinisil: And how do you typically develop with this, using build or shell?
<__monty__>
infinisil: With build you give up incremental builds, right?
Anton-Latukha has quit [Client Quit]
<infinisil>
__monty__: automatically enter nix-shell by going into the directory (direnv does that), then use cabal repl/build/run/whatever to develop, with HIE giving completions and stuff in the editor. nix-build only to deploy
<manveru>
LnL: setting `PERL5LIB = "${git.outPath}/lib/perl5/site_perl/5.28.0";` in my nix-shell fixes it temporarily, will open an issue for it anyway
civodul has joined #nixos
<LnL>
you could reintroduce the global variables in your config, but I really don't like doing that, stuff should work without that
<infinisil>
__monty__: (I spent quiet some time until I got to this point, with lots of problems, most of which are solved now)
<{^_^}>
domenkozar/hie-nix#26 (by Infinisil, 6 weeks ago, merged): Update nixpkgs, stack2nix and HIE
AntonLatukha[m] has joined #nixos
<infinisil>
Still need to fix something, namely the hie ghc detection not working if you don't have a cabal hackage database which you get with `cabal update`
sigmundv has joined #nixos
<infinisil>
(And hie has a bunch of issues on its own still)
<infinisil>
And I still want to have better new-build support, currently I would need to duplicate what cabal.project contains in default.nix and shell.nix
<srhb>
infinisil: Shouldn't shellFor have you covered there?
<manveru>
rauno: you can try running the command in a pure nix-shell?
<{^_^}>
#18315 (by domenkozar, 2 years ago, open): Remove myEnvFun
<srhb>
infinisil: No?
<infinisil>
__monty__: Wait what doesn't exactly work?
<manveru>
rauno: other options are to change the executable to `strace` and pass it the real executable, so you see what it's doing
<infinisil>
srhb: Well I can't build the packages unless I do. I don't think there's a cabal.project parser somewhere in there which would automatically add them
kai_w has joined #nixos
<srhb>
infinisil: Combining callCabal2nix and shellFor, you'll get all deps.
<srhb>
infinisil: Isn't that good enough?
<infinisil>
callCabal2nix only works for a single package
<infinisil>
I guess I could `let in` the packageSourceOverrides arguments and use that for shellFor
<infinisil>
But still would need to duplicate cabal.project info once
<srhb>
So essentially, lib.filesystem.haskellPathsInDir, callCabal2nix all those, shellFor whatever union of those.
<infinisil>
Checking out cocreature link now
<__monty__>
infinisil: The problem is mostly how internet-happy nix-shell is. For me specifically this is a problem not because I don't usually have internet but because my host is too weak to do any building on its own within a reasonable time frame. So it poses a problem whenever I can't reach my remote build host.
<infinisil>
srhb: Ahh, haskellPathsInDir
<infinisil>
While not really project.cabal parsing, would probably be the same for most projecst
<srhb>
infinisil: Yah. With those pieces you get fully automated shells for any union of haskell sources in some tree. :)
<infinisil>
Neat, I'll try this later
<srhb>
All I want for christmas is incremental/component-wise nix builds of haskell. :-)
<betaboon>
has anyone used elastic-apm and packaged it for nix yet ?
<srhb>
infinisil: Yep, I've really been meaning to rewrite my personal infrastructure for that to get a feel for it
<srhb>
infinisil: It sounds incredibly exciting, but I don't quite understand it yet.
<infinisil>
srhb: Unfortunately snack only does the current project like that, not all dependencies
<srhb>
Someone needs to blog about snackifying an existing project :P
<hyper_ch2>
ok, seems newest samba doesn't like anymore extraConfig = "name resolv order = hosts wins bcast"
<infinisil>
It's also quiet slow..
<infinisil>
I like snack's idea, but it's kinda impractical right now
<srhb>
:(
<infinisil>
cabal is much faster, and I can still get nix builds with nix-build
<__monty__>
Are there any plans to unify cabal new-*'s store with the nix store (if it exists)?
<srhb>
I think it might still win with snack when I have a single cabal project that takes 20m+ to build
<infinisil>
cocreature: That cabal.project parsing sounds decent too, assuming the parser doesn't mess up. haskellPathsInDir sounds more solid, I think I'll use that
<srhb>
__monty__: I haven't heard of any such attempt.
<__monty__>
srhb: Why would snack be faster? Cabal does incremental builds already, no?
<srhb>
__monty__: I mean incremental when I do the actual nix-build :)
<__monty__>
Ah.
Acou_Bass has quit [Ping timeout: 252 seconds]
<srhb>
__monty__: iirc snack will do the build component-wise, which our current haskell builder does not.
<srhb>
__monty__: That could save a ton of time.
<infinisil>
Well it is actually possible to have the cabal build products be reused in the nix-build
<infinisil>
Kinda impure, can happen if you forgot to cleanSource
nh2[m] has quit [Ping timeout: 276 seconds]
<srhb>
Our builder picks that up? Funky.
<srhb>
And by kinda, you mean... Very. :D
<{^_^}>
[nixpkgs] @lschuermann opened pull request #48201 → nixos/nftables: check ruleset syntax during build → https://git.io/fxlYX
moredhel[m]1 has quit [Ping timeout: 276 seconds]
exarkun1 has quit [Ping timeout: 276 seconds]
dtz[m] has quit [Ping timeout: 276 seconds]
sphalerit has quit [Ping timeout: 276 seconds]
thefloweringash has quit [Ping timeout: 276 seconds]
WilliamHamilton[ has quit [Ping timeout: 276 seconds]
<{^_^}>
[nixpkgs] @gebner pushed to master « piper: fix gi dependencies »: https://git.io/fxlOG
sphalerit has joined #nixos
thefloweringash has joined #nixos
<CMCDragonkai>
Why does nix-shell report this sometimes? `bash: warning: setlocale: LC_ALL: cannot change locale (en_US.UTF-8)`?
<sphalerite>
CMCDragonkai: glibc locale stuff incompatibility between 18.03 and 18.09/unstable iirc
<infinisil>
joko: You can add `export PATH="${lib.makeBinPath [ pkgs.jq pkgs.curl ]}:$PATH"` at the beginning of it
<kai_w>
Is it possible to pass /sys into the build for tests then? Or a restricted subset of it? I agree it is impure so should be off by default, but it seems like it is necessary here.
iyzsong has joined #nixos
<infinisil>
bjhall: Link?
<joko>
infinisil: and append the script from the file, got it, thanks
<infinisil>
bjhall: If merged already you can just open a new PR, should get merged rather quick, otherwise just change the commit in the PR
<{^_^}>
[nixpkgs] @xeji pushed commit from @peterhoeg to master « iio-sensor-proxy: 2.4 -> 2.5 (#48195) »: https://git.io/fxlu3
<samueldr>
couldn't see git commits referrencing zfs and installer media since ~17.09 (stopped looking mid 2017)
<srhb>
I think Ubuntu are the only ones who ignore the potential licensing issue? At least, only mainstream.
<azazel>
srhb, avn, gchristensen: maybe you're right... the last times I've installed nixos I was using the kexec method that's on the wiiki
<srhb>
azazel: That would explain :)
<samueldr>
(and find '*zfs*' looks really similar on boath 18.03 and 18.09 media)
michas has joined #nixos
reinzelmann has quit [Quit: Leaving]
johanot has quit [Quit: WeeChat 2.2]
fendor has joined #nixos
<{^_^}>
[nixpkgs] @xeji merged pull request #48017 → Fix `nload` output corrupting a few seconds after starting → https://git.io/fxsDJ
<{^_^}>
[nixpkgs] @xeji pushed commit from @nh2 to master « nload: Include patch to fix screen corruption. (#48017) »: https://git.io/fxlzC
<rawtaz>
HELLO!
<Taneb>
rawtaz: not so loud, some people are asleep
Rusty1 has joined #nixos
<ekleog>
Profpatsch: Hey! Was looking at https://github.com/NixOS/nixpkgs/pull/37252 and wondered… did you start thinking about a way to include support for merging lists of values?
<rawtaz>
i have a question. running NixOS unstable (master branch) in a VM, and there's no sound. is there normally sound out of the box in NixOS? any pointers to what to check? i know ALSA and pulseaudio are two things sound related in linux
<gchristensen>
rawtaz: I think you need sound.enable = true
<Ke>
is there a way to get absolute path from relative
<Ke>
builtins.toPath, but without expectation to have an absolute path
<srhb>
Ke: Can you give more details of your use case? All paths are usually normalized to absolute paths
<Ke>
I have a string that I want to use as path
<Ke>
user input
<srhb>
Ke: User input as in an argument?
<Ke>
yes
<srhb>
Just don't use a string.
<Ke>
what do you mean?
<srhb>
Ke: I mean, that will also just normalize a path to an absolute path under normal circumstances.
<Profpatsch>
ekleog: Yes, my hunch is that merging logic should be implemented seperately.
<srhb>
> let foo = { path }: path in foo { path = ./.; } # <-- Ke
<{^_^}>
error: syntax error, unexpected IN, expecting ';', at (string):197:26
<srhb>
> let foo = { path }: path; in foo { path = ./.; } # <-- Ke
<{^_^}>
/var/lib/nixbot/state/nixpkgs
<Profpatsch>
ekleog: Plus, all merges should implement the semigroup interface, because “last element”, “first element”, “max element”, “concatenate lists” all follow that interface.
<Profpatsch>
And if something doesn’t it’s probably not a good candidate for a merge.
<Profpatsch>
If you go one step further and require a Monoid, you even get default values for free.
<Profpatsch>
But then you lose a bunch of nice merges, e.g. the ones interspersing elements.
<Profpatsch>
So what I want to say is: the type checker and the merging of options are two different things that can be implemented seperately and then combined.
trevorriles has quit [Remote host closed the connection]
markus1189 has quit [Ping timeout: 252 seconds]
<Ke>
srhb: I don't still quite get, what you mean, but ./. seems to at least expand to absolute path, so I can continue
<ekleog>
Profpatsch: hmm, I agree with that, but from an end-user point-of-view specifying the two is likely the best course, in my opinion
<Profpatsch>
ekleog: What do you mean by “specifying the two”?
Synthetica has joined #nixos
siers has joined #nixos
<ekleog>
but yeah, TYPE.check :: v:any -> r:bool{r = v has type TYPE} and TYPE.MERGESTRATEGY :: [TYPE] -> TYPE are likely the two primitives we want to implement
<ekleog>
like, as a user I don't want to specify product { type = "foo"; val = string; } and then in addition merge-product { type = merge-unique; val = merge-lines; }
simukis has quit [Read error: Connection reset by peer]
<Profpatsch>
ekleog: Well, what you want to do is: you build a DSL of combining types with an instance of Semigroup/Monoid.
simukis has joined #nixos
<ekleog>
something like product.merge-inside { type = "foo"; val = string.merge-lines; } sounds good to me, from an end-user pov
<ekleog>
(disclaimer: I'd be willing to use your types module along with some merge logic in something that's not nixtos, this example is from real code :))
<Profpatsch>
Nope, simple-types.nix isn’t going to have any idea about merging.
<ekleog>
nixos*
<Profpatsch>
But you can combine types with the instances you need and use that.
markus1189 has joined #nixos
<ekleog>
yeah, I'm not saying simple-types should support merging, just wondering how to integrate the two to minimize duplication in the way recursion is handled :)
<Profpatsch>
Well, it’s like tearing the Haskell type class system apart and manually giving implementations where you need them.
<ekleog>
(and in the user-facing interface, too)
<Profpatsch>
Hm, the type checking is not related to the merging. So you type check first and then you merge.
<Profpatsch>
I mean if you have something like a “last” merge you don’t want to ignore all values but the last, right? You want to type check them separately first and then merge.
<ekleog>
yeah, but imagining `merged-values = merge (merge-product-inside { type = merge-unique; val = merge-lines; }) (verify (product { type = "foo"; val = string; }) initial-value))` sounds quite redundant :/
<ekleog>
I completely agree about the two phases being internally done, though :)
patrl has quit [Ping timeout: 252 seconds]
<Profpatsch>
A good user interface means defining good atoms first and then combinators for those.
<ekleog>
hmm? I usually start from the user-interface I want to define, then define atoms that are coherent, and then try to make ends meet
patrl has joined #nixos
<ekleog>
and you already have defined the “type checking” atom here :D
<Profpatsch>
Exactly.
<Profpatsch>
If I had started from the user interface, I think the clarity would be missing.
orivej has joined #nixos
<Profpatsch>
Meaning: For fundamental parts of the system I like to get the foundations right first, even if they are too “heavy” or “complicated” for the user.
<Profpatsch>
One sign of getting the foundations right is that a good user interface is easy to add (is my hunch)
<ekleog>
actually thinking it more, a merge strategy can often apply reasonably only on a single type (apart from when it's something like `first` or `last`… but I think these shouldn't exist, they're IMO the sign of a problem somewhere along the chain anyway, `unique` would be the only case of any-type merge strategy I can think of)
<ekleog>
hmm when I say single type I mean not full type, just outer type (eg. list 'a, not necessarily list int)
<Profpatsch>
ekleog: There’s more than one semigroup implementation for a lot of types. Think + and *
<Profpatsch>
on Ints.
<{^_^}>
[nixpkgs] @fpletz pushed commit from @prusnak to release-18.09 « spotify: fix icon »: https://git.io/fxlwE
<Profpatsch>
You might also define a merging strategy as “multiply” or “add”
<ekleog>
oh yeah there are a lot of semigroup implementations for a lot of types, what I mean is that not a lot of semigroups are independent on the type
<Profpatsch>
Oh, those. Yes, you are right. But there are some useful ones. ;)
<ekleog>
so somehow merging is already (most of the time) dependent on typing having been done
<Profpatsch>
I’m sure we can find a lot more for the use-case of implementing a module system.
<Profpatsch>
I found “interspersing an element” is a good use-case.
<ekleog>
hmm ok
<ekleog>
so basically we'd need, for typing+merging, a (type, merge strategy) couple where some merge strategy impose requirements on the type
hiroshi- has joined #nixos
<ekleog>
s/strategy/strategies/2
Jackneill has quit [Quit: Leaving]
<ekleog>
a merge strategy is… should we consider it as [T] -> T'? it's not the most direct translation of a monoid but should be close enough
<Profpatsch>
Nope, wouldn’t do.
<ekleog>
(and it takes into account weird merge strategies that aren't strictly speaking monoidal)
<Profpatsch>
I have a pretty good representation of type classes somewhere.
<Profpatsch>
ekleog: Which merge strategies for example?
<ekleog>
ISTR having seen some stuff in nixos that do post-processing in the `merge` function
hiroshi has quit [Ping timeout: 252 seconds]
hiroshi- is now known as hiroshi
* ekleog
looking
<ekleog>
Profpatsch: yeah, for containers, nixos/modules/virtualisation/containers.nix l. 449
<ekleog>
(on latest master)
<ekleog>
(I think at least, that's the part I understand least of the current options system, so…)
<Profpatsch>
That applies the module system recursively.
<Profpatsch>
It calls eval-config.nix on the given config set.
<Profpatsch>
err, list of modules.
<ekleog>
oh yeah it's true nixos module system once evaluated has the same type than before being evaluated
<Profpatsch>
(btw one reason why defining lots of containers is such a memory hog, it has to evaluate the whole module systems once for each container)
<Profpatsch>
s/systems/system/
* ekleog
still thinks that doesn't really make sense, but… meh ^^'
<ekleog>
so well, that's a case where I think it would be legitimate to have a result that's not in the same set as the input
exarkun1 has joined #nixos
<ekleog>
even though, yeah, it's really corner-case
<ekleog>
(and not even the case in the current module system)
<exarkun1>
nixops lost the ssh keys to these virtualbox vms it is managing. what the heck?
<exarkun1>
is it going to lose the ssh keys to other machines I manage with it?
<ekleog>
Profpatsch: actually thinking about it a bit more, the `all` merge strategy that just takes all values and puts them in a list is not technically a monoid law
<ekleog>
yet I think it can come in handy :)
mayhewluke has joined #nixos
<Profpatsch>
ekleog: I think it is.
<Profpatsch>
It’s applying a function a -> [a] first and then using ++ on lists.
<Profpatsch>
I think you can define a valid Monoid from that.
<Profpatsch>
at least a semigroup
<ekleog>
hmm my definitions are a bit rusty, but I think it's a semigroup action, not a semigroup law
<ekleog>
like, T * U -> T
<Profpatsch>
Don’t look at me, I sucked in theoretical CS. :)
<ekleog>
(with T being [a] the semigroup, and U being a)
* ekleog
just checked wikipedia :°
<gchristensen>
why would our meta checks need to implement merging?
<Profpatsch>
I can’t think about that stuff mathematically at all, just from the perspective of the Haskell type system tbh
<Profpatsch>
So no proofs from me.
<ekleog>
gchristensen: it's here not for meta checks, but for replacing the module type system :) (as the PR was globally concluding with “we won't have two type systems”, if I read correctly)
<Profpatsch>
gchristensen: The idea is to use it for the module system as well, at least for a mockup.
Jackneill has quit [Remote host closed the connection]
<gchristensen>
oh I see
<Profpatsch>
There’s always room for experimentation :3
<ekleog>
Profpatsch: anyway, back from theory to practice: what's the alternative you propose for [T] -> T' ?
nuncanada has joined #nixos
* ekleog
thinking T * T' -> T' would be possible to turn into [T] -> T' via fold
Jackneill has joined #nixos
<Profpatsch>
Monoid t => [t] -> t
<Profpatsch>
And yeah, that’s fold
kai_w_ has joined #nixos
<ekleog>
oh, so it's basically the same idea :)
<Profpatsch>
:)
<Profpatsch>
fold is a bit more abstract, (Foldable f, Monoid m) => f m -> m
<Profpatsch>
But I guess that distinction is moot for most use-cases.
<Profpatsch>
Except if you want to allow a tree of module implementations or something. :)
<jonge>
hi there. i have a project where i would like to add `cmakeFlags = [ "-DCMAKE_C_FLAGS=-fsanitize=address -fsanitize=undefined" ];`, but unfortunately this somehow gets mixed up on the cmake call during build. if i add \" or ' around the two fsanitize tokens, the same happens. any ideas how to feed multi-token parameters into -D cmake params correctly in a nix derivation?
<Profpatsch>
Maybe a semilattice to implement priorities?!
<Profpatsch>
ekleog: And yes, one interesting (unsolved) aspect of the merge thingy is how to implement priorities in that scheme.
kai_w has quit [Ping timeout: 272 seconds]
<ekleog>
hmm I must say now I'm lost in haskell parlance, sorry :° (and semilattice don't really speak to me)
<LnL>
joko: you need to use the bash cmakeFlagsArray to add opitions with spaces
<ekleog>
oh. well, for nixtos I don't need to implement priorities 😇
aleph- has joined #nixos
<LnL>
jonge: oops ^
<Profpatsch>
ekleog: rest easy, I have no intuition of semilattices as well :)
<jonge>
LnL: thank you. let me try...
<ekleog>
ooh the definition is not that bad
* ekleog
assumed highly complex stuff from the “lattice” word
Jackneill has quit [Client Quit]
<ekleog>
now, between the definition and actually using the word… x)
<jonge>
LnL: other packages always use `preConfigure = " .... cmakeFlagsArray=($cmakeFlagsArray ... plus my own flags) ...". is that the correct way to use it or can i also provide this as an attribute in my derivation parameters?
<LnL>
no, attributes are regular variables and would get split
Jackneill has joined #nixos
<LnL>
that looks ok, but you can use +=
BlessJah_ has quit [Remote host closed the connection]
<jonge>
LnL: great, using preConfigure = ... it works great (and killed some of the unit tests, so i can go bug hunting, yay!)
<jonge>
LnL: about += ... so i can say `cmakeFlagsArray += ... my stuff...;` you mean?
<jonge>
LnL: does this play well with my preexisting `cmakeFlags = [ ... ];`?
<{^_^}>
[nixpkgs] @fpletz merged pull request #48055 → nixos/tests: add test for prometheus exporters → https://git.io/fxGhL
Jackneill has quit [Remote host closed the connection]
fendor_ has joined #nixos
<LnL>
it doesn't override cmakeFlags and yes you might still need the parentheses with += since it's an array but at least you don't need to repeat the name
Jackneill has joined #nixos
aleph- has quit [Quit: WeeChat 2.2]
jperras has joined #nixos
<jonge>
LnL: great, works. awesome, thank you!!
Jackneill has quit [Remote host closed the connection]
<makefu>
hey all, i am trying to run a CI runner for our local jenkins instance with nix.In the tests we are compiling a small number of c files, which require some libraries. right now i am using a custom script which exec's nix-shell -p lib1 lib2 etc, however the machines now do not have any internet anymore and i am not sure what would be the right way to prepare an image which allows nix-shell to be executed. when
<makefu>
i try it, nix tries to fetch some bash source tarballs from the internet
<makefu>
what would be the correct way to handle this situation?
<srhb>
makefu: Is making proper derivations out of the question?
<makefu>
unfortunately, yes
nuncanada has quit [Quit: Leaving]
<{^_^}>
[nixpkgs] @fpletz pushed 3 commits to release-18.09: https://git.io/fxliO
<makefu>
if i'd know which derivation nix-shell actually requires i might be able to somewhere become it part of the system, however it is very unclear what actually gets built and why. because obviously bash is already part of the system
<{^_^}>
[nixpkgs] @fpletz pushed commit from @Vskilet to master « nixos/nextcloud: add poolConfig option (#48094) »: https://git.io/fxli8
<{^_^}>
[nixpkgs] @fpletz opened pull request #48213 → lazygit: init at 0.4 → https://git.io/fxlPI
<johanot>
Is it possible specify SSH identity file to "nix copy --to ssh://..." ? By looking at nix source code it looks like "ssh-key" exists as an option to ssh-stores, but it is not possible to provide that option to copy-closure?
<gchristensen>
maybe you can do ssh://...?ssh-key=...
<johanot>
but haven't tried tbh. will try anyway :)
<gchristensen>
nix-copy-closure is not `nix copy`
<aleph->
Morning
<makefu>
srhb: i tried a couple of things and if i see this correctly, then all you need to do is to put "pkgs.bash{,Interactive}.{out,dev,info,doc}" somewhere into your system derivation (e.g. into an output string)
astronavt has quit [Quit: Leaving]
<johanot>
gchristensen: right.. I'm possibly guilty of making to many assumptions about the nix codebase without knowing it :)
<gchristensen>
:)
<gchristensen>
nix-copy-closure is ... well, nix-copy-closure :)
<johanot>
gchristensen: Yeah I know that "nix copy" is not the same as "nix-copy-closure". My brain just didn't make the connection there. Aaand you were right. ?ssh-key=.. actually works :)
<gchristensen>
great!
o1lo01ol1o has joined #nixos
jabranham has joined #nixos
seanparsons has quit [Quit: ZNC 1.6.5 - http://znc.in]
seanparsons has joined #nixos
fendor_ has quit [Ping timeout: 250 seconds]
Jackneill has quit [Remote host closed the connection]
Jackneill has joined #nixos
grp has joined #nixos
grp has left #nixos [#nixos]
<{^_^}>
[nixpkgs] @paddygord opened pull request #48214 → yojimbo: init at 1.1 → https://git.io/fxl1T
Rusty1 has quit [Quit: Konversation terminated!]
johanot has quit [Quit: WeeChat 2.2]
<kiloreux_>
How can I get store paths for specific commit from github ?
<symphorien>
nix-build --dry-run on a checkout
erasmas has joined #nixos
<kiloreux_>
Thank you symphorien . Will try it now.
<ldlework>
how do i get flash to work
elgoosy has joined #nixos
<ldlework>
hbonow doesn't work in google chrome or firefox
Mateon2 has joined #nixos
Mateon1 has quit [Ping timeout: 252 seconds]
Mateon2 is now known as Mateon1
<kiloreux_>
symphorien, I am getting "error: Typesafe Activator was removed in 2017-05-08 as the actual package reaches end of life."
<aleph->
If I'm running i3 via home-manager, do I want to enable x11 in config.nix?
<symphorien>
kiloreux_: hum to be specific: nix-build /path/to/checkout -A somepackage --dry-run
<kiloreux_>
My end goal here is to find store paths for that specific commit and copy them all to my s3 (so I stop using cache.nixos.org).
<kiloreux_>
So I don't want to use only one package but I want paths for everything.
<o1lo01ol1o>
I need to build package from fetchFromGitHub. What's the expression to tell nixos to use that derivation for any future configuration of the package in configuration.nix?
<{^_^}>
[nixpkgs] @dtzWill opened pull request #48218 → [WIP] libdrm: 2.4.94 -> 2.4.95, use meson → https://git.io/fxl7t
Itkovian has joined #nixos
<{^_^}>
[nixpkgs] @Ericson2314 merged pull request #48216 → lib: fix wording of the `overrideScope` warning → https://git.io/fxlHx
<o1lo01ol1o>
can anyone point me to an example of how to use packageOverrides? I want to use the master hydra via fetchFromGithub to replace the one from nixpkgs
Aexoden has quit [Quit: Connection reset by supervisor.]
<rmra>
emily: clock set is correctly... nbardiuk: maybe the problem was the ipv6... yes... i will see
<sphalerite>
o1lo01ol1o: you shouldn't need to use packageOverrides for it, since there's a hydra.package option
<sphalerite>
o1lo01ol1o: I don't know what simple-hydra is, but it may be playing a role in that
<sphalerite>
aah ninja :p
<o1lo01ol1o>
x)
PyroLagus has joined #nixos
<sphalerite>
hm doesn't look like there's anything there that would pull in the unmodified hydra
<betaboon>
anyone knows how to get uwsgi with python3 support in a nix-shell working? `nix-shell -p 'pkgs.uwsgi.override{ plugins = ["python3"];}'` and then `uwsgi --plugin-list` doesnt seem to be the solution oO
<cransom>
if simple-hydra is a copy of the services.hydra/hydra.nix module, you need to set simple-hydra.package = thatotherpackage
<sphalerite>
cransom: it's not, it's a wrapper around it
<cransom>
oh, i could have kept reading and saw that.
<o1lo01ol1o>
and set the package to use the master
<o1lo01ol1o>
however: builder for '/nix/store/lzqbylz7yrl9jhhsclbfvypkssymri4z-hydra-2017-11-21.drv' failed with exit code 1
<jabranham>
In nixos, any call to pactl results in "Connection failure: Connection refused" and "pa_context_connect() failed: Connection refused". Any idea how to go about fixing that?
<jabranham>
I have sound.enable = true and hardware.pulseaudio.enable = true set
<o1lo01ol1o>
sphalerite: am I right that hydra-2017-11-21.drv is from nixpkgs? can I blacklist that?
<betaboon>
just for the record regarding the uwsgi with python3-plugin: uwsgi --plugins-dir $(dirname $(which uwsgi))/../lib/uwsgi --plugins python3
<Ke>
is { a="override";} // set_b normal way to override one attribute in a set?
<{^_^}>
[nixpkgs] @LnL7 merged pull request #48169 → erlang: temporarily disable wxSupport on darwin → https://git.io/fxW3D
judson has quit [Killed (sinisalo.freenode.net (Nickname regained by services))]
judson has joined #nixos
<judson>
"infinite recursion encountered, at undefined position"
<emily>
Judson: sounds like there was an error
<gchristensen>
haha
<judson>
Taking another run at pulling old version of Ruby in with an overlay. This time, I checked out the nixpkgs repo to where the old versions still existed, and copied from the all-packages into my overlay file, redirecting the callPackage to a local directory...
<judson>
emily, thanks ;)
<{^_^}>
[nixpkgs] @7c6f434c pushed to release-18.09 « Merge pull request #48189 from aanderse/redmine »: https://git.io/fx8ff
alex-v has joined #nixos
<judson>
Oh, because the "ruby" directory I created in overlays gets included automatically...
<judson>
That seems better.
<judson>
Well, I'll know in $(compileTime)
ter-_ has joined #nixos
<gchristensen>
god speed
<judson>
I think this was a way better solution than my last frankenstein
<o1lo01ol1o>
is there a way to check when a new version of a package gets pushed to nixpkgs?
<{^_^}>
[nixpkgs] @Ericson2314 merged pull request #48221 → __splicedPackages: Don't include xorg for 18.09 → https://git.io/fx8vW
<{^_^}>
[nixpkgs] @Ericson2314 pushed 2 commits to release-18.09: https://git.io/fx8fA
Denommus has joined #nixos
<symphorien>
o1lo01ol1o: repology has rss feeds
<{^_^}>
[nixops] @amemni opened pull request #1022 → Trap boto exception InvalidSpotInstanceRequestID.NotFound when allow_missing is True in function get_all_spot_instance_r… → https://git.io/fx8J7
ryantrinkle has quit [Ping timeout: 250 seconds]
lassulus has quit [Ping timeout: 252 seconds]
<schmittlauch[m]>
Is there a good reason why certain pkg expressions don't allow to pass arbitrary additional variables to the expression? They lack the "..." argument
<gchristensen>
it is generally just not done, because there is no need for it
<schmittlauch[m]>
Also, where to find documentation for certain nixpkgs things, in my case cmake options? "Use the source, Luke"?
patrl has joined #nixos
<cransom>
if the expression has all the inputs defined, there's no reason to expect other arguments
lassulus has joined #nixos
sigmundv has joined #nixos
<schmittlauch[m]>
hm, I need to override the CMAKE_BUILD_TYPE. the cmake setup hooks even have a variable for that, but it is not exposed by the package in question.
<bitmapper>
Can steam-run be used for other programs that require a FHS filesystem such as propriatary software?
<symphorien>
yes
<clever>
bitmapper: if they need the same dependencies, yeah
<clever>
steam-run doesnt include everything, so it might still fail due to something missing
<o1lo01ol1o>
ok, that's possible. is there a workaround?
<clever>
o1lo01ol1o: look at what the package is doing exactly, does it check for a file like .version? and then either provide that, or pach what its doing
<clever>
patch*
<o1lo01ol1o>
oi, what a pain
<judson>
clever, yeah, this is at a build level, I think - there's a genStubsScript that takes from its ruby parameter ruby.gemPath
<alexshpilkin>
Is there a way to pass around a library of functions in my NixOS configuration, apart from doing it manually?
drakonis_ has joined #nixos
<judson>
The expression for ruby hasn't changed that much, and interpolates a string into passThru.gemPath, so even if things are wrong it shouldn't be empty, right?
Fare has joined #nixos
<alexshpilkin>
I have a number of config files stitched together by import statements, and right now I’d have to do something like
<clever>
Judson: what about passthru, rather then passThru ?
<alexshpilkin>
{ lib, ... }: let inherit (import ./lib.nix lib) aFunc in ...
<judson>
Sorry: that's what it is: passthru
<alexshpilkin>
which is silly
<{^_^}>
[nixpkgs] @Infinisil merged pull request #48220 → openvpn plugins: use absolute paths to configuration gui → https://git.io/fx8el
<{^_^}>
[nixpkgs] @Infinisil pushed 2 commits to release-18.09: https://git.io/fx8LZ
<zimbatm>
kalbasit[m]: do you mean to avoid generating the deps.nix?
<zimbatm>
it's not worth the added update complexity IMO
<kalbasit[m]>
zimbatm: Well the `update-all` in the terraform is able to generate the derivation but has no way to add deps, we can still use the script but have an override (similar to vim plugins)
<o1lo01ol1o>
so I can install a package from a binary cache with: /nix/store/2mvn5gv9hjmal1pw9zz2822a82fajh4a-hydra-0.1.2552.e0f204f3da6245fbaf5cb9ef59568b775ddcb929 --option binary-caches https://cache.nixos.org
<o1lo01ol1o>
is there an expression analogous to fetchFromGithub for the binary cache?
drakonis_ has quit [Ping timeout: 252 seconds]
teej has joined #nixos
<gchristensen>
you can just refer to the path in your nix expression, however it isn't very nice because it is opaque as to where it comes from and what is inside itw.
mekeor has joined #nixos
apeyroux has quit [Quit: leaving]
<shreyansh_k>
symphorien: thank you.
bgamari_ has joined #nixos
<bgamari_>
Ericson2314, what is the status of pkgconfig and cross-compilation
<bgamari_>
Ericson2314, it seems we still don't prefix pkgconfig
<bgamari_>
and I'm seeing build failures of shared-mime-info due to it not finding packages
<o1lo01ol1o>
gchristensen: of course, yes. but now i'm onto a new problem: I need a `package` not just the location of the package, is there a function to get that?
<gchristensen>
I don't understand, it sounds like you've taken a wrong turn somewhere and you're now in trouble
<gchristensen>
what are you trying to accomplish, and how have you done it so far?
<Ericson2314>
bgamari_: oh it's good to know that actually is still causing problems
<Ericson2314>
it was just sort of idling on my todo list
<bgamari_>
Ericson2314, ahh, I see
<bgamari_>
to be honest I'm actually rather perplexed by the current failure
ZeDestructor has joined #nixos
<bgamari_>
Ericson2314, how is pkg-config supposed to find .pc files of dependencies again?
<Ericson2314>
matthewbauer and I were also talking about wrapping meson
<o1lo01ol1o>
gchristensen: the short of it is that I'm trying to build the master branch of hydra and patch it into my configuration.nix. there have been more than a couple roadblocks along the way with fetchFromGithub and various forks of hydra. now I'm just trying to pass the binary from the hydra master build in the cache to the `services.hydra.package` attribute.
<Ericson2314>
bgamari_: there's some environment variable. I forget
<rawtaz>
if during rebuild you get the message "cannot find file sv" for the keymap package, what can you do? i've set the stuff in i18n to sv and sv_SE.UTF-8, which according to https://sourceware.org/git/?p=glibc.git;a=blob;f=localedata/SUPPORTED
<Ericson2314>
yeah the wrapper would basically make a NIX_<config>_PKG_CONFIG_PATH
<bgamari_>
Ericson2314, ahh, I think I found my bug
<Ericson2314>
and then stick the right stuff in that
<bgamari_>
Ericson2314, pkgconfig was in nativeBuildInputs but I think it should be depsBuildBuild
<gchristensen>
o1lo01ol1o: and what happens with that codeyou linked?
<rawtaz>
sorry, the error message is "cannot open file sv"
<bgamari_>
Ericson2314, since we want it to find libraries for the build machine
<Ericson2314>
just like cc-wrapper with -isystem or ld-wrapper with -L
<bgamari_>
Ericson2314, does this sound plausible?
<Ericson2314>
bgamari_: *with* the fix that woudl solve it. but without the fix it won't make a difference
<o1lo01ol1o>
gchristensen: it pulls the repo, builds, complains about not being a git repo, goes on doing some stuff, and then fails to build hydra-2017-11.drv
<bgamari_>
Ericson2314, oddly it looks like it actually worked
<Ericson2314>
(meson btw has some nice things, and I am trying to add my cross methodology to it atm as side project.)
<o1lo01ol1o>
So, it looks like it's still pulling the old repo; I though maybe there was an issue with how fetchFromGithub was working
<{^_^}>
[nixpkgs] @zimbatm pushed to master « terraform-providers.gandi: init at 1.0.0 (#48223) »: https://git.io/fx8OH
<cransom>
hydra is one of those apps that demonstrates how you should be nailing down all of your inputs and testing your upgrades. if you didn't, it would be a magnitude harder to run.
<shreyansh_k>
Hi, trying to write nix expression for a package and it needs qt's core. Stuck on: "error: attribute 'qtbase' missing". Any pointers?
<o1lo01ol1o>
gchristensen: I guess I'm still to new to follow.
<o1lo01ol1o>
clever: gnarley. So previously when I built the master, I got no notifications of build failures beyond it saying that the hydra-2017-11.drv failed. I had to muck around with the iohk code to accidentally get the error above. I was also able to build from source on the machine locally. your branch builds successfully.
<o1lo01ol1o>
clever: however, my jobset still returns `command `git rev-parse master' failed with exit status 32768 at /nix/store/hhvbyrc8rnfihpka791l5srzy767bdr7-hydra-2017-11-21/libexec/hydra/lib/Hydra/Helper/Nix.pm line 428`
<clever>
o1lo01ol1o: you may need to fork hydra master, then cherry-pick my oldernix commit, and then see what happens with that version
drakonis has quit [Ping timeout: 252 seconds]
<gchristensen>
o1lo01ol1o: what are you going to use Hydra for?
<o1lo01ol1o>
CI for a git project with submodules and CD to a staging environment
<samueldr>
perfect to store your secrets in! (nom don't)
<infinisil>
Hehe neat
<samueldr>
no,*
<gchristensen>
haha
<infinisil>
Well actually, is there a way to get to commits without tags?
* samueldr
wonders about user activity
<infinisil>
Ah, I guess github allows 7 char long sha's to go to the full ones, which makes brute force to discover commits not too bad of an option
Berra has joined #nixos
<elvishjerricco>
infinisil: Doesn't github garbage collect commits with no refs to them?
<infinisil>
elvishjerricco: Ah, that might be a problem too hehe
<elvishjerricco>
That too :P
<Berra>
It doesn't seem possible to do: path + "../dir2" - any way around this?
<infinisil>
,dnw Berra
<{^_^}>
Berra: "Does not work" isn't very helpful: What doesn't work? What's the error?
<clever>
Berra: path + "/../dir2"
<infinisil>
Ah
<clever>
Berra: nix strips any trailing /'s from paths
<Berra>
clever: Great stuff - I had even tried that - but wasn't careful to make sure the concatenation happens between the string part - so concating "/" with the path was idempotent. Thanks for the help.
<clever>
bgamari_: but if you do `sandbox = relaxed`, then fixed-output derivations get full access to any world-readable file on the host, without having to request anything special
<elgoosy>
have anyone had success with vlc or videostream (chrome extension) + chromecast in nixos? I opened the ports and i can cast from chrome tab, but not with vlc neither with videostream
<drakonis_>
nvidia has to be compiled on the host device
<Church->
bgamari_: So just add this to config.nix - services.xserver.videoDrivers [ "ati_unfree" "amdgpu" "amdgpu-pro" "nv" "nvidia" "nvidiaLegacy340" "nvidiaLegacy304" "intel" ]
nD5Xjz has joined #nixos
<worldofpeace>
I would try just `[ "nouveau" ];`
<bgamari_>
Church-, I'd probably drop the irrelevant entries
<alex-v>
gchristensen: I mean on non-nixos system. This user owns /nix/store so no issues
Diagon has joined #nixos
<gchristensen>
alex-v: let me put it another way, I know of no way for nix-daemon to run as any user other than root.
<alex-v>
gchristensen: i don't have any issues with running it as a different user. it owns /nix/store and its profile is the default one so all the users see it
<lassulus>
how can i find out why a package is installed?
<Church->
Hmm seems i950.ko isn't loaded.
<infinisil>
lassulus: run `which <binary>`
<infinisil>
Should tell you where it comes from, user profile or system profile probably
<alex-v>
gchristensen: i am not on nixos so no system services via nix
LysergicDreams has quit [Ping timeout: 252 seconds]
<gchristensen>
alex-v: you seem to not be reading my messages properly. As far as I know, nix-daemon must run as root.
<lassulus>
well it's not in PATH
<gchristensen>
alex-v: if you're using Nix on a system with systemd which isn't using selinux, you can install nix-daemon and the service from the installer.
<infinisil>
lassulus: What then?
<lassulus>
I'm trying to debug xpra, but when I connect via xpra to my local user and local system an older derivation of xpra gets called, even though the one in my PATH is patched
LysergicDreams has joined #nixos
jasongrossman has quit [Ping timeout: 276 seconds]
<Church->
And running via nomodtest didn't help off the bat. Well let's try with other drivers
Berra has quit [Remote host closed the connection]
<infinisil>
lassulus: If you have the path of the binary you can use `nix-store -q --roots <path>` to figure out some stuff
rprije has joined #nixos
<lassulus>
that helps
jasongrossman has joined #nixos
<alex-v>
gchristensen: btw Nix 2.1 has this in release notes: nix-daemon</command> now respects --store, so it can be run as a non-root user.
<samueldr>
lassulus: <3 ping me if there's progress
<lassulus>
will do, but could take a while :D
<lassulus>
(most certainly not today)
<{^_^}>
[nixpkgs] @volth opened pull request #48241 → perlPackages.LWP: support cross-compilation → https://git.io/fx80R
drakonis_ has quit [Quit: Leaving]
CrazedProgrammer has quit [Ping timeout: 252 seconds]
CrazedProgrammer has joined #nixos
drakonis_ has joined #nixos
LysergicDreams has quit [Ping timeout: 245 seconds]
<andi->
Is there some darwin user available that could dig into why the gitea 1.5.2 PR expects another sha256 for the very same fetchFromGitHub? (https://github.com/NixOS/nixpkgs/pull/48128/files )
<alex-v>
gchristensen: I see that the section "3.7.2.3. Nix store/database not owned by root" was removed from the manual after I did my initiall install. According to the commit message it was done because nobody was using nix-setuid-helper. Neither did I because I did not use the build users nix-setuid-helper was meant to enable.
<worldofpeace>
Church-: You could use nixos unstable
jperras has quit [Ping timeout: 245 seconds]
<Church->
worldofpeace: Why?
<Church->
Trying out bumblebee now.
sigmundv has quit [Ping timeout: 250 seconds]
<worldofpeace>
Church-: It would have this feature now
<Church->
Ah
<lopsided98>
Church-: I know this isn't very helpful, but I don't think nvidia and bumblebee should be necessary to get X working. I have a (somewhat older) optimus laptop, and if you ignore the nvidia card it runs just like any other laptop with Intel graphics
<lopsided98>
Anyway, bumblebee only works with an already running X server on the Intel GPU
drakonis has quit [Ping timeout: 245 seconds]
<worldofpeace>
I think that option would be `hardware.nvidiaOptimus.disable`
<lopsided98>
I haven't tried running NixOS on it, though, so I can't be much help
<Church->
lopsided98: I tried just - services.xserver.videoDriver = "intel";
<Church->
worldofpeace: Doing it from a fresh install now, there is no nvidia driver loaded
<Church->
Gonna load the intel driver
jakubd1 has joined #nixos
<worldofpeace>
Fresh install? I'm not sure what that means in your context
jakubd1 has left #nixos [#nixos]
jakubd1 has joined #nixos
LysergicDreams has quit [Ping timeout: 268 seconds]
<jakubd1>
hello, i am totally new to nixos, I get a tmpfs on /run/user/1000 by default with way too little space (800MB) and a build tool (commercialhaskell/stack) uses up the space quickly aborting a compilation, how can I control the size of this dir?
<Church->
worldofpeace: Reloaded the burned livecd
<worldofpeace>
Church-: ahh
LysergicDreams has joined #nixos
drakonis has quit [Ping timeout: 250 seconds]
<Church->
Hmm no module fbcon
ryantrinkle has quit [Ping timeout: 245 seconds]
Denommus` has quit [Remote host closed the connection]
drakonis has joined #nixos
<lopsided98>
I'm testing the ISO on my laptop
<Church->
Thanks!
ZeDestructor has quit [Ping timeout: 276 seconds]
jperras has quit [Ping timeout: 250 seconds]
<Church->
Okay, reloaded the livecd, gonna try again and post the logs. This is intel only, no nvidia.
<lopsided98>
It works fine on my laptop - this is something specific to your hardware
<Church->
... fucking laptop
ZeDestructor has joined #nixos
erasmas has quit [Quit: leaving]
jperras has quit [Ping timeout: 244 seconds]
* Church-
sighs
<Church->
How are there graphics issues with intel in this age?
<avn>
Personally I have only one intel hd machine, and it works, all other are radeons of different age
jakubd1 has quit [Ping timeout: 256 seconds]
<worldofpeace>
intel graphics issues when you through nvidia in the mix
<worldofpeace>
*throw
<Church->
Well nvidia is disabled
<Church->
It should be a non issue >_>
<lopsided98>
Can you manually load the i915 module?
<lopsided98>
Are there are errors related to it in dmesg?
<Church->
Let me check
<Church->
Ahhh. The driver support for my hardware in this kernel is alpha quality for i915
<lopsided98>
Try using a newer kernel
<worldofpeace>
Also did you say that you could disable the nvidia card in the bios?
<Church->
I'm supposed to be able to. Option isn't there.
<lopsided98>
NixOS uses 4.14 (LTS release) by default
<Church->
Gotcha
<Church->
Yeah let me try that. This is the current newest intel hardware
drakonis1 has joined #nixos
<ryantm_>
Is there a reason not to have the option types in the NixOS options documentation? It would be really helpful for variables like https://nixos.org/nixos/options.html#systemd+prestart which aren't just simple strings.
jperras has joined #nixos
<samueldr>
ryantm_: dunno, but as long as serializing it into the options.json is possible, once done adding it to the site shouldn't be too hard
<clever>
samueldr: this is part of my old nixos-installer idea, it would build that json file, from the current channel, and then render the options as an interactive tree
<samueldr>
that's the data source for the site
<clever>
yep
<samueldr>
the release -A options
<clever>
i also built my own UI's over it
<{^_^}>
[nixpkgs] @catern opened pull request #48243 → bazel-buildtools: upgrade to 2018-10-11 → https://git.io/fx8Vt
<clever>
you have a standard treeview, which dynamically shows the description at the bottom, and you can add the selected option to the tree on the left
<clever>
that was back before hnix, so i had no easy way to convert to/from configuration.nix and a treeview
<samueldr>
okay, so the generated manual pages (html and man) also list "string" for types.lines