Skip to content

Commit

Permalink
Fix flake
Browse files Browse the repository at this point in the history
  • Loading branch information
niknetniko committed May 23, 2024
1 parent dec71d8 commit 7e98027
Showing 1 changed file with 39 additions and 1 deletion.
40 changes: 39 additions & 1 deletion flake.nix
Original file line number Diff line number Diff line change
Expand Up @@ -38,7 +38,7 @@
};

nativeBuildInputs =
[ python.pkgs.pdm-pep517 python.pkgs.pdm-backend ];
[ prev.pdm-pep517 prev.pdm-backend ];

doCheck = false;

Expand All @@ -48,8 +48,46 @@
maintainers = [ ];
};
};
# We need PyYAML with C support, but poetry2nix does not do that apparently...
# Taken from nixpkgs.
pyyaml = prev.buildPythonPackage rec {
pname = "pyyaml";
version = "6.0.1";

format = "pyproject";

src = pkgs.fetchFromGitHub {
owner = "yaml";
repo = "pyyaml";
rev = version;
hash = "sha256-YjWMyMVDByLsN5vEecaYjHpR1sbBey1L/khn4oH9SPA=";
};

nativeBuildInputs = [
prev.cython_0
prev.setuptools
];

buildInputs = [ pkgs.libyaml ];

checkPhase = ''
runHook preCheck
PYTHONPATH="tests/lib:$PYTHONPATH" ${python.interpreter} -m test_all
runHook postCheck
'';

pythonImportsCheck = [ "yaml" ];

meta = with pkgs.lib; {
description = "The next generation YAML parser and emitter for Python";
homepage = "https://github.com/yaml/pyyaml";
license = licenses.mit;
maintainers = with maintainers; [ ];
};
};
};


# This one isn't in Nix, so do it manually.
ast = pkgs.buildNpmPackage rec {
pname = "abstract-syntax-tree";
Expand Down

0 comments on commit 7e98027

Please sign in to comment.