Skip to content
GitLab
Menu
Projects
Groups
Snippets
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
Menu
Open sidebar
Astro
rust-card10
Commits
041fa0e2
Commit
041fa0e2
authored
Aug 24, 2019
by
Astro
⚙
Browse files
release.nix: fill in card10-version.h for c firmware
parent
d80f9681
Changes
1
Hide whitespace changes
Inline
Side-by-side
release.nix
View file @
041fa0e2
...
...
@@ -4,13 +4,27 @@
with
pkgs
;
let
versionSuffix
=
if
jailbreak
then
"-jailbreak"
else
""
;
cSrc
=
stdenv
.
mkDerivation
{
name
=
"card10-src"
;
src
=
./
c
;
src
=
./
.
;
phases
=
[
"unpackPhase"
"patchPhase"
"installPhase"
];
nativeBuildInputs
=
[
git
];
prePatch
=
"cd c"
;
patches
=
[
./0001-feat-nix-add-jailbreak-arg.patch
];
postPatch
=
''
VERSION="$(git describe --always)
${
versionSuffix
}
"
GITHASH="$(git rev-parse HEAD)"
substituteInPlace tools/version-header.sh \
--replace "\$VERSION" "$VERSION" \
--replace "\$GITHASH" "$GITHASH"
''
;
installPhase
=
''
cp -ar . $out
''
;
...
...
Write
Preview
Supports
Markdown
0%
Try again
or
attach a new file
.
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment