aboutsummaryrefslogtreecommitdiff
path: root/nix/nomad-driver-nix.nix
blob: 9d3638d2753aec02e1ca2c6f76750abe487ad16c (plain) (blame)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
{
  pkgs ? import <nixpkgs> {}
}:
pkgs.buildGoModule rec {
  pname = "nomad-driver-nix";
  version = "0.1.0";

  src = pkgs.fetchFromGitHub {
    owner = "input-output-hk";
    repo = "nomad-driver-nix";
    rev = "010b09c680887d0cade86e8ac136c3a04609e04a";
    sha256 = "sha256-hET+b7XhDLSuVQwXLI2V5nYCcdvxQQj9BAG8z4ta6CE=";
  };

  vendorSha256 = "sha256-FDJpbNtcFEHnZvWip2pvUHF3BFyfcSohrr/3nk9YS24=";

  ldflags = [
    "-X github.com/input-output-hk/nomad-driver-nix/nix.pluginVersion=${version}"
  ];

  postInstall = ''
    mv $out/bin/nomad-driver-nix $out/bin/nix-driver
  '';

  meta = with pkgs.lib; {
    description = "Nomad driver to run Nix packages / NixOS in systemd-nspawn containers";
    homepage = "https://github.com/input-output-hk/nomad-driver-nix";
    license = licenses.mpl20;
    platforms = platforms.linux;
  };
}