<matthewcroughan>
it gives me error: in pure evaluation mode, 'fetchTree' requires an immutable input, at /nix/store/l5nhivnnb6sisbppnn82wvfg6iqwxbag-source/tunnelvr.nix:7:9
<matthewcroughan>
quite confused :D
cinimod` has quit [Ping timeout: 265 seconds]
<pennae>
try giving it an exact commit/hash
ddellacosta has joined #nixos
<matthewcroughan>
pennae: now it asks for a user/pas
<kitty_hut[m]>
Anyone know how to get packages outside of the regular channel/get more up to date ones, like, any way to use the nix config to build something from source from git or the such?
<Henson>
matthewcroughan: homeless-shelter is the "home directory" of the build process. In a mkDerivation in the buildCommand put in "cd ~" and it'll try to go to that directory. I think it's designed to cause and therefore trigger an error when part of the build process tries to reference the build user's home directory.
<Henson>
matthewcroughan: I usually specify a buildCommand in a mkDerivation to control what it does. You might try that to see if you can stop make from being called.
Henson is now known as HensonAway
h0m1 has quit [Ping timeout: 276 seconds]
h0m1 has joined #nixos
<lukegb>
matthewcroughan: you can usually override buildPhase, that's what e.g. ninja does
<lukegb>
if you don't want _anything_ to happen, then there's, well, dontBuild
<Henson>
matthewcroughan: it works for me. I tried fetching https://www.google.com/index.html and it looks like it froze, but it spit out a path in the Nix store which when I "cat" it is the contents of the download.
<matthewcroughan>
Oh
<matthewcroughan>
what about fetchurl, which doesn't return a derivation?
ahmed_elgabri has quit [Ping timeout: 250 seconds]
<matthewcroughan>
Nope, doesn't look like the issue.
<matthewcroughan>
Maaaybe it's just that big.
<matthewcroughan>
But the log output is only one line, so I thought it wasn't working.
<Henson>
matthewcroughan: I don't think you should try to built it, because it's not a derivation, it will just point to a path in the nix store that is the contents of the file
<matthewcroughan>
Yeah I just wanna be able to refer to it and play.
<MysteriousSilver>
Hi! I earlier installed emacsWithPackages-27.1, now i am trying to install gccemacs. How do I make gccemacs to use ELPA from nix repos? my config: http://ix.io/3lA8
<Kinnison>
Hi, I'm trying to use pandoc on nixos. pandoc itself is easy, but pandoc-citeproc only seems to be available via haskellPackages which pulls in a heck of a lot of haskell build stuff which I don't need/want.
<Kinnison>
Is there a way to install only the resultant binary from pandoc-citeproc ?
<{^_^}>
[nix] @Ma27 closed pull request #4759 → libstore/derivation-goal: don't raise an error if the only remaining output is a wildcard → https://github.com/NixOS/nix/pull/4759
<sterni>
Kinnison: are you sure you need pandoc-citeproc? it has been deprecated by upstream and is unmaintained, as a result it doesn't build on unstable currently I think
<Kinnison>
sterni: a tool I'm trying to use uses it, but I wasn't aware of that -- is the citation support now integrated into pandoc?
<eyJhb>
It is really cool how simple that actually is.
<DigitalKiwi>
colemickens: see before the digital era we didn't have ebooks. we had pbooks
<Kinnison>
Yeesh, it comes to something when the easiest way to find out what version a breaking change came in with is to use git grep, git annotate, and then some log diving on the tags
<Kinnison>
So it was 2.11
<DigitalKiwi>
Kinnison: have you had the joys to git bisect nixpkgs yet
<Kinnison>
DigitalKiwi: not yet, but thanks for that horrifying thought
<DigitalKiwi>
oh it's fun
<colemickens>
DigitalKiwi: wat
<DigitalKiwi>
10:48 colemickens: "jumping from page to page" what could you mean :P
<dupon1>
Hi, I'm trying to compile a project but I get a CMake error telling me it can't link the static library. GCC, CMake and Erlang headers are installed but wonder if I miss a dep
sangoma has quit [Ping timeout: 260 seconds]
meh` has joined #nixos
<evils>
,library dupon1
<{^_^}>
dupon1: Don't install libraries through nix-env or systemPackages, use nix-shell instead. See https://nixos.wiki/wiki/FAQ/Libraries for details.
<qyliss>
also (I saw your config earlier, after you'd disconnected), if you're using services.emacs.package, put your emacsWithPackages there instead of in environment.systemPackages
ddellacosta has quit [Ping timeout: 240 seconds]
<MysteriousSilver>
ah okay, will try and report
cole-h has joined #nixos
<MysteriousSilver>
`The option `services.emacs.emacsWithPackages' defined in `/etc/nixos/configuration.nix' does not exist.`
<MysteriousSilver>
what should be the option called/
<beanbl>
Hey guys I notice very frequently when I rebuild my system, that files are not on static sources where they need to be. Usually this gets fixed within a week but it can be kind of disheartening to comment out packages while it gets resolved. Is there any plan for how to deal with this in the future? Tor Browser is on the of the biggest offenders by the way.
<{^_^}>
[rfc39-record] @grahamc pushed commit from rfc39 to main « Automated team sync results. »: https://git.io/J3482
<thblt>
beanbl: static source = binary caches?
<beanbl>
(Regardless of what they say by the way, I would rather have last week's Tor Browser than no Tor Browser at all)
<beanbl>
thblt: No it seems to be a thing where code/binaries are fetched from external https sites.
<{^_^}>
#114643 (by tobiasBora, 9 weeks ago, open): Tor-browser: 404 error when downloading the source
<beanbl>
There are others that have this sort of problem sometimes; I wonder if something like IPFS would be a good solution for the .tar.gzs, so at least it can be pulled and builds completed.
ddellacosta has joined #nixos
MysteriousSilver has quit [Remote host closed the connection]
<bennofs>
beanbl: judging from the comments on the issue, it looks to me like this is not a technically issue but rather a policy issue. Do we want to pull tor browser binaries from non-upstream sources? (the issue cites trust requirements as the reason for the fact that hydraPlatforms is set to none)
<bennofs>
beanbl: if the package was built by hydra, I think it would already cache the source
<thblt>
That's what's a bit strange though, why does NixOS rely on upstream binaries for that package?
ddellacosta has quit [Ping timeout: 252 seconds]
<bennofs>
no idea
<bennofs>
perhaps so that you don't have to trust hydra for your tor browser?
<qyliss>
it's better to have to upgrade than to be using an out of date tor browser
<qyliss>
same reason the tor project doesn't provide downloads of old releases
<beanbl>
Yeah what qyliss says is right. But we also have this problem for e.g. jdk. Just tried to build the "processing" package and "Unfortunately, we cannot download file jdk-8u271-linux-x64.tar.gz automatically." but if it were cached in IPFS...
bdju has quit [Ping timeout: 240 seconds]
<bennofs>
beanbl: that sounds like a different problem. I think you're getting that error message because the package is using sources whose license forbids redistribution
<bennofs>
providing mechanisms with the intent of circumventing the license still seems like a questionable idea for nixpkgs to me
ahmed_elgabri has joined #nixos
<qyliss>
yeah
<beanbl>
What I mean is, if e.g. jdk-8u271-linux-x64.tar.gz were already available on IPFS and nixpkgs simply referenced it, nix is not redistributing.
<qyliss>
correct
<qyliss>
anybody downloading it might be violating Oracle's copyright, though
<qyliss>
doing that automatically doesn't sound very smart
<beanbl>
Is this one of those things that is best served as an apology later if anyone really cares?
<beanbl>
Like I said, it would improve the user experience so significantly.
<qyliss>
only for a very small number of proprietary programs
<bennofs>
best way to avoid it is to use openjdk
<lukegb>
^
<qyliss>
bennofs++
<{^_^}>
bennofs's karma got increased to 6, that's Numberwang!
<beanbl>
Yeah
beertoagunfight has joined #nixos
<lukegb>
open alternatives (or, failing that, licenses that permit redistribution) are the answer here, unfortunately
<ploupiboulba[m]>
I've entered `assert true -> throw "Python2 support has been removed from neovim, please remove withPython and extraPythonPackages.";` in the REPL but I can't seem to execute it: Enter or shift+enter just adds newlines without a prompt
NieDzejkob has joined #nixos
jonringer has joined #nixos
ddellacosta has quit [Ping timeout: 240 seconds]
<pennae>
ploupiboulba[m]: there's an expression missing after the semicolon that the assert is meant to protect
<pennae>
> assert true -> false; "won't be evaluated"
<{^_^}>
assertion (true -> false) failed at (string):494:1
<Frosku>
I've installed openssl but when I try to compile Net::SSLeay (perl module) it says it can't find openssl
<Frosku>
Any ideas?
<Frosku>
*** Could not find OpenSSL
<Frosku>
If it's already installed, please set the OPENSSL_PREFIX environment
<Frosku>
variable accordingly. If it isn't installed yet, get the latest version
<cub3s_>
If I upload package to Haskell, how long roughly until I can see it on "haskell-updates" branch of nixpkgs?
kaivai has joined #nixos
<cub3s_>
s/to Haskell/to Hackage
gustavderdrache has quit [Quit: Leaving.]
noudle has quit []
ddellacosta has joined #nixos
ahmed_elgabri has joined #nixos
stree has quit [Ping timeout: 260 seconds]
<Frosku>
How does a symlinkJoin work?
<Frosku>
I think if I can somehow join these openssl packages I'll get what I need
<clever>
Frosku: buildenv is simpler, builtenv { name = "name"; paths = [ openssl.out openssl.dev ]; }
<clever>
buildenv*
ddellacosta has quit [Ping timeout: 268 seconds]
<maralorn>
<cub3s_ "If I upload package to Haskell, "> We are currently in a transition of the process so it’s not so easy to tell. The maximum right now is 2 weeks. Probably within a week. Likely sooner.
ahmed_elgabri has quit [Ping timeout: 250 seconds]
<Frosku>
clever: Thanks, can I use "name" to assign to the env variable in shell.nix?
<yurb>
If I'd like to run a command such that it can find and dynamically load a `*.so` library (gstreamer), what would be a nix(os)'y way of doing that?
<eyJhb>
Frosku: Did you ever find out the fish/sudo stuff?
<Frosku>
eyJhb: Yeah my PATH was being reordered in my config
<pie_>
every damn time :P <Frosku> Name checks out :D
ahmed_elgabri has joined #nixos
<eyJhb>
Is there any nice way to share vars across configs? I am guessing not besides creating a file to store them in, and then importing that file in each file that needs them.
ahmed_elgabri has quit [Ping timeout: 250 seconds]
<a12l>
Currently my main priority is to have my derivation build and being usable.
<AmandaC>
Is there a nixpkgs lib function to exclude some attrs from a recursive copy? I need to avoid including `inputs.self.images` from `inputs.self` when I'm building my `inputs.self.nixosConfigurations` values...
<AmandaC>
Got a loop as a result of that. Actually, why do I even include the inputs...
<eyJhb>
infinisil: It is for ... HMMMM
<eyJhb>
I might be able to do that actually.
ddellac__ has quit [Ping timeout: 268 seconds]
<pie_>
eyJhb: i keep having the same doh moment
<eyJhb>
pie_: Are we the same person?
waleee-cl has joined #nixos
<eyJhb>
What are you doing ? :p
<pie_>
eyJhb: for the Nth time,
<pie_>
yes
<pie_>
well i monorepo my configs that share stuff (err, well lets just say that.) so its more a manner of how i make the system demux the configs
<eyJhb>
infinisil: Wireguard does not have a name attribute, for the interface? I think.. except the attribute key
<lukegb>
a12l: in general: build tools (like cmake) go in nativeBuildInputs, build-time deps go in buildInputs, propagatedBuildInputs is used for things like python packages where you have a runtime dependency on them as well (but... not necessarily for cases where you depend on _executables_ from those packages at runtime)
<eyJhb>
infinisil: The name of the attribute is the name of the interface, and I reference that like 10+ times :p
<infinisil>
But yeah it doesn't have a name option
<infinisil>
Just the attribut key
<eyJhb>
Not sure that explains it. But I need the interface name, and the netns name, which I can get easily, if I have the name
<eyJhb>
No, but it should! :(
ddellaco_ has quit [Ping timeout: 265 seconds]
<eyJhb>
Very annoyed...
<infinisil>
I'm confused
<eyJhb>
pie_: that looks... Like hell
<infinisil>
What's wrong with using the attribute name?
<pie_>
eyJhb: haha why
<a12l>
lukegb: Thanks for the easy explanation!
ddellac__ has joined #nixos
<pie_>
eyJhb: i kind of accidentally into this, havent looked at nixus or nixops yet
<eyJhb>
infinisil: I guesss I could. What annoys me is, that I cannot name the attribute key something like "thisismywireguardupstreamtunnel", and then specify the interface name. Then I would have something "static" that will always be the same, even if I change the interface name.
<eyJhb>
Well, it might be good practice pie_ :p
civodul has joined #nixos
<pie_>
eyJhb: i mean, i should probably look for better stuff if they exist
<eyJhb>
I.. I like nixus quite much
<eyJhb>
I usually complain quite a lot (look above), but Nixus haven't really given me any complains. Seeing as anything I want, I can do, if I take the time to do some nix.
squirclespace has joined #nixos
ddellac__ has quit [Ping timeout: 268 seconds]
<pie_>
cool
<eyJhb>
So then I can only complain about myself being lazy.
<pie_>
pure(ish) nix is good
<pie_>
dont leave the language paradigm
<infinisil>
eyJhb: Ah I see yeah
<eyJhb>
also, infinisil I added two options to the Minecraft module. Ability to add plugins + manage OPs declarative. Not sure it is something for you :D
<infinisil>
eyJhb: plugins? datapacks?
<eyJhb>
e.g. if you use papermc, then adding plugins to plugins/
<infinisil>
Ah I see, so extension to the NixOS minecraftmodule
<eyJhb>
Yeah :)
<squirclespace>
Hey folks! I'm wondering how Nix bootstraps the compiler. Like, if I change the NIX_CFLAGS_COMPILE to have -march=something, I see it re-building clang. But, what compiler is it using to build clang with?
<eyJhb>
However, it is not that fun, since I haven't setup the do-image-updater module you have. So I have to manually build + upload the image each time I want to change something :p
ddellaco_ has joined #nixos
<squirclespace>
Surely there's a difference between compiling clang with a compiler that has my overridden NIX_CFLAGS_COMPILER vs one that doesn't
<Luker>
uhm... has anyone tried to build rust-cbindgen instead of using the cache? I get a "hash mismatch in fixed-output derivation" and don't really know what to do
<lukegb>
if you're putting this in the root of a random repo and you want e.g. just "nix-build ." to work then you'll probably want a small shim to wrap it so that callPackage is invoked on it too, unless you've already got that
<pingiun>
if I have an imported nixpkgs (like the pkgs argument in a nixos configuration) how can I turn that into a path so that I can include qemu-guest.nix?
zupo has quit [Quit: My MacBook has gone to sleep. ZZZzzz…]
zupo has joined #nixos
zupo has quit [Client Quit]
<ris>
y'know that feeling when you don't know quite whether something's your proudest moment or most shameful? well i've just managed to write a jq expression that transforms netplan yaml configs into nixos networking configurations: https://gist.github.com/risicle/4aaad898902c821f535a98901d599615
<ris>
currently just handles the stuff i needed it to - vlans and bonding
ormaaj[m] has joined #nixos
<azazel>
never used netplan... kudos anyway
zupo has joined #nixos
zupo_ has joined #nixos
zupo_ has quit [Client Quit]
zupo has quit [Ping timeout: 246 seconds]
<ris>
neither had i, but i'm trying to nixos-infect some machines that come with slightly involved network configs using netplan
<gchristensen>
ca-derivations probabl ymeans can it make ca derivations, and ca-references probably means can ca-derivations have things depend on it
cody has joined #nixos
Acou_Bass has quit [Ping timeout: 252 seconds]
cody is now known as codygman___
<codygman___>
I want to setup my default desktop manager to be xfce, but my default RDP window manager to be exwm. I have that mostly working, but the exwm window manager used by `services.xrdp.defaultWindowManager = "exwm"` doesn't seem to actually use the windowManager.session named "exwm" I've defined. Any ideas? More info here: https://github.com/codygman/tech-roam/blob/master/20210502164843-remmina_exwm_configuration.org
<jackdk>
matthewcroughan: if you're going to paste massive snippets, would you be able to use a pastebin with line numbers? Anyway, the argument to mkDerivation is an attribute set, and having `runCommand` sitting on its own, and not on the RHS of a `name = ...` sort of thing is a syntax error
sumner has joined #nixos
<ajs124>
you can assign the name attribute in that case, I think?
<matthewcroughan>
jackdk: will do next time
<jackdk>
matthewcroughan: o7 thanks
<ajs124>
jackdk: oh, did my brain just autocorrect to assume there is an assignment to an attribute? oops…
<matthewcroughan>
RHS?
<jackdk>
any chance I can get some eyes on #121449 ? I was pinged on #121293 because they were files I changed recently
<matthewcroughan>
It might help if I explain what I want to do.
<matthewcroughan>
I want to make nix produce a pck file. Instead of doing this in a docker container.
zeta_0 has joined #nixos
cr4y1 has quit [Ping timeout: 252 seconds]
<matthewcroughan>
But what I'm making does not require any of nix's phases, all it needs is to run a command. So should I not be using mkDerivation?
<jackdk>
I think: if you are writing a small thing for yourself, or to wire into some larger build process, I would use runCommand and be done with it. If you are writing something that needs to be wired into a nixpkgs-style repo or overlay or something, then I'd think harder about using mkDerivation
<matthewcroughan>
But that can then not be a package right?
<matthewcroughan>
Or can I have that as an output to my flake?
<matthewcroughan>
My desire is that the result be this pck file.
<ajs124>
matthewcroughan: runcommand is a wrapper around stdenv.mkDerivation
<matthewcroughan>
Above all, I need to be able to build it like `nix build .#tunnelvr` and have the result be a symlink to `tunnelvr.pck` which was produced by Nix.
<jackdk>
you didn't mention that you wanted a package, and I know epsilon about flakes
<tpw_rules>
you can just set the builder attribute to a shell script which does everything. then you don't have to futz with the phases
attila_lendvai has quit [Read error: Connection reset by peer]
<gustavderdrache>
matthewcroughan: to clarify: in the sense you're thinking of, everything that can be built with nix is a package since it winds up in the nix store and can be referenced by other derivations as inputs
<gustavderdrache>
so whether you use mkDerivation or a wrapper, the end result is the same in the system's eyes
<matthewcroughan>
gustavderdrache: Yes, but what determines whether it's able to be built like I asked?
<matthewcroughan>
composed like I asked.
<matthewcroughan>
`nix build .#thing`
<matthewcroughan>
called with pkgs.callPackage
<gustavderdrache>
so you're not going to like this, but the answer is: that part doesn't matter
<matthewcroughan>
Nobody seems to agree or know what a package is.
<zeta_0>
hello there, I installed nix in ubuntu in windows subsystem for linux, using vscode's remote-wsl and nix-environment-selector extensions, I was able to build an isolated nix environment in vscode will all of the needed java dependencies, anyways in the root folder of the workspace, I made a java file and did a simple java test program that prints out "java code", but it seems like vscode is not recognizing the java
<zeta_0>
tooling installed in the nix-shell environment, and when I opened up the terminal, the corresponding java/javac commands are not in scope? any tips on what's wrong and how to fix this issue?
<gustavderdrache>
matthewcroughan: yeah, that's because "package" in the traditional sense isn't really applicable to nix
<matthewcroughan>
well, what is callPackage expecting as a return?
<matthewcroughan>
An attribute set? What's the type.
<gustavderdrache>
i'm not sure it actually cares... i think it only arranges for inputs from nixpkgs
<matthewcroughan>
if I change `tunnelvr.nix` from `outputs.packages.x86_64-linux.tunnelvr` to be a runCommandNoCC, will I be able to build it all the same?
<gustavderdrache>
yeah
<matthewcroughan>
from mkDerivation
<ajs124>
marnov: do you want your production environment to be stable or unstable?
<matthewcroughan>
all it caresa bout is that something ends up in $out?
<matthewcroughan>
Is that the definition of a package? Something that ends up executable in $out?
<gustavderdrache>
it doesn't have to be executable
<marnov>
asj yeah, stable
<marnov>
ajs124: yeah, stable
<marnov>
but not every distro "unstable" means unstable
<tpw_rules>
nix unstable is pretty unstable...
<marnov>
like arch - it is rolling relaease, and it is stable :-)
<marnov>
tpw_rules: ok thx
<marnov>
thats what i need to hear
<ajs124>
marnov: We have two releases a year, unstable is not very stable. I personally probably wouldn't run it in production.
<tpw_rules>
but on the other hand, if you can catch it at a point you like you can pin that
<matthewcroughan>
gustavderdrache: can you give me a definition that is concrete?
<{^_^}>
#36354 (by nh2, 3 years ago, open): Document what callPackage does and its preconditions
<gustavderdrache>
matthewcroughan: no, because thinking in packages is kind of an anti-pattern in nix
<matthewcroughan>
Still an open issue, it's vague.
<matthewcroughan>
Unless you can describe to me exactly what callPackage does :P
<matthewcroughan>
It's a function. It takes arguments. It should be able to be described with English.
<matthewcroughan>
I'm not thinking in packages right now. My mind is open. I just want to know how the function works in English.
<matthewcroughan>
The nix pill is very technical, it has no abstract overview of what it is, I've only ever thought of it as magic.[
m0rphism has quit [Ping timeout: 260 seconds]
<matthewcroughan>
At some point in the next year, I'll read that Nix pill, fully understand it, and have forbidden knowledge. But for now, it's just magic to me, and every time I ask about it, I actually get a different answer from people in Nix.
<gustavderdrache>
> lib.functionArgs ({ x, y }: null)
<{^_^}>
{ x = false; y = false; }
<tpw_rules>
because you ask different questions
<tpw_rules>
callpackage automatically fills in the arguments to a function with attributes from an attribute set
<matthewcroughan>
callPackage doesn't have a __functionArgs
<matthewcroughan>
I tried to autocomplete that in the repl to see what arguments it takes, but didn't get anywhere.
<tpw_rules>
matthewcroughan: all nix makes is derivations. that's the only way to do things in nix
<matthewcroughan>
Well that's reassuring, like finding out that the only place it writes to is the /nix/store.
<ajs124>
> builtins.functionArgs callPackage
<{^_^}>
{ }
<matthewcroughan>
So when something is not a derivation, what is it?
jgt has joined #nixos
<tpw_rules>
any other type?
<matthewcroughan>
You can end up in situations where you're executing functions that expect to be passed derivations. What are these things that aren't derivations?
<matthewcroughan>
Okay, so what is "making"?
<tpw_rules>
you're asking non sequitor questions. that's why you get random answers
<matthewcroughan>
Okay.
<tpw_rules>
in order to get nix to do something, like make a pack file or whatever, you HAVE to give it a derivation. there is no other mechanism
<matthewcroughan>
If you can't answer, then I've probably asked a dumb question, I'll keep that in mind in future.
<matthewcroughan>
You say "give it" a derivation. What is 'it'?
<tejing>
nix
<tpw_rules>
i guess you could say refer to as an attribute passed to a nix command
<matthewcroughan>
But when I'm in the repl, there is no Nix command. What is it?
<matthewcroughan>
What is this great 'it'?
<tpw_rules>
what is the repl?
<matthewcroughan>
functions that take derivations, you mean?
<ajs124>
tpw_rules: nix repl
jgt_ has joined #nixos
<tpw_rules>
then something you give to :b or :i
<tpw_rules>
or :s or :u
jgt has quit [Ping timeout: 240 seconds]
<matthewcroughan>
runCommandNoCC doesn't have things like `pname` right?
<matthewcroughan>
Oh wait, no it does, because it's a wrapper around mkDerivation right?
<matthewcroughan>
So it inherits all that stuff?
<tpw_rules>
okay so this is simplified but it's true. and it's not an answer to your question but a path to the enlightenment that enables you to find the solution
<tpw_rules>
there are two nixes. nix the language and nix the thing that does stuff with /nix/store. nix the language has ONE command to generate a derivation object: https://nixos.org/manual/nix/stable/#ssec-derivation which then gets written to a .drv file. nix the rest reads those files and runs bash and updates the store database and whatever.
supersandro2000 has quit [Killed (verne.freenode.net (Nickname regained by services))]
mbrgm_ has joined #nixos
supersandro2000 has joined #nixos
<matthewcroughan>
So, I can't use runCommand inside of mkDerivation.
<matthewcroughan>
But all I want to do is have a "derivation" that is nothing more than the output of a command.
<tpw_rules>
"inside" isn't a thing
<tpw_rules>
neither is the output of a command a thing
<matthewcroughan>
tpw_rules: the output of a given command that puts a file into $out
<matthewcroughan>
that isn't a thing?
<matthewcroughan>
What framework do you want my mind to think under? Because whatever you have, I don't have it.
mbrgm has quit [Ping timeout: 260 seconds]
mbrgm_ is now known as mbrgm
ehmry has joined #nixos
<ajs124>
if you want an explanation of nix from first principles, I'm sure one of the companies listed under https://nixos.org/community/commercial-support.html would be glad to give you a (paid) workshop :P
<ajs124>
(and I'm totally not saying that because my company is listed there)
<tpw_rules>
if you want some magic pile of nix that generates a pack file or whatever, the pile needs to call `derivation` with the appropriate arguments as described in that link and convey that object by naming an attribute containing it as a parameter to :b in the shell or whatever
<zeta_0>
how come when I build a nix-shell env in vscode, java and javac are not showing up in terminal? how do I troubleshoot this issue?
<tpw_rules>
stdenv.mkDerivation and runCommand and everything else just ultimately boil down to `derivation`.
<colemickens>
> let x = ({ foo }: foo) { foo = pkgs.hello; }; pkgs.callPackage x
<{^_^}>
error: syntax error, unexpected ID, expecting '.' or '=', at (string):494:64
<ajs124>
surprise, it's the same .drv
<tpw_rules>
don't forget the {} to specify you don't want to override any arguments
<matthewcroughan>
the {} at the end?
<tpw_rules>
yes
<matthewcroughan>
what does that do in all contexts?
<matthewcroughan>
is it dependant on context? Or is it doing the same thing in all?
<tpw_rules>
there's a non sequitur again
<matthewcroughan>
?
<colemickens>
> let x = ({ foo }: foo); pkgs.callPackage x { foo = pkgs.hello; }
<{^_^}>
error: syntax error, unexpected ID, expecting '.' or '=', at (string):494:42
<matthewcroughan>
I'm saying I've seen it done before and want to know what it does.
<matthewcroughan>
Not everything is a debate :P
* colemickens
should pm the bot i guess
jgt_ has quit [Ping timeout: 265 seconds]
<matthewcroughan>
I've seen `{}` at the end of things a lot, and never understand if it's doing the same thing in all contexts.
<tpw_rules>
i'm not real sure how to explain it because it means you don't understand the basics of nix the language
<matthewcroughan>
Best part is, you don't need to, to jump in.
<tpw_rules>
no, you really really do
<matthewcroughan>
And that's what a lot of people do, are doing, have done in a lot of other languages.
<matthewcroughan>
Okay purist :P
<matthewcroughan>
You don't have to give me your help, if you feel I'm not ready for it.
<tpw_rules>
because if you DID, you would know that {} is a function argument in this context. and to callPackage, it's the argument that's the set of additional arguments to pass to the package function. which there aren't any so it's a null set
<matthewcroughan>
Not everyone is a functional God such as yourself! Calm down.
<zeta_0>
sweet, I am now able to get my java programs to print to terminal using nix-shell in vscode, so that's a start!
<matthewcroughan>
What is basic to you, is not basic to me, and to a lot of others.
<colemickens>
"hey knowing the literal basics of the language might help" is not an attack.
<matthewcroughan>
Feels like one :D
<colemickens>
If you're comfortable not understanding how function calls work in a language you've been using on and off to some degree for a year, that's cool, but understand that others are going to roll their eyes at some point.
<matthewcroughan>
colemickens ignored me for a while and I learned a little more.
<tpw_rules>
i'm sorry, i don't intend to be degrading. but colemickens is right, there's a massive amount of confusion surrounding nix which is answered by forms which i've just illustrated. primarily it's because the docs suck massively rather than any innate failings of the users
<matthewcroughan>
you should ignore me for a bit, I won't take offense to it.
wnklmnn has quit [Quit: Leaving]
<matthewcroughan>
Cold words about eye rolling.
<matthewcroughan>
Love you <3
<marnov>
hello, is there some best-practice where to store in filesystem php webapp, like drupal ? /srv/www /var/www
<tpw_rules>
but to some degree it IS attitude, "i'll ignore the pills lol and get by on magic runes" is a dumb way that appears to work on the surface but really hurts you. the relevant function syntax is covered in pill 5.2: https://nixos.org/guides/nix-pills/functions-and-imports.html
<ajs124>
marnov: the best practice is managing it with nix, then
<matthewcroughan>
Welp, thanks for the shaming.
<matthewcroughan>
Won't ask any more questions until I'm qualified.
<marnov>
ajs124: :-) so whaty about apps, not managed by nix ?
<ajs124>
marnov: don't :D
<tpw_rules>
like i wish the pills could somehow be magically clearer. most of them i kind of glazed over and then screwed up a lot and eventually i went "oh, that's what it was trying to tell me. that makes perfect sense". but the basic syntax you need to get at least a little bit. and not be afraid to read nixpkgs code itself
<marnov>
ajs124: i need to start somewhere ... i have running webapps, ans wanna to switch nix :-)
<marnov>
ok so it measn, doesnt matter
<hexa->
marnov: package the app with nix then:)
<marnov>
yeah, i'll do ... later :-)
<matthewcroughan>
I didn't realise a lack of basic knowledge could be so offensive to people who know a lot more than me.
<matthewcroughan>
I didn't intend to ask people who were on a much higher level than me, these questions, knowing they would belittle me like that.
<matthewcroughan>
It's an open irc. If you have a high skill level that causes your blood to boil when you see noobs, sorry.
<tpw_rules>
matthewcroughan: i would genuinely suggest in a kind and respectful manner to take a few hours, go through the pills, and type out all the examples and reading all the responses. just to make sure you've seen everything in an appropriate context. that's what i did and that's what planted the seeds.
<marnov>
hexa-: ajs124: i really like nixos ... it is like a dream ... but the steep learning curve ... :-)_
<marnov>
i need to go step by step
<matthewcroughan>
tpw_rules: yeah, except I'm learning what I need, when I need it.
<tpw_rules>
like i said it was frustrating for a while and it took lots of reflection to actually Get It
<matthewcroughan>
Which is a learning style that it seems neither you or colemickens agree with.
zeta_0 has quit [Quit: rcirc on GNU Emacs 27.1]
<matthewcroughan>
So you're telling me to learn differently, I appreciate the suggestion. Thank you, but I'm going to keep doing what I'm doing now.
<tpw_rules>
matthewcroughan: from watching other people in this channel, that's a fatal mistake! don't do it. it doesn't work. that's the part, if anything, that offends me
<matthewcroughan>
I can't refute your opinions.
<ajs124>
marnov: you can just put it in /srv/http or wherever and point your nginx/apache/whatever at it. I'd recommend to "just package it", but if you're in a hurry or just not that familiar with it, that should also work.
<ajs124>
don't tell anyone I told you to do that though (he said, on a publically logged channel)
<matthewcroughan>
tpw_rules: Everybody is always learning. Your comment about magic runes is the case in most languages.
<matthewcroughan>
There are absolutely magic runes that people don't understand in C++.
<tpw_rules>
nix has the un-enviable position though that the goal is unrelated to the magic runes
Synthetica has quit [Quit: Connection closed for inactivity]
<matthewcroughan>
You never learn everything about everything. It's a continual process.
<gchristensen>
thats how I learned. by the time I read the pills I knew just about all of it, it works
<marnov>
ajs124: yeah, thx :-) how do store non-bublic webapps managed by nixos ? from some secured locations ?
<matthewcroughan>
So, yesterday, I discovered that there's a __functionArgs at the end of some things, which lets me play around in the repl and discover function arguments.
<matthewcroughan>
That's not there for some things. Why is that?
<marnov>
ajs124: ahh, that is right question ... whre to store prsistent data (in my opinion sqlitefile )
<matthewcroughan>
Can I ask that question? Or am I gonna be told to go and learn the basics? :P
<matthewcroughan>
Where would I be able to read about that behavior?
<gchristensen>
what do you mean, not there for some things?
<matthewcroughan>
callPackage is a function, right?
<gchristensen>
ah
<tpw_rules>
gchristensen: so you didn't really learn much from the pills?
<matthewcroughan>
There is no `callPackage.__functionArgs`
<ajs124>
marnov: /var/lib/$your_app. what systemd calls StateDirectory.
ahmed_elgabri has quit [Ping timeout: 260 seconds]
<tpw_rules>
what did you mean by "it works"?
<ajs124>
I'm not sure I've actually read all the nix pills, to this day >.<
<ajs124>
Maybe I should
<matthewcroughan>
People have different learning styles.
<matthewcroughan>
It's always the case that people who read a lot of books belittle those who do not.
<matthewcroughan>
Reading books isn't invalid, neither is learning by doing. They're different.
<gchristensen>
I don't think __functionArgs is an member of an attrset usually
<lukegb>
builtins.functionArgs is the "supported" way of doing taht
<{^_^}>
attribute 'builDockerImage' missing, at (string):494:23
<gchristensen>
meh
<gchristensen>
__ usually means internal, unstable interface
<marnov>
ajs124: thx
<matthewcroughan>
unstable? O.o
<lukegb>
unstable as in "don't rely on this" not necessarily unstable as in "will crash and you get to keep all the pieces"
<matthewcroughan>
how do they end up becoming members?
<matthewcroughan>
and why is it there for some things and not others?
<ajs124>
so if I use __functor, I shouldn't?
<gchristensen>
ajs124: correct, please don't use __functor it is regretful that it was added
<gchristensen>
:P
<lukegb>
well, also I feel like some of the __ members are just named that so they never conflict with anything
<lukegb>
matthewcroughan: so nixpkgs has this "setFunctionArgs" thing...
<gchristensen>
yeah..
<marnov>
!help
<ajs124>
gchristensen: hey, at least I'm not using importNative or builtins.exec
<gchristensen>
;_;
<marnov>
ajs124: can i give u carma ?
<tpw_rules>
matthewcroughan: i'm confused now. the place to read to learn about those things is the pills.
<gchristensen>
marnov: an important thing to remember is that Nix itself is a tiny language, and Nixpkgs has to add a ton of library and whatnot
<gchristensen>
erm, matthewcroughan ^
<marnov>
gchristensen: i hate nix language :-)))
<lukegb>
ajs124: what about __findFile
<ajs124>
lukegb: Ah, I think we dropped that from our tree. Let me grep real quick.
<ajs124>
nope, there's still one (1) there
<ajs124>
__findFile __nixPath
<lukegb>
but you're not overriding it? :P
<matthewcroughan>
Oh, well haven't you all read the pills?
ddellac__ has joined #nixos
<tpw_rules>
i guess to really beat a dead horse, there's nowhere in nix to directly find the answers to your exact questions. but there's the pills which give you the background you need to figure that out. they're the best reading there is to be had, so saying "where can i read about this?" then deliberately ignoring them is weird
<matthewcroughan>
Why is there so much confusion and discussion? :D
<ajs124>
lukegb: pls no
<gchristensen>
matthewcroughan: people are showing off how much cursed knowledge the yhave
<matthewcroughan>
tpw_rules: You need to realise how good you are at this thing.
<matthewcroughan>
I'm not trying to flatter you.
<ajs124>
gchristensen: is this where I bring up how to disable restricted eval in hydra?
<lukegb>
yeah, we're basically discussing things you shouldn't ever* do
<gchristensen>
ajs124: stop stop stop!
<matthewcroughan>
tpw_rules: If I ask a question, you don't have to answer it and tell me how little I know :P
<matthewcroughan>
In fact, I'm sorry for taking up so much of your time.
<tpw_rules>
don't you wish to be free of asking questions?
<matthewcroughan>
I took up so much of colemickens time months ago that he blocked me haha.
<matthewcroughan>
I can't wait for NixCon so you can all reject me in person too.
<ajs124>
gchristensen: but this is just getting fun :(
<lukegb>
I'm going to regret asking how this PID ends up being "10"
<l33[m]>
<tpw_rules "don't you wish to be free of ask"> i find your questions...... 'disturbing'.
<lukegb>
and no, they haven't wrapped around on this system
ddellac__ has quit [Ping timeout: 252 seconds]
<ajs124>
lukegb: the internet tells me "In Linux a root user can influence the PID given to a process by writing one less of the desired PID number to /proc/sys/kernel/ns_last_pid"
<lukegb>
oh wait, this is in a build, 10 is actually a reasonable pid