Skip to content

Commit

Permalink
Full project definition
Browse files Browse the repository at this point in the history
Not working on MacOS while poetry2nix does not implement markers parsing in the pyproject.toml file. See nix-community/poetry2nix#857 and nix-community/poetry2nix#1174.
  • Loading branch information
leolavaur committed Jun 27, 2023
1 parent d70d28a commit 16352cf
Show file tree
Hide file tree
Showing 3 changed files with 63 additions and 141 deletions.
7 changes: 4 additions & 3 deletions flake.nix
Original file line number Diff line number Diff line change
Expand Up @@ -19,7 +19,7 @@
projectDir = self;
preferWheels = true;
python = final.${pythonVer};
extras = if final.stdenv.isDarwin then [ "macos" ] else [ "linux" ];
groups = if final.stdenv.isDarwin then [ "darwin" ] else [ "linux" ];
overrides = prev.poetry2nix.defaultPoetryOverrides.extend (self: super: {
tensorflow-io-gcs-filesystem = super.tensorflow-io-gcs-filesystem.overrideAttrs (old: {
buildInputs = old.buildInputs ++ [ prev.libtensorflow ];
Expand Down Expand Up @@ -78,12 +78,13 @@

shellHook = ''
export PYTHONPATH=${pkgs.${pythonVer}}
'' + (if stdenv.isLinux then ''
export LD_LIBRARY_PATH=${ lib.strings.concatStringsSep ":" [
"${cudaPackages.cudatoolkit}/lib"
"${cudaPackages.cudatoolkit.lib}/lib"
"${cudaPackages.cudnn}/lib"
]}:$LD_LIBRARY_PATH
'';
]}
'' else "") + ":$LD_LIBRARY_PATH";
};

});
Expand Down
Loading

0 comments on commit 16352cf

Please sign in to comment.