1
0
Fork 0

conda: build pythonparser

This commit is contained in:
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 }: { pkgs }:
{ name, version, src, dependencies ? [], extraYaml ? ""}: { name, version, src, extraSrcCommands ? "", dependencies ? [], extraYaml ? ""}:
pkgs.runCommand "conda-fake-source-${name}" { } pkgs.runCommand "conda-fake-source-${name}" { }
'' ''
mkdir -p $out/fake-conda; 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. # 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 cp --no-preserve=mode,ownership -R ${src} workaround-conda
pushd workaround-conda pushd workaround-conda
${extraSrcCommands}
tar cf $out/src.tar . tar cf $out/src.tar .
popd popd
rm -rf workaround-conda 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}"; }); artiq-env = (pkgs.python3.withPackages(ps: [ artiq ])).overrideAttrs (oldAttrs: { name = "${pkgs.python3.name}-artiq-env-${artiq.version}"; });
openocd = callPackage ./pkgs/openocd.nix {}; 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; } { conda-sipyco = import ./conda/build.nix { inherit pkgs; } {
name = "conda-sipyco"; name = "conda-sipyco";
src = import ./conda/fake-source.nix { inherit pkgs; } { src = import ./conda/fake-source.nix { inherit pkgs; } {

View File

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