The pills are a bit out of date, and need modernising the last time i checked.
pkgs = import {};
doesn’t ‘pin’ your nixpkgs to a certain revision/commit. So this example probably worked a long time ago, but things have moved on. (and they move quick in nixpkgs land!).
It’s quite possible this would work if you could find out the commit is was published at.