-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
* Testing templates * Running nix flake init on an empty directory * Fix mktemp flag * Remove suffix * Calling flake show * Print workspace * Quote template source * Run nix-shell * Add hasVersion to python plugin * Use relative paths for testing template * Fix path to asdf2nix * Point inputs to a specific commit during the testing phase * Run git add --all * Print the content of templates/default/flake.nix * Fix plugins input * Setup nixpkgs-python cache * Use a matrix to test templates * Add devenv template * Customize test command for each template * Add descriptions to CI steps * Add description to templates
- Loading branch information
Showing
6 changed files
with
93 additions
and
9 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
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 @@ | ||
python 3.12.0 |
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,38 @@ | ||
{ | ||
inputs = { | ||
asdf2nix-python.url = "github:sestrella/asdf2nix?dir=plugins/python"; | ||
asdf2nix.url = "github:sestrella/asdf2nix"; | ||
devenv.url = "github:cachix/devenv"; | ||
flake-utils.url = "github:numtide/flake-utils"; | ||
nixpkgs.url = "github:nixos/nixpkgs/nixpkgs-unstable"; | ||
}; | ||
|
||
nixConfig = { | ||
extra-substituters = "https://cache.nixos.org https://nixpkgs-python.cachix.org"; | ||
extra-trusted-public-keys = "nixpkgs-python.cachix.org-1:hxjI7pFxTyuTHn2NkvWCrAUcNZLNS3ZAvfYNuYifcEU="; | ||
}; | ||
|
||
outputs = inputs@{ self, asdf2nix-python, asdf2nix, devenv, flake-utils, nixpkgs }: | ||
flake-utils.lib.eachDefaultSystem (system: | ||
let | ||
pkgs = nixpkgs.legacyPackages.${system}; | ||
packages = asdf2nix.lib.packagesFromVersionsFile { | ||
inherit system; | ||
versionsFile = ./.tool-versions; | ||
plugins = { | ||
python = asdf2nix-python.lib; | ||
}; | ||
}; | ||
in | ||
{ | ||
devShells.default = devenv.lib.mkShell { | ||
inherit inputs pkgs; | ||
modules = [ | ||
({ pkgs, config, ... }: { | ||
languages.python.enable = true; | ||
languages.python.package = packages.python; | ||
}) | ||
]; | ||
}; | ||
}); | ||
} |