gerrit: fixed-output derivation to avoid rebuilds

see also https://github.com/NixOS/nixpkgs/issues/27754#issue-246545036
for motivation.
This commit is contained in:
Jörg Thalheim 2017-09-05 18:11:09 +01:00
parent f59d3a730d
commit 8144460e36

View File

@ -6,12 +6,15 @@ stdenv.mkDerivation rec {
src = fetchurl {
url = "https://gerrit-releases.storage.googleapis.com/gerrit-${version}.war";
sha256 = "db602d06b11bfa81f1cb016c4717a99699828eda08afb2caa504175a2ea4b9c3";
sha256 = "1hxrlhp5l5q4lp5b5bq8va7856cnm4blfv01rgqq3yhvn432sq6v";
};
outputHashAlgo = "sha256";
outputHashMode = "recursive";
outputHash = "1wg7bbhwgi9sxn7skxb9gwaydq9jzpdhglwgq5kihj7r269fmr4k";
buildCommand = ''
mkdir -p "$out"/webapps
cp "${src}" "$out"/webapps/gerrit-${version}.war
install -D ${src} "$out"/webapps/gerrit-${version}.war
'';
meta = with stdenv.lib; {