-
Notifications
You must be signed in to change notification settings - Fork 1
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Update ip_addresses to match new format in sync (#264)
* Update ip_addresses to hash format * Add nix flake support
- Loading branch information
1 parent
218584f
commit 32034db
Showing
4 changed files
with
78 additions
and
0 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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1 @@ | ||
use flake . --impure |
Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.
Oops, something went wrong.
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,46 @@ | ||
{ | ||
inputs.nixpkgs.url = "github:NixOS/nixpkgs/nixpkgs-unstable"; | ||
|
||
outputs = { self, nixpkgs }: | ||
let | ||
supportedSystems = [ "x86_64-linux" "x86_64-darwin" "aarch64-linux" "aarch64-darwin" ]; | ||
forAllSystems = nixpkgs.lib.genAttrs supportedSystems; | ||
pkgs = forAllSystems (system: nixpkgs.legacyPackages.${system}); | ||
in | ||
{ | ||
devShells = forAllSystems (system: { | ||
default = pkgs.${system}.mkShellNoCC { | ||
venvDir = "./.venv"; | ||
buildInputs = with pkgs.${system}; [ | ||
# A Python interpreter including the 'venv' module is required to bootstrap | ||
# the environment. | ||
python3Packages.python | ||
|
||
# This execute some shell code to initialize a venv in $venvDir before | ||
# dropping into the shell | ||
python3Packages.venvShellHook | ||
python3Packages.python-lsp-server | ||
# In this particular example, in order to compile any binary extensions they may | ||
# require, the Python modules listed in the hypothetical requirements.txt need | ||
# the following packages to be installed locally: | ||
python3Packages.wheel | ||
python3Packages.setuptools | ||
libvirt | ||
]; | ||
|
||
# Run this command, only after creating the virtual environment | ||
postVenvCreation = '' | ||
unset SOURCE_DATE_EPOCH | ||
pip install -r ./requirements.txt | ||
''; | ||
|
||
# Now we can execute any commands within the virtual environment. | ||
# This is optional and can be left out to run pip manually. | ||
postShellHook = '' | ||
# allow pip to install wheels | ||
unset SOURCE_DATE_EPOCH | ||
''; | ||
}; | ||
}); | ||
}; | ||
} |
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