Merge pull request #55421 from grahamc/ninjarepro

ninja: make reproducible
This commit is contained in:
Domen Kožar 2019-02-08 13:37:09 +07:00 committed by GitHub
commit 9bffdaa1b7
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23

View file

@ -1,4 +1,4 @@
{ stdenv, fetchFromGitHub, python, buildDocs ? true, asciidoc, docbook_xml_dtd_45, docbook_xsl, libxslt, re2c }:
{ stdenv, fetchFromGitHub, fetchpatch, python, buildDocs ? true, asciidoc, docbook_xml_dtd_45, docbook_xsl, libxslt, re2c }:
with stdenv.lib;
@ -13,6 +13,15 @@ stdenv.mkDerivation rec {
sha256 = "1q0nld3g0d210zmdjyjzjz2xb2bw1s58gj6zsx7p8q30yh0wg610";
};
patches = [
# Make builds reproducible by generating the same IDs from the same inputs.
(fetchpatch {
name = "consistent-doc-ids";
url = "https://github.com/ninja-build/ninja/commit/9aa947471fcfc607bec6d92a1a6eed5c692edbaf.patch";
sha256 = "0zsg46jflsh644jccrcgyfalr7fkzrv041kyi8644nyk923gcrl9";
})
];
nativeBuildInputs = [ python re2c ] ++ optionals buildDocs [ asciidoc docbook_xml_dtd_45 docbook_xsl libxslt.bin ];
buildPhase = ''