Skip to content
GitLab
Explore
Sign in
Register
Primary navigation
Search or go to…
Project
F
firmware
Manage
Activity
Members
Labels
Plan
Issues
Issue boards
Milestones
Wiki
External 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
Service Desk
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
Terms and privacy
Keyboard shortcuts
?
Snippets
Groups
Projects
Show more breadcrumbs
fleur
firmware
Commits
2e69f19e
Commit
2e69f19e
authored
5 years ago
by
Moritz Wilhelmy
Browse files
Options
Downloads
Patches
Plain Diff
feat(nix): shell.nix which installs dependencies and patched openocd
Thanks to adisbladis!
parent
1a65950a
No related branches found
No related tags found
No related merge requests found
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
shell.nix
+60
-0
60 additions, 0 deletions
shell.nix
with
60 additions
and
0 deletions
shell.nix
0 → 100644
+
60
−
0
View file @
2e69f19e
# This nix expression describes the build and debug environment for the
# firmware. To use it, first install nix and then invoke the "nix-shell"
# command to activate the environment. It will install all dependencies for and
# build and install a patched openocd, before dropping you into a shell where
# everything required for compiling/debugging the firmware is available.
{
pkgs
?
import
<
nixpkgs
>
{}
}:
let
crc16
=
{
stdenv
,
buildPythonPackage
,
fetchPypi
}:
buildPythonPackage
rec
{
pname
=
"crc16"
;
version
=
"0.1.1"
;
src
=
fetchPypi
{
inherit
pname
version
;
sha256
=
"15nkx0pa4lskwin84flpk8fsw3jqg6wic6v3s83syjqg76h6my61"
;
};
};
ocd
=
pkgs
.
openocd
.
overrideAttrs
(
old
:
{
name
=
"openocd-cardio"
;
src
=
pkgs
.
fetchgit
{
url
=
"https://git.card10.badge.events.ccc.de/card10/openocd.git"
;
rev
=
"90d828185cea44b29cffb40f2c8aea19282b9130"
;
sha256
=
"092wg19kjapv9s70b23ckd4j5i8ykk3d7mcl4h8cgl2acwcw8myr"
;
fetchSubmodules
=
true
;
};
nativeBuildInputs
=
old
.
nativeBuildInputs
++
[
pkgs
.
which
pkgs
.
libtool
pkgs
.
autoconf
pkgs
.
automake
];
SKIP_SUBMODULE
=
"1"
;
preConfigure
=
''
./bootstrap
''
;
});
in
pkgs
.
mkShell
{
buildInputs
=
[
pkgs
.
meson
pkgs
.
ninja
pkgs
.
git
pkgs
.
gcc-arm-embedded
pkgs
.
jq
(
pkgs
.
python3
.
withPackages
(
ps
:
[
ps
.
pillow
(
ps
.
callPackage
crc16
{})
]))
ocd
pkgs
.
gcc-arm-embedded
];
}
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