Building ancient nixpkgs: Difference between revisions
imported>Nix m recategorize |
imported>Ckiee m fix my github username |
||
(One intermediate revision by one other user not shown) | |||
Line 1: | Line 1: | ||
Nix's reproducibility allows for easy building of ancient nixpkgs checkouts. | Nix's reproducibility allows for easy building of ancient nixpkgs checkouts. | ||
An attempt to get firefox 2.0 running can be found here: https://github.com/ | An attempt to get firefox 2.0 running can be found here: https://github.com/ckiee/nixpkgs/commits/2007-fixing | ||
== Replacing outdated nix.cs.uu.nl == | == Replacing outdated nix.cs.uu.nl == | ||
Line 17: | Line 17: | ||
<code>nix-build</code> may fail while trying to fetch a package from a 3rd-party mirror. | <code>nix-build</code> may fail while trying to fetch a package from a 3rd-party mirror. | ||
If this happens, you will need to search the internet for another mirror from which you can fetch the package; for certain nixpkgs versions you will need to ensure it does not force-redirect to SSL as <code>curl</code> was not built with SSL support in early versions. | If this happens, you will need to search the internet for another mirror from which you can fetch the package; for certain nixpkgs versions you will need to ensure it does not force-redirect to SSL as <code>curl</code> was not built with SSL support in early versions. | ||
You can manually add a tarball to the store by using <code>nix-prefetch-url</code>. You have to use the same checksum algorithm used in the nixpkgs definition with the <code>--type</code> parameter. | |||
[[Category:Cookbook]] | [[Category:Cookbook]] |
Latest revision as of 12:02, 4 September 2022
Nix's reproducibility allows for easy building of ancient nixpkgs checkouts.
An attempt to get firefox 2.0 running can be found here: https://github.com/ckiee/nixpkgs/commits/2007-fixing
Replacing outdated nix.cs.uu.nl
You may find that the build fails as it cannot find some tarballs. This is solved by updating the primary mirror URL to one that is still running:
for x in $(find); do sed -i 's/nix.cs.uu.nl/tarballs.nixos.org/g' "$x"; done
for x in $(find); do sed -i 's/dist\/tarballs\///g' "$x"; done
You will also want to run nix-build
with the --no-substitute
flag to avoid any outdated caches.
Replacing outdated package sources
nix-build
may fail while trying to fetch a package from a 3rd-party mirror.
If this happens, you will need to search the internet for another mirror from which you can fetch the package; for certain nixpkgs versions you will need to ensure it does not force-redirect to SSL as curl
was not built with SSL support in early versions.
You can manually add a tarball to the store by using nix-prefetch-url
. You have to use the same checksum algorithm used in the nixpkgs definition with the --type
parameter.