diff --git a/.envrc b/.envrc index 1f15539fb..edebaae71 100644 --- a/.envrc +++ b/.envrc @@ -1,10 +1,14 @@ # Create a gcroot that keeps all third_party.sources alive -nix-build --out-link .gcroots/sources -E ' +nix-build --show-trace --out-link .gcroots/sources -E ' with import ./. {}; third_party.nixpkgs.writeText "depot-3p-sources.txt" ( toString ( builtins.map (s: s.outPath or null) ( - builtins.attrValues third_party.sources + # Only gcroot sources that are explicitly marked using + # niv modify --attribute gcroot=true + builtins.filter (source: source.gcroot or false) ( + builtins.attrValues third_party.sources + ) ) ) )' diff --git a/third_party/sources/sources.json b/third_party/sources/sources.json index 043034e98..690694635 100644 --- a/third_party/sources/sources.json +++ b/third_party/sources/sources.json @@ -14,6 +14,7 @@ "gitignore.nix": { "branch": "master", "description": "Nix functions for filtering local git sources", + "gcroot": true, "homepage": "", "owner": "hercules-ci", "repo": "gitignore.nix", @@ -26,6 +27,7 @@ "home-manager": { "branch": "master", "description": "Manage a user environment using Nix [maintainer=@rycee] ", + "gcroot": true, "homepage": "https://nix-community.github.io/home-manager/", "owner": "nix-community", "repo": "home-manager", @@ -74,6 +76,7 @@ "nixpkgs": { "branch": "nixos-unstable", "description": "Nix Packages collection", + "gcroot": true, "homepage": "", "owner": "NixOS", "repo": "nixpkgs", @@ -86,6 +89,7 @@ "nixpkgs-stable": { "branch": "nixos-23.11", "description": "Nix Packages collection", + "gcroot": true, "homepage": "", "owner": "NixOS", "repo": "nixpkgs", @@ -98,6 +102,7 @@ "rust-overlay": { "branch": "master", "description": "Pure and reproducible nix overlay of binary distributed rust toolchains", + "gcroot": true, "homepage": "", "owner": "oxalica", "repo": "rust-overlay",