-
-
Notifications
You must be signed in to change notification settings - Fork 36
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Detect HerculesCI, make our nixpkgs version easily available
- Loading branch information
Showing
2 changed files
with
11 additions
and
1 deletion.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,10 @@ | ||
# Detect HerculesCI by checking if NIX_PATH is empty. | ||
# See https://docs.hercules-ci.com/hercules-ci/getting-started/repository/ | ||
# If it's empty, we give our custom nixpkgs version; | ||
# otherwise we use what the user has set with NIX_PATH. | ||
if builtins.getEnv "NIX_PATH" == "" | ||
then | ||
builtins.trace "NIX_PATH is not set, we're probably in HerculesCI" | ||
(import (fetchTarball https://github.com/nh2/nixpkgs/archive/a2d7e9b875e8ba7fd15b989cf2d80be4e183dc72.tar.gz) {}) | ||
else | ||
import <nixpkgs> {} |