Skip to content
Snippets Groups Projects
Commit 041fa0e2 authored by Astro's avatar Astro :gear:
Browse files

release.nix: fill in card10-version.h for c firmware

parent d80f9681
No related branches found
No related tags found
No related merge requests found
...@@ -4,13 +4,27 @@ ...@@ -4,13 +4,27 @@
with pkgs; with pkgs;
let let
versionSuffix =
if jailbreak
then "-jailbreak"
else "";
cSrc = stdenv.mkDerivation { cSrc = stdenv.mkDerivation {
name = "card10-src"; name = "card10-src";
src = ./c; src = ./.;
phases = [ "unpackPhase" "patchPhase" "installPhase" ]; phases = [ "unpackPhase" "patchPhase" "installPhase" ];
nativeBuildInputs = [ git ];
prePatch = "cd c";
patches = [ patches = [
./0001-feat-nix-add-jailbreak-arg.patch ./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 = '' installPhase = ''
cp -ar . $out cp -ar . $out
''; '';
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment