mirror of
https://github.com/NixOS/nixpkgs.git
synced 2024-11-26 08:53:21 +00:00
ccache: make src reproducible
This commit is contained in:
parent
a37a6e107f
commit
898be2ef0f
@ -26,7 +26,20 @@ stdenv.mkDerivation (finalAttrs: {
|
||||
owner = "ccache";
|
||||
repo = "ccache";
|
||||
rev = "refs/tags/v${finalAttrs.version}";
|
||||
sha256 = "sha256-0T9iJXnDX8LffhB/5hsfBNyZQ211f0lL/7dvTrjmiE0=";
|
||||
# `git archive` replaces `$Format:%H %D$` in cmake/CcacheVersion.cmake
|
||||
# we need to replace it with something reproducible
|
||||
# see https://github.com/NixOS/nixpkgs/pull/316524
|
||||
postFetch = ''
|
||||
sed -i -E \
|
||||
's/version_info "([0-9a-f]{40}) .*(tag: v[^,]+).*"/version_info "\1 \2"/g w match' \
|
||||
$out/cmake/CcacheVersion.cmake
|
||||
if [ -s match ]; then
|
||||
rm match
|
||||
else # pattern didn't match
|
||||
exit 1
|
||||
fi
|
||||
'';
|
||||
hash = "sha256-YHSr2pnk17QEdrIHInXX2eBFN9OGjdleaB41VLaqlnA=";
|
||||
};
|
||||
|
||||
outputs = [
|
||||
|
Loading…
Reference in New Issue
Block a user