<Shouou>
When adding to Nixpkgs, can I use nix-shell to test my new package? I've been trying `nix-shell . -A package --pure --run package` but said package doesn't seem to be in scope.
o1lo01ol1o has joined #nixos
<ajs124>
Shados, you can just build the package with nix-build and execute the binary from the results/bin directory
the-kenny has quit [Ping timeout: 255 seconds]
mbrgm_ has joined #nixos
<ajs124>
* I mean Shouou, oops
mbrgm has quit [Ping timeout: 246 seconds]
mbrgm_ is now known as mbrgm
<Shouou>
ajs124, is that identical in behaviour to `nix-shell --pure`?
thc202 has quit [Ping timeout: 245 seconds]
the-kenny has joined #nixos
<clever>
Shouou: -A is for building the package, not using the package
<clever>
Shouou: you want -p, which doesnt accept the . (a path)
<ajs124>
ah, I'm really not paying enough attention… obviously. just do something like nix-shell -I nixpkgs=$PWD --pure -p package
<ajs124>
that should work, shouldn't it?
<clever>
ajs124: yeah, that should work
Havvy has quit [Ping timeout: 245 seconds]
<Shouou>
Ah, I was missing the "nixpkgs=" part. Thanks for the help!
<Shouou>
I tried it with the `-I` parameter earlier but it didn't work
Havvy has joined #nixos
Ariakenom has quit [Quit: Leaving]
Anton-Latukha has quit [Quit: Leaving.]
Myhlamaeus has quit [Ping timeout: 268 seconds]
<gchristensen>
I have a / filesystem which is ro, and another block device I'd like to mount as a writable layer on top. is this possible, with the / being ro?
<ajs124>
gchristensen, can't you just use overlayfs for that?
<clever>
you would need to mount tmpfs's to directories that already exist
<clever>
and then overlay things, maybe
<clever>
would be simpler from the initrd
<clever>
the livecd stuff already does that, purely with fileSystems.
<ajs124>
Sure, but that sounds about like what a live iso setup looks like. Read only "backing device", writable tmpfs on top. Or non-tmpfs, in your case.
<gchristensen>
I don't have an initrd :(
<clever>
gchristensen: why not?
<gchristensen>
no support :)
<clever>
lol
<ajs124>
what are you running this on?
<{^_^}>
[nixpkgs] @Zer0- opened pull request #58231 → python beaker: 1.8.0 -> 1.10.1 fix building on hydra → https://git.io/fjJ5W
KaitoDaumoto has joined #nixos
<gchristensen>
firecrackervm
<aleph->
Heya gchristensen
<aleph->
Others
<gchristensen>
hi
o1lo01ol1o has quit [Remote host closed the connection]
o1lo01ol1o has joined #nixos
erictapen has quit [Ping timeout: 245 seconds]
<adisbladis>
gchristensen: "I'm not sure I can... since its ro"
<ajs124>
gchristensen, that's what I though. Sure, something like mount -t overlayfs -o lower=/,upper=/tmpfs / looks weird, but I'd kinda expect it to work.
<infinisil>
aanderse: Another idea I had for https://github.com/NixOS/nixpkgs/issues/50105#issuecomment-475765748 was that all the current committers should also go through this process (well, a fast version of it), such that we know what they focus on and that they're still active
<infinisil>
Oh, you mean maintainers, not committers
<{^_^}>
[nixpkgs] @peti pushed to haskell-updates « hackage-packages.nix: automatic Haskell package set update »: https://git.io/fjJ5A
adetokunbo has quit [Quit: This computer has gone to sleep]
LnL has quit [Ping timeout: 252 seconds]
<mightybyte>
Anyone know if it's possible to decouple a Haskell package's test suite from everything else in terms of code coverage generation?
<mightybyte>
Current behavior turns on the code coverage for all the targets including executables other than the test suite. But you usually don't want code coverage on those.
fusion809 has quit [Remote host closed the connection]
Havvy has quit [Ping timeout: 255 seconds]
wfranzini has quit [Remote host closed the connection]
wfranzini has joined #nixos
clever has joined #nixos
clever has joined #nixos
clever has quit [Changing host]
Mateon3 has joined #nixos
Mateon2 has quit [Ping timeout: 245 seconds]
Mateon3 is now known as Mateon1
abathur has quit [Ping timeout: 250 seconds]
clever_ has joined #nixos
rauno has quit [Remote host closed the connection]
<marler8997>
I'm putting together some notes/documentation based on what I've learned...I had a question.. is there a term or way to distinguish between a "derivation definition" and a "realized derivation"? Would those be the terms to use?
clever_ has joined #nixos
clever_ has quit [Changing host]
clever_ is now known as clever
Rusty1 has quit [Quit: Konversation terminated!]
KaitoDaumoto has joined #nixos
clever_ has joined #nixos
clever has quit [Ping timeout: 250 seconds]
BertyCoX- has quit [Ping timeout: 250 seconds]
i1nfusion has quit [Remote host closed the connection]
<elvishjerricco>
marler8997: I don't really understand what distinction you're trying to make
<marler8997>
between the ".drv" file and the derivation it generates
<slack1256>
between the .nix file and the .drv
<marler8997>
nah, between the ".drv" file and the files it generates
<slack1256>
ah the "realisation" as said by nix-store?
<marler8997>
"/nix/store/<hash1>-<name>.drv" VS "/nix/store/<hash2>-<name>"
<elvishjerricco>
marler8997: I generally just refer to the .drv as "the deriver" and its outputs as "the outputs"
<marler8997>
so you would call this /nix/store/a8aapdin2820s5nm2dzdyqm7r0nv4djc-busybox-1.29.3.drv a "Deriver for busybox"
<marler8997>
and /nix/store/i5q5spk02pm3gmjkgj49sv73g6cnldrc-busybox-1.29.3 the "busybox outputs"?
<elvishjerricco>
marler8997: yea
<marler8997>
but that's not what the nix pills and doc calls them
<marler8997>
it calls them derivations
<marler8997>
from what I read, it calls both of them derivations and doesn't distinguish between the two
<marler8997>
and the point of my notes is to distinguish between the two...
<marler8997>
so would people in the nix community know what I meant if I said a "derivation deriver" and "derivation output"?
<marler8997>
and the command to print a "deriver" as you called it is "nix show-derivation"???
<marler8997>
if what you're saying is true, why isn't it "nix show-deriver"?
<slack1256>
just define your terms at the beginning and adhere to them
<elvishjerricco>
marler8997: The most unambiguous thing you could say ".drv file" for the .drv file, and "outputs" for the outputs. The nix pills are leaving an ambiguity just to keep it simple
<elvishjerricco>
^ that's the best thing
<marler8997>
yes of course I'll define my terms...but I'm new to nix so I'm asking if there's already an accepted term for these
<marler8997>
it sounds like the answer is no?
<marler8997>
I don't want to go inventing new terms if everyone already has a term
<slack1256>
I mean PDEs books all redefine all their concepts (in incompatible ways with each other author), what could go wrong? :^)
<slack1256>
Nah in all seriousness, define your terms at the beginning and keep it simple
<marler8997>
yeah of course
<marler8997>
good advice, but not an answer to the question
<marler8997>
it looks like "nix-store -q --deriver <file>" shows the ".drv file"
<marler8997>
so it looks like that's a place it is used...I suppose I'll go with "deriver" and "realized derivation"?
drakonis has quit [Quit: WeeChat 2.3]
wfranzini has quit [Remote host closed the connection]
slack1256 has quit [Remote host closed the connection]
<elvishjerricco>
marler8997: I'd go with "output" before I'd go with "realized derivation." Output is used in the nix language a lot; e.g. `outputs = ["out" "dev"];`
<elvishjerricco>
or "fixed-output"
endformationage has quit [Ping timeout: 255 seconds]
lukego has quit [Quit: Page closed]
slack1256 has joined #nixos
BertyCoX- has joined #nixos
KaitoDaumoto has quit [Ping timeout: 250 seconds]
jtojnar has quit [Read error: Connection reset by peer]
jtojnar has joined #nixos
ddellacosta has joined #nixos
jtojnar has quit [Read error: Connection reset by peer]
slack1256 has quit [Remote host closed the connection]
<MichaelRaskin>
gchristensen: given that maintainer-team will be invite-once, only committers will have an incentive to mark themselves gone
<MichaelRaskin>
mog: it is not in QuickLisp, so it has to be updated separately; it is not comprehensive, as in there are a few extras outside it; and it is a single StumpWM command to set the path to checkout; not sure the tradeoff is worth it
jackdk has quit [Ping timeout: 268 seconds]
<{^_^}>
[nixpkgs] @Ericson2314 merged pull request #58223 → manual: Make sure building doesn't need recursive nix → https://git.io/fjJHW
<jomik>
Is there no pretty way to use a package-lock.json/yarn.lock to get dependencies for an npm package? That is, without running a script to generate a nix expression? I am pretty certain that I can not simply pass a file to nix to read dependencies from, because then we would have to fetch sources during build, not before.. :(
<immae>
jomik: yarn.lock contain every information needed to build a correct nix derivation, and that’s what yarn2nix does. I’s not the case for everything (package-lock in particular I don’t know)
lewo has joined #nixos
<immae>
Basically, you need an url and a sha256, which yarn.lock holds
drakonis_ has joined #nixos
linarcx has quit [Ping timeout: 244 seconds]
drakonis has quit [Ping timeout: 250 seconds]
linarcx has joined #nixos
<jomik>
immae: Yeah - as I tried to say though, it is rather annoying having to run yarn2nix :P
<immae>
Well, you can write it by hand
<immae>
And maybe you can give the yarn.lock directly, but you’ll have to check :p
<jomik>
My issue was that I wanted to be able to simply update yarn.lock, and then have my final nix expression update as well. That is - I can fetch a yarn.lock, check the sha, and then extract the sources, with shas.
<jomik>
That should be pure/declarative, since we can ensure that the content of yarn.lock is the same.
<immae>
ok
Jetien has joined #nixos
<immae>
But then I think you just have to check yarn2nix documentation, I’m almost sure I saw something like that
<immae>
(but I may muddle with bundle/gem)
emacsomancer has quit [Ping timeout: 246 seconds]
<jomik>
Though, Nix does not support pulling dependencies based on runtime - it needs them at evaluation time :(
<jomik>
More importantly though, I guess I need a NUR :D
<immae>
no, it’s on purpose that you need to know what you will build before building it
sinner has joined #nixos
sinner is now known as Guest20903
buffet- is now known as buffet
<immae>
It doesn’t mean that there is no possibility though, but it’s a bit more tricky
<immae>
and you have to fix "something" (for instance, the git commit where you will find the yarn.lock)
emacsomancer has joined #nixos
jomik has quit [Ping timeout: 250 seconds]
grizwako has joined #nixos
<{^_^}>
[nixpkgs] @danbst opened pull request #58246 → pkgsMusl, pkgsi686Linux, pkgsStatic: fix infinite recursion with overlays → https://git.io/fjJA5
teto has quit [Ping timeout: 250 seconds]
teto has joined #nixos
goibhniu1 has joined #nixos
<teto>
Mic92: seems like your NUR.nix-lsp hash is out of date
jomik has joined #nixos
<{^_^}>
[nixpkgs] @delroth opened pull request #58247 → zbar: 0.10 -> 0.22 (new upstream) → https://git.io/fjJxf
Alling has joined #nixos
<Alling>
Hello guys! I have one general question and one specific one.
<jomik>
I am unsure how I add NUR, should I use packageOverrides, or an overlay? I want to access it with nix-shell and through home-manager.
tpanum has quit [Remote host closed the connection]
<Alling>
When I search NixOS packages, there is a "Package name" and an "Attribute name". What's the difference? https://nixos.org/nixos/packages.html
<Alling>
For example "ghc-8.4.3" and "haskellPackages.ghc_8_4_3", respectively.
periklis has joined #nixos
<jomik>
Alling: The attribute name is a more precise way of specifying what you want. If you install the package in a *.nix, you'll need to use the attribute name, if you use nix-env, it will first look for a matching attribute, and if that fails, it'll find the first package name.
<Alling>
Also I don't understand how Stack and GHC work. $ nix-shell; ghc -v
<Alling>
Glasgow Haskell Compiler, Version 8.6.4, stage 2 booted by GHC version 8.2.2
<Alling>
But: $ stack build
<Alling>
error: attribute 'ghc864' missing, at (string):1:43 (use '--show-trace' to show detailed location information)
<jw358>
can i safely overrideAttrs and set broken = false on derivations even if they did not have a broken attribute before?
<Mic92>
teto: can you send me a PR for that?
<jw358>
i'm trying to make sure i can use packages like async-pool across different channels
<Alling>
I think I figured out the Stack problem. It "looks in nixpkgs" (if that means anything); it doesn't care what's in my shell.nix.
domogled has quit [Quit: domogled]
<jomik>
Alling: I think I understand what you mean, and that is correct - a package in Nix normally has all its dependencies in its own environment, independent of your PATH.
__Sander__ has joined #nixos
<{^_^}>
[nixpkgs] @joachifm pushed commit from @dtzWill to release-18.09 « tor-browser-bundle-bin: 8.0.6 -> 8.0.8 »: https://git.io/fjJxw
<{^_^}>
[nixpkgs] @joachifm pushed commit from @dtzWill to release-19.03 « tor-browser-bundle-bin: 8.0.6 -> 8.0.8 »: https://git.io/fjJxo
oleks_ has quit [Quit: leaving]
Mister_Magister has joined #nixos
<{^_^}>
[nixpkgs] @lheckemann opened pull request #58248 → netperf: remove libsmbios on non-x86 → https://git.io/fjJxM
<Mister_Magister>
Hello I tried nixos yesterday but i have one problem. When i ssh to it PATH variable is wrong and no commands are available. when i open terminal directly everything is okay. My shell is fish
oleks has joined #nixos
<teto>
Mic92: I am not using it, just wanted to try it while bored :D
<Alling>
When I run stack build, it tries to "configure hmatrix", but fails with this: Cabal-simple_mPHDZzAJ_2.4.0.1_ghc-8.6.4: Missing dependencies on foreign libraries: * Missing (or bad) C libraries: blas, lapack
__monty__ has joined #nixos
<Alling>
I added liblapack and blas to my shell.nix, but they're still not found.
<jomik>
Anyone using gitlab? https://gitlab.com/rycee/nur-expressions/blob/master/.gitlab-ci.yml#L38 I am unsure what the `nur-updates:token@gitlabe.com/repo.git` url does. I am pretty certain that it logs in with token and sets the remote, but what is the `nur-updates` in front? I can't seem to google it.
<nomeata>
Hi. What might be the cause for this error message: error: path '/nix/store/rawjlrb7k3yh17yb183wvjyzagr9di1n-name-of-local-derivation-0.0.0' does not exist and cannot be created
<jomik>
nomeata: is that in a build step? You are probably missing a `mkdir -p $out/...` somewhere.
<jomik>
We need some context :D
<nomeata>
It is when I call `nix-build`, and it seems to work on other people’s machines, so it is likely some brokenness with my nix store?
<nomeata>
The “error” is colorful, so it seems to come from `nix-build`.
<nomeata>
Some context: I have experimented using remote builders, but I keep getting `error: unexpected end of file` errors that I have not manged to debug yet (unreliably TCP connection?), so there might have been some partial download. But the nix store should be resistant against that, right?
<AlexRice[m]>
Alling: is stack definitely using you're shell.nix file
<nomeata>
With -vvvv I see: path '/nix/store/rawjlrb7k3yh17yb183wvjyzagr9di1n-…-0.0.0' is required, but there is no substituter that can build it
<Alling>
AlexRice[m]: I don't think it is (but I don't really know what that means).
<nomeata>
Ah, `fgrep` finds a nix store path that mentions the missing derivation. So it seems that I somehow downloaded a store path from the builder without downloading all its dependencies?
<nomeata>
If I use `nix-store --query` on that path, I get: error: path '/nix/store/57fqkxvnynrimpbrc0hpm9przmw8cfhf-ghc-8.4.4-with-packages' is not valid
Izorkin has quit [Ping timeout: 252 seconds]
agander has joined #nixos
<nomeata>
How can I safely delete paths from the store?
<srk>
nomeata: nix-store --delete
<srk>
<PATH>
Anton-Latukha has quit [Ping timeout: 245 seconds]
<nomeata>
Thanks. I am still confused by this: nix says “error: path '/nix/store/rawjlrb7k3yh17yb183wvjyzagr9di1n-…-0.0.0' does not exist and cannot be created”, but accoring to “nix-store --query --referers /nix/store/rawjlrb7k3yh17yb183wvjyzagr9di1n-…-0.0.0” nothing is referring to it (that command just does not print anything)
<srk>
you can also try nix-store --verify
<nomeata>
nix-store --verify --check-contents goes through without issues.
<nomeata>
Disabling all substituters and remote builders also does not help
<nomeata>
But oddly, that path does not appear when I grep through the output of nix-store --dump-db
<nomeata>
(I wonder if I just just nuke `/nix` and reinstall it, and go for a long walk…)
sigmundv has joined #nixos
<srk>
:))
<clever>
nomeata: `is not valid` means its not in `--dump-db`, so a normal nix-collect-garbage will automatically delete that path
<clever>
nomeata: `nix-collect-garbage --max-freed 1m` may start with that path, you can repeat that until the path in question is gone
<clever>
nomeata: nix will also delete the path automatically when trying to build it again
<clever>
and no nix tools will use an invalid path
Anton-Latukha has joined #nixos
<nomeata>
Oh, interesting, the path actually exists! (So much about “does not exist and cannot be created”). I could `nix-store --delete` it, and now it does not exist on disk. But same error message.
<clever>
nomeata: what was the original error? and the cmd that gave it?
rycwo has joined #nixos
<nomeata>
Original error: error: path '/nix/store/rawjlrb7k3yh17yb183wvjyzagr9di1n-…-0.0.0' does not exist and cannot be created
<clever>
and the cmd that gave it?
<nomeata>
Command: `nix-build` in our internal monorepo. (The mentioned derivation is a smal piece down the the chain of dependenceis)
<clever>
does nix-build give the same error if ran several times?
<nomeata>
Yes
<clever>
can you pastebin the entire output of nix-build?
<nomeata>
Oh, wait, maybe I was wrong. It seems that `nix-build -A foo .` actually works, but `nix-env -i -A foo -f .` does not
<nomeata>
I tought nix-build had the same problem … but not any more. So it is `nix-env` giving this error message, when I ask it to install something. `nix-build` actually works fine.
<clever>
both should be building the same thing and just working the same way
silver has joined #nixos
orivej_ has quit [Ping timeout: 246 seconds]
illegalprime has quit [Read error: Connection reset by peer]
<nomeata>
That’s what I thought as well :-). But the building seems to work fine, maybe the problem is related to my user profile, rather than to building this thing...
<nomeata>
Ha, that brings me closer: `nix-env -i hello` doesn’t work either.
<clever>
nomeata: ahh
<nomeata>
Too many trees, barked up the wrong one
<clever>
nomeata: there is a bug in nix-env, if you have dead symlinks in ~/.nix-profile, it cant update the profile
<clever>
nomeata: find out which thing is adding it, and uninstall it with nix-env -e
inquisitiv3 has quit [Ping timeout: 250 seconds]
<clever>
`nix-env -q` to list the installed things
rycwo has quit [Ping timeout: 250 seconds]
orivej has joined #nixos
<jomik>
I can't seem to run `./bin/nur format-manifest` from NUR. `Could not find a version that satisfies the requirement jaraco.text`
<nomeata>
Weird. Running `nix-env -e` on a bunch of installed files makes it _download_ glibc and other basic packages from the nixos cache. Somehow my setup is pretty broken.
<clever>
nomeata: what does ls -l ~/.nix-profile report?
<nomeata>
points to /var/lib/nix/profiles/per-user/jojo/profile, and that points to profile-200-link, and that points to /nix/store/rv8yv7b3jnmgiz5v257n0j37ni5dg60i-user-environment, and that looks reasonable
<clever>
yep
<Alling>
AlexRice[m]: OK, so it kind of sort of worked using that tutorial. But I can't get stack build to work. It stops with "Could not find module `Data.Packed.Matrix'" when compiling metric-0.2.0.
<AlexRice[m]>
I think stack manages the haskell dependencies and not nix
<clever>
nomeata: what about `nix-store --verify --check-contents` ?
<nomeata>
I wonder if I did something (upgrade nix in an unclean way) that invalidated all paths in my profile. And now `nix-env` tried to reinstall everything, and it could not reinstall stuff that I built at some point in the past from source. Once I removed these packages from the profile using nix-env, it was reinstalling the other ones from the cache.
orivej has quit [Ping timeout: 255 seconds]
<nomeata>
and now that this is out of the way, I can install stuff just fine again. So the problem seems to have been fixed.
<nomeata>
Thanks for walking me through this!
<clever>
yep
jomik has quit [Quit: WeeChat 2.4]
<Alling>
AlexRice[m]: Yeah, probably. But I don't understand what I'm supposed to do to be able to install packages.
<clever>
Alling: the products made by stack are all impure builds, and nix wont know they exist
<clever>
Alling: if you want something installed by nix, then it has to be built by nix, which is where tools like nix-tools and stack2nix come into play
magnetophon has quit [Remote host closed the connection]
<AlexRice[m]>
you should be able to run stack build though right?
<clever>
AlexRice[m]: yep
<Alling>
stack build fails when it tries to compile/configure/whatever metric-0.2.0, which is a dependency of kmeans-par, which is the package I actually wany.
* srk
got rid of stack today .. find . -name .stack-work -type d -prune -exec rm -rf "{}" \;
ThatDocsLady_ has joined #nixos
ThatDocsLady has quit [Ping timeout: 258 seconds]
<clever>
Alling: that likely has to do with the version of metric in the stack.yaml
<Alling>
clever: It doesn't really matter to me if I use Nix or Stack; I'd just like to install kmeans-par and try it out.
<clever>
Alling: do you have a link to kmeans-par?
<AlexRice[m]>
0.2.0 is the most recent
<Alling>
clever: AlexRice[m] I have metric-0.2.0 in stack.yaml.
<srk>
fails for me as well Could not find module ‘Data.Packed.Matrix’
nomeata has quit [Remote host closed the connection]
<Alling>
Stack recommends adding metric-0.2.0 to extra-deps, which is why I did it.
<clever>
Alling: so, the version of hmatrix, isnt compatible with the version of metric!
<AlexRice[m]>
it looks like it becomes internal to the package from 16 onwards
<clever>
and id say metric is to blame, for not having the correct version bounds on its hmatrix dep
<clever>
and you can fix it by specifying an hmatrix version in stack.yaml
<Alling>
clever: Yeah, specifying hmatrix-0.13.0.0 instead of 0.19 made that error go away. But now I'm stuck with that other error I got last time I tried.
<Alling>
"base-4.12.0.0 from stack configuration does not match ==4.2.* || >=4.4 && <4.7" and a bunch of similar errors.
<Alling>
package.yaml: - base >= 4.7 && < 5
<Alling>
This is after like three steps of trying stack build and adding suggested dependencies to extra-deps.
<AlexRice[m]>
hmatrix needs a base version more less than 4.7
<Alling>
Now it suggests "- base-4.6.0.1" which I have already added to extra-deps.
<Alling>
AlexRice[m]: How do I select a compatible version of base?
tboston has quit [Ping timeout: 252 seconds]
<AlexRice[m]>
I'm not sure with stack
<Alling>
AlexRice[m]: Do you recommend building in some other way?
<clever>
Alling: you may need to change the version of ghc your using, i believe stack does that via the lts release?
iyzsong has joined #nixos
<AlexRice[m]>
Alling: Not necessarily, I just don't know enough about stack
<clever>
nefix: did you build u-boot for the board?
<nefix>
And tried to add the package but it also fails
<clever>
nefix: that hydra build is in the cache, you can just: nix-store -r /nix/store/m7rpgdb47k0qkbw8wq03r47z9gy9w5q5-uboot-rock64-rk3328_defconfig-2017.09
<nefix_>
So, I've flashed first the NixOS image and then u-boot but nothing seems to happen when I start the Rock
nefix has quit [Ping timeout: 256 seconds]
<nefix_>
No output nor led blinking
<clever>
nefix_: does the board have a serial port?
agander has joined #nixos
<nefix_>
You can get serial output connecting the cable to certain pins
orivej has joined #nixos
<nefix_>
But I don't have a serial cable :/
<clever>
nefix_: do you happen to have a second matching board?
<nefix_>
What do you mean with that? A second board like it?
<clever>
nefix_: yeah
<{^_^}>
[nixpkgs] @marsam opened pull request #58251 → postgresql: always create the bin directory in postgresqlAndPlugins → https://git.io/fjJhp
<nefix_>
Not right now, but I have access to it
<nefix_>
What would I be able to do with it?
<clever>
nefix_: if you connect the tx->rx between both of them, then the serial port on one is linked to the other
<clever>
nefix_: so you can then run any serial terminal program on one, to access the serial port of the other
<clever>
you will also want to connect the gnd of both, so they have a common reference
<nefix_>
Hmmm I see
<fmsbeekmans>
clever: How can I calculate the sha256 of the repository after I fetchgit?
zupo has quit [Quit: My MacBook has gone to sleep. ZZZzzz…]
<clever>
fmsbeekmans: by running nix-prefetch-git, in a normal shell
rasmosis has joined #nixos
<clever>
,tofu fmsbeekmans
<{^_^}>
fmsbeekmans: 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.
<clever>
fmsbeekmans: or giving it a wrong hash
<{^_^}>
[cabal2nix] @peti pushed to master « update-stackage: Stackage published a new URL to download their config files »: https://git.io/fjJjk
<fmsbeekmans>
clever: Does that mean manually fixing the hash when you notice things going wrong?
<clever>
fmsbeekmans: yeah
<{^_^}>
[nixpkgs] @peti pushed 2 commits to haskell-updates: https://git.io/fjJjY
erasmus has quit [Ping timeout: 272 seconds]
<fmsbeekmans>
clever: I want to do it in a derivation, without manual intervertion since I'm looking to clone a ton of them. Is there a way to change have a not-fixed-output derivation so that I can have network access?
<AlexRice[m]>
can you just use a shell script?
<clever>
fmsbeekmans: you need to have a script that generates the nix, outside of nix
<fmsbeekmans>
Ok, that makes .
clefru has joined #nixos
<clefru>
when debugging a failed build, I usually do "nix-build -K". When desperate, I source "env-vars" in there. When even more desperate, I sudo to the nixbld user that did the build. However, when rerunning the build step that failed, I hit the obstacle that $out points to /nix/store which isn't writable anymore at that point. Is there anything I can do to get a writable $out in this situation?
<clever>
clefru: first, you can skip sourcing env-vars, by running `nix-shell /nix/store/foo.drv`, as for $out, you can just re-export out to something else
<clever>
clefru: the rest highly depends on what is failing, and why
<{^_^}>
[nixpkgs] @7c6f434c pushed to master « lispPackages.stumpwm: mimic Query-FS tricks for adding extra deps »: https://git.io/fjJjw
<clefru>
clever: thanks for the nix-shell trick. what's the function inside that shell that's the entry point for a build? I usually try to call genericBuild
<Ashy>
how do i find all of the *.desktop files in my current nix profile?
<clefru>
clever: nanopos requires some kind of build step that is not properly specified in its package.json, and I am trying to figure out which npm command I need to call to make that build.
<clefru>
this is all in the context of node2nix
<clever>
clefru: yeah, genericBuild is the usual entry
<clever>
clefru: you may want to `export out=$HOME/foo` first, to make it writable
<clever>
clefru: can you pastebin the original error your trying to fix?
<clefru>
something seems off there with those references to ./gvfs
domogled has joined #nixos
<clefru>
clever: here is the original error. https://pastebin.com/Fs5TEV6H . nanopos's git repo contains a build.sh that is not called when npm install-ing, as it's in 'scripts: { "dist": "build.sh" }' in the package.json, however there is "bin": "dist/cli.js" inside the package.json as well, which doesn't exist when build.sh is not run, therefore npm errors out
<clefru>
clever: not sure how familiar you are with package.json..
<clever>
and its likely complaining about /usr/bin/env not existing
<clever>
clefru: one mi
<clever>
n
<clefru>
clever: there is in fact no dist/cli.js in $out. that's not a wrong-shebang error
<clever>
ah
<clever>
clefru: have you tried yarn2nix yet?
<clefru>
the error comes from npm linkBins according to the npm error log. So my theory is that build.sh isn't invoked, which I can see no trace of. also build.sh would probably fail anyway, because it shebangs to /bin/bash
<clever>
clefru: looks like you need to run `babel -d dist src` after npm does most of its work
<clefru>
clever: no I haven't. Looks like a packaging error to me
<clefru>
clever: right, I figured that npm install does that work
<clever>
i dont think it does
<clefru>
node2nix calls npm install...
<clever>
only `npm run dist` will run that
<clefru>
clever: sorry, I forgot to mention that I cloned the repo and renamed dist to install
<clefru>
So I figure that npm install should now run build.sh
<clever>
install is special, and i dont think it can be overrode like that
<clefru>
I am sure that there are custom builds scripts that can be triggered
<clefru>
all those C binding compilation steps are triggered somehow
<clefru>
If I could only get a reasonable working nix-shell
<clefru>
genericBuild goes completely wrong in my case.
<clefru>
meh, not getting into the environment of a nixbld1 is strongly frustrating
<clefru>
there seems to be a developer tooling gap here.
<clever>
clefru: also, you can just edit the nix file, to add more commands at any point in the derivation
<clever>
clefru: and then re-run nix-build, and nix will run those commands for you, at the right point
<clefru>
clever: that's what I do, but I want something more complex, and additionally play around with the invocation of npm/strace it and so forth. The derivation is pretty heaving and I don't want to have a 20 sec turnaround on each invocation
<clever>
clefru: what about just running nix-shell, and then `phases="buildPhase" genericBuild` in the directory the src came from?
<clefru>
clever: probably the same result, npm not being able to write to $out
<jomik>
I am not sure how to do that.. :/ The assertions example I found in the manual sets it as an attribute in a set - I am not sure what the attribute name of the derivaton should be then.
periklis` has joined #nixos
<clever>
jomik: you want the nix manual, not the nixos manual
<clefru>
clever: I worked around my problem by switching the underlying source for something that already contains the compiled dist/cli.js. That is I didn't point to the git repo but to the npmjs.org tgz file which is produced by npm dist
<Alling>
AlexRice[m]: Yeah, I found it eventually! I didn't think of the possibility of an internal module at first.
<kai_w>
for python packages, what's the difference between `disabledIf IsPy3k (callPackage foo.nix)` and `callPackage foo.nix { disabled = IsPy3k; }`?
kai_w has quit [Quit: Konversation terminated!]
shabius has joined #nixos
kai_w has joined #nixos
shabius_ has quit [Ping timeout: 258 seconds]
myskran has joined #nixos
<sphalerite>
Anybody know what's up with the "error: restoring parent mount namespace: Invalid argument" message that seems to crop up every second time I try to use nix-shell as root?
abathur has quit [Ping timeout: 255 seconds]
cmacrae has joined #nixos
<clever>
sphalerite: ive also noticed it, but havent looked into why
<{^_^}>
[nixpkgs] @kalbasit pushed commit from @elasticdog to master « bazelisk: init at 0.0.3 (#56867) »: https://git.io/fjUJL
genesis has joined #nixos
<{^_^}>
[nixpkgs] @worldofpeace pushed commit from @dtzWill to release-19.03 « youtube-dl: 2019.03.01 -> 2019.03.18 »: https://git.io/fjUJl
amir has quit [Ping timeout: 264 seconds]
genesis_ has joined #nixos
genesis_ is now known as genesis
genesis is now known as Guest54103
rasmosis is now known as Erasmus
amir has joined #nixos
drakonis1 has joined #nixos
myskran has quit [Quit: myskran]
romildo has quit [Quit: Leaving]
amir has quit [Ping timeout: 264 seconds]
Makaveli7 has joined #nixos
linarcx has joined #nixos
amir has joined #nixos
<{^_^}>
[nixpkgs] @worldofpeace pushed 3 commits to release-18.09: https://git.io/fjUJM
msgctl is now known as loonquawl
inquisitiv3 has quit [Quit: Leaving]
<betawaffle>
ok, so i managed to install nixos from another linux distro, because i couldn't get the graphical installer usb to boot
<srhb>
betawaffle: Funny, that was how my first install went too. Though i think it was because I didn't have a usb stick at the time. Nerve wracking!
periklis` has quit [Ping timeout: 268 seconds]
<betawaffle>
but now, after i turned on some stuff like wireless and xserver, it does this weird flashy thing when booting, where it switches between the normal virtual terminal i'd expect and what appears to be an incorrectly configured console (like, the one where newlines don't reset to the beginning of a line)
<betawaffle>
so... what i've got now are two nixos things i can boot. one that works, but has no networking or anything; and another, that is graphically fucked and unusable
<srhb>
betawaffle: Sounds like you need to grab some xserver logs for starters.
<betawaffle>
is there something i can pass on the kernel command line to boot the latter is some kind of safe mode?
<betawaffle>
s/is/in/
<srhb>
You can boot to single user mode, but I'd expect that's less functional than just switching to vt1 and debugging from there.
<betawaffle>
because i'm not sure how to interact with the later from the former
<srhb>
There's no "graphical safe mode"
<betawaffle>
srhb: when i switch vt, it still does that weird flashing thing. so i can't actually *see* the virtual terminal
<betawaffle>
it's literally unusable
<srhb>
betawaffle: Yuck, okay.
<samueldr>
if display-manager.service is in a "bad loop" it might be hard to switch to VT1
<betawaffle>
like, i'm trying to figure out how to completely disable whatever graphical nonsense it's trying to do
erasmas has joined #nixos
<srhb>
betawaffle: Then you might indeed want to boot single user mode and go from there.
equivrel has joined #nixos
<betawaffle>
how do i do that?
<betawaffle>
(i'm pretty new to linux)
<samueldr>
try adding `systemd.mask=display-manager.service` to the kernel boot options
<srhb>
betawaffle: press 'e' in your boot loader and add "single" to your command line
periklis` has joined #nixos
<samueldr>
(as an alternative)
<srhb>
Oh, samueldr's option is even nicer
<srhb>
Definitely go with that :)
<betawaffle>
ok. i'll try that
<srhb>
Saves you some manual wrangling.
<betawaffle>
thanka
<samueldr>
I believe it should disable the display manager service for the duration of the boot
zupo has joined #nixos
<samueldr>
betawaffle: what kind of computer is it?
<samueldr>
something really recent?
<betawaffle>
system76 darter pro, yep, i think so
<samueldr>
okay
<samueldr>
I think I know what will help, unless you already did it
<betawaffle>
so, the systemd mask totally seems to be helping. i have an actual login now
<AlexRice[m]>
If i've realised that my pr is broken should I take it down and add it again once I've fixed stuff or just leave it up while I fix stuff and commit the fixes?
<manveru>
AlexRice[m]: just leave it up :)
<manveru>
AlexRice[m]: but maybe mention that it's broken in the comment
dnlkrgr has quit [Ping timeout: 250 seconds]
jmeredith has joined #nixos
<linarcx>
They force me not using makeDesktopItem, but instead useing it's own .desktop file. but i don't have any idea how to do this job.
<monotux>
thank you betaboon and srhb, I'll have a look!
<srhb>
monotux: Ack, that;s not actually as helpful as I thought.
<samueldr>
betawaffle: I was thinking more about the display-manager issues; newer kernels are generally easier to deal with new hardware when DMs won't start
mmlb97745 has quit [Ping timeout: 250 seconds]
<srhb>
monotux: Basically, just override the package "globally" via an overlay.
<betawaffle>
right, i just realized i can't run nixos-rebuild until networking is working
<monotux>
never got around to understand overlays, but I'll give it a try
<samueldr>
looks like it's an intel wireless card, which AFAIK are generally are well supported without doing much... except maybe if it's too new?
<samueldr>
(the darter pro page says it's a "Intel® Wireless-AC, Bluetooth")
<srhb>
monotux: betaboons approach works fine too since there's an home-assistant.package option, but overlays will work even when there isn't. ymmw.
<betawaffle>
samueldr: i don't think there's a problem with support. more about me telling it what network to connect to, and the password :P
<slabity>
Does it appear when you run `ip a`
<betawaffle>
trying to find the docs to configure that
<samueldr>
ah, betawaffle, for this I'm always using network-manager, so I can't help with the usual linux things; but AFAIK when you just enable wireless, it should be "as you do on other distros without helpers"
<samueldr>
probably something like wpa_supplicant and dhcpcd/dhclient
<srhb>
monokrome: I've never had a usb connection _connect_ and yet not charge o_o
<srhb>
Frankly I'd suspect the cable if that ever happened..
<srhb>
But maybe I'm just USB-ignorant.
<monokrome>
srhb: There are rules for "device X supports Y feature" that tell it that it's okay to send extra power to the device so it deoesn't damage ones that don't
linarcx has joined #nixos
<srhb>
TIL. :)
<monokrome>
This phone just released last month and it's not, like, a super popular one
<monokrome>
So, makes sense that there aren't rules for it yet
<buckley310>
i wouldnt think you need udev rules, or even a working driver, to charge a phone O.o
<monokrome>
maybe udev isn't the right thing
<buckley310>
i have also never had a phone not charge once it was detected
<monokrome>
but there are rules somewhere that decide whether you can or not
<monokrome>
Have you ever had a phone that isn't widely popular plugged into your PC?
<samueldr>
usb PD can ask for more power, but USB itself should always provide the 500mA~ 5V output, the phone might say something like "charging slowly"
cmacrae has quit [Remote host closed the connection]
<samueldr>
though I don't know how PD can be configured, if at all, via linux
<monokrome>
Lots of phones want more power than that
<samueldr>
yeah, but most, if not all, will still charge, albeit slowly
<monokrome>
well it's not
<samueldr>
though some firmwares (bios/uefi) will have options for that
<buckley310>
i mean, ive never had what i would describe as an "unpopular" phone, i have seen phones charge before my OS has booted...
<srhb>
monokrome: Is it possible that your USB port is just rated lower than what the phone will accept?
<monokrome>
charges w/ my mac, not w/ my linux laptop, same connection
Alling has quit [Ping timeout: 256 seconds]
<samueldr>
since dmesg sees the phone, the phone receives power from the USB port; maybe the software on the phone (or the firmware) decided that the 500mA/5V is not enough to show the charging state
<monokrome>
yes that's what I said :)
linarcx has quit [Ping timeout: 245 seconds]
linarcx1 has joined #nixos
<srhb>
I'll stop guessing blindly, I'm just very surprised. :P
<betawaffle>
wth... 63% packet loss over wireless :(
<monokrome>
betawaffle: Maybe a saturated channel?
<samueldr>
apple computers are known to be able to deviate from the spec without PD, to give 1100mAH in some cases; might be related
<betawaffle>
idk, maybe? not sure how to diagnose that. it's never a problem on my apple machines
<monokrome>
pretty sure I just need to add a udev rule
<samueldr>
find out how it'd be done on other distros, then we should be able to figure out how to do it for NixOS
<monokrome>
hmm
<monokrome>
so it isn't udev actually
<monokrome>
If I plug in AC, it charges
<monokrome>
tlp I guess
<samueldr>
either that or the firmware of the laptop goes into "keep this up to spec, but as low power as needed"
<{^_^}>
[nixpkgs] @gebner pushed to release-19.03 « evince: enable postscript support »: https://git.io/fjUUA
<betawaffle>
suddenly i've got no packet loss :/
<monokrome>
what changed?
<betawaffle>
nothing!
<monokrome>
something did :D
<betawaffle>
i ran nix-channel --update
<samueldr>
betawaffle: don't move, hold your breath, don't heat anything in the microwave, and ask your neighbours too, not to microwave anything
<samueldr>
(assuming 2.4Ghz)
<{^_^}>
[nixpkgs] @gebner pushed to master « evince: enable postscript support »: https://git.io/fjUUh
<monokrome>
now it charges w/out AC
isHavvy has quit [Read error: Connection reset by peer]
<disasm>
fpletz, globin, WilliButz: I know you guys are using prometheus 2. Would one of you be able to review https://github.com/NixOS/nixpkgs/pull/58255/files? I'd like to get this upstreamed. We're currently using it in our fork, much like you guys do :)
<{^_^}>
[nixpkgs] @gebner closed pull request #58259 → evince: enable all features → https://git.io/fjUJT
<srhb>
So, who's up for some psychic debugging...
<srhb>
nixos-rebuild build fails with stack overflow (possible infinite recursion)
<srhb>
I roll back my repo 100 commits and rebuild works.
<srhb>
I bisect from there, marking the previous commit as bad.
<srhb>
After some 5 steps, I have a reported first bad commit.
<srhb>
Alas, this commit is fine.
<srhb>
???
<monokrome>
It doesn't give a traceback?
Havvy has joined #nixos
orivej has joined #nixos
<monokrome>
use `git bisect`
<globin>
disasm: we're currently in the process of moving offices but will do so as soon as possible
<srhb>
No. But what weirds me out is that the supposed first bad commit is wrong. I'm clearly not understanding some intricacy of git bisect here.
<monokrome>
oh you're saying yo already did?
<srhb>
Yup.
<monokrome>
From master, did `git bisect start`?
<srhb>
I'll redo it. I must have done _something_ wrong, right?
<srhb>
nixos-unstable, but yes. (via git bisect bad)
<monokrome>
via git bisect bad?
<monokrome>
like
<srhb>
If you invoke git bisect bad without start first, it'll just ask you whether it should start a bisect for you
<srhb>
No, I did git checkout HEAD~100, tested it, and it was good, so I did git bisect good
<srhb>
Then it starts searching.
<monokrome>
after doing `git bisect good`?
<srhb>
Yep!
<monokrome>
I didn't know you could manually checkout w/ a bisect active
<monokrome>
it didn't break it?
<srhb>
How else to mark the boundaries?
<srhb>
Oh, you use the git bisect good COMMIT version?
<monokrome>
yeah
<srhb>
Yeah, I'm pretty sure it should be the same thing.
<monokrome>
hmm interesting
<srhb>
Like, after checking out two commits, one good and one bad, and marking each good/bad respectively, it'll initiate the normal bisect search.
<srhb>
It's just implicitly the current commit.
<srhb>
I'm so confused :-)
<monokrome>
So, it found a commit that doesn't have any recursive logic or call into functions that commit introduces usage of?
<srhb>
Well, it certainly finds a commit that's good... So there must be some interaction somewhere that I don't understand, I guess? I must have made some mistake, this doesn't make sense..
<monokrome>
so once it finds a good commit
<monokrome>
did you `git bisect good`?
equivrel` has joined #nixos
<srhb>
Yep.
<monokrome>
the it should have checked out a new one to find a bad one?
<srhb>
If you'd asked me an hour ago I would have sworn I know how to bisect ;-)
<srhb>
Yeah, I went through a bunch.
<monokrome>
I would try again without the manual checkout
<srhb>
OK. :)
<monokrome>
I think that may have broken it
<monokrome>
unless there's some caching of source files going on
equivrel has quit [Ping timeout: 268 seconds]
<ajs124>
switch-to-configuration switch isn't updating my systemd-boot config anymore and I'm kind of out of ideas why that might be. any help?
<srhb>
ajs124: Any errors or warning during rebuild? Usually it's out of space conditions.
fendor has joined #nixos
<srhb>
hmm, wait, does switch-to-configuration switch do the same thing as rebuild switch?
<ajs124>
srhb, nothing. There's enough space. The truly weird thing is, if I move /boot/loader, if I do a switch, it doesn't recreate /boot/loader/loader.conf but it does recreate /boot/loader/entries and it's contents, but only generations until 4 days ago
<srhb>
ajs124: Right, I was wondering whether it calls the boot logic separately, I forget.
<ajs124>
I took a look and it doesn't look like it does.
<monokrome>
the easiest way imo is to just do `git bisect start bad_commit good_commit`
<monokrome>
sorry if not helpful
<ajs124>
hm, yeah. I'll look through my commit history. The thing is, I don't remember changing anything related to that stuff over the weekend
<monokrome>
:o
<srhb>
I think the bisect stuff was a comment for me :)
<simukis_>
what besides `.drv` being refered to could keep it "alive"?
<ajs124>
and nixpkgs, which might have changed, obviously
<srhb>
simukis_: nix-store --query --roots may help you
<monokrome>
I meant srhb. Sorry for confusion ^
zupo has quit [Quit: My MacBook has gone to sleep. ZZZzzz…]
<simukis_>
srhb: ah, there was a `result` path somewhere.
<simukis_>
thanks!
<srhb>
ajs124: Which commit are you on?
<srhb>
ajs124: The only other thing I can think of is an efi entry that point to an old, wrong boot list somehow..
Jackneill has quit [Ping timeout: 244 seconds]
Jackneill has joined #nixos
tertl3_ has quit [Quit: Connection closed for inactivity]
ixxie has joined #nixos
<ajs124>
srhb, I'm on 918bc442802b78e41998b327348c6a7d3b1c9038
wfranzini has quit [Remote host closed the connection]
__Sander__ has quit [Quit: Konversation terminated!]
<ajs124>
I think I might have figured it out, but I'm still not sure why that would have changed in the last 4 days on the stable channel
<srhb>
ajs124: What's your hunch?
<ajs124>
srhb, it seems to look like systemd-boot is generating the config correctly, but my generations are not "updating" properly. As in, if I do a switch, list my generations, change something and do another switch and list them again, only the newest generation gets replaced, but the whole list didn't get "shifted".
<srhb>
ajs124: This doesn't apply to the actual generations in /nix, right?
<srhb>
/nix/var/nix/profiles I mean
<srhb>
What I'm wondering is whether there's actually a maximum for systemd-boot
<ajs124>
srhb, it does. That's what I'm saying. I'm using a replacement for nixos-rebuild which a friend and I wrote, for various reasons and that seems to be broken.
<srhb>
Ah, sorry.
<ajs124>
Yup, doing a regular old nixos-rebuild switch worked -.-
knupfer has joined #nixos
<ajs124>
Amazing. Well, thanks anyway. Guess I know whom to blame now, at least.
<srhb>
Hehe. :)
<samueldr>
ajs124: anything cool in that nixos-rebuild replacement? (if you're not ready to show, just don't mine me :) )
<samueldr>
mind*
knupfer has quit [Client Quit]
knupfer has joined #nixos
cryptomonad has joined #nixos
<ajs124>
samueldr, I'm not responsible for most of it, so das_j is the better person to ask this question. It mainly deploys secrets, nix channels, builds and deploys systems. Locally and remotely. It's a collection of horrible bash scripts.
rcshm has joined #nixos
<AlexRice[m]>
does anyone know how I can set an environment variable to be an empty string in makeFlags
<azazel>
samueldr: I'm packaging a customized version of nixops, but if leave the nixpkgs in release.nix https://github.com/azazel75/nixops/blob/remote-libvirt/release.nix#L3 unspecified i get an error about (python?) package compatibilty as I'm on unstable ... so I setup to pass in the store path to latest stable nixpkgs, but I don't know why this way fails to render the path at
<azazel>
https://github.com/azazel75/nixops/blob/remote-libvirt/doc/manual/default.nix#L23 that gets called along the way and looks up just for /nixos/doc/manual/options-to-docbook.xsl, so I was thinking about the differences between fetchTarball "stablepkgs" and <nixpkgs> and I noted that the former returns a string, while the latter is a path (in nix repl)
<NemesisD>
hey folks. i'm trying to set up a particular directory structure with `dockerTools.buildImage`. i have a derivation that drops a bunch of files into $out. i tried making a derivation that depends on that and in the `installPhase` copying those to `$out/my/desired/structure`, then using that in the docker image `contents`, but the image still has all those files in the root
<simukis_>
srhb: adding a new entry to substituters and its key.
<srhb>
simukis_: You could write a nix derivation that generates the nix.conf file declaratively, but... :-P
<NemesisD>
is there a more sensible way to configure where files in the docker image go at build time?
<srhb>
NemesisD: iirc everything is just linked to the top level, so you can modify the generation to produce whatever kind of tree you like.
<srhb>
NemesisD: as in pkgs.runCommand "weirdlocation" {} "mkdir -p $out/blorb && ln -s ${pkgs.hello}/bin/hello $out/blorb/hello"
<marler8997_>
is anyone else getting this right now? warning: unable to download 'https://cache.nixos.org/nix-cache-info': SSL peer certificate or SSH remote key was not OK (60)
PuercoPope has joined #nixos
<NemesisD>
srhb: i've seen runCommand mentioned before but never used. so runCommand creates a new derivation with name "weirdlocation" right?
<srhb>
NemesisD: Yeah.
<{^_^}>
[nixpkgs] @rnhmjoj opened pull request #58278 → mtxclient: patch to workaround matrix synapse bug → https://git.io/fjUk9
<srhb>
NemesisD: It's just an ultra simple mkDerivation.
<samueldr>
marler8997_: does load on another device on your network? is your system clock about right?
alex`` has quit [Ping timeout: 250 seconds]
<marler8997_>
actually system clock is wrong, I'll try fixing
<{^_^}>
[nixpkgs] @dingxiangfei2009 opened pull request #58279 → Customizable fsType for make-disk-image → https://git.io/fjUk7
adetokunbo has quit [Quit: This computer has gone to sleep]
<NemesisD>
srhb: i'll give that a try. i may be doing the rough equivalent already, i'm running mkDerivation, unpackPhase = "true"; buildPhase = "true"; installPhase = "mkdir -p $out/my-dir $out/my-dir/log; maybe where i went wrong is that i was doing a `cp` instead of an `ln` from source to dest
<srhb>
NemesisD: Either should be fine.
<NemesisD>
srhb: either runCommand || mkDerivation, or either ln || cp
alex`` has joined #nixos
<srhb>
NemesisD: anyOf those :)
<srhb>
NemesisD: What do you see wrong with your version? Does it not link my-dir properly?
<NemesisD>
hmm, wonder why it isn't taking then, the files are still in the root and my directory structure is nowhere to be found in the docker image
<srhb>
NemesisD: You added it to contents, or what's its name?
<srhb>
NemesisD: If so, it might be using paths-to-link or something...
<srhb>
NemesisD: Looks to me like it's basically doing `for content in $contents; do cp -r content /; done`
<srhb>
git reset --hard HEAD~1 && git pull -- fixed the rebuild issue. Go figure. The repository was cleaned, garbage collected, and everything. git must have messed up something?
* srhb
shrugs
<marler8997_>
samueldr: that did the trick...thanks for the help
<betawaffle>
does anyone here use wayland on nixos?
<AlexRice[m]>
yes
<samueldr>
marler8997_: one of the most non-obvious issue, SSL checks with time and date, and when it's wildly out of whack, it just fails hard :/
<betawaffle>
what config options do you need for it?
<samueldr>
(not nix specific)
equivrel` has quit [Ping timeout: 250 seconds]
<marler8997_>
good to know, I'll keep that in mind in the future
<AlexRice[m]>
where <compositor> is whatever you're going to run
<betawaffle>
like sway?
<AlexRice[m]>
yes
<NemesisD>
srhb: it works! it turns out i was goofing up the syntax: `cp -r ${frontend} $out/my-dir` i think was like copying the link or something weird. i changed it to `cp -r ${frontend}/* $out/my-dir` and everything looks good :)
HappyEnt has joined #nixos
<srhb>
NemesisD: Great!
alex`` has quit [Ping timeout: 244 seconds]
alex`` has joined #nixos
sigmundv has quit [Ping timeout: 250 seconds]
<AlexRice[m]>
betawaffle: A few wayland programs are missing from nixpkgs atm but it seems you can copy in .nix files from https://github.com/colemickens/nixpkgs-wayland and it has worked fine for me so far
<betawaffle>
AlexRice[m]: what's something that's missing, as an example?
<dejanr>
hi anyone here familiar with thinkpad cpu throttling issues, i am looking for something like this for NixOS https://github.com/erpalma/throttled
<ldlework>
hmm, the dep2nix README doesn't have quite enough information for me to piece together how to use it
<NemesisD>
infinisil: i need some files from ../frontend and ../test, i can't for the life of me figure out how to make this work: `sourceByRegex ../. ["^frontend/.*", "^test/.*"]`, it seems like regexes with path slashes in them just doesn't work
<infinisil>
NemesisD: Ahh, you need to add a regex for the directory itself too
<neonfuz__>
clever: maybe tags need to be passed in together? like -tags "sqlite pam" rather than -tags sqlite -tags pam
<infinisil>
NemesisD: It will only descend into a directory if the directory itself matches too
<clever>
neonfuz__: check the go docs
<neonfuz__>
yah
<NemesisD>
infinisil: meaning the name of ../. ? e.g. `my-project`?
<infinisil>
NemesisD: I mean "^frontend" should be in the list of regexes
<infinisil>
Or something like that, without the slash
<samrose>
anyone happen to know what the default logrotate settings are on journald in nixos 18.09?
<infinisil>
NemesisD: explicitFilterSource would make that much more intuitive
<samrose>
I only see a ratelimit in my /etc/systemd/journald.conf
<NemesisD>
infinisil: so say i just want `../test/data`, i would do sourceByRegex ../. ["^test$", "^test/data/.*"] or something?
<samrose>
but it appears the logs are actually rotated for journal already
<infinisil>
NemesisD: Um maybe? Not entirely sure
<NemesisD>
sourceByRegex kinda sucks. it seems like explicitFilterSource isn't in the code yet
<infinisil>
NemesisD: Yeah, but you could try it out regardless
<infinisil>
NemesisD: If you do I'd love if you could give the PR an accepting review so we know you'd like it to be merged too :)
<neonfuz__>
oh crap clever , that nix eval version was wrong too btw
<neonfuz__>
because I didn't run it as sudo
<NemesisD>
i don't know if i have time, i've burned all morning on this
<neonfuz__>
I use a different channel for my user nix-env
<neonfuz__>
in any case I think it may still be broken in the latest version
<goibhniu1>
lassulus: to be clear, this is for the problem where starting a VPN fails because you're not allowed to create the tun device in an container (just in case you're actually asking about something else)
<srhb>
neonfuz__: Bizarre. Does it not like -tags being specified twice?
<samrose>
ok if anyone searches for this in irc archives: I found that if systemd defaults are being used in nixos, SystemMaxUse defaults to 10% of the system with a cap of 4GB (how much max space journal can use up at most) SystemMaxFiles defaults to max 100 indivudal files
o1lo01ol1o has quit [Remote host closed the connection]
o1lo01ol1o has joined #nixos
drakonis1 has quit [Quit: WeeChat 2.3]
<srhb>
neonfuz__: The thing I dislike most is that it seems incidental that buildFlags and buildFlagsArray interact correctly in this case.
<srhb>
But yes, it technically works.
<betawaffle>
AlexRice[m]: it sort of worked, but i've changed some thing since then, it might work better now
<neonfuz__>
lmao
<srhb>
neonfuz__: Er, sorry, that came out wrong...
<neonfuz__>
honestly it's a bit... implementation dependent maybe
<srhb>
Yeah.. :)
<srhb>
I really think preBuild and then a bash array looks cleaner. There's precedence for this as well
drakonis_ has joined #nixos
<srhb>
neonfuz__: See eg. pkgs/tools/networking/dd-agent/6.nix -- where the tags list is hardcoded, granted, but that model is simple to understand with a concatStringsSep " " tags
Makaveli7 has quit [Quit: Leaving]
<infinisil>
I wonder how a mkDerivation redo would look like
<srhb>
infinisil: More builder logic, more passing via json?
<infinisil>
I want it to better integrate with running the build from nix-shell
drakonis has quit [Ping timeout: 250 seconds]
<infinisil>
And less confusing phases, less of that prePhase/postPhase thing
<srhb>
I like the pre/postphases :(
<srhb>
But maybe with more dynamic hooks..
o1lo01ol1o has quit [Remote host closed the connection]
<infinisil>
srhb: I mean the thing about pre/postX not running when you override X
<srhb>
aah.
<srhb>
Yes, that is indeed confusing.
<srhb>
Maybe they should just be phases themselves instead of hooks..
<samueldr>
the idea is to add/remove pre/post by simply adding or removing their attached phase I think
drakonis_ has quit [Ping timeout: 240 seconds]
jbgi has quit [Ping timeout: 250 seconds]
<infinisil>
That on the other hand seems to make sense
<infinisil>
How about having a dependency graph thing instead, where you can say that "This phase must run after this one and before that one"
o1lo01ol1o has quit [Remote host closed the connection]
o1lo01ol1o has joined #nixos
<infinisil>
And we could add stuff like ".. and needs that file to run successfully"
<infinisil>
Or " only runs on this architecture"
<infinisil>
Although, that feels like it's going towards a makefile
<samueldr>
might be a tad too much abstract to think about
<samueldr>
I'm thinking such an endeavour would be better taken by actively trying to make something like a borfpkgs using stdenv.mkDerivationTwoPointOh
<samueldr>
;)
<infinisil>
borf?
<samueldr>
(try and fail, retry and refail?)
<srhb>
borgpkgs :3
<samueldr>
I wasn't sure you read that silly thing the other night
<infinisil>
Ohh, retrying phases sounds interesting, although dangerous too
<srhb>
Hey, who are you calling silly. :P
<samueldr>
oh, I was thinking trying to implement a mkDerivation, and failing to implement one, then retrying and maybe do it!
<infinisil>
Ahh yes that sounds good too
<samueldr>
I'm sure there are numerous design decisions that aren't obvious
<infinisil>
Like?
<samueldr>
no idea, they aren't obvious!
<samueldr>
(sorry if this is unhelpful)
<rnhmjoj>
do you know whether nixos updates the hardware clock before shutdown?
<infinisil>
I guess the whole buildInputs with cross comp stuff
rprije has joined #nixos
<infinisil>
What I also find a bit weird on mkDerivation is how it's ready-to-go for a standard C project by default
<infinisil>
I'd rather have this be a thing you need to add yourself
Shouou has joined #nixos
<samueldr>
you see C, but I hear [./configure]; make; make install
<samueldr>
:)
<samueldr>
(though your point mostly stands)
vk3wtf has quit [Ping timeout: 250 seconds]
<infinisil>
How about having a mkDerivationTwoPointOh which has an option `buildType = [ "rust" "c" "node" ]` which could be used to specify what builders it needs. This would replace the non-modular `buildRustPackage`, etc.
<samueldr>
it sure would be a better experience to start every derivation with stdenv.mkDerivation
o1lo01ol1o has quit [Remote host closed the connection]
o1lo01ol1o has joined #nixos
<samueldr>
and those additional behaviours be "plugged-in"
<infinisil>
Give that stdenv is pretty much the C stuff, it could be `pkgs.mkDerivation` directly even
<fendor>
trying to install an exe with cabal that depends on zlib. Cant figure out a way to make cabal/ghc be aware of zlib? tried nix-shell -p ghc zlib --run 'cabal new-install hoogle' and similar stuff
knupfer has quit [Ping timeout: 268 seconds]
<fendor>
all fail because of a missing zlib
<infinisil>
Or hell, why even `mkDerivation`, let's call it `pkgs.build`
<infinisil>
I'll probably experiment with this in the future
o1lo01ol1o has quit [Remote host closed the connection]
o1lo01ol1o has quit [Remote host closed the connection]
o1lo01ol_ has joined #nixos
jackdk has joined #nixos
vk3wtf has joined #nixos
<neonfuz__>
srhb: got busy with some stuff, also just noticed your suggestion
<neonfuz__>
somehow got eaten by my irc client before I think
orivej has joined #nixos
<neonfuz__>
I like that suggestion, I was actually looking for let blocks but I tried to do them haskell style (after, and without in) so it didn't work lol
<neonfuz__>
been a bit since I've been far into nix syntax