-
Notifications
You must be signed in to change notification settings - Fork 84
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Add mach-nix example for python repository
- Loading branch information
Showing
10 changed files
with
99 additions
and
15 deletions.
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
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,26 @@ | ||
let | ||
mach-nix = import (builtins.fetchGit { | ||
url = "https://github.com/DavHau/mach-nix"; | ||
ref = "f60b9833469adb18e57b4c9e8fc4804fce82e3da"; | ||
}) { | ||
# ** Extremely important! ** | ||
# You want to use the same python version as your main nixpkgs. | ||
# Bazel does not enforce this, and it will fail for binary packages. | ||
pkgs = import <nixpkgs> {}; | ||
}; | ||
pythonWithPackages = mach-nix.mkPython { | ||
requirements = builtins.readFile ./requirements.txt; | ||
providers._default = "nixpkgs"; | ||
}; | ||
python = pythonWithPackages; #.python; | ||
# Beloved hacks ! | ||
# Extract the subset of packages that have been requested by mach-nix. | ||
# By default, python.pkgs contains all the packages known by nixpkgs, | ||
# plus the onse configured by mach-nix. | ||
# This retrives the `extraLibs` attribute that mach-nix configured. | ||
pkgs = (pythonWithPackages.override (old: { | ||
ignoreCollisions = old.extraLibs; | ||
})).ignoreCollisions; | ||
in { | ||
inherit python pkgs; | ||
} |
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,2 @@ | ||
cffi | ||
pandas |
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
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
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