29 lines
711 B
Nix
29 lines
711 B
Nix
with import <nixpkgs> {};
|
|
|
|
stdenv.mkDerivation rec {
|
|
name = "nomad";
|
|
version = "0.1.2";
|
|
filename = "nomad_${version}_linux_amd64.zip";
|
|
|
|
src = fetchurl {
|
|
url = "https://releases.hashicorp.com/nomad/${version}/${filename}";
|
|
sha256 = "0d3r3n1wwlic1kg3hgghds7f3b0qhh97v8xf36mcmsnmn2ngfd9k";
|
|
};
|
|
|
|
unpackPhase = ''
|
|
unzip ${src}
|
|
'';
|
|
|
|
|
|
buildInputs = [ makeWrapper unzip ];
|
|
libPath = lib.makeLibraryPath [ ];
|
|
installPhase = ''
|
|
patchelf --set-interpreter ${stdenv.glibc}/lib/ld-linux-x86-64.so.2 ./nomad
|
|
|
|
mkdir -p $out/bin
|
|
cp ./nomad $out/bin/nomad
|
|
# wrapProgram $out/bin/nomad \
|
|
# --prefix LD_LIBRARY_PATH : "${libPath}"
|
|
#
|
|
'';
|
|
}
|