cambridgehackers / connectal

Connectal is a framework for software-driven hardware development.
MIT License
159 stars 46 forks source link

More #!/usr/bin/env python #159

Closed KoviRobi closed 4 years ago

KoviRobi commented 4 years ago

Hi,

I'm trying to play around with this on NixOS, and one of the things it doesn't have is python in /usr/bin, so I have patched up all I could find to /usr/bin/env python.

There are some more things which might break:

$ grep -r '/usr/bin/'|grep '/usr/bin/env' -v
Makefile:       if [ -f /usr/bin/yum ] ; then yum install gmp strace python-argparse python-ply python-gevent; else apt-get install libgmp10 strace python-ply python-gevent; fi
cpp/runpython.cpp:    statok = stat("/usr/bin/python", &statbuf);
debian/connectal.install:/usr/bin/pcieflat
debian/rules:#!/usr/bin/make -f
examples/gyro_simple/test_gyro.py:            octave_file.write("#! /usr/bin/octave --persist \nv = [");
scripts/Doxyfile:PERL_PATH              = /usr/bin/perl
tests/spikehw/README.md:    Running /usr/bin/pciescan.sh

Of these, the three I think would break are the runpython.cpp, Doxyfile and the test_gyro.py.

P.S.: Here is the shell.nix file I'm using

{ nixpkgs ? import <nixpkgs> {}
}:

with nixpkgs;
stdenv.mkDerivation {
  name = "connectal";
  version = "1.0.0";
  buildInputs = [
    bluespec
    strace
    gmp
    (python.withPackages (p: with p; [ ply gevent ]))
  ];
}