I just packaged my first Rust program thanks to this video. It worked perfectly and wasn't super convoluted like some other guides out there. Thanks a ton!!
correct you can use nativeBuildInputs for the compiler, and its probably better to do so, basically buildInputs is any libraries and depends, nativeBuildInputs is depends only required at build time and not runtime so gcc and go etc should be in nativeBuildInputs, that being said it works either way it just uses up a bit more disk space unless you optimize your nix store, as well as things like autoconf, automake any utilities that do sanity tests etc.
@@WhyDoesNothingWork i think nixos automatically runs the command for optimizing the nix store after every 7 days. i read that somewhere, probably in the description in search dot nixos slash options smth smth. > _"it works either way it just uses up a bit more disk space unless you optimize your nix store"_
It only runs it automatically if you configure it to do it, it can also run on every rebuild if set to do so, it's slow and resource intensive I cover it in my video on NixOS maintenance
6:33 i just noticed that the KDE DE's taskbar looks just like win10's taskbra 👀 the 2 line time/date, the expand accordion arrow, the network widget icon, the glance desktop icon, etc...
hi! ur videos seem nice. but please try to remove the subtle noise from the audio and boost the volume levels a bit (though, keep the volume levels consistent/normalised throughout the video) 5:596:05 who's snoring behind u lol 😆
@@WhyDoesNothingWork why? i heard it's pretty simple. though i have never tried it. 0. get a lavelior mic - costs about 6-7 USD, cling it onto shirt. 2. record an ambient 5 second sample before speaking. 3. perform a noise removal with that sample in audacity. > _"audio is difficult it's been a constant challenge"_
Isn't the hash going to change depending on the hostPlatform.system because the tar file is different? Or is the hash in fact not based on the contents of the tar file?
For the binary package yes, nix allows you to specify the hash per arch it looks something like this (youtube comments mangle code ) hash = { aarch64-linux = "sha256-blablah"; x86_64-linux = "sha256-lalala"; }
I think this might be the first complete video on UA-cam explaining how to actually package your own stuff with Nix. Thank you for your effort!
Thank you, I hope it was helpful
you're doing god's work with these videos. the snoring in the background is also a nice touch.
thanks! lol sorry about the snoring, its my dog, i am so used to her snoring I dont even notice it anymore
I was going to comment this too!
@@WhyDoesNothingWork my little fella snore in the same way!
I love that it's very similar to an AUR PKGBUILD but it's the main way to package things in nixos.
Yeah this method of packaging at first seems like a big pain but it really grows on you after a while
I just packaged my first Rust program thanks to this video. It worked perfectly and wasn't super convoluted like some other guides out there. Thanks a ton!!
I'm so happy to hear this! I'm glad to have helped
2:54 i think nativeBuildInputs is used for specifying the compiler etc, the buildInputs is used for includes, imports and libs etc.
correct you can use nativeBuildInputs for the compiler, and its probably better to do so, basically buildInputs is any libraries and depends, nativeBuildInputs is depends only required at build time and not runtime so gcc and go etc should be in nativeBuildInputs, that being said it works either way it just uses up a bit more disk space unless you optimize your nix store, as well as things like autoconf, automake any utilities that do sanity tests etc.
@@WhyDoesNothingWork i think nixos automatically runs the command for optimizing the nix store after every 7 days. i read that somewhere, probably in the description in search dot nixos slash options smth smth.
> _"it works either way it just uses up a bit more disk space unless you optimize your nix store"_
It only runs it automatically if you configure it to do it, it can also run on every rebuild if set to do so, it's slow and resource intensive I cover it in my video on NixOS maintenance
6:33 i just noticed that the KDE DE's taskbar looks just like win10's taskbra 👀
the 2 line time/date, the expand accordion arrow, the network widget icon, the glance desktop icon, etc...
11:18 Command to build and run our package.
9:30 wouldn't setting hostSystem be an issue with only a single hash? Because the releases for different architectures would have different hashes
Is your dog snoring in the back ? xD
anyway, tutorial remains very good ! thanks for the video :D
Yep that's my dog, she's a noisy sleeper. 😴
1:03 doesn't arch's pkgbuild files do the same?
sort of it has some things in common with this but arch packages in general have a very different approach
Very cool niche video topic
I'm using Nix in my ubuntu. How do I configure the required settings to add the derivation as a package?
hi! ur videos seem nice. but please try to remove the subtle noise from the audio and boost the volume levels a bit (though, keep the volume levels consistent/normalised throughout the video)
5:59 6:05 who's snoring behind u lol 😆
Yeah audio is difficult it's been a constant challenge I'll keep working on it
@@WhyDoesNothingWork why? i heard it's pretty simple. though i have never tried it.
0. get a lavelior mic - costs about 6-7 USD, cling it onto shirt. 2. record an ambient 5 second sample before speaking. 3. perform a noise removal with that sample in audacity.
> _"audio is difficult it's been a constant challenge"_
Because I don't have a quiet studio just a home office and things will sound different to me on my pc speakers than they may to others volume wise
@@WhyDoesNothingWork even with using earphones?
> _"sound different to me on my pc speakers"_
Isn't the hash going to change depending on the hostPlatform.system because the tar file is different?
Or is the hash in fact not based on the contents of the tar file?
For the binary package yes, nix allows you to specify the hash per arch it looks something like this (youtube comments mangle code )
hash = {
aarch64-linux = "sha256-blablah";
x86_64-linux = "sha256-lalala";
}
God's work
Thanks for this video! ❤
I hope it was helpful!
5:59 6:05 who's snoring behind u lol 😆
My dog :)
You should teach how to make a Debian server.
I have 2 more videos I want to do in my nixos series then I will look into doing some tutorials around Debian and rocky Linux probably
Awesome videos! Subscribed.
Thank you....
All I did was change the value from poo to poopoop and you know what happened? It still works!
I tried changing it to ka ka but I was getting errors :)