o1lo01ol1o has quit [Remote host closed the connection]
<ToxicFrog>
So, there's attrsets.genAttrs which turns a list of keys into an attrset of key-value mappings
<ToxicFrog>
Is there an equivalent where the generation function can return both the key and the value?
<ToxicFrog>
The inverse of mapAttrsToList?
drakonis_ has quit [Read error: Connection reset by peer]
drakonis has joined #nixos
<ottidmes>
ToxicFrog: builtins.listToAttrs, each list item has to be { name, value }
<ToxicFrog>
Thank you!
lunik1 has quit [Ping timeout: 246 seconds]
<ottidmes>
ToxicFrog: there is also lib.nameValuePair to generate the attrset for you, but you dont win much my using it most of the time
<rardiol1>
ottidmes: managed to do almost of what I wanted with ssh. Apparently it's one of those days reading the manual for 10 more minutes would have saved me hours "learning" perl and XS and nix. Except maybe that nix build with ssh now fails, apparently because it's trying to copy things that were locally build on the substituter like stage-2 or -nixos-version and then giving up because of lack of signature instead of rebuilding
Diagon has quit [Quit: Leaving]
<ottidmes>
rardiol1: I remember there was a situation where you could configure whether you wanted those kind of things (config files and such) to be build locally, not sure is applicable here
hamishmack has joined #nixos
IRCsum has quit [Read error: Connection reset by peer]
IRCsum has joined #nixos
rardiol1 has quit [Remote host closed the connection]
ma27 has quit [Quit: WeeChat 2.2]
ma27 has joined #nixos
Diagon has joined #nixos
ryantrinkle has quit [Remote host closed the connection]
thc202 has quit [Ping timeout: 245 seconds]
<{^_^}>
[nixpkgs] @TikhonJelvis opened pull request #51971 → Don't fail on haskell configure warning → https://git.io/fpFT6
alex`` has quit [Ping timeout: 246 seconds]
drakonis_ has joined #nixos
worldofpeace_ has quit [Remote host closed the connection]
<Lisanna>
is it possible to do a multi-user single-user install on a machine? i.e., no nix-daemon, but multiple users having a .nix-profile and such?
<Lisanna>
and a shared /nix
IRCsum has quit [Ping timeout: 250 seconds]
cyounkin_ has joined #nixos
markus2341 has joined #nixos
cyounkin_ has quit [Read error: Connection reset by peer]
cyounkin_ has joined #nixos
cyounkins has quit [Ping timeout: 246 seconds]
cyounkins has joined #nixos
<elvishjerricco>
Lisanna: It *might* work, if everyone has write access to it. But Nix definitely recommends only letting one user write to the store, so I wouldn't be surprised if there are ways it could break.
<elvishjerricco>
Like I'm guessing if a user does a build, it won't automatically be given the permissions necessary to let other users read / write it
cyounkins has quit [Read error: Connection reset by peer]
cyounkin_ has quit [Ping timeout: 250 seconds]
cyounki__ has joined #nixos
aleph- has quit [Ping timeout: 244 seconds]
pie___ has joined #nixos
Anton-Latukha has quit [Quit: Leaving.]
<ekleog>
will potentially have race conditions, too
<elvishjerricco>
ekleog: I would've thought that would be solved by lockfiles and sqlite and whatnot. Should be, since you can run concurrent nix commands with a single user, can't you?
* ekleog
doesn't know
<Lisanna>
elvishjerricco, I think they'd have read permissions, but not write, which is good anyways
IRCsum has joined #nixos
<Lisanna>
and yeah, the existing locking should be enough to handle that I think
<Lisanna>
one thing that *might* not work is garbage collection / gc roots
<{^_^}>
[nixpkgs] @ToxicFrog opened pull request #51980 → nixos/munin: New options (and some bugfixes) for service configuration → https://git.io/fpFYI
<Lisanna>
gchristensen, it's a shared system that I don't own, concerned about having an extra systemd service in there
<{^_^}>
#51980 (by ToxicFrog, 1 minute ago, open): nixos/munin: New options (and some bugfixes) for service configuration
<ToxicFrog>
I'm running it on my server with no issues so far but would definitely appreciate someone else hammering on it as well; this is my first time writing NixOS options.
<elvishjerricco>
Lisanna: An extra systemd service sounds much less concerning than this setup you're considering :P
<gchristensen>
Lisanna: understandable. if you use the .socket service, nix won't run until someone asks for it, fwiw
<Lisanna>
plus, won't the multi-user install create nix profiles for everyone by default?
<Lisanna>
don't really want that
<gchristensen>
ah ... yes
<gchristensen>
but that can be, erm, fixed
graphene has quit [Remote host closed the connection]
graphene has joined #nixos
jperras has joined #nixos
kvda has quit [Quit: My MacBook has gone to sleep. ZZZzzz…]
cyounki__ has quit [Remote host closed the connection]
cyounkins has joined #nixos
<teto>
anyone has experience with buildStackProject ? Seems like 1/ need to disable sandboxing 2/ I get problems within a nix-shell unpackPhase "chmod: changing permissions of '/nix/store/6ip20phw3jv1rl3kvrx4n3b6kfzdy083-gutenhasktags': Read-only file system" ?
LysergicDreams has quit [Ping timeout: 250 seconds]
graphene has quit [Remote host closed the connection]
graphene has joined #nixos
LysergicDreams has joined #nixos
drakonis has quit [Quit: WeeChat 2.3]
rprije has quit [Ping timeout: 250 seconds]
<{^_^}>
[nixpkgs] @hyperfekt opened pull request #51985 → polyglot: init at 0.5.16 → https://git.io/fpF3J
jperras has quit [Ping timeout: 240 seconds]
graphene has quit [Remote host closed the connection]
graphene has joined #nixos
phreedom_ has joined #nixos
phreedom has quit [Ping timeout: 256 seconds]
<elvishjerricco>
teto: I cannot recommend trying to use `buildStackProject` for actual `nix-build`, or the ole `nix-shell` -> `unpackPhase && configurePhase && buildPhase` style workflow. It's sole purpose is to give stack a shell for its Nix integration.
<elvishjerricco>
Aside from that, I think it's pretty much always been in a broken state
<elvishjerricco>
And getting it working with sandboxing will be very difficult since Stack needs to download dependencies itself
LysergicDreams has quit [Ping timeout: 250 seconds]
hiratara has joined #nixos
<Arahael>
What does this mean? error: packages '/nix/store/lciggkinw321v874zq8xi09c52jnb53n-dwarf-fortress-full/lib/qt-5.11/qml/QtQml/plugins.qmltypes' and '/nix/store/j9bkiljg908k8ixdl0f95lqqpyrvakhr-qtdeclarative-5.11.1-bin/lib/qt-5.11/qml/QtQml/plugins.qmltypes' have the same priority 5; use 'nix-env --set-flag priority NUMBER INSTALLED_PKGNAME' to change the priority of one of the conflicting packages (0 being the
<Arahael>
highest priority)
Ariakenom has joined #nixos
<ekleog>
Arahael: it means that you installed two packages that both want to install a lib/qt-5.11/qml/QtQml/plugin.qmltypes
<Arahael>
ekleog: Right - my expectation was that nix allows that.
<ekleog>
it does
lassulus_ has joined #nixos
<Arahael>
ekleog: And that by installing one package, it shouldn't affect the other, etc.
<ekleog>
but both packages are requesting this file to be installed in /run/current-system/sw/lib
<Arahael>
Hmm, sounds like dwarf fortress there isn't well-behaved, then?
<ekleog>
so you basically need to tell it one is more important than the other by setting a priority (though I don't know how this happened to you so the way of doing it may vary)
<ekleog>
well, one or the two of the packages isn't well-behaved, I would think (without certainty)
<ekleog>
I'm curious, do the two files have the same contents?
<Lisanna>
ok, the multi-user without nix-daemon thing was actually really easy
graphene has quit [Remote host closed the connection]
lassulus has quit [Ping timeout: 268 seconds]
lassulus_ is now known as lassulus
<Arahael>
ekleog: That particular file has the same sha1 hash.
graphene has joined #nixos
<Lisanna>
after doing a regular single-user install, login as the other user that you want to install nix for, and run ". /home/existinguser/.nix-profile/etc/profile.d/nix.sh" and then "/home/existinguser/.nix-profile/bin/nix-env -i nix"
<{^_^}>
[nixpkgs] @ivan opened pull request #51986 → grab-site: init at 2.1.11 → https://git.io/fpF39
<Lisanna>
and of course setup the appropriate stuff that you want in your .bashrc or w/e
<Arahael>
ekleog: How do I set the priority? The trouble is, I don't know what the problematic INSTALLED_PKGNAME is. (I had tried to install it using `nix-env -iA nixos.qt5.full`)
vk3wtf has quit [Ping timeout: 252 seconds]
<Lisanna>
obv this only works in a completely trusted environment
<ekleog>
Arahael: so that may be a qt issue, if the two have the same hash
<ekleog>
good thing is setting a priority can't break anything then
<ekleog>
I'd suggest you open an issue against nixpkgs related to that, hopefully it's possible to do *something* to handle this
<Arahael>
ekleog: Well, it looks like dwarf fortress includes qt itself, so it's unsurprising that they would have the same hash, then?
<ekleog>
it shouldn't include qt, but qtdeclarative shouldn't either imo, so it's potentially a more generic qt packaging issue, idk
* ekleog
doesn't know the name of the executable in dwarf fortress
<Arahael>
That's dwarf-fortress. :)
<ekleog>
infinisil: ^sounds like a bug, as the package appears on nixos.org I guess it's not unfree?
<ekleog>
(for the {^_^} behavior above)
<ekleog>
Arahael: so I rarely use nix-env (much prefer setting all in configuration.nix), but you may want to try nix-env --set-flag priority 6 dwarf-fortress
<Arahael>
ekleog: Curious - why do you match it on the *application* name, and not the name of the package as installed?
<ekleog>
and dwarf-fortress-full if it doesn't work
<ekleog>
Arahael: ,locate is to find the package that provides an executable ; there's https://nixos.org/nixos/packages.html for figuring out the name of the package (and dwarf fortress appears to be `dwarf-fortress`)
<ekleog>
but actually I think I was wrongn above and it's supposed to be `nix-env --set-flag priority 6 dwarf-fortress-full`
<ekleog>
because you didn't install dwarf-fortress but dwarf-fortress-full
* ekleog
finds nix-env confusing
<Arahael>
Worked flawlessly.
<Arahael>
Yeah, so do I. :)
<Arahael>
I mainly use nix-env for 'experiments', eg, I want to check out this qml thing, which is part of qt. But I don't know if I like it, so I don't see the point of updating the whole system for it.
<ekleog>
configuration.nix + nix-shell is enough for me :°
<Arahael>
Plus, I want to try getting to know nix-env anyway as I figure that nix-env is more common outside of nixos.
<ekleog>
if it doesn't I guess you should comment on your issue to state that it's also borken in nix-shell, which would make it one step worse
<Arahael>
Ah, ok.
<ekleog>
hmm that sounds kind of bad… and at this point I don't know enough about qt to be able to help a lot, sorry :/
<Arahael>
That's fine. :)
<ekleog>
maybe trying to install some GUI that can handle qml may help
<ekleog>
idk who does qt development on nixos
<Arahael>
ekleog: That's why I was trying to get the hello world goign! ;)
vk3wtf has joined #nixos
<Arahael>
ekleog: But perhaps, yeah... Onto qtdesigner...
<ekleog>
if you can get it to work, I hope you can write down your experience developing with qt for inclusion in https://nixos.org/nixpkgs/manual/#sec-language-qt ; so that future people will have a nice guide :)
<Arahael>
SOrry, I have to give up. :( Got qtcreator installed (I like nix-shell, though it doesn't use fish...)
<Arahael>
qtcreator has some pretty good wizards, and generated a nice hello world app for me, but it doesn't build. :(
<Arahael>
So I'm done. :(
<Arahael>
qtcreator looks awesome, though, if it worked. :)
graphene has quit [Remote host closed the connection]
graphene has joined #nixos
<ekleog>
:'(
endformationage has quit [Ping timeout: 268 seconds]
<ekleog>
well, if you've got time I guess you could contribute to nixpkgs' handling of qt packaging :)
<ekleog>
that'd be great, given I think ttuegel is kind of overloaded
<ekleog>
but… well, requires time, I guess ^^'
<Arahael>
Yeah. Moving on, I've looked at fltk, which seems OK... Qt, which is over my head at the moment, now trying glade.
<ekleog>
g'luck :)
<Arahael>
`nix-shell -p glade` doesn't work, looks like I have to nix-env -i that.
Mr_Keyser_Soze has quit [Quit: Then he was gone...]
Mr_Keyser_Soze has joined #nixos
<ekleog>
glade is either nix-shell -p haskellPackages.glade or gnome3.glade depending on which one you're looking for
<{^_^}>
[nixpkgs] @matthewbauer pushed commit from @vaibhavsagar to staging « attr: 2.4.47 -> 2.4.48 »: https://git.io/fpFZD
<teto>
In my overlay I wrote ` dce = if (super.pkgs ? dce) then super.pkgs.dce else super.callPackage ./pkgs/dce.nix;` (if "dce" is in my current nixpkgs checkout, do nothing else load it from dce.nix) but it generates an infinite recursion. I fail to see why
<teto>
paulvictor: seems like mbedtls and lib/pclsync/ should have their own derivation and be dependencies of pcloud
<teto>
they should be pretty straightforward to write, you can use the same src across derivations, just specify the correct subfolder with "sourceRoot"
<teto>
the derivations should be straightforward as these are cmake/make projects
<teto>
paulvictor: you have 2 possibilities, either setting a bash function in `setSourceRoot` or set the correct folder in `sourceRoot`. I would do sourceRoot="pCloudCC/lib/pclsync"
<rhalff>
any suggestions for a simple http server available as nixos package? just to quickly server some files from the command line.
<tilpner>
rhalff - python3 -m http.server
<teto>
You can check within a nix-shell the folder structure
<teto>
rhalff: webfsd
<rhalff>
ok cool :-)
<paulvictor>
teto: Gives me this error : source root is pCloudCC/lib/pclsync
<paulvictor>
chmod: cannot access 'pCloudCC/lib/pclsync': No such file or directory
<paulvictor>
This is with `NIX_DEBUG=1`
<teto>
paulvictor: sourceRoot should be the folter to change to after the unpackPhase. so you should do: nix-shell -A pcloud <nixpkgs>, unpackPhase then look for the pclsync folder
<ldlework>
Anyone handy with nodejs stuff? I have a node app that builds with npm install; yarn build; a bunch of static files get output to build/. I wanna make a derivation where the build is in the output. I have read about node2nix and yarn2nix but I don't understand how to build my project, rather than produce an npm package...
mr_noobs has joined #nixos
<paulvictor>
as in sourceRoot = "${src}/pCloudCC/lib/pclsync" ?
<paulvictor>
teto: That's when I encounter chmod: cannot access '/nix/store/lm37wpl8vnd6ljyi2lmayngahw6228ii-src-1.18/pCloudCC/lib/pclsync': No such file or directory
<Lisanna>
anyone on that's familiar with the buildBazelPackage stuff? for some reason the -deps derivation can't reach the internet... but the machine I'm building it on definitely can
<teto>
paulvictor: sourceRoot="source/pCloudCC/lib/pclsync" works here
<teto>
paulvictor: run the unpackPhase from the nix-shell with your derivation and you will see the folder structure as it is before the builder moves to $sourceRoot
<LnL>
paulvictor: sourceRoot should point to the unpacked sources in the build directory, src is probably a tarball
<Lisanna>
OK, the derivation shows a "r:sha256" as the hashAlgo for the output.... so nix understands that it's fixed-output... but it can't connect to the internet when actually building ):
<{^_^}>
[nixpkgs] @Scriptkiddi opened pull request #52001 → github-changelog-generator: init at v1.14.3 → https://git.io/fpFWM
<paulvictor>
LnL: Is it possible to evaluate a nix expression from a nix file and also have dependencies from -p ?
<paulvictor>
Just saw the documentation from the man pages that I need either of them
<paulvictor>
Thanks.
<Lisanna>
so... what is the solution for requiring proxies to access stuff from inside a fixed-output derivation (not any of the built-in fetchers, which seem to magically avoid this issue)
<LnL>
ah I see what you're trying to do now
Ariakenom has joined #nixos
<LnL>
paulvictor: the regular shell will include all the dependencies specified in the expression, adding those there will work
kingemp has quit [Read error: Connection reset by peer]
<Lisanna>
oh ok, figured it out. fetchurl etc. usually sets impureEnvVars, but this particular fixed-output derivation (buildBazelPackage deps) doesn't, which is a bug
justanotheruser has quit [Ping timeout: 244 seconds]
<ejpcmac>
Hi! I’m having a bad time trying to get JLink tools work on NixOS. I tried to start from this: https://github.com/pjones/nixpkgs-jlink, however I get a relocation error while trying to execute JLinkExe: `JLinkExe: relocation error: JLinkExe: symbol version GLIBC_2.2.5 not defined in file libc.so.6 with link time reference`.
freeman42x[nix] has quit [Ping timeout: 252 seconds]
<ejpcmac>
I’ve searched for `GLIBC_2.2.5` in `/nix/store/jmriq52sidjac25hzrhhiwl4bbvkf9sa-glibc-2.27/lib/libc.so.6` and I get loads of results, so I don’t understand what’s going on.
<WilliamHamilton[>
the file is at `/nix/store/xs3qv3shv0y622rwymsvq8lwkhx2chlw-texlive-combined-2018/share/texmf/web2c`, but is there a quick way to edit and save it?
<{^_^}>
[nixpkgs] @worldofpeace pushed commit from @r-ryantm to master « wireshark: 2.6.4 -> 2.6.5 »: https://git.io/fpFXv
vk3wtf has joined #nixos
hiratara has quit [Ping timeout: 250 seconds]
<ivan>
does execsnoop (in perf-tools) work for anyone? I get no output after the headers
nD5Xjz has quit [Ping timeout: 250 seconds]
<elvishjerricco>
teto: Or stack2nix
<ivan>
WilliamHamilton[: add configuration or change the nix code that generates it
<ivan>
it doesn't take long to reconfigure your system
<ivan>
assuming you don't have to build a bunch of stuff :-)
<ivan>
oh I see it's hairier than I expected
__Sander__ has quit [Ping timeout: 245 seconds]
<WilliamHamilton[>
ivan: in this case I'd have probably to dig in how the entire texlive distribution is configured, add the option and build it again; I'm asking if there is a quicker way, because I may borrow a computer with a different linux distribution to do this
<WilliamHamilton[>
and I would finish sooner :D
<WilliamHamilton[>
s/may/might
<ivan>
did you try that TMPDIR workaround?
<WilliamHamilton[>
yeah, it doesn't really work for me, I think because the latex stuff I'm trying to build directly references /tmp instead of $TMPDIR
nD5Xjz has joined #nixos
<ivan>
you can add another sed -e to pkgs/tools/typesetting/tex/texlive/combine.nix and wait for it to rebuild
<ivan>
if there is a bug here it might be worth filing on nixpkgs
<WilliamHamilton[>
ivan: I see, thanks, I'll try to do that!
<ivan>
mount -o remount,rw /nix/store # if you really want to screw things up
phreedom_ has quit [Ping timeout: 256 seconds]
<WilliamHamilton[>
ivan: thanks, that's what I had in mind; and after I revert the changes, how do I return to the previous mount state?
<WilliamHamilton[>
mount -o remount,r /nix/store
<WilliamHamilton[>
?
drakonis1 has joined #nixos
<ivan>
remount,ro probably
<ivan>
note I have not tested this
<WilliamHamilton[>
yeah, no worries :)
<LnL>
don't tell people to do that
phreedom has joined #nixos
<WilliamHamilton[>
I won't, but tbh that was the "solution" I had in mind, I didn't know how to do it. LnL if I use it only to change a config file for a bit, then revert the change, would I cause a lasting problem?
<LnL>
yes, depending on what you changed nix can't help you recover it and it's very unlikely it's still the same afterwards if you verify the path
ottidmes has joined #nixos
<WilliamHamilton[>
LnL: I see, that makes sense
<LnL>
a bunch of operations won't work on invalid paths, for obvious reasons
agander has joined #nixos
Anton-Latukha has joined #nixos
pie__ has joined #nixos
<LnL>
how is the file referenced?
phreedom has quit [Ping timeout: 256 seconds]
pie___ has quit [Remote host closed the connection]
phreedom has joined #nixos
<ottidmes>
An offtopic question, but I am completely at a loss, I have some Frankenstein PHP+Node.js application (basically a matter of keeping it alive until its going to be replaced), but the problem I am facing is that I get a permission denied error from PHP when writing a file, no matter what I do. I tried everything I and Googling could come up with. The user+group are the same between the file, PHP, Node.js,
<ottidmes>
Nginx, and the permissions are correct (even temporarly tried chmod 777 in desperation), absolute path has been used to write, document root has even been set / to rule that one out, open_basedir has been both empty and I tried setting it to /, any other location seems to work fine, so my guess is that it is the Node.js application that somehow locks the files. Can this be done in Linux? Maybe it is listening
<ottidmes>
for changes within the directory recursively and in doing so locking out the PHP process from writing to it?
<ottidmes>
LnL: yes, hmm, I will try root, just in case
<ivan>
:(
<LnL>
that was a joke, but ok
<ottidmes>
ivan: its not readonly, I can write the same file system in other locations with PHP without issue
<ottidmes>
LnL: am at this point... I will try everything :(
voiceftp has quit [Remote host closed the connection]
<LnL>
I think it might be trying to write to the store somewhere
voiceftp has joined #nixos
<LnL>
if that's the case the error should change from permission denied to readonly filesystem
<ivan>
you need better introspection instead of guessing
voiceftp has quit [Remote host closed the connection]
<LnL>
but yeah, strace file writes
<ivan>
strace the process or insert more debug prints or get better tracebacks
<ottidmes>
ivan: yeah I will strace regardless whether root works
<ottidmes>
if I symlink the files to another location, but have the symlink in the old location I could not write to, it does allow me to write, that is all the useful info I got so far
<ottidmes>
fair enough, it does not let me run as root
<ottidmes>
LnL: so I guess I have to stop the service and run the ExecStart of PHP directly myself with the strace
<LnL>
if it's continuous, strace -f -p $PID
psiconauta has left #nixos ["Cya"]
<ottidmes>
LnL: thanks! that seems to work, just have to ge the PID right, I used the PID reporting the PHP warning, but thats just a systemd thing, it only contains that, a notify, a read of the warning and a sendto of the formatted warning to the log, so I will try others now
Rusty1 has joined #nixos
cyounkins has joined #nixos
<ottidmes>
I need to strace the whole pool, since otherwise I will have to get lucky
mariel__ has quit [Remote host closed the connection]
mariel__ has joined #nixos
<ottidmes>
bunch of lstat("...path...", 0xXXXXXXXXXX) = -1 EACCES (Permission denied), but those paths are outside of the directory where the PHP files are located (although I set the roots everywhere at / and no restrictions), it still refuses to give access, I will try restore the old situation that made PHPFPM fail to find the PHP files and see if I can solve that with strace info, and if that fails I am going to give
<ottidmes>
up and go with my last resort plan, place the PHP next to the Node.js, but because they share certain files, symlink the stuff into the right places :(
<WilliamHamilton[>
in my local checkout of nixpkgs. How would then I install the font, given that I install the fonts globally in my `etc/nixos/configuration.nix`?
<jomik>
WilliamHamilton[: You can use `imports = [ ./myfont.nix ];` in your configuration.nix.
<srhb>
WilliamHamilton[: I'd use an overlay to define the font package
<ottidmes>
WilliamHamilton[: just like normal, by making sure you have a way to reference that newly installed font, i.e. by adding it to pkgs/top-level/all-packages.nix and than adding it to the fonts.fonts list
<srhb>
WilliamHamilton[: Then you can simply refer to pkgs.yourfont as if it were in the upstream nixpkgs repo
<ottidmes>
Jomik: not if that ./myfont.nix contained all he needed :P
<srhb>
WilliamHamilton[: Oh, if you're already using your local checkout, there's nothing to do but what ottidmes mentioned :)
<jomik>
ottidmes: Yaaah, but :P He wanted to edit his local checkout :P
<jomik>
Any of you guys good with higher order separation logic, hoare triples, invariants and ghost states? :D
<jomik>
This assignment is being a pain in the ass D:
<srhb>
Jomik: Try #nixos-chat :)
<jomik>
Ooh, smart.
mr_noobs has joined #nixos
<WilliamHamilton[>
I mean, writing in my local checkout is the only thing that came to mind, but as I'm actually using the unstable channel for my /etc/nixos/configuration, writing an overlay seems a good option also
<Izorkin>
Mic92: really change location nginx.conf to /etc/nginx/nginx.conf?
<asymmetric_>
what happens if i pass a set that contains sets to nix-build? will it evaluate recursively?
<srhb>
WilliamHamilton[: That's basically what I do, especially if I'm just waiting for an upstream PR to land. (self: { super: foo = warnIfFooIsIn super (mypackagedefinition); })
<ottidmes>
WilliamHamilton[: I would always go with the overlay, even if I am making a package intended to go upstream, I will first try it in my overlay and only move it to a seperate checkout when creating a PR, and since it not always backported or takes some time, you still have your overlay which is preferrable in my opinion
<ben>
"10.rebuild-linux: 501+" i guess this means its unlikely a change will make it to nixpkgs-unstable binary caches soon, right?
<jomik>
ottidmes: IIUC overlays are used for overriding stuff? Would he need it if he is just adding a new font?
<srhb>
Jomik: Yep.
<srhb>
Jomik: It's a way to alter "pkgs" generically
<srhb>
Jomik: Adding, removing, overriding. :)
<srhb>
Jomik: Though you could definitely have an imports in nixos config that just defines an overlay. It'll only take effect in the configuration though.
<jomik>
Ooooh, fonts.fonts takes packages, yup, my bad again :D
asymmetric_ is now known as asymmetric
<ottidmes>
I have my overlays defined in my configuration in such a way that I also share them with the rest (nix-env, and such), so its really like I am changed my nixpkgs globally
<srhb>
ottidmes: Oh, right ;)
<WilliamHamilton[>
srhb: when I do a haskell overlay, there is the `super.haskellPackages.extend` function. Is there a similar function for pkgs?
<srhb>
WilliamHamilton[: No, overriding pkgs.foo is much simpler
<ottidmes>
And that is why we are using overlays :) the hardest part is self: super: and that you just learn once, and its pretty obvious, self = reference to the {} you are defining, and super = the old situation which you conceptually do super // self, with
fusion809 has quit [Remote host closed the connection]
<srhb>
WilliamHamilton[: Yes, callPackage will fill in the arguments
<srhb>
ottidmes: I only understood why it's super.callPackage over self.callPackage for 15 minutes the other week, and now I've forgotten that. :P
<srhb>
ottidmes: But at least I can cargo cult it...
<jomik>
Super - because then callPackage has access to the changes made by the overlays that precede the one you are declaring. Yes?
mr_noobs has joined #nixos
<ottidmes>
after the strace, all I get why Nginx cannot connect with PHPFPM if I place the PHP files in the Node.js project, accept4(7, 0x7fff66e113a0, [112], SOCK_NONBLOCK) = -1 EAGAIN (Resource temporarily unavailable), so I am going to just give up (its in my top 2 of bugs I cannot seem to figure out for the life of me) and go with the symlink solution that works, while not having a clue why (very frustrating)
<ottidmes>
Jomik: its basically a onion, you continue building upon the previous layer, so super points to the previous layer
kreisys has joined #nixos
cyounkins has joined #nixos
<jomik>
ottidmes: Then I understood it. An onion. Like a troll then!
hedning has quit [Remote host closed the connection]
<srhb>
Jomik: It does either way.
<srhb>
Jomik: The explanation eludes me right now. :)
<ottidmes>
Jomik: troll?
<jomik>
ottidmes: lol, silly Shrek reference that popped to mind.
jtojnar has joined #nixos
<jomik>
srhb: IIUC self doesn't have access to the changes that the previous overlays made. As ottidmes explained above :P
<srhb>
Jomik: That's not correct.
<jomik>
:o
<srhb>
self is not "just me" -- it's the fixpoint of the overlays, iirc.
hedning has joined #nixos
<jomik>
I was sure that self was before all overlays. Doesn't that make sense as a fixpoint?
<ottidmes>
Jomik: no thats not what I meant, if taken literally I did say so, but its not what I meant, self references to super // { .. the thing you are defining }
<jomik>
OOOOH
<jomik>
Awesome
<jomik>
Thanks :D
<srhb>
And this is why I used to think self.callPackage was correct.
<srhb>
But it's not. For *reasons*. And super.callPackage will Do The Right Thing.
cyounkins has quit [Ping timeout: 250 seconds]
<jomik>
Oh! I haven't heard of this argument thing before. *reasons*. Think I can apply it in my assignment? :P
<__monty__>
Still not clear why it's not, unless you override callPackage in the current self that is.
<srhb>
Jomik: Yep. Just don't quote me :P
<typetetris>
No, because *reasons* :)
<srhb>
If you search #nixos-dev history you will find the real explanation :P
<ottidmes>
srhb: I guess the reason is you can get inf-rec because of how you are defining your thing with the final result of which your thing is part of, which often goes OK, but can go wrong I guess, better to use super
<srhb>
ottidmes: I tend to close my eyes, rock back and forward for five minutes, burn some incense and move on with my life.
<ottidmes>
srhb: lol, might be the best approach...
<fusion809>
Hi folks, I have GNOME3 and KDE enabled in /etc/nixos/configuration.nix and it appears that due to that I'm getting the error: https://pastebin.com/n2LpXUFL. Besides the obvious answer of removing one of my desktop lines (the ones enabling gnome3 and kde, that is) in /etc/nixos/configuration.nix, is there a way to fix this error?
<srhb>
fusion809: You'll have to at least disable one of those display managers, probably using thatManager = lib.mkForce false;
<ekleog>
ugh someone else having issues receiving mail from discourse? just noticed that I've not received any mail from it for the last 14 days ._.
<fusion809>
srhb: I don't have gdm enabled in my /etc/nixos/configuration.nix file. I'm only getting this error now when I'm doing a fresh reinstall of NixOS. My past install, with this exact same config, ran fine (nixos-rebuild switch --upgrade ran fine with it).
<fusion809>
I have SDDM enabled in there. Guessing it's something GNOME enables by default.
<ekleog>
ML mode still enabled and email address still correct, somehow it looks like discourse sent me a pm telling me they had difficulties joining my server
drakonis_ has joined #nixos
agander has quit [Ping timeout: 250 seconds]
<etu>
fusion809: Gnome is quite dependant on gdm sometimes :/
<ekleog>
I guess they were fooled by the fact that my mail server about 14 days ago was offline and sent warnings telling that the mail had been delayed for >4hrs, but it shouldn't permanently deactivate the mail address if that's it ._.
<srhb>
fusion809: One of gnome/kde is enabling it for you
<ottidmes>
srhb: I think my understanding of self/super is correct, its just that callPackage use of it makes it more confusing, so without going to look into callPackage in depth, I will stick with my intuition and just go with cargo culting for super.callPackage :P
<srhb>
ottidmes: Yes, exactly what I do. I understand self/super EXCEPT for callPackage :P
fendor has joined #nixos
<srhb>
(And any other function that does the same weird thing...)
<fusion809>
srhb: yep your approach of disabling one (I chose GDM, I favour SDDM) has worked, thanks.
drakonis has quit [Ping timeout: 252 seconds]
<ottidmes>
srhb: but I believe they are not liking callPackage anyway, because its considered a hack, so hopefully it just goes away at some point soon and we never will have to understand the details ;)
<srhb>
WilliamHamilton[: There's no reference to merriweather.nix is there?
<srhb>
WilliamHamilton[: Like, in nixpkgs.overlays
<WilliamHamilton[>
wait, I was under the impression that the overlays got picked by themselves if put in ~/.config/nixpkgs/overlays, but maybe this is not the case for the global nix config
<{^_^}>
[nixpkgs] @worldofpeace pushed commit from @r-ryantm to master « qgnomeplatform: 0.4 -> 0.5 »: https://git.io/fpFd9
<ottidmes>
Jomik: I finally found it, just to make sure I was not just saying things: "Rather it just assumes that builders exists in the lexical scope, thus preventing the need for ugly hacks like callPackage.": https://gist.github.com/edolstra/29ce9d8ea399b703a7023073b0dbc00d
<srhb>
elvishjerricco: ottidmes. I forget the link. :)
<{^_^}>
#51894 (by ottidmes, 2 days ago, open): configure the evaluation of modules in a modular way
<ottidmes>
Jomik: I will make it public soon, I am in the progress of a big cleanup, I will make a snapshot of it and publish that once I am done
<srhb>
ottidmes: Thanks :)
<jomik>
That include does look pretty neat then. Tho, I feel that it is a bit weird to assume that you have things in your scope based on where you are used.. It looks sort of like a cpp macro then :P
iyzsong has quit [Ping timeout: 252 seconds]
cyounkins has quit [Remote host closed the connection]
<ottidmes>
Jomik: to what include were you referring? I mean the gist I linked talks about scoping and was what you asked about, but my PR also has that the configureModules attribute is like in a different scope
<jomik>
Oh, sorry. The gist you linked :P I didn't see the PR.
<fusion809>
Might I suggest adding to the Firefox included in the graphical install live image, a bookmark to kiwiirc.com, or some other web client for IRC, so that if users need help with the install they can more easily access this channel. After all, the live graphical installer ISO doesn't include any standalone IRC client.
<fusion809>
Or is this something I should mention at NixOS/nixpkgs?
<srhb>
fusion809: Please do!
<srhb>
fusion809: It's a good idea :)
<srhb>
fusion809: I think freenode actually has their own web interfacre
<srhb>
fusion809: That might be the most optimal link to give.
<jomik>
I am using this, lul
<jomik>
Too lazy to decide on a irc client :D
silver has joined #nixos
<srhb>
fusion809: Ugh, but it's less useful since we don't allow unregistered users here currently.
<ottidmes>
Jomik: but yes, a useful macro though, hence it is still used everywhere, but that does not mean it would not be better of with a different approach, time will tell what they will come up with
<fusion809>
srhb: Fair point. Do yas have an -unregistered channel? Like for Fedora there is #fedora-unregistered for unregistered users that try and fail to enter #fedora
justanotheruser has quit [Ping timeout: 250 seconds]
<ottidmes>
Jomik: I used it for too long myself, the webchat URL, but now use weechat and can really recommend it
<srhb>
fusion809: Yep. #nixos-unregistered
<fusion809>
Well, that is still better than nothing.
<{^_^}>
[nixpkgs] @Ericson2314 pushed 3 commits to staging: https://git.io/fpFbD
<jonaswouters>
I want to setup znc with weechat someday, but need to have an nixos configuration and vm set up for that first :D so for now it's irccloud for me.
IRCsum has quit [Ping timeout: 250 seconds]
IRCsum has joined #nixos
<ottidmes>
jonaswouters: I am planning to as well, and am going to setup ZNC this weekend
<ottidmes>
Jomik: basically it lets the server act as your client, and you connect to your server instead, so the server can keep you connections alive and give you backlogs and such
<jomik>
Ahhh, so I'd need a server for it? That's pretty smart tho.
<qyliss^work>
I never found ZNC to be too mad on NixOS
<qyliss^work>
Including with ACME, etc
<qyliss^work>
I can post a configuration, one sec...
<ottidmes>
kyren: I am using ACME in a bunch of places, so that should not be a problem for me, and I heard there is very good NixOS module for it, so hopefully it will be easy enough
<{^_^}>
[nixpkgs] @volth opened pull request #52062 → perl526: drop → https://git.io/fpFNK
<kyren>
maybe I did it stupidly, it's a bit tricky when ZNC needs the cert, here I'll show you and maybe you can tell me how my setup is dumb and it's easier than I thought?
<ottidmes>
kyren: thanks, that should help make things easier to setup for me!
<kyren>
what I meant was the part where nginx has to serve the challenge directory but znc has to read the certs, and if you swap user and group in security.acme.certs I believe you get intermittent permission errors in acme jobs because... ugh I can't remember the details
<kyren>
I might be forgetting the details, it's been a bit since I set it up
<kyren>
but it's possible it's vastly easier than I thought and there's some simpler way
<kyren>
but like I said it's only *slightly* tricky
<ottidmes>
kyren: yeah I am familiar with the issues that can arrise, had some of them recently so it should be easy enough to fix for me now
<kyren>
oh yeah, since you said you use ACME in a bunch of places yeah you probably understand it better than I do, I ran into these issues with ZNC first
<srhb>
kyren: Wow, I never considered using ACME for that. Now I feel stupid :)
<srhb>
Because "why not"
<lo_mlatu>
So the references of a derivation is actually computed during the expression evaluation and stored in the db?
<{^_^}>
[nixpkgs] @tilpner opened pull request #52063 → [WIP] pythonPackages.pymdown-extensions: init at 6.0 → https://git.io/fpFA0
<srhb>
lo_mlatu: It's not stored in the db at that point.
<qyliss^work>
I use Nginx to do the SSL termination, and proxy that to ZNC, because I don't trust ZNC with my SSL certs
<srhb>
lo_mlatu: It's stored once the path is registered.
<lo_mlatu>
but it's computed during the expression evaluation?
IRCsum has quit [Ping timeout: 250 seconds]
<srhb>
lo_mlatu: Yes.
<srhb>
qyliss^work: Makes sense!
<ottidmes>
qyliss^work: thanks! I tend to do that as well, why spread the trust when you are already trusting Nginx with it, and I trust Nginx the most with being to handle it
<qyliss^work>
exactly
<srhb>
qyliss: Do you get notifications here as well? Caret is so uncomfortable here :P
<WilliamHamilton[>
srhb: right, I forget that things are passed around as nix expressions. What is the right way to obtain the hash? What's wrong with `nix-prefetch-url --type sha256 https://github.com/EbenSorkin/Merriweather/archive/v2.001.zip`?
<qyliss^work>
,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.
drakonis_ has quit [Ping timeout: 246 seconds]
<manveru>
just waiting for something to have that hash :)
<qyliss^work>
just waiting for the heat death of the universe
<srhb>
WilliamHamilton[: Yeah, always use tofu. Usually the gotcha with prefetch is --unpack.
<srhb>
WilliamHamilton[: But there's other gotchas, so it's just usually a bad idea to use it.
<WilliamHamilton[>
qyliss^work: srhb I see, thanks, tofu worked
<{^_^}>
[nixpkgs] @jtojnar opened pull request #52068 → libglib2: drop 0.26 → https://git.io/fpFhz
<bbarker>
is it possible to provide default values that are packages in a nix derivation? for instance, MPI: mpi has multiple implementations that are all (more or less) compatible for basic use. I'd like to give the default as the 'openmpi' package. Or do I have to add more conditionals to switch based on a string value?
<jomik>
You can set a package as default value, why not? :P
<ldlework>
I'm trying to find pymacs in nixpkgs but not finding it
<fusion809>
Hi, I couldn't boot my NixOS system after I had just installed it. It was looking for a device that doesn't exist, a device that doesn't even appear in /etc/nixos/hardware-configuration.nix. I think the device it was trying to boot was my old NixOS root partition (I deleted another partition that came before it, along with itself, and created a new partition with the newly freed space, then formatted it as ext4, that's where
<fusion809>
the new install is).
ma27 has joined #nixos
<bbarker>
qyliss ah right, i think i see what you mean. I guess if I could require every package is namespaced with 'pkgs.' it wouldn't be an issue
<fusion809>
I think /boot/EFI/NixOS-boot belonged to my old NixOS install, so I deleted it and re-ran nixos-install from the live session of NixOS, in the hope it'd regenerate /boot/EFI/NixOS-boot, but it didn't.
<fusion809>
What do I do?
<Synthetica>
fusion809: I think I ran into similar troubles when installing NixOS, turns out you can't install over a partially installed system
<THFKA4>
you could try using a live usb and chroot'ing into your "installed" nixos maybe?
<Synthetica>
So I rm -rf *'d the mount point for / and tried again, that time it worked
<fusion809>
THFKA4: what would I do from the chroot? I know nix cannot run in a chroot anymore, as I've tried it. Guessing you'
<fusion809>
re proposing running grub-install from the chroot?
<THFKA4>
either that or nixos-rebuild after mounting all the right partitions
<fusion809>
Synthetica: I suspected that might be necessary, but it took ~1-2 hours to install, so if I can find a faster method I shall.
<THFKA4>
i'm just throwing things out there, i was not aware that nixos doesn't like chroot
EarlDeLaWarr has joined #nixos
ma27 has quit [Client Quit]
<Synthetica>
fusion809: You might be able to back up your /nix folder and copy that back? Not sure if that works
fusion809 has quit [Remote host closed the connection]
<Synthetica>
or nix-copy-closure to file, of course
<THFKA4>
he's gone
<Synthetica>
:(
ma27 has joined #nixos
agander has joined #nixos
detran has quit [Quit: ERC (IRC client for Emacs 26.1)]
detran has joined #nixos
migy has quit [Quit: migy]
<{^_^}>
[nixpkgs] @kisonecat opened pull request #52075 → hashcash: init at 1.22 → https://git.io/fpbfB
<ldlework>
Any chance anyone uses pymacs on nixos?
<{^_^}>
[nixpkgs] @peti pushed 2 commits to haskell-updates: https://git.io/fpbUR
fusion809 has joined #nixos
<fusion809>
Well, I decided to do the more prudent, but tedious, thing and do a completely fresh NixOS reinstall, in my attempts to overcome the previously mentioned GRUB issue.
<{^_^}>
[nixpkgs] @peti pushed to haskell-updates « haskell-hoogle: override haskell-src-exts to the latest version (as required) »: https://git.io/fpbUa
<djahandarie>
Hey folks, I have two output derivations which are directories and I want to combine their results. Obviously it'd be easy to write a stdenv.mkDerivation which has a script which does this, but I was wondering if there's a helper already available for this.
<{^_^}>
[systemd] @andir closed pull request #25 → include NixOS current system bin & sbin paths in DEFAULT_PATH* → https://git.io/fxxTJ
<djahandarie>
(In my case there are no conflicts, FWIW)
<clefru>
wasn't it pkgs.buildEnv?
Mr_Keyser_Soze has joined #nixos
<djahandarie>
I think that might be close, but I need all the items to be in a single folder, not in two seperate subdirectories
<djahandarie>
Not exactly sure how buildEnv works, I haven't used it
<clefru>
That's what buildEnv does to my understanding.
<{^_^}>
[nixpkgs] @dotlambda pushed commit from @r-ryantm to master « python37Packages.timeout-decorator: 0.4.0 -> 0.4.1 (#52085) »: https://git.io/fpbmK
<gchristensen>
nDuff: not sure what you're looking for?
<nDuff>
gchristensen, ...just as I can have an attrset that contains __toString = self: "String that represents ${self.name}", I'd like to be able to have __toJson = self: { key = "object that can be safely serialized to JSON"; } -- f/e, removing things like functions that can't be serialized.
alex`` has joined #nixos
<gchristensen>
huh... what is this __toString behavior you're using? I'm not familiar.
ZoomZoomZoom has quit [Quit: Leaving]
<nDuff>
see the builtins.toString definition in the manual-- if a set contains { __toString = self: ...; }, that function gets called when trying to coerce the set to a string.
<gchristensen>
interesting
<{^_^}>
[nixpkgs] @Mic92 merged pull request #52070 → unit: remove perl526, which is EOL → https://git.io/fpFjM
<nDuff>
I suppose I can get the behavior I want by making the attrset I was working with a derivation, since toJSON has special handling for them, but it's a bit silly to be cluttering up the store as a workaround for a missing language feature.
Synthetica has quit [Quit: Connection closed for inactivity]
<fusion809>
Hi, my reinstall is not going the greatest, largely because nixos-install seems to have stalled (for the past 20 mins roughly) at the GRUB install stage with the error, repeated over two lines: "mktemp: failed to create directory via template '/tmp/os-prober.XXXXXX': No such file or directory". I think (it was a while ago) I may have received this
<fusion809>
error in the past without any problems, but it's been 20 mins since I first saw this error and there's no new output (i.e. the nixos-install command isn't producing any new output after that error)
sir_guy_carleton has joined #nixos
freeman42x[nix] has joined #nixos
graphene has quit [Remote host closed the connection]
graphene has joined #nixos
<{^_^}>
[nixpkgs] @peti pushed 18 commits to haskell-updates: https://git.io/fpbs8
johnw has joined #nixos
<{^_^}>
[nixpkgs] @peti pushed 12 commits to haskell-updates: https://git.io/fpbs2
<gchristensen>
evidently that code path is not covered by the examples (tests)
<gchristensen>
so sorry djahandarie, I'll send a patch in soon!
chimay has joined #nixos
<djahandarie>
Haha, no worries. I actually fixed that one locally, but am running into other stuff, which is why I dropped by to see if I was doing something wrong...
<eyJhb>
How would I go about, having a package that only contains a github repository? Not running the makefile etc.?
<eyJhb>
Because default gitfetch will run the makefile I guess..
<srhb>
eyJhb: It won't. Just fetch the thing. :)
keith_analog has joined #nixos
<eyJhb>
srhb: I might be running it in stdenv.mkDerivation.. So... That is the reason
<eyJhb>
How would I go about just having a plain env?
<gchristensen>
so you have mything = stdenv.mkDerivation { src = fetchgit{ ... , right eyJhb?
<sphalerite>
eyJhb: define your own buildPhase and installPhase or set phases to prevent the phases from running
<srhb>
eyJhb: fetchThing ...
<srhb>
eyJhb: Just that :)
<eyJhb>
srhb: outside derivation I will get a error
<eyJhb>
gchristensen: yeah close! Just not the mthing = ... but just `stdenv.mkDerivation = { ... };`
<keith_analog>
Hi All, I'm trying to extract the package identifier (i.e., <hash>-foo from /nix/store/<hash>-foo). However, the call (baseNameOf "$out") just returns /nix/store/<hash>-foo. Can anyone tell me how to get just <hash>-foo? Thanks!
<gchristensen>
eyJhb: so just delete everything but fetchgit { ...}
<gchristensen>
if you paste code, we can help more directly
<eyJhb>
So.. Removing the stdenv just yields in `error: syntax error, unexpected '=', expecting $end, at /home/eyjhb/.nixpkgs/pkgs/development/arduino/arduino-mk/default.nix:8:8`
<{^_^}>
[nixpkgs] @veprbl pushed commit from @JakeLogemann to master « maintainers: add jakelogemann (#52095) »: https://git.io/fpb4n
<eyJhb>
gchristensen: basically it is just a git repo, and nothing more => just want to clone it, and nothing more. But still want it to be available with a description as a `package` :)
<eyJhb>
hyper_ch: so just overritw everything would solve this?
goibhniu has quit [Ping timeout: 250 seconds]
<hyper_ch>
eyJhb: just the phases you don't need or don't want to run. I've had this problem a few day ago when I wanted to package a single perl script.... fetch source always wanted to unpack it als... so I had to unpackPhase = "-";
<hyper_ch>
the - is a bash keyword and by this you just overwrite the phase
agander has quit [Ping timeout: 250 seconds]
<eyJhb>
hyper_ch: it basically needs to run NONE of the phases :p
<hyper_ch>
there's also the other way of specifying which phases to run
<hyper_ch>
that might in your case be more suitable
<eyJhb>
What is that command?
<sphalerite>
hyper_ch: do you mean : instead of - ?
Mr_Keyser_Soze has joined #nixos
<keith_analog>
Or, even better, is there a way I can get the name of the target folder of my nix derivation from a .nix script?
<{^_^}>
[nixos-org-configurations] @zimbatm pushed to master « docs: add the resource inventory (#45) »: https://git.io/fpb4b
doyougnu has quit [Ping timeout: 268 seconds]
elgoosy has joined #nixos
<keith_analog>
gchristensen: i have a nix build package that needs to put the results of autotuning in a known location. so, by my convention, the path is /var/tmp/<hash>-foo, where <hash>-foo is the path of my package in the nix store
<hyper_ch>
there's only rice and coconut milk here as far as I've figured out :)
<eyJhb>
Are you on Hawaii or something?
rawreraw has quit [Quit: WeeChat 2.3]
<hyper_ch>
philippines
<gchristensen>
keith_analog: you could calculate it at run time?
<eyJhb>
hyper_ch: so close, yet so very very far
<hyper_ch>
never been to Hawaii but it's probably the same... except much cheaper
<keith_analog>
gchristensen: yes, it must be calculated as the result of running binaries compiled by the nix derivation
sigmundv_ has joined #nixos
<eyJhb>
How can I fix `failed to produce output path '/nix/store/fd3pblypp1p59qp8rxfaps4jy03czpz0-arduino-mk-1.6.0'` -> http://termbin.com/rucx
<gchristensen>
something needs to create $out, so like your installPhase might be "cp -r $src $out"
doyougnu has joined #nixos
[Leary] has joined #nixos
<keith_analog>
gchristensen: oops, i may have been unclear. i have a package called sptl, and its nix build script builds a c++ header library along with an autotuner application. the header library looks opportunistically when it runs for a folder containing the results of the autotuner. my convention is for the autotuner to be run manually, using the result of the nix build. the convention i want to use is: i want the autotuning results to go in
<keith_analog>
/var/tmp/<hash of sptl>-sptl, but i'm having trouble finding a way to get "<hash of sptl>-sptl" in my default.nix script
Lears has quit [Read error: No route to host]
Synthetica has joined #nixos
<keith_analog>
gchristensen: i tried (baseNameOf "$out"), but that just returns "$out"
<jomik>
keith_analog, You could probably split $out ?
<jomik>
Or remove the prefix of `$out`
<jomik>
Since that is "always" /nix/store/
doyougnu has quit [Client Quit]
<eyJhb>
Is maintainers required for `meta` in stdenv.mkDerivation?
nDuff has joined #nixos
sbdchd has joined #nixos
<keith_analog>
Jomik: yea, i suppose there are alternative ways of stripping off the "/nix/store". however, it'd be great if i could simply use baseNameOf, and similarly it's worrying that baseNameOf behaves unexpectedly
<LnL>
eyJhb: not strictly, but why leave it empty?
<gchristensen>
keith_analog: can you paste some examplecode?
<eyJhb>
Becuase I am in doubt, if the maintainer is the owner of the code, or the one who creates the file for nix
<eyJhb>
And either way, there is no stdenv.lib.maintainers.<name>
<LnL>
the expression
<{^_^}>
[nixpkgs] @zimbatm merged pull request #50992 → git: wrap git-credential-netrc to set PERL5LIB → https://git.io/fp0Pf
<{^_^}>
[nixpkgs] @zimbatm pushed commit from @cyounkins to staging « git: wrap git-credential-netrc to set PERL5LIB (#50992) »: https://git.io/fpbRI
<eyJhb>
LnL: the expression? Currently just commented out ` # maintainers = [ stdenv.lib.maintainers.grahamc ];`
<gchristensen>
:o
<eyJhb>
And it is copy pasted from another package, so not useful :p
<LnL>
and there's are requirements to be a maintainer, it's just useful information in case somebody is looking for help
<eyJhb>
Haha :D
<eyJhb>
gchristensen: do you want another package, huh, huh? ;) :p
graphene has quit [Remote host closed the connection]
<nDuff>
Huh. I've got a value for which (builtins.toString x) returns immediately, but (builtins.toJSON x) chews CPU for a bit and then segfaults, and so does builtins.trace x (builtins.toString x)
<eyJhb>
LnL: yeah, but seeing as the owner of the code does not use nix, and I do not think I fulfill the requirements.. Then I guess it needs to be empty :%
<LnL>
my point is put yourself there
<LnL>
:D
graphene has joined #nixos
<eyJhb>
`maintainers = [ grahamc ]; # under duress!` :p
<fresheyeball>
how do xorg.conf things get generated in nixos?
<{^_^}>
[nixpkgs] @djahandarie opened pull request #52109 → dockerTools.buildImage: fix two bugs introduced in c88337c9aca9d91804da7d1d05960c88e17455c9 → https://git.io/fpbRB
<djahandarie>
gchristensen, ^
<eyJhb>
LnL: so basiclly add myself to the maintainers list, and then make a PR for the full package?
<eyJhb>
Holy hell, check maintainers takes forever to run
sigmundv_ has quit [Ping timeout: 250 seconds]
<gchristensen>
check maintainers?
<eyJhb>
` See `../maintainers/scripts/check-maintainer-github-handles.sh``
<eyJhb>
But I guess... I will just add my name in the correct order
ng0_ is now known as ng0
<gchristensen>
ah
asymmetric_ has joined #nixos
<eyJhb>
I will leave maintainers blank for now, I am not commited to this Nix relationship yet! But soon!
<hyper_ch>
eyJhb: hehehe
<gchristensen>
you'll be hooked before you know it.
<gchristensen>
you're hooked now, you just haven't realized it yet
asymmetric has quit [Ping timeout: 250 seconds]
<jomik>
keith_analog, if you wanted a nix expression to get the <hash>-<pkg name>, couldn't you do `removeSuffix "/" (removePrefix "/nix/store/" out)` ? (You could just do a substring and hardcode the length of "/nix/store/" :D )
<{^_^}>
[nixpkgs] @eyJhb opened pull request #52112 → arduino-mk: init at 1.6.0 → https://git.io/fpbEB
<eyJhb>
So, this is fine? ^^^
<jomik>
keith_analog: actually, you should probably use builtins.storeDir instead of the hardcoded path. :)
<gchristensen>
eyJhb: it'll be fine with you as a maintainer :)
<LnL>
aliases are usually only added when stuff is renamed
<gchristensen>
eyJhb: if you add it and nobody maintains it, you are committing us to the relationship with software nobody else has wanted to maintain :)
<gchristensen>
looking through the list, we do have some people listed under nicknames.
<LnL>
that's fine, some people do that
<gchristensen>
however: we strongly prefer an actual name when possible, in particular before giving commit access
<eyJhb>
Well.. I just by principle, prefer not to spread my information that much about :p That is basically it
<eyJhb>
But I understand completely :)
<keith_analog>
i'm trying to use removePrefix in strings.nix, but not sure how to reference the function. i get "undefined variable" if i try plain removePrefix and builtins.removePrefix
<keith_analog>
anyone know how to reference removePrefix?
<djahandarie>
gchristensen, I'm confused, i'm definitely not doing anything more complicated than layered-on-top in there...
<gchristensen>
djahandarie: can you paste your expression?
<gchristensen>
keith_analog: can you paste code?
<jomik>
keith_analog, it should be in `lib`
<keith_analog>
let pkgName = lib.removePrefix builtins.storeDir "$out";
<jomik>
let pkgName = lib.removePrefix builtins.storeDir ou" in ...
<gchristensen>
no, there is no out variable.
<djahandarie>
gchristensen, huh, I don't see how that would affect things, but if you do I leave this it you :P
<jomik>
Oh, that is my bad then
<gchristensen>
keith_analog: and how do you want to change this?or you want to refer to it from a different package?
<jomik>
I guess mkDerivation doesn't get access to its own out path then gchristensen ?
<gchristensen>
it doesn't
<gchristensen>
because the out path is a function of the inputs to mkDerivation
<jomik>
He wants the <hash>-pkgname in his nix expression.
<jomik>
Yeah, I realize that now :D
Mr_Keyser_Soze has quit [Ping timeout: 272 seconds]
<keith_analog>
gchristensen: so, the current code does the job, but it's ugly in the sense that i'm copying /var/tmp/$pkgid multiple times. i could probably live with what's there. but it'd be better if i can find a solution that binds this path once in the script
<gchristensen>
where exactlydo you want a reference? like, why isn't the basename $out sufficient?
Dedalo has quit [Quit: My MacBook has gone to sleep. ZZZzzz…]
<keith_analog>
gchristensen: i guess i can also just forget trying to strip the /nix/store/ from the path. But then I'd get a less readable path in /var/tmp. It'd be like /var/tmp/nix/store/<hash>-foo instead of /var/tmp/<hash>-foo
<gchristensen>
I'm still not clear on why basename is a deal breaker here :/
Dedalo has joined #nixos
<gchristensen>
you only need to do it in this one installPhase
<keith_analog>
gchristensen: the only issue is that there are multiple sites in my installPhase where there's a reference to /var/tmp/<hash>-foo and I'm using copies of the full path in each site
<gchristensen>
just set a variable in the insntallPhase? thetmppath=/var/tmp/$(basename "$out") and then refer to $thetmppath
<keith_analog>
gchristensen: interestingly, i can let-bind "$out" in installPhase and use it in the body, getting the correct path (not literally "$out").
<keith_analog>
gchristensen: yea, setting a variable inside the installPhase does the job too
<keith_analog>
gchristensen: apologies if i seem to be splitting hairs here. i should give more context: i'm trying to chart out general methods for making research artifacts more readily repeatable
<keith_analog>
gchristensen: nix is proving to be a powerful tool for making some of the benchmarking suites easy to repeat across systems and easy to customize
<gchristensen>
awesome! this is a hugely major reason I am In To Nix
<keith_analog>
gchristensen: cool :) thanks to all for the help, btw.
<fresheyeball>
hey does services.xserver.config extend xorg.conf? or replace it outright?
<eyJhb>
Is it fine with /etc/nixos/configuration.nix to be owned by a user?
<ottidmes>
eyJhb: yes
<fresheyeball>
ottidmes: so I think I may have this wacom thing figured out
<fresheyeball>
/etc/X11/xorg.conf.d/70-wacom.conf
<fresheyeball>
is not complete
<ottidmes>
eyJhb: my config is owned by my regular user, I just point it at a different location, but the same potential permission issues would apply, so yes, thats no problem
<ottidmes>
fresheyeball: so you probably want to mkForce the source in your own config with a modified copy of that file that contains the tweaks you want?
palo1 is now known as palo
<fresheyeball>
ottidmes: can't I make my addition a seperate file?
<ottidmes>
fresheyeball: I dont know the details, if its standalone and not some modification, then probably
<eyJhb>
ottidmes: thanks! Finally *.nix in my dotfiles
<ottidmes>
eyJhb: ghehe, in my case its more of, my dotfiles in my NixOS config project ;)
<eyJhb>
gchristensen: sorry, did the alphabet song wrong
<ottidmes>
fresheyeball: even if you have to overwrite maybe use the numbering differently, I cannot remember whether it was the higher the number the higher the prio or lower number, or if it does not need replacement you can probably just assign it to xserver.config
<gchristensen>
eyJhb: you should have heard me here, singing it out loud.
<eyJhb>
gchristensen: but shouldn't it be after expipiplus1 ?
<eyJhb>
Yeah... I will never learn it WITHOUT singing it.. Never.. In my life haha
<fresheyeball>
ottidmes: how would this look? we are setting source, but I don't see how to append.
<gchristensen>
heh, yep!
<eyJhb>
gchristensen: should be fixed now.. :p
pointfourone has left #nixos ["Leaving"]
<gchristensen>
eyJhb: people are bad computers :)
<gchristensen>
lgtm, gotta wait for ofborg
<eyJhb>
Of course...
<ottidmes>
fresheyeball: ow you want to append it in that particular file, thats easy enough to, just mkForce the source and set it to: ''${lib.fileContents "${pkgs.xf86_input_wacom}/share/X11/xorg.conf.d/70-wacom.conf"}\n...your stuf...'' or something like that
<eyJhb>
What is your role in NixOS gchristensen ? Because it is your bot, right?