How do i get 'rev' argument and sha256 from github repository?

today i try to install dwm but the fork one i got from github. i read this (st - NixOS Wiki) but the wiki is for st…how do i get the ‘rev’ argument and sha256 for dwm from github repo??

2 Likes

You can nix-prefetch-github or other related tools. You can clone locally and do git rev-parse HEAD to get the SHA1 of your commit, or you specify a tag to fetch from.

The sha256 is built upon that using that. If you used one of the nix-prefetch-* tools, it will be already available to you in the generated file. If you decided to go one of the manual routes, you can use lib.fakeSha256 as initial value (or if your nix is recent enough, just use sha256 = null or omit it) and then copy the “got” value from the error on first build into the sha256 value.

5 Likes

A more streamlined interface would be https://github.com/msteen/nix-prefetch

2 Likes

thanks alot guys…exactly what i need…i can feel my experience using nix is increasing…im going level up soon… :grin:

1 Like