News for hackers. Stuff that matters.
Re:Show HN: Nixhub.io – Search Historical Versions of Nix Pa... by breakds on Monday July 17, 2023 @05:04PM (#36764062)
For flake.nix, you add that to the inputs, for example, call it `nixpkgs-old`, and then reference the package of interest with:

`nixpkgs-old.legacyPacakges.linux-x86_64.node`, or something like below

``` let pkgs = import nixpkgs-old { system = "linux-x86_64"; } in pkgs.mkShell { packages = [ pkgs.node ]; } ```

Sorry i am not sure how to make code blocks look nicer here.

Re:Show HN: Nixhub.io – Search Historical Versions of Nix Pa... by jljljl on Monday July 17, 2023 @05:18PM (#36764252)
You can use 2 spaces after a newline to format it:

  let 
     pkgs = import nixpkgs-old { system = "linux-x86_64"; } 
  in 
     pkgs.mkShell { packages = [ pkgs.node ]; }

Combine this with the input statement in the comment below to get a decent flake. You can mix and match multiple inputs if you want to install different versions of packages