NixOS tutorial - Nix Packages

Поділитися
Вставка
  • Опубліковано 12 гру 2024

КОМЕНТАРІ • 42

  • @minecraftpufferfish9066
    @minecraftpufferfish9066 7 місяців тому +25

    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!

  • @seanhdka
    @seanhdka 6 місяців тому +9

    you're doing god's work with these videos. the snoring in the background is also a nice touch.

    • @WhyDoesNothingWork
      @WhyDoesNothingWork  6 місяців тому +3

      thanks! lol sorry about the snoring, its my dog, i am so used to her snoring I dont even notice it anymore

    • @VincentMaule
      @VincentMaule 5 місяців тому +1

      I was going to comment this too!

    • @poe84it
      @poe84it 3 місяці тому

      @@WhyDoesNothingWork my little fella snore in the same way!

  • @sharperguy
    @sharperguy 5 місяців тому +1

    I love that it's very similar to an AUR PKGBUILD but it's the main way to package things in nixos.

    • @WhyDoesNothingWork
      @WhyDoesNothingWork  5 місяців тому

      Yeah this method of packaging at first seems like a big pain but it really grows on you after a while

  • @Rypervenche
    @Rypervenche 3 місяці тому

    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!!

  • @yash1152
    @yash1152 3 місяці тому

    2:54 i think nativeBuildInputs is used for specifying the compiler etc, the buildInputs is used for includes, imports and libs etc.

    • @WhyDoesNothingWork
      @WhyDoesNothingWork  3 місяці тому

      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.

    • @yash1152
      @yash1152 3 місяці тому

      @@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"_

    • @WhyDoesNothingWork
      @WhyDoesNothingWork  3 місяці тому

      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

  • @yash1152
    @yash1152 3 місяці тому

    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...

  • @yash1152
    @yash1152 3 місяці тому

    11:18 Command to build and run our package.

  • @mgord9518
    @mgord9518 Місяць тому

    9:30 wouldn't setting hostSystem be an issue with only a single hash? Because the releases for different architectures would have different hashes

  • @lololol338
    @lololol338 4 місяці тому +4

    Is your dog snoring in the back ? xD
    anyway, tutorial remains very good ! thanks for the video :D

  • @yash1152
    @yash1152 3 місяці тому

    1:03 doesn't arch's pkgbuild files do the same?

    • @WhyDoesNothingWork
      @WhyDoesNothingWork  3 місяці тому

      sort of it has some things in common with this but arch packages in general have a very different approach

  • @OnboardingInformation
    @OnboardingInformation 7 місяців тому +1

    Very cool niche video topic

  • @sailendragautam6268
    @sailendragautam6268 Місяць тому

    I'm using Nix in my ubuntu. How do I configure the required settings to add the derivation as a package?

  • @yash1152
    @yash1152 3 місяці тому

    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 😆

    • @WhyDoesNothingWork
      @WhyDoesNothingWork  3 місяці тому

      Yeah audio is difficult it's been a constant challenge I'll keep working on it

    • @yash1152
      @yash1152 3 місяці тому

      @@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"_

    • @WhyDoesNothingWork
      @WhyDoesNothingWork  3 місяці тому

      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

    • @yash1152
      @yash1152 3 місяці тому

      @@WhyDoesNothingWork even with using earphones?
      > _"sound different to me on my pc speakers"_

  • @RobFisherUK
    @RobFisherUK 6 місяців тому

    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?

    • @WhyDoesNothingWork
      @WhyDoesNothingWork  6 місяців тому +1

      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";
      }

  • @dyncake
    @dyncake 3 місяці тому

    God's work

  • @egunuraka
    @egunuraka 7 місяців тому

    Thanks for this video! ❤

  • @yash1152
    @yash1152 3 місяці тому

    5:59 6:05 who's snoring behind u lol 😆

  • @Trokumukum
    @Trokumukum 7 місяців тому +3

    You should teach how to make a Debian server.

    • @WhyDoesNothingWork
      @WhyDoesNothingWork  7 місяців тому

      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

  • @InspiredPlans
    @InspiredPlans 6 місяців тому

    Awesome videos! Subscribed.

  • @hubstrangers3450
    @hubstrangers3450 7 місяців тому

    Thank you....

  • @eygs493
    @eygs493 6 місяців тому +1

    All I did was change the value from poo to poopoop and you know what happened? It still works!

    • @WhyDoesNothingWork
      @WhyDoesNothingWork  6 місяців тому

      I tried changing it to ka ka but I was getting errors :)