FAQ: Difference between revisions

imported>Mathnerd314
add question based on https://github.com/NixOS/nixpkgs/issues/36266
imported>Makefu
No edit summary
Line 232: Line 232:
== How do I install a specific version of a package for build reproducibility etc.? ==
== How do I install a specific version of a package for build reproducibility etc.? ==


See [[FAQ/Pinning Nixpkgs]] and [[How to fetch Nixpkgs with an empty NIX PATH]]. Find the version of nixpkgs with the package version you want and pin nixpkgs to that.
See [[FAQ/Pinning Nixpkgs]] and [[How to fetch Nixpkgs with an empty NIX PATH]]. Find the version of nixpkgs with the package version you want and pin nixpkgs to that. However, be aware that the pinning of a package of another nixpkgs version results in a much larger package size as not only the package itself but all dependencies (down to libc) have older versions.
 
if you just want the old version of the single package but with new dependencies it is often easier to copy the package description into your scope and add it to your <code>configuration.nix</code> via: <code> mypackage-old = pkgs.callPackage ./mypackage-old.nix {};</code>.You can try to build the package as described in [[FAQ#I.27m_working_on_a_new_package.2C_how_can_I_build_it_without_adding_it_to_nixpkgs.3F|the FAQ: building a single derivation]].


== An error occurs while fetching sources from an url, how do I fix it? ==
== An error occurs while fetching sources from an url, how do I fix it? ==