default.nix: prevent nixpkgs tarball GC
When adding a GC root with `nix-build -A inputDerivation` the Nixpkgs tarball wasn't being saved because it's technically not a build input.
This commit is contained in:
parent
3f79a6e9cd
commit
cd6966f1b4
@ -2,11 +2,11 @@
|
|||||||
|
|
||||||
let
|
let
|
||||||
# Pinned Nixpkgs for reproducibility
|
# Pinned Nixpkgs for reproducibility
|
||||||
nixpkgs = import (builtins.fetchTarball
|
nixpkgs = builtins.fetchTarball
|
||||||
{ name = "nixpkgs-21.05-ee90403e147";
|
{ name = "nixpkgs-21.05-ee90403e147";
|
||||||
url = "https://github.com/nixos/nixpkgs/archive/ee90403e147.tar.gz";
|
url = "https://github.com/nixos/nixpkgs/archive/ee90403e147.tar.gz";
|
||||||
sha256 = "1mk3s4ncfa8z8mr6vrgjh74s8dci12yam7plpc1bqgz12wld73ax";
|
sha256 = "1mk3s4ncfa8z8mr6vrgjh74s8dci12yam7plpc1bqgz12wld73ax";
|
||||||
}) {};
|
};
|
||||||
|
|
||||||
# Needed for HTML manual
|
# Needed for HTML manual
|
||||||
katex = builtins.fetchTarball {
|
katex = builtins.fetchTarball {
|
||||||
@ -20,7 +20,7 @@ let
|
|||||||
!builtins.elem path [ "configure.mk" "default.nix" "result" ]
|
!builtins.elem path [ "configure.mk" "default.nix" "result" ]
|
||||||
&& baseNameOf path != "build") ./.;
|
&& baseNameOf path != "build") ./.;
|
||||||
|
|
||||||
inherit (nixpkgs) lib pkgs;
|
inherit (import nixpkgs {}) lib pkgs;
|
||||||
|
|
||||||
in
|
in
|
||||||
pkgs.stdenv.mkDerivation rec {
|
pkgs.stdenv.mkDerivation rec {
|
||||||
@ -41,6 +41,9 @@ in
|
|||||||
(texlive.combine {
|
(texlive.combine {
|
||||||
inherit (texlive) scheme-small xetex fontspec;
|
inherit (texlive) scheme-small xetex fontspec;
|
||||||
})
|
})
|
||||||
|
|
||||||
|
# save nixpkgs tarball from gc
|
||||||
|
nixpkgs
|
||||||
];
|
];
|
||||||
|
|
||||||
buildInputs = lib.optional static pkgs.glibc.static;
|
buildInputs = lib.optional static pkgs.glibc.static;
|
||||||
|
Loading…
Reference in New Issue
Block a user