unix: use pkg-config in sconscript file, add shell.nix for nix-shell

pull/25/head
Pavol Rusnak 6 years ago
parent e1eb405ed7
commit d2d7efeb12
No known key found for this signature in database
GPG Key ID: 91F3B339B9A02A3D

@ -100,8 +100,6 @@ SOURCE_MOD += [
]
if ARGUMENTS.get('TREZOR_EMULATOR_NOUI', 0):
CPPDEFINES_MOD += ['TREZOR_EMULATOR_NOUI']
else:
LIBS_MOD += ['SDL2', 'SDL2_image']
# modtrezorutils
SOURCE_MOD += [
@ -273,6 +271,9 @@ env.Replace(
] + CPPDEFINES_MOD,
ASPPFLAGS='$CFLAGS $CCFLAGS', )
if not ARGUMENTS.get('TREZOR_EMULATOR_NOUI', 0):
env.ParseConfig('pkg-config --cflags --libs sdl2 SDL2_image')
env.Replace(
PYTHON='python',
MAKEQSTRDATA='$PYTHON vendor/micropython/py/makeqstrdata.py',

@ -0,0 +1,9 @@
with import <nixpkgs> {};
let
myPython = python36.withPackages(p: [p.trezor]);
in
stdenv.mkDerivation {
name = "trezor-core-dev";
buildInputs = [ myPython protobuf scons gnumake gcc pkgconfig SDL2 SDL2_image ];
}
Loading…
Cancel
Save