Commit 041fa0e2 authored by Astro's avatar Astro
Browse files

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

parent d80f9681
...@@ -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
''; '';
......
Supports Markdown
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment