Skip to content

Commit

Permalink
pdm: Update pyproject.nix
Browse files Browse the repository at this point in the history
  • Loading branch information
purepani committed Jan 3, 2025
1 parent 98c1c2e commit c9951e0
Show file tree
Hide file tree
Showing 3 changed files with 34 additions and 25 deletions.
43 changes: 30 additions & 13 deletions flake.lock

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

3 changes: 1 addition & 2 deletions flake.nix
Original file line number Diff line number Diff line change
Expand Up @@ -5,8 +5,7 @@
nixpkgs.url = "github:NixOS/nixpkgs/nixpkgs-unstable";

# TODO: go back to upstream after PRs are merged
pyproject-nix.url = "github:davhau/pyproject.nix/dream2nix";
pyproject-nix.flake = false;
pyproject-nix.url = "github:pyproject-nix/pyproject.nix";

purescript-overlay.url = "github:thomashoneyman/purescript-overlay";
purescript-overlay.inputs.nixpkgs.follows = "nixpkgs";
Expand Down
13 changes: 3 additions & 10 deletions modules/dream2nix/WIP-python-pdm/default.nix
Original file line number Diff line number Diff line change
Expand Up @@ -11,15 +11,7 @@
lib.systems.elaborate config.deps.python.stdenv.targetPlatform;
};

libpyproject = import (dream2nix.inputs.pyproject-nix + "/lib") {inherit lib;};
libpyproject-fetchers = import (dream2nix.inputs.pyproject-nix + "/fetchers") {
inherit lib;
curl = config.deps.curl;
jq = config.deps.jq;
python3 = config.deps.python;
runCommand = config.deps.runCommand;
stdenvNoCC = config.deps.stdenvNoCC;
};
libpyproject = dream2nix.inputs.pyproject-nix.lib;

lock_data = lib.importTOML config.pdm.lockfile;
environ = libpyproject.pep508.mkEnviron config.deps.python;
Expand Down Expand Up @@ -75,6 +67,7 @@ in {
autoPatchelfHook
buildPackages
curl
fetchPypiLegacy
jq
mkShell
pdm
Expand Down Expand Up @@ -193,7 +186,7 @@ in {
else null
);
mkDerivation = {
src = lib.mkDefault (libpyproject-fetchers.fetchFromLegacy {
src = lib.mkDefault (config.deps.fetchPypiLegacy {
pname = name;
file = source.file;
hash = source.hash;
Expand Down

0 comments on commit c9951e0

Please sign in to comment.