Skip to content
GitLab
Explore
Sign in
Primary navigation
Search or go to…
Project
Q
qthing
Manage
Activity
Members
Labels
Plan
Issues
Issue boards
Milestones
Wiki
Code
Merge requests
Repository
Branches
Commits
Tags
Repository graph
Compare revisions
Snippets
Build
Pipelines
Jobs
Pipeline schedules
Artifacts
Deploy
Releases
Container Registry
Model registry
Operate
Environments
Monitor
Incidents
Analyze
Value stream analytics
Contributor analytics
CI/CD analytics
Repository analytics
Model experiments
Help
Help
Support
GitLab documentation
Compare GitLab plans
Community forum
Contribute to GitLab
Provide feedback
Keyboard shortcuts
?
Snippets
Groups
Projects
Show more breadcrumbs
Jens Nolte
qthing
Commits
a1dce27c
Commit
a1dce27c
authored
5 years ago
by
fxk8y
Browse files
Options
Downloads
Patches
Plain Diff
make qthing ready for NixOS
parent
18cfc4c6
No related branches found
No related tags found
1 merge request
!10
make qthing ready for NixOS
Changes
5
Hide whitespace changes
Inline
Side-by-side
Showing
5 changed files
default.nix
+20
-0
20 additions, 0 deletions
default.nix
esp32-toolchain.nix
+40
-0
40 additions, 0 deletions
esp32-toolchain.nix
ota.py
+1
-1
1 addition, 1 deletion
ota.py
set-device
+1
-1
1 addition, 1 deletion
set-device
set-environment
+1
-1
1 addition, 1 deletion
set-environment
with
63 additions
and
3 deletions
default.nix
0 → 100644
+
20
−
0
View file @
a1dce27c
{
nixpkgs
?
import
<
nixpkgs
>
{}
}:
let
inherit
(
nixpkgs
)
pkgs
;
in
pkgs
.
stdenv
.
mkDerivation
{
name
=
"esp-idf-env"
;
buildInputs
=
with
pkgs
;
[
gawk
gperf
gettext
automake
bison
flex
texinfo
help2man
libtool
autoconf
ncurses5
bash
(
python2
.
withPackages
(
ppkgs
:
with
ppkgs
;
[
pyserial
future
cryptography
pyelftools
click
]))
(
python3
.
withPackages
(
ppkgs
:
with
ppkgs
;
[
paho-mqtt
]))
(
pkgs
.
callPackage
./esp32-toolchain.nix
{})
];
shellHook
=
''
export NIX_CFLAGS_LINK=-lncurses
export IDF_PATH=./esp-idf
''
;
}
This diff is collapsed.
Click to expand it.
esp32-toolchain.nix
0 → 100644
+
40
−
0
View file @
a1dce27c
{
stdenv
,
fetchurl
,
makeWrapper
,
buildFHSUserEnv
}:
let
fhsEnv
=
buildFHSUserEnv
{
name
=
"esp32-toolchain-env"
;
targetPkgs
=
pkgs
:
with
pkgs
;
[
zlib
];
runScript
=
""
;
};
in
stdenv
.
mkDerivation
rec
{
name
=
"esp32-toolchain"
;
version
=
"1.22.0"
;
src
=
fetchurl
{
url
=
"https://dl.espressif.com/dl/xtensa-esp32-elf-linux64-1.22.0-80-g6c4433a-5.2.0.tar.gz"
;
sha256
=
"0mji8jq1dg198z8bl50i0hs3drdqa446kvf6xpjx9ha63lanrs9z"
;
};
buildInputs
=
[
makeWrapper
];
phases
=
[
"unpackPhase"
"installPhase"
];
installPhase
=
''
cp -r . $out
for FILE in $(ls $out/bin); do
FILE_PATH="$out/bin/$FILE"
if [[ -x $FILE_PATH ]]; then
mv $FILE_PATH $FILE_PATH-unwrapped
makeWrapper
${
fhsEnv
}
/bin/esp32-toolchain-env $FILE_PATH --add-flags "$FILE_PATH-unwrapped"
fi
done
''
;
meta
=
with
stdenv
.
lib
;
{
description
=
"ESP32 toolchain"
;
homepage
=
https://docs.espressif.com/projects/esp-idf/en/stable/get-started/linux-setup.html
;
license
=
licenses
.
gpl3
;
};
}
This diff is collapsed.
Click to expand it.
ota.py
+
1
−
1
View file @
a1dce27c
#!/usr/bin/python3
#!/usr/bin/
env
python3
# TODO: read from header?
BROKER
=
"
mqtt.c3pb.hack
"
...
...
This diff is collapsed.
Click to expand it.
set-device
+
1
−
1
View file @
a1dce27c
#!/
bin/
bash
#!/
usr/bin/env
bash
set
-e
...
...
This diff is collapsed.
Click to expand it.
set-environment
+
1
−
1
View file @
a1dce27c
#!/
bin/
bash
#!/
usr/bin/env
bash
set
-e
...
...
This diff is collapsed.
Click to expand it.
Preview
0%
Loading
Try again
or
attach a new file
.
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Save comment
Cancel
Please
register
or
sign in
to comment