conda: build pythonparser

pull/30/head
Sebastien Bourdeauducq 2020-06-09 15:43:18 +08:00
parent 0581ac7b69
commit 7ab028deb6
3 changed files with 12 additions and 1 deletions

View File

@ -1,5 +1,5 @@
{ pkgs }:
{ name, version, src, dependencies ? [], extraYaml ? ""}:
{ name, version, src, extraSrcCommands ? "", dependencies ? [], extraYaml ? ""}:
pkgs.runCommand "conda-fake-source-${name}" { }
''
mkdir -p $out/fake-conda;
@ -7,6 +7,7 @@ pkgs.runCommand "conda-fake-source-${name}" { }
# work around yet more idiotic conda behavior - build breaks if write permissions aren't set on source files.
cp --no-preserve=mode,ownership -R ${src} workaround-conda
pushd workaround-conda
${extraSrcCommands}
tar cf $out/src.tar .
popd
rm -rf workaround-conda

View File

@ -35,6 +35,15 @@ let
artiq-env = (pkgs.python3.withPackages(ps: [ artiq ])).overrideAttrs (oldAttrs: { name = "${pkgs.python3.name}-artiq-env-${artiq.version}"; });
openocd = callPackage ./pkgs/openocd.nix {};
conda-pythonparser = import ./conda/build.nix { inherit pkgs; } {
name = "conda-pythonparser";
src = import ./conda/fake-source.nix { inherit pkgs; } {
name = "pythonparser";
inherit (pythonDeps.pythonparser) version src;
extraSrcCommands = "patch -p1 < ${./pkgs/python37hack.patch}";
dependencies = ["regex"];
};
};
conda-sipyco = import ./conda/build.nix { inherit pkgs; } {
name = "conda-sipyco";
src = import ./conda/fake-source.nix { inherit pkgs; } {

View File

@ -37,6 +37,7 @@ rec {
pythonparser = python3Packages.buildPythonPackage rec {
name = "pythonparser";
version = "1.3";
src = fetchFromGitHub {
owner = "m-labs";
repo = "pythonparser";