-
Notifications
You must be signed in to change notification settings - Fork 3
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Nix shell #245
Open
alecandido
wants to merge
10
commits into
master
Choose a base branch
from
nix
base: master
Could not load branches
Branch not found: {{ refName }}
Loading
Could not load tags
Nothing to show
Loading
Are you sure you want to change the base?
Some commits from the old base branch may be removed from the timeline,
and old review comments may become outdated.
Open
Nix shell #245
Changes from all commits
Commits
Show all changes
10 commits
Select commit
Hold shift + click to select a range
6db5d6e
Add nix files
alecandido d68d531
Add maturin, update nixos distribution
alecandido e78e85c
Add lhapdf dependency, setup shell to ease its usage
alecandido 90e175a
Propagate Python version to the LHAPDF package
alecandido f4ede7f
Use PATH variable from module system
alecandido 8e4892a
Drop path extension, temporarily
alecandido 8cef3a8
Set pineappl PATH in the trivial way
alecandido 971773c
Document Nix files added to the repo
alecandido 6983c81
fix: Upgrade direnv watch directives
alecandido 7008bd9
fix: Remove fixed Python version
alecandido File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,11 @@ | ||
if ! has nix_direnv_version || ! nix_direnv_version 2.2.1; then | ||
source_url "https://raw.githubusercontent.com/nix-community/nix-direnv/2.2.1/direnvrc" "sha256-zelF0vLbEl5uaqrfIzbgNzJWGmLzCmYAkInj/LNxvKs=" | ||
fi | ||
|
||
watch_file devenv.nix | ||
watch_file devenv.lock | ||
watch_file devenv.yaml | ||
if ! use flake . --impure | ||
then | ||
echo "devenv could not be built. The devenv environment was not loaded. Make the necessary changes to devenv.nix and hit enter to try again." >&2 | ||
fi |
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 |
---|---|---|
@@ -1,2 +1,5 @@ | ||
/target | ||
test-data/* | ||
|
||
# Devenv files, to handle the development shell defined by the flake | ||
.devenv/ |
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
Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.
Oops, something went wrong.
Oops, something went wrong.
Oops, something went wrong.
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
The description is slightly beyond what is currently provided, since I have no
output.packages
in the flake (yet).However, that is perfectly possible, and I'm also going to do it (sooner or later).
In principle, we could use Nix to build packages even in the CI (those for which we're distributing binaries). But dynamically-linked binaries won't be portable outside Nix (not sure if it's possible to make them such).
In any case, even spelling out the build is already a source distribution on its own, that will make it possible to compile PineAPPL with just:
and no extra requirement (not regarding build tools installation, nor dependencies).