werner291 has quit [Remote host closed the connection]
chiefgoat has joined #nixos
<evanjs>
so I have a nix function that checks against a list of channels for a given package, and gets the newest one. Does anybody have an example of that but for hydra?
<evanjs>
e.g. just get me the last version of X that was build/evaluated on hydra
<infinisil>
Can't do that in nix directly (well, without hacks at least)
<infinisil>
The hydra API should be useful for this
erictapen has quit [Ping timeout: 265 seconds]
<infinisil>
But I don't know of an example of something like this
<yhager>
I'm very new to nix, so please bear with me. I'm trying to build my project with cmake, which requires downloading and building packages from the internet (e.g. openssl). The build starts fine, but then cmake fails downloading files because it cannot resolve hosts like openssl.org and github.com. I have no problem resolving them outside of nix-build, or in nix-shell, and I'm not sure what might be the issue.
<pie_[bnc]>
clever: oh :V
<pie_[bnc]>
clever: i was lookign at install-grub,pl but that explains why i couldnt find it
<pie_[bnc]>
clever: too many moving parts :
<pie_[bnc]>
:P
<yhager>
On `nsswich.conf` the hosts line is `hosts: files dns myhostname`
<simpson>
yhager: Instead of building your project by hand, with Nix, you'll write a Nix expression for your project and use nix-build to put it together.
thc202 has quit [Ping timeout: 268 seconds]
<simpson>
Can you show us what you've tried so far?
<yhager>
Yes, that's what I'm doing. I have a nix expression and I'm calling `nix-build`
<infinisil>
yhager: You can't access the network in the nix-build sandbox
<yhager>
Oh!
kvda has joined #nixos
<simpson>
Oh, okay, awesome. In your build, rather than asking cmake to do network stuff, you'll want to put `openssl` and others into your derivation's `buildInputs`.
<pie_[bnc]>
clever: ok so now the thing is that grub2_full has i386-pc modules and my system has as you saw above x86_64-efi, and im not sure why
<pie_[bnc]>
is it the .override that sets efi?
kvda has quit [Client Quit]
<clever>
pie_[bnc]: one sec
<pie_[bnc]>
well i can just test that actually
<yhager>
hmm.. I see. I understand this would be the natural way to do stuff with nix. The problem is I have a system that is already downloading and building everything it needs, and I'm trying to move it to nix. So I would rather if it worked out of the box for now, and with time I can phase out the downloading and building outside of nix. Is there any way to allow network access within `nix-build`?
<clever>
pie_[bnc]: grub.nix is grabbing the overridden version, and putting that into the grubEfi var
<clever>
but if you disable efi support, grubEfi = null
kleisli has joined #nixos
<pie_[bnc]>
clever: yeah i see it now
<qyliss>
/go
<pie_[bnc]>
well, i dont really like this but i dont have any better ideas and im not gonna rewrite it :p
<qyliss>
I really need to do something to stop me doing that
<clever>
pie_[bnc]: i would just add a custom module to the dir by hand, for testing
leotaku has joined #nixos
<simpson>
yhager: Like, how much time? Hopefully it'd be done in a single commit of a few hundred lines. Does your cmake configuration only download packages conditionally, when it can't find them locally? You could go put everything into buildInputs as a first step and then figure out how much of your cmake stuff should be removed.
<evanjs>
infinisil: mmkay figured as much. I could also just build some things off master, and for a majority of them (jetbrains, gitkraken, postman), they're just binary packages anyway, so I guess it probably won't matter in the end?
<pie_[bnc]>
clever: thats kind of what im trying to do
kleisli has quit [Client Quit]
<evanjs>
Like I won't really suffer any serious performance hits/extended rebuild times
kleisli has joined #nixos
<pie_[bnc]>
clever: im trying to figure out how to remove a module and splice it in after the fact
turona has quit [Ping timeout: 272 seconds]
turona_ has joined #nixos
turona_ has quit [Max SendQ exceeded]
turona has joined #nixos
orivej has joined #nixos
<{^_^}>
[nixpkgs] @sternenseemann opened pull request #78397 → uberwriter: add shared-mime-info to environment → https://git.io/JvtwT
leotaku has quit [Ping timeout: 260 seconds]
doyougnu has joined #nixos
KeiraT has quit [Remote host closed the connection]
<yhager>
simpson: no, it builds everything it needs (and links statically). That is what I've been doing so far, but now I want to nix it (for lack of a better word), and was hoping to first build it as usual under nix, as a proof of concept. I guess there's no choice and I need to go and change my cmake files though
alex`` has quit [Ping timeout: 268 seconds]
<pie_[bnc]>
clever: protip: you can look at the contents of partitions with testdisk without mounting them
<clever>
pie_[bnc]: grub testdisk or linxu testdisk?
<pie_[bnc]>
photorec testdisk
<NemesisD>
how good or bad of an idea is it to enable autoUpdate?
<clever>
NemesisD: i tend to avoid it
leotaku has quit [Ping timeout: 268 seconds]
Rusty1 has quit [Remote host closed the connection]
leotaku has joined #nixos
sigmundv__ has quit [Ping timeout: 260 seconds]
judson has quit [Ping timeout: 265 seconds]
Rusty1 has joined #nixos
is_null has quit [Ping timeout: 260 seconds]
is_null has joined #nixos
<{^_^}>
[nixpkgs] @peti pushed to haskell-updates « hackage-packages.nix: automatic Haskell package set update »: https://git.io/JvtrC
<clever>
which can happen based on supportedFilesystems
<pie_[bnc]>
_light just does zfsSupport = false; im already dong that manually
kvda has joined #nixos
iyzsong has joined #nixos
<pie_[bnc]>
clever: 1) i dont have zfs in supportedfilesystems, 2) that should give me a conflict error when i try to set that to false, which I do, and get no error?
<clever>
it may already be false then
<clever>
not sure whats going on
<pie_[bnc]>
right
<pie_[bnc]>
so its not true
<pie_[bnc]>
so why does it have the zfs modules still :D
rogue_koder has quit [Remote host closed the connection]
rogue_koder has joined #nixos
leotaku has joined #nixos
mac10688 has joined #nixos
smatting has quit [Ping timeout: 265 seconds]
<aanderse>
can anyone share with me the best way to deal with bin/prog collisions? package A has bin/prog and so does package B. I want to make sure if both A and B are in my environment.systemPackages that bin/prog from package B always wins out
<NemesisD>
i'm setting up an entry in the `fileSystems` attribute on nixos. i want this mounted volume to be available to all users. should i be doing that declaratively in the `fileSystems` entry somehow or do i just imperatively mount and chown the mount point?
<evanjs>
I guess you can handle that with nix-env --set-flag priority
<noonien>
is it possible to make `nix search` only search one channel by default?
<evanjs>
e.g. nix-env --set-flag priority 5 binutils
h0m1 has quit [Ping timeout: 252 seconds]
<evanjs>
noonien++ I had this same issue and I just removed my other channels from the path for the time being :D
yhager has quit [Quit: leaving]
<{^_^}>
noonien's karma got increased to 2
<noonien>
i don't even have any channels on the user i'm doing `nix search` on
<noonien>
it seems to use root's channels
<evanjs>
but yeah aanderse from what I can tell it looks like priority is the way to go, just not sure how to do that outside of nix-env without overriding
<evanjs>
but from `man nix-env` "If there are multiple derivations matching a name in args that have the same name (e.g., gcc-3.3.6 and gcc-4.1.1), then the derivation with the highest priority is used. A derivation can define a priority by declaring the meta.priority attribute. This attribute should be a number, with a higher value denoting a lower priority. The default priority is 0."
h0m1 has joined #nixos
<evanjs>
noonien: yeah that's expected behavior
<{^_^}>
[nixpkgs] @jabranham opened pull request #78400 → R: Update CRAN and bioconductor packages → https://git.io/JvtoX
<noonien>
this is pretty new, it didn't happen like a month ago
<evanjs>
the search behavior?
<noonien>
yes
<evanjs>
okay maybe that's why I only noticed it lately
<aanderse>
<noonien "yes"> evanjs: thanks. nix-env not desired. priority it is.
<evanjs>
noonien: might be something with nixpkgs.hicolor-icon-theme. If I don't have that installed, for example, taffybar will crash when I open chrome or etc
<{^_^}>
[nixpkgs] @jonringer merged pull request #77962 → vscode-extensions.ms-python.python: 2019.10.44104 update language server to 0.4.127 → https://git.io/JvThm
<{^_^}>
[nixpkgs] @jonringer pushed commit from @tbenst to master « vscode-extensions.ms-python.python: 2019.10.44104 update language server to 0.4.127 »: https://git.io/JvtKa
<pie_[bnc]>
im doing a manual nix-shell build now
<pie_[bnc]>
```With libzfs support: No (explicitly disabled)```
<pie_[bnc]>
from configure
Maxdamantus has joined #nixos
Maxdaman1us has quit [Ping timeout: 265 seconds]
<pie_[bnc]>
clever: yeah it still built them..
<pie_[bnc]>
this is gonna end up being some big misunderstanding on my par
<pie_[bnc]>
like, maybe it builds everything but fails at runtime if its not linked against libzfs or something
<pie_[bnc]>
that seems like it would be bad though
<clever>
pie_[bnc]: what is the filename the last cmd found?
<clever>
pie_[bnc]: and now i'm lost, ive never seen a file like that in make before!
f0i has joined #nixos
<NemesisD>
hey folks. i'm trying to set up an LVM for an external drive enclosure. i named the VG ProBox, got it all mounted and then set up an entry in my configuration.nix. however upon reboot, /dev/ProBox is not there. but `vgs` sees it. should i be using a different device path for the `fileSystems` entry?
<clever>
NemesisD: did you include usb drivers in the initrd?
<clever>
NemesisD: i think those are the main ones
<NemesisD>
clever: i see usb_common, usbcore, btusb, usb_storage, usbhid. i don't know if those are needed or not though
<clever>
NemesisD: theres not much harm in adding too many things, it just makes the initrd file bigger
iqubic has joined #nixos
<iqubic>
So, I use a gui chat program called Discord. When I click on a link in this program, nothing happens. No link is opened, and no ouput is sent on stdout/stderr
<iqubic>
Anyone know how I might fix this?
f0i has quit [Ping timeout: 268 seconds]
<ivan>
iqubic: use strace to investigate what it is trying to execute
<ivan>
there may be a problem with environmental variables being set or not set to whatever is needed to launch your real browser
kvda has quit [Quit: My MacBook has gone to sleep. ZZZzzz…]
<NemesisD>
clever: ok so i commented out the fstab entry because it keeps arresting my startup, but i added those available kernel modules. `vgs` still sees my `ProBox` vg but it isn't in dev
<pie_[bnc]>
theres no tpl tho
felixfoertsch23 has joined #nixos
<clever>
NemesisD: `vgchange -a y`
<clever>
NemesisD: there is also a flag under options to make systemd shut up
<clever>
NemesisD: i think it was nofail?
<NemesisD>
clever: is that a one-time thing i need to run or do i need to put vgchange in a config somewhere?
<clever>
NemesisD: noauto is also of use
<clever>
NemesisD: `vgchange -a y` has to be ran every time you boot, normally the initrd automates it, but ive only really used lvm on the boot disks
felixfoertsch has quit [Ping timeout: 268 seconds]
<iqubic>
ivan: I ran the program once with strace, and URLs just worked.
<NemesisD>
clever: so this device isn't needed for boot, but it'd be nice if it eventually showed up
<iqubic>
And then I ran it without strace, and URLs are still being opened up.
<NemesisD>
clever: i've set filesystem options for nofail and nowaitboot
<clever>
NemesisD: i think setting neededForBoot = true; is your only fix
<clever>
though nofail and some manual vgchange would also work
kvda has joined #nixos
<pie_[bnc]>
clever: YEAH NO IDEA HOW TO FIND WHICH PART OF THIS BUILD SYSTEM BUILDS THE MODULES
<pie_[bnc]>
whoops, heh
<NemesisD>
clever: the latter option sounds attractive. whenever boot halts i have to haul a TV into the room to see what's going on on this otherwise headless machine. where would i put the vgchange though?
<pie_[bnc]>
clever: is usually everything generated from configure.ac?
<clever>
pie_[bnc]: usually
<clever>
NemesisD: id just do it manually at that point
kvda has quit [Client Quit]
Supersonic has quit [Disconnected by services]
Supersonic112 has joined #nixos
Supersonic112 is now known as Supersonic
<NemesisD>
man this is silly
<NemesisD>
i mean i guess i can say this is needed for boot, this is a media server
<pie_[bnc]>
clever: ok and maybe Makefile.am I guess?
<pie_[bnc]>
idk how this stuff works argh
<NemesisD>
clever: it worked! thank you i would have been dead in the water without your help!
<pie_[bnc]>
clever: > gentpl.py
<pie_[bnc]>
clever: > # This is the python script used to generate Makefile.*.am
<pie_[bnc]>
mfw
f0i has joined #nixos
<iqubic>
If you include python as build input, you might be able to add something to the prebuild hook.
sb0 has joined #nixos
<pie_[bnc]>
these guys need some damn developer docs for their build system
<pie_[bnc]>
tooeasy2do: plan B is using virtualenv
<bhipple>
It *is* possible to install pip and setuptools and use them to build python packages in your homedir, but it's much easier to swim
delli3 has quit [Ping timeout: 248 seconds]
<bhipple>
with the nix ecosystem and do something like python.withPackages(p: [p.numpy])
<tooeasy2do>
Ok, so i just found the package i need on nix a nix package will try to see if it works
<pie_[bnc]>
bhipple: oh hey, didn't know you hang out here now. did you make any progress on the setuptools reproducibility thing, or whatever it was we were talking about using rr for at nixcon?
<bhipple>
https://r13y.com/ the setuptools build I was looking at magically turned out to be reproducbile (though the sdist apparently isn't now).
<bhipple>
I recall it was fixed upstream in setuptools itself
<{^_^}>
pypa/setuptools#1690 (by jaraco, 48 weeks ago, merged): Honor declared ordering for Provides-Extra entries in package metadata.
<bhipple>
was merged right around NixCon :)
<tooeasy2do>
Ok, i am back guys, so i installed the package i need but when i import it on python it says there is no module named like the library
<tooeasy2do>
:(
<bhipple>
what package is it?
<tooeasy2do>
libtcod is the name on nix
<tooeasy2do>
and tcod the real name
<bhipple>
tooeasy2do: one that that's confusing at first about python libraries in nix is that you don't just imperatively install libraries, instead you install a "wrapped" python interpreter that can see exactly some list of libraries and nothing else
<tooeasy2do>
wait you got me there what you mean and how i do it?
<bhipple>
libtcod looks like it's C++, not Python
endformationage has quit [Quit: WeeChat 2.6]
<tooeasy2do>
They have a python version
<tooeasy2do>
py -m pip install tcod
<iqubic>
Don't use pip install on nixos. Please don't.
<pie_[bnc]>
clever: so I guess the question is now...what does --enable-libzfs even change in the output
<tooeasy2do>
Sorry i had no idea :(
<bhipple>
ah I see, in Nix we just have the C++ core library packaged, but not the python component. If you're up for a challenge you could look at how apache arrow and pyarrow work to see how we split C/C++ libs and their separately packaged Python FFI modules
<bhipple>
it's a little hard to grasp at first tho, so it might take some experimentation to get it right
<tooeasy2do>
that sounds way more compicated than what i can get rn
<clever>
pie_[bnc]: yeah, thats what i was wondering too, but the makefiles arent easy to read while multi-tasking
<pie_[bnc]>
tooeasy2do: try virtualenv and then look at the rest
<pie_[bnc]>
tooeasy2do: youll still need to enter an environment with the appropriate libraries, if you need any, though
<pie_[bnc]>
well, AFAIK, bhipple seems to have an actual clue about how the python stuff works
<tooeasy2do>
Yep, he SMART also thanks everyone for the help
is_null_ has joined #nixos
TwoNicToupper has quit [Ping timeout: 265 seconds]
<evanjs>
rather than pip, lorri + pipenv is what I’ve been using and seems to work well. It still uses pip in the back but doesn’t get messy or make you manage anything yourself
<clever>
notgne2: that doesnt look right at all
<clever>
infinisil: ^^
<gchristensen>
clever: oops :D
bhipple has quit [Ping timeout: 260 seconds]
mexisme has quit [Ping timeout: 272 seconds]
bhipple has joined #nixos
<infinisil>
notgne2: Oh yeah my mistake, was done in a recent pr
<aiverson>
How do I figure out what to set the sha256 hash that the fetchFromGithub function accepts to so that it can successfully validate them?
<clever>
,tofu aiverson
<{^_^}>
aiverson: 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. See: tofu-vim
is_null_ has quit [Read error: Connection reset by peer]
<nihh>
Hi. Which regex "engine" does nix's builtins.match use? I want to use some of the more advanced capturing groups that you see in e.g. PHP but so far it has been a hit or miss
<nihh>
Looking for a name or something s.t. I can look up the available constructs
chagra has joined #nixos
chagra_ has quit [Ping timeout: 268 seconds]
<nihh>
Nevermind I just found it in nixpkgs :-)
civodul has joined #nixos
dansho has joined #nixos
revtintin has joined #nixos
smatting has joined #nixos
is_null has joined #nixos
<chloekek>
nihh: FYI what PHP uses is called PCRE.
zeta_0 has joined #nixos
<nihh>
chloekek: Thanks. I found the specification for builtins.match; it uses posix ERE
zeta_0 has quit [Client Quit]
zupo has quit [Quit: My MacBook has gone to sleep. ZZZzzz…]
<chagra>
can I pass variables down to my imports in configuration.nix without specifying them each? for example if I specify that nixosConfDir="/etc/nixos", is there a way I can have the other nix expressions I import from configuration.nix respect that?
cosimone has quit [Quit: Terminated!]
chagra has quit [Quit: WeeChat 2.6]
wavirc22 has joined #nixos
fendor has joined #nixos
domogled has quit [Remote host closed the connection]
domogled has joined #nixos
wavirc22 has quit [Read error: Connection reset by peer]
euandreh has joined #nixos
wavirc22 has joined #nixos
fendor has quit [Ping timeout: 272 seconds]
<Rovanion>
How do I install a specific version of a package with nix-env -i?
<{^_^}>
[nixpkgs] @jonringer pushed commit from Farkas, Arnold to master « maintainers: add arnoldfarkas »: https://git.io/JvtD9
fendor has joined #nixos
euandreh has quit [Remote host closed the connection]
<wedens[m]>
Rovanion: nix doesn't really know about versions
chagra has joined #nixos
<wedens[m]>
so, if there are multiple versions in the same nixpkgs revision, they'll just have different attribute names like "ghc864", "ghc865", etc
<chagra>
you can override the version attribute or the src attribute to a previous specific version
<chagra>
if the attribute is not already in nixpkgs
<wedens[m]>
chagra: to answer your question: you probably want to put such values in nixos module
<Rovanion>
I'm new to Nix so I'm not sure I follow. Nix has no understanding of version numbers, but packages are still built from a specific version of the source code. So if I were to modify the package declaration in the nixpkg repo I can change the version that is built into the package `ncdu` for example?
<Shoubit>
Rovanion, if said version isn't in Nixpkgs (because it's older) you can probably import and old revision of Nixpkgs and use the package through that.
<Shoubit>
Rovanion, yup, and in fact often the version number dictates the package downloaded as well so it's often enough to _just_ change the version.
<Rovanion>
But there is no way of, on a multi-user system, user1 having `ncdu-1.12` in their environment and user2 having `ncdu1.14` in their environment? Because that multi-user system will use one and only one version of the nixpkgs repo.
chagra has quit [Ping timeout: 260 seconds]
Chiliparrot has quit [Quit: My iMac has gone to sleep. ZZZzzz…]
<Rovanion>
I'm not sure why that would be desireable in the context of a multi-user system though. One usually wants every user to have the latest version of each package with the relevant security patches applied.
<wedens[m]>
you can define 2 attributes. for example ncdu_1_12 and ncdu_1_14 and use different versions for them
chagra has joined #nixos
<Shoubit>
Rovanion, you can use both for different users -- even for the same user, e.g. per package. Users can have different Nixpkgs channels even
<wedens[m]>
or override ncud attribute for each user
floscr has quit [Ping timeout: 268 seconds]
<Rovanion>
Attribute is a weird word in the context of packaging, to me. Is there a Nix dictionary somewhere I can use?
chagra has quit [Client Quit]
<Rovanion>
I sort of guess that it is equivalent to "package name". But the manual has no definition for it, just examples.
<Rovanion>
Just a quick aside: Do you happen to know why they are called "attributes" and not "names" or "symbols"? But thank both of you for your help!
<Shoubit>
Rovanion, attribute is like a field in a set/map/record/object/dict, e.g. in { version = "1.2"; }, version is an attribute.
<{^_^}>
[nixpkgs] @cust0dian opened pull request #78404 → glances: fix darwin build → https://git.io/JvtyK
<chagra>
Rovanion: you can't call them variables because while that's what they're technically are, they are immutable and they don't vary because it's a functional programming language
<chagra>
so attribute is a decent substitute, it's just semantics really
<chagra>
but I guess variables in the maths sense could workd, it works for haskell
<{^_^}>
[nixpkgs] @0x450x6c opened pull request #78407 → Added a new package: Punch clock program. (time tracker) → https://git.io/Jvt9K
rogue_koder has quit [Ping timeout: 268 seconds]
waleee-cl has joined #nixos
vidbina_ has joined #nixos
<tlater[m]>
MasseR: I've experienced similar things while playing around with `gpg --homedir` - I suspect it has something to do with running gpg-agent as a systemd unit vs manually invoking it
chagra has quit [Ping timeout: 240 seconds]
<{^_^}>
[nixpkgs] @Mic92 merged pull request #78399 → libredirect: fix build on darwin → https://git.io/Jvtr7
<mkaito>
easy solution: use the git cli instead of weird things like gitkraken :P
<evanjs>
>_>
<etu>
magit <3
<qyliss>
evanjs: I know that Shell only gets pinged if you match the case of her nick. So "shell" doesn't ping.
domogled has quit [Read error: Connection reset by peer]
<evanjs>
not too familiar with deb format, but why is tar -xf failing in this case?
domogled has joined #nixos
<evanjs>
qyliss: I figured as much. Probably my mobile client then (Igloo), which just displays "Shell" every time I type shell lol
<evanjs>
like, I enter shell, and it shows Shell _after_ I send the message :P
<pie_[bnc]>
does anyone know how to deal with this rust problem?: error: the lock file /build/modgrubrust/Cargo.lock needs to be updated but --frozen was passed to prevent this
rogue_koder has joined #nixos
<evanjs>
pie_[bnc]: yeah that means the Cargo.toml is not synced with Cargo.lock
<lejonet>
What would be the correct way to override a kernel feature? (I want to use linuxPackages_hardened, but it turns off IA32_EMULATION by default, but just enabling IA32_EMULATION with boot.kernelPatches isn't enough, because for example steam looks at the feature flag of the kernel, which still states IA32_EMULATION = false)
<pie_[bnc]>
evanjs: im trying to build my own thing
<evanjs>
pie_[bnc]: okay, can you run `cargo generate-lockfile` and try again?
<pie_[bnc]>
evanjs: that doesnt even make any sense though? buildcargopackage or whatever makes the lock file?
<pie_[bnc]>
ok
<evanjs>
hrm
<lejonet>
Atm I've made my own kernel derivation, based on the one that is used to create linuxPackages_hardened, but that feels like a hack
<evanjs>
buildRustPackage, but IIRC it still takes that into account
<evanjs>
has to vendor all the dependencies and etc
<NemesisD>
i'm trying to install home-manager via https://nixos.wiki/wiki/Home_Manager via the git method. i add the fetchGit in a let and then added in the imports (import "${home-manager}/nixos"), but it fails to nixos-rebuild with "executing 'git': No such file or directory". i added git to `environment.systemPackages` but i'm wondering if that's not early enough?
<pie_[bnc]>
evanjs: ok thats weird dthe cargo command seemed to work
jgeerds has joined #nixos
<pie_[bnc]>
i dont get it. but ok.
<Shoubit>
NemesisD, fwiw you can also use `fetchTarball` for Github, their URL format is something like: https://github.com/<owner>/<project>/tarball/<branch or commit sha256>
<Shoubit>
(which should be faster than fetchGit, and fetchFromGitHub uses those tarballs for the same reason)
<NemesisD>
Shoubit: yeah i might do that, but the wiki page itself says the git way should be more secure
<Shoubit>
I'm not sure how, since you can provide a `sha256` argument to both and verify the contents of what you download
<evanjs>
if not preset, buildRustPackage will complain because it needs the lockfile, but --frozen prevents it from creating it
Mic92 has quit [Quit: WeeChat 2.6]
<tlater[m]>
I'd like to install https://github.com/Synthetica9/nix-linter in a `shell.nix`. That repository contains a default/shell.nix and recommends using the project with `$(nix-build -A nix-linter)/bin/nix-linter` - is there a way to include that process in a `shell.nix` so that I don't need to actually download and build the repository manually, i.e., can I depend on the `default.nix` in the remote git repository?
<evanjs>
can be annoying how long it takes sometimes though... I try to use buildRustPackage whenever possible, or https://github.com/kolloch/crate2nix when I really have to
Mic92 has joined #nixos
chagra has quit [Ping timeout: 268 seconds]
veske has quit [Quit: This computer has gone to sleep]
Chiliparrot has quit [Quit: My iMac has gone to sleep. ZZZzzz…]
<{^_^}>
[nixpkgs] @bennofs pushed 10 commits to release-19.09: https://git.io/JvtFT
<{^_^}>
[nixpkgs] @bennofs closed pull request #73593 → Fix MySQL Include Path → https://git.io/JeKJA
Makaveli7 has quit [Quit: WeeChat 2.7]
<{^_^}>
[nixpkgs] @B4dM4n opened pull request #78416 → snowman: use Qt mkDerivation → https://git.io/JvtFk
<{^_^}>
[nixpkgs] @B4dM4n opened pull request #78417 → backport snowman: use Qt mkDerivation → https://git.io/JvtFq
jboy has joined #nixos
<Shell>
evanjs: haha, yes, I fixed it in weechat after getting fed up enough :P
<evanjs>
Shell: wait how did you "fix" it? Just disable all mentions? :P
jboy has quit [Client Quit]
<Shell>
evanjs: there's a way to set a mention regex, and it's possible to make it case-sensitive :)
<evanjs>
ohhhh okay. That makes sense then :P
<evanjs>
hrm. what's the difference between using dpkg or ar for deb archives on nixpkgs?
17WAAKK40 is now known as jboy
ddellacosta has joined #nixos
<ar>
i'd expect using ar x + tar to avoid a dep on dpkg to be a reasonable choice
<ar>
(especially if you're not planning to extract dependency information from said .deb)
leotaku has quit [Ping timeout: 268 seconds]
<evanjs>
ar: yeah so that's what I tried, but simply setting the unpack phase to use ar doesn't seem to produce the right output, or rather, $out seems to be empty
<evanjs>
okay, think I got it now. Knowing nothing about deb stuff, I'm assuming the control tarball is what was messing things up?
pingveno has quit []
pingveno has joined #nixos
Chiliparrot has joined #nixos
<{^_^}>
[nixpkgs] @utsl42 opened pull request #78419 → nixos/unifi: use systemd tmpfiles instead of preStart → https://git.io/JvtbZ
MasseGuillaume has joined #nixos
<MasseGuillaume>
Hey, I'm getting `error: file 'nixpkgs/nixos' was not found in the Nix search path (add it using $NIX_PATH or -I)` after I did `sudo nixos-rebuild switch --upgrade`
petrkr has quit [Remote host closed the connection]
civodul has quit [Quit: ERC (IRC client for Emacs 26.3)]
jbetz has joined #nixos
ng0 has quit [Ping timeout: 272 seconds]
<NemesisD>
Shoubit: so i've got fetchtarball working and i've added (import "${home-manager}/nixos") to the imports as per the wiki but i'm not sure how to make the `home-manager` executable available
<evanjs>
MasseGuillaume: what does your $NIX_PATH look like?
<evanjs>
NemesisD: eh depends on what you want to do. On NixOS, the submodule is the way to go IMO. I just use the one from NUR
zupo has quit [Quit: My MacBook has gone to sleep. ZZZzzz…]
<evanjs>
if you import home-manager and use the nixos submodule, you will not use the home-manager package
<evanjs>
it will be done on nixos-rebuild
digitalgrease has quit []
digitalgrease has joined #nixos
<Taneb>
I'm trying to package a Python library and I'm getting a "cannot open shared object file: No such file or directory" error when I try to use it in a shell. Any ideas?
<MasseGuillaume>
@Taneb you can run strace to find the missing file
<NemesisD>
evanjs: i should step back. what i'm trying to do is declaratively make home-manager available in configuration.nix, then let individual users configure with their own home.nix. is there a way i can do the channel add declaratively?
<evanjs>
It's going to be slightly different in your case, though
<evanjs>
NemesisD: I'm assuming you have `imports = [ <home-manager/nixos> ];` somewhere, too?
<NemesisD>
evanjs: i think i was doing that with fetchtarball. i fetchtarball'd home manager's master revision and then did (import "${home-manager}/nixos") which i think is equivalent
work_ has quit [Quit: Connection closed for inactivity]
sumner[m] has joined #nixos
<NemesisD>
but it sounds like it'd be better to figure out how to set up NUR and then ...?
<evanjs>
NemesisD: yeah that should be fine as well. Just make sure you import the nixos module from there... which it does look like you're doing
<NemesisD>
evanjs: so when i did nixos-rebuild test, that didn't fail, it just also didn't make `home-manager` available to my user
<qyliss>
Using the NixOS module isn't going to do what you want
<evanjs>
^
<qyliss>
You just need to install the home-manager program
MasseGuillaume has quit [Remote host closed the connection]
knupfer has joined #nixos
<qyliss>
The module will pull home.nix into your NixOS configuration.nix
<qyliss>
And that would mean that an administrator would have to run nixos-rebuild every time a user changed something in their home.nix.
<DigitalKiwi>
https://myfriendshate.me/files/glirc-otr/default.nix I recently made this; in the installPhase I'd like to put the glirc-otr.so somewhere static as I have to put the location in a config file so I'd like it to be the same no matter the version; I was thinking something like /var/lib/glirc-otr/glirc-otr.so might be appropriate. So a. would that be ok and b. how do I do that? what bash commands go in installPhase? is it just a mkdir cp?
<NemesisD>
qyliss: should i not do the nixos module then? and should i not use home-manager from the packages db?
<qyliss>
You can use the home-manager package
<qyliss>
But if you want non-admin users to be able to rebuild their own home environments, they need to run home-manager for themselves
<DigitalKiwi>
infinisil clever ^^
<evanjs>
I mean, you can still do it from nixos-rebuild, but they'd have to be configured beforehand, and would only be reconfigured on nixos-rebuild
<evanjs>
*from the nixos module
<NemesisD>
evanjs: i definitely want the latter. so by running home-manager themselves what does that mean? they just need to run home-manager switch and all that? or do you mean like i have to install it for each user?
<evanjs>
NemesisD: AFAIK you can just add home-manager to systemPackages
<NemesisD>
evanjs: oh ok. and btw does that mean that it freezes all the packages and versions thereof available to whatever version is in the nixpkgs home-manager? or is there sort of a self-update i can do once its installed?
<evanjs>
bah. any good way to debug a nix-collect-garbage run? Seems to be stalled right now ...
<evanjs>
*checks computer again* .... nevermind.... guess it just took forever
Tucky has quit [Quit: WeeChat 2.7]
<evanjs>
I'm so used to getting _some_ kind of feedback... that, and strace hung on read for a min--oh. I didn't follow forks...
xkapastel has joined #nixos
opthomasprime has joined #nixos
<{^_^}>
[nixpkgs] @worldofpeace opened pull request #78421 → nixos/xfce: use sessionPackages → https://git.io/JvtNV
<evanjs>
NemesisD: can't say for sure, but I'd assume it's so they're always up to date, as home-manager repo is always "up to date", and nur is the next best. Looks like master nixpkgs is ~20 days behind home-manager upstream, for example
<MasseGuillaume>
hum, I deleted that machine already :p
hyper_ch has joined #nixos
<{^_^}>
[nixpkgs] @worldofpeace merged pull request #78423 → nixos/gnupg: actually use the configured gpg package → https://git.io/JvtNX
<{^_^}>
[nixpkgs] @worldofpeace pushed 2 commits to master: https://git.io/JvtAZ
hyper_ch2 has quit [Remote host closed the connection]
<infinisil>
MasseGuillaume: Well it's probably either kubectl itself or zsh-completions, so you could look at the output of those to find some _kubectl in $out/share/zsh
<tlater[m]>
zeta_0: You'd use something like ${pkgs.ghc}/lib/ghc-*
tpanum has quit [Ping timeout: 265 seconds]
<tlater[m]>
Which will resolve to the correct path - assuming that shell expansion works in that env variable
rajivr___ has quit [Quit: Connection closed for inactivity]
<tlater[m]>
If not you might need to modify that every time the version number changes... Maybe there's a way to access the version number through the package?
<evanjs>
MasseGuillaume: I can't remember what exactly the issue was before, but I recall oh-my-zsh behaving differently between nixos and hm. One of them worked, and the other didn't :P
<MasseGuillaume>
no I don't have programs.home-manager in my configuration.nix
pitch has quit [Ping timeout: 260 seconds]
opthomasprime1 has quit [Remote host closed the connection]
<Miyu-saki>
Do we need optimus-manager for NixOS? I wanna experiment with full GPU rendering and disabled GPU.
opthomasprime has joined #nixos
<Miyu-saki>
I'm thinking we could use one of those subconfigurations(clones, IIRC?) to do the switching rather than use optimus-manager.
<infinisil>
The zsh setup scripts in nixos and hm are a bunch of hacks tbh
<evanjs>
^
opthomasprime has left #nixos [#nixos]
mac10688 has quit [Ping timeout: 268 seconds]
<infinisil>
Not surprised that interactions with all kinds of zsh plugin systems breaks
<Miyu-saki>
So your base config is hardware.nvidiaOptimus.disable = true;, while you have clones that set that to false + your NVidia/Intel optimus setting.
<sigwinch28>
Is this a good place to get support RE nixpkgs/writing my own packages, or am I better off on the discourse?
<gchristensen>
yep! ask away!
<{^_^}>
[nixpkgs] @Mic92 opened pull request #78426 → nixos/systemd: add all systemd tmpfiles files → https://git.io/Jvtpq
MasseGuillaume has quit [Remote host closed the connection]
<sigwinch28>
I'm very new to Nix(OS) and I'm having trouble getting a font I want. I want the font to be managed in the same way every other bit of my system is (configuration.nix, imports, etc.) but I notice the font I want isn't available on 19.09: https://github.com/NixOS/nixpkgs/tree/master/pkgs/data/fonts/cascadia-code . My question is: is this a package? and if so, how can I build it? The contents of the
<sigwinch28>
default.nix here look a little different to what I've been able to find online (which use mkDerivation etc.)
<sondr3>
sigwinch28: it's available on unstable so you could import that and install it from there
tokudan has quit [Remote host closed the connection]
<sondr3>
depending on how you have unstable available, you could either import the channel or fetch the tarball for it
tokudan has joined #nixos
<sigwinch28>
sondr3: I got the gist of that from some googling (it reminds me of enabling extra repos with apt and then pinning specific packages in distros like debian), but I'm looking for some understanding here about why I can't use this nix expression to build a deriviation and use it in my system. Is this something I can learn from the Nix pills?
<sondr3>
if you follow the above link and do `unstable.cascadia-code` in the fonts declaration it should work
<sondr3>
and you could, I've done it a few times I've added my own packages. Nix derivations in the `nixpkgs` repo are just the same as if you added them in your own configuration
<sondr3>
there's many layers to peel and grokking Nix(OS) takes a while, so ask away :)
<sigwinch28>
sondr3: thanks, that solves the problem of getting the font now. Instead, though, I'm struggling to understand what that cascadia-code/default.nix file _is_: it's not like anything I've seen in the pills, and doesn't appear to be a derviation. I can't call nix-build on it, for example.
lxsameer has quit [Quit: out]
[Leary] has quit [Ping timeout: 240 seconds]
v88m has quit [Ping timeout: 240 seconds]
<sigwinch28>
it's a bit weird that the file is returning a function o.O
<sondr3>
I mean, Nix is a functional language so everything is functions
kenjis1 has quit [Ping timeout: 248 seconds]
<sondr3>
it's turtles all the way down
<sigwinch28>
okay, I'll dig into the nixpkgs repo a little bit more to find out where this thing is actually used :)
<sigwinch28>
thanks :)
zupo has joined #nixos
linkrage has quit [Quit: Leaving]
<sondr3>
and you can build it locally, if you have cloned `nixpkgs`, you can do `nix-build -A cascadia-code` inside it and it'll build it
<symphorien>
sigwinch28: you probably want to pass the function to pkgs.callPackage
<symphorien>
or do as sondr3 said
mmlb has quit [Ping timeout: 272 seconds]
petrkr has quit [Quit: Leaving]
<sondr3>
sigwinch28: most of the files in nixpkgs _declare_ how to get, build and install them, they are in a sense a recipe for building packages/services. AFAIK everything that declares how to build something is a derivation
smatting has quit [Ping timeout: 240 seconds]
<sondr3>
you can see that the derivation for cascadia downloads the font and uses the `install` tool to copy the downloaded font to $out/blah. $out is basically Nix magic that places things where they should go lol
<sigwinch28>
oh I think I get what's being said about what's /actually/ in the nixpkgs repo, now
<sigwinch28>
I'll have a look at the Nixpkgs manual
<{^_^}>
[nixpkgs] @bjornfor pushed commit from @iblech to master « dsniff: Unbreak the build »: https://git.io/Jvtph
<infinisil>
Something like that
<{^_^}>
use gitAndTools.hub instead
<infinisil>
Damnit
xkapastel has quit [Quit: Connection closed for inactivity]
<yhager>
In a `mkDerivation` attribute set, I have `some_src = fetchurl {...}` and I want later to say `cmakeFlags = `[ "-DSOME_SRC=${some_src}" ... ]`. But `some_src` is not available. Is there a way to pass the result of `fetchurl` to a `cmakeFlags`?
<sondr3>
and I'd import those package like `pkgs = import ./default.nix { inherit pkgs; };` and run something like that over it infinisil ?
<infinisil>
sondr3: I don't know what your default.nix contains, you just need an expression to get an attribute set of packages
<sondr3>
zeta_0: what does `echo $NIX_GHC_LIBDIR` say?
fendor has joined #nixos
<sondr3>
cause I think `NIX_GHC_LIBDIR="${pkgs.ghc.outPath}/lib/ghc-${pkgs.ghc.version}"; might work (?)
fendor_ has joined #nixos
wildtrees has joined #nixos
lsix has quit [Quit: WeeChat 2.6]
gagbo has quit [Quit: I'm out !]
chagra has quit [Quit: WeeChat 2.6]
<sondr3>
our once kitten has grown large and now his hairs are long and stuck to my screen, everytime I scratch him I see black lines on my display lol
<sondr3>
and he loves to play with my computer mouse and fingers, so I can't use that either
<sondr3>
and now he wants to lie on top of my keyboard
<sondr3>
cats man
chagra has joined #nixos
<gchristensen>
pretty fun.
<sondr3>
love 'em
<sondr3>
is there a way to define recursive functions in `nix repl`? I just get a `name not defined` inside the body of itself
chagra has quit [Client Quit]
<gchristensen>
maybe do a let in ... right there.
<tilpner>
rec { } works too
<tilpner>
(but let-in is better)
<sondr3>
how'd I do that in the repl? Just `let func: a: ... in`?
<gchristensen>
let a = foo: ...; in a
OmnipotentEntity has joined #nixos
chagra has joined #nixos
<notgne2>
I use morph to deploy to my servers, and have pkgs set to a specific commit (with a script to update it), yet occasionally I will see some random other things being rebuilt, is there a way to track down these impurities?
<zeta_0>
sondr3: it's showing the older path from before i did the rebuild:
<zeta_0>
[zeta@nixos:/~]$ echo $NIX_GHC_LIBDIR
<sondr3>
hmm, I just get a lambda function instead of a named one
fendor_ has quit [Ping timeout: 260 seconds]
v88m has joined #nixos
o1lo01ol1o has joined #nixos
<zeta_0>
sondr3: ok i am going to try another rebuild with the path you recommended
zeta_0 has quit [Remote host closed the connection]
o1lo01ol1o has quit [Ping timeout: 268 seconds]
zeta_0 has joined #nixos
zeta_0 has quit [Client Quit]
craige has quit [Ping timeout: 268 seconds]
<{^_^}>
[nixpkgs] @peti pushed to haskell-updates « hackage-packages.nix: automatic Haskell package set update »: https://git.io/Jvqv4
<zeta_0>
sondr3: that did not work either, i am guessing that it has something to do with the syntax because the whole thing is not being highlighted as a string?
<pie_[bnc]>
clever: i just had a dumb idea: what if lisp module for grub
<sondr3>
zeta_0: I think something like this might work https://hastebin.com/idolujojop.bash, it's close to how I've done it previously with Python + packages
<clever>
pie_[bnc]: somebody already wrote python for grub
<pie_[bnc]>
clever: ...that was actually my first thought
<pie_[bnc]>
i didnt think to search it because "why would anyone ever do something like that"
<clever>
pie_[bnc]: bios testing and such
<clever>
pie_[bnc]: when you want to have a complex program, and no os in the way
<sondr3>
zeta_0: maybe? I mostly use `cabal2nix` when developing in Haskell, so I only have HIE, brittany and some other utilities installed and install all packages locally in each repo as required
<{^_^}>
[nixpkgs] @puckipedia opened pull request #78430 → nixos/stage-1: Do not allow missing kernel modules in initrd → https://git.io/Jvqfk
<kalbasit>
are there any security risks to using cache.nixos.org over HTTP? Is the binary cache signature reliable enough?
<sondr3>
zeta_0: your problem is basically that the derivation that is built with the packages is not `pkgs.ghc` but `pkgs.ghc-with-your-packages` so using the $PATH to `pkgs.ghc` does not include any of the packages you installed and you have no way of referencing this derivation
<wucke13>
Building a package that needs python with a fex python packages as interpreter for a script. How to do it?
jonten has joined #nixos
<aswanson>
daw:
Chiliparrot has joined #nixos
noudle has joined #nixos
<NemesisD>
has anyone used the `docker-containers` feature?
noudle has quit [Client Quit]
fendor_ has quit [Ping timeout: 268 seconds]
<wucke13>
NemesisD: I guess I do?
<NemesisD>
wucke13: is it supposed to automatically pull the image if you don't have it? i'm trying to set one up and the container never starts but also `docker images` returns empty
<wucke13>
Yes of course it automatically pulls the image
<NemesisD>
hmm something else must be going on then
<{^_^}>
[nixpkgs] @jonringer pushed commit from @magnetophon to master « sfizz: init at unstable-2020-01-24 »: https://git.io/JvqTv
<NemesisD>
ah looks like its getting a manifest unknown error: docker pull plexinc/pms-docker:1.18.4.21 #=> Error response from daemon: manifest for plexinc/pms-docker:1.18.4.21 not found: manifest unknown: manifest unknown
<NemesisD>
nm their stupid website crops part of the tag
johnw has joined #nixos
zupo has quit [Ping timeout: 240 seconds]
<wucke13>
To put my problem in other words: How can I ensure that there are some pythonPackages in the python interpreter that is used to patch the shebangs of utility scripts?
<NemesisD>
wucke13: thanks, got it working :)
zupo has joined #nixos
<{^_^}>
[nixpkgs] @ljli opened pull request #78441 → python: auto patch wheels with manylinux RPATH → https://git.io/JvqTB
<johnw>
with nix copy, I can use --to ssh://host, and --to file:://path; is there a way to specify a specific store path on another host via ssh? does ssh://host/path do what I'd expect?
<amanjeev>
is anyone running latest kernel with 19.09? i am thinking of moving to latest kernel but decided to check in here if anyone saw issues with it.
o1lo01ol1o has quit [Remote host closed the connection]
<Yaniel>
I'm using latest kernel on unstable, no problems so far
<amanjeev>
thank Yaniel
<amanjeev>
thank you*
<quiet_laika[m]>
does `stdenv.mkDerivation` use CMake by default? im trying to build a simple project (not my own) that uses a Makefile, but not CMake, and im getting an error about CMakeLists.txt not being present
<infinisil>
quiet_laika[m]: It doesn't. Only when you add something like `nativeBuildInputs = [ cmake ]` it should use cmake
justanotheruser has quit [Ping timeout: 272 seconds]
<quiet_laika[m]>
this might be outside the scope of nix guidance, but the lua build is complaining about missing `.so` files in the luarocks dependencies. does that smell like anything specific?
zarel has quit [Ping timeout: 252 seconds]
<clever>
quiet_laika[m]: are you using nix-shell?
<clever>
quiet_laika[m]: are you using the pkgs.luarocks package?
pluggi61 has joined #nixos
zarel has joined #nixos
aveltras has quit [Quit: Connection closed for inactivity]
pluggi61 has quit [Remote host closed the connection]
aw has joined #nixos
aw has quit [Client Quit]
jonten has joined #nixos
gustavderdrache has quit [Quit: Leaving.]
fendor_ has quit [Remote host closed the connection]
fendor_ has joined #nixos
<zeta_0>
hello guys, why i am getting this error: attribute 'haskellWithPackages' missing, at /home/zeta/.config/nixpkgs/home.nix:398:25 https://hastebin.com/gakeludahi.bash
justanotheruser has joined #nixos
aw has joined #nixos
spacefrogg has joined #nixos
zupo has quit [Quit: My MacBook has gone to sleep. ZZZzzz…]
<zeta_0>
i included haskellWithPackages in both the let and in parts, as well in the environment variable, am i missing something?
<zeta_0>
it's this line of code that is throwing the error:
<zeta_0>
sondr3: ok i set NIX_GHC_LIBDIR env var and it seems like it fixed ghcide, all the package modules are now being recognized and all the ghcide features are now working as well
fendor_ has quit [Ping timeout: 268 seconds]
<scheming_around>
How exactly are "nix search" and "nix-env -qa" different?
<quiet_laika[m]>
its probably a little inflexible because i just made it with my own projects in mind but it was working well for me for my haskell stuff
<zeta_0>
but now, i am getting this weird message: there are over 15000 files in folder /home/zeta so watching the repo may slow down emacs, do you want to watch all files in /home/zeta ? yes or no
<scheming_around>
btw, if there is a package on nixpkgs that has been updated since, what is the correct procedure to bring the nixpkgs version up-to-date?
<quiet_laika[m]>
scheming_around: PR the nix expression for the package :)