Skip to content

Commit

Permalink
nix: pin pdm to working version
Browse files Browse the repository at this point in the history
also expose used pdm version for external consumption
  • Loading branch information
rroohhh authored and phlmn committed Dec 29, 2024
1 parent 0e36b68 commit cf4c206
Showing 1 changed file with 10 additions and 3 deletions.
13 changes: 10 additions & 3 deletions nix/pkgs/worker.nix
Original file line number Diff line number Diff line change
@@ -1,19 +1,26 @@
{ config, pkgs, lib, ... }:
{ pkgs, lib, ... }:
with lib;
let
python3Packages = pkgs.python3.pkgs;
pyproject = builtins.fromTOML (builtins.readFile ../../worker/pyproject.toml);
pdmFixedPkgs = (import (builtins.fetchTarball {
name = "nixos-unstable-with-fixed-pdm";
url = "https://github.com/nixos/nixpkgs/archive/9482c3b0cffed8365f686c22c83df318b4473a3e.tar.gz";
sha256 = "05rgyl1i09jzsvhwg3blvac7x9mayj3kqpp55h287qxsimsslh0x";
}) {});
in
python3Packages.buildPythonApplication rec {
pname = pyproject.project.name;
# expose this because we want to use the same version when using `pdm run` externally to run this package
pdm = pdmFixedPkgs.pdm;
version = pyproject.project.version;
src = ../..;

format = "pyproject";

nativeBuildInputs = [
pkgs.pdm
python3Packages.pdm-pep517
pdmFixedPkgs.pdm
pdmFixedPkgs.python3.pkgs.pdm-pep517
pkgs.git
pkgs.cacert
pkgs.maturin
Expand Down

0 comments on commit cf4c206

Please sign in to comment.