Using nixos for some months now and like it. But one thing lack, good and up to date documentation
I’m trying to add a newer version for houdini as nixpkgs give 21.0.559 and sidefx has released newer version since (21.0.729). And newer version come fast with small bugfix or optimization. I can PR each new version but i think it can be faster to make an overlay or override for it.
I’ve tried with packages override but no documentation seem to offer up to date example that work.
Tried overlays and same problem.
I’m not seasoned programmer but 3d artist with some basic programming knowledge (python, C, learning haskell since two weeks).
Can anyone here give me full example of how to use most recent houdini version with nixos, please? It can be with other software but i need recent, working solution…
I like to learn by trial and error but this time, after hours of trying, nothing seem to work.
If someone can help me here, i’ll be I would be very grateful
Oof, whoever packaged houdini did not make things easy for you.
Untested because unfree software, but something like this should work:
{
environment.systemPackages = [
(pkgs.houdini.override {
unwrapped = pkgs.houdini.unwrapped.overrideAttrs (finalAttrs: oldAttrs: {
version = "21.0.729";
src = pkgs.requireFile {
name = "houdini-${finalAttrs.version}-linux_x86_64_gcc11.2.tar.gz"; # maybe?
message = ''
Anything you want. Usually this will contain instructions
for how to download the unfree software package. When
preparing a package for personal use, it'd just be a
reminder to yourself.
'';
hash = ""; # you will have to fill this in after Nix complains about a hash mismatch
};
outputHash = ""; # same
});
})
];
}
Change the files to your liking (if you are lucky you only need to change in runtime.nix the version and hash.) As it is unfree i can’t test it.
Change in your configuration.nix pkgs.houdini to (pkgs.callPackage ./packages/houdini/package.nix { })
It could be that you need to use the impure flag (i think that you don’t need this if the folder is in the same folder as your configuration.nix file.)
With the original package, i need to add houdini to my pkgs, run nixos-rebuild, add the tar.gz file with nix-store or nix-prefetch-url and launch nixos-rebuild for it to work.
With modified package, it can’t find it but it’s in the store…
I don’t know how to calculate outputhash as it seem ti be my problem now.
I’m assuming English is not your first language, so sorry if I am not understanding you or I say something unclear.
What does nix-store --query --deriver /nix/store/vjab7pgja3pzjcdk31ajmawdggi1vxp0-houdini-21.0.729-linux_x86_64_gcc11.2.tar.gz return?
If it’s /nix/store/2xb7r709m7vwf86ah2mi54589szim1i7-houdini-21.0.729-linux_x86_64_gcc11.2.tar.gz.drv, then you shouldn’t be getting Unfortunately, we cannot download file houdini-21.0.729-linux_x86_64_gcc11.2.tar.gz automatically..
If you aren’t getting that error, please post the new error.
ah I see. Have you tried vjab7pgja3pzjcdk31ajmawdggi1vxp0 in that case? Not sure if that will work, but that’s the hash of the file in /nix/store apparently
I just create a package where i use the local tar.xz with requireFile i got it working with:
i downloaded the tar.xz to the downloads folder
i added the file to the nix-store with nix-store --add-fixed sha256 /home/lukas/Downloads/file.tar.xz
I tried to build it but got the same error as you.
I calculated the hash with nix hash file /home/lukas/Downloads/file.tar.xz
I used this hash with the leading sha256-... in requireFile
i was able to successfully build it.
I think your hash is wrong.
When i use nix-hash --sri --type sha256 /home/lukas/Downloads/file.tar.xz i get the wrong hash. I need to use nix hash file /home/lukas/Downloads/file.tar.xz to get the correct hash.