nixpkgs/pkgs/development/tools/continuous-integration/jenkins/default.nix
Bjørn Forsman 4075c10a59 jenkins: move .war file from $out to $out/lib/jenkins.war
Fixes #14137, also known as:

  $ nix-shell -p jenkins
  bash: source: /nix/store/ln1yw6c2v8bb2cjqfr1z5aqcssw054wa-jenkins-2.3:
  cannot execute binary file
  [nix-shell exited with error]

The problem is that jenkins.war is not installed inside the directory
$out, but rather _as the file_ $out. Fix it by moving the file to
$out/lib/jenkins.war.

While at it, move buildCommand so that the "meta" section is at the end
of the expression (standard style), and quote shell variables.
2016-07-15 15:12:52 +02:00

25 lines
605 B
Nix

{ stdenv, fetchurl }:
stdenv.mkDerivation rec {
name = "jenkins-${version}";
version = "2.3";
src = fetchurl {
url = "http://mirrors.jenkins-ci.org/war/${version}/jenkins.war";
sha256 = "0x59dbvh6y25ki5jy51djbfbhf8g2j3yd9f3n66f7bkdfw8p78g1";
};
buildCommand = ''
mkdir -p "$out/lib"
cp "$src" "$out/lib/jenkins.war"
'';
meta = with stdenv.lib; {
description = "An extendable open source continuous integration server";
homepage = http://jenkins-ci.org;
license = licenses.mit;
platforms = platforms.all;
maintainers = [ maintainers.coconnor ];
};
}