Last active
December 14, 2023 12:36
-
-
Save robertodr/9363680a48b38a14a56aa2dddff4d348 to your computer and use it in GitHub Desktop.
Sample Nix flake using mach-nix
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
{ | |
description = "veloxchem-hpc"; | |
inputs = { | |
nixpkgs.url = "github:NixOS/nixpkgs/nixpkgs-unstable"; | |
flake-utils.url = "github:numtide/flake-utils"; | |
pypi-deps-db = { | |
url = "github:DavHau/pypi-deps-db/a8ea7f774b76d3b61237c0bc20c97629a2248462"; | |
flake = false; | |
}; | |
mach-nix = { | |
url = "mach-nix/3.4.0"; | |
inputs.nixpkgs.follows = "nixpkgs"; | |
inputs.flake-utils.follows = "flake-utils"; | |
inputs.pypi-deps-db.follows = "pypi-deps-db"; | |
}; | |
}; | |
outputs = { self, nixpkgs, flake-utils, mach-nix, pypi-deps-db }: | |
flake-utils.lib.eachDefaultSystem (system: | |
let | |
pkgs = nixpkgs.legacyPackages.${system}; | |
pythonEnv = mach-nix.lib."${system}".mkPython { | |
requirements = builtins.readFile ./requirements.txt + '' | |
# additional dependencies for local work | |
jupyterlab | |
pandas | |
''; | |
}; | |
in | |
{ | |
devShell = pkgs.mkShell { | |
nativeBuildInputs = [ ]; | |
buildInputs = [ | |
pythonEnv | |
]; | |
}; | |
}); | |
} |
@marcosrdac packaging.versions.parse
used to allow invalid versions, but this was deprecated and removed in 22.0. Nixpkgs recently updated packaging
from 21.3 to 23.0.
@marcosrdac I'm encountering the same issue. Did you ever find a fix?
encountering the same issue, is there a workaround ? @CodeWithOz @marcosrdac
Nope.
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
I had to update the pypi-deps-db commit to the last one (github:DavHau/pypi-deps-db/305b579292c8843611ef55db65ad8f4f19de7e09), but still I couldn't make this flake run with nix develop. So strange. Here is the trace: