albatros/flake.nix
2023-03-16 12:24:23 +01:00

46 lines
1.4 KiB
Nix

{
description = "Albatros";
inputs = {
nixpkgs.url = "github:NixOS/nixpkgs";
};
outputs = { self, nixpkgs }:
let
system = "x86_64-linux";
nixuniverse = import (builtins.fetchGit {
url = "https://git.deuxfleurs.fr/quentin/nixuniverse.git";
ref = "main";
rev = "fd2922cc97599172851f0817abc84ead2ba54cdb";
});
pkgs = import nixpkgs {
inherit system;
overlays = [ nixuniverse ];
};
albatros = pkgs.buildGoModule rec {
pname = "albatros";
version = "0.9";
src = ./.;
vendorSha256 = "sha256-Q7gImRoJqtcORpHLQoF3TRK2WJu3tKSjSE3Sno6lNNk=";
checkPhase = "true";
meta = with pkgs.lib; {
description = "albatros is a CI for Nomad";
homepage = "https://git.deuxfleurs.fr/quentin/albatros";
license = licenses.agpl3;
platforms = platforms.linux;
};
};
docker = pkgs.dockerTools.buildImage {
name = "dxflrs/albatros";
config = {
Cmd = [ "${albatros}/bin/albatros" ];
};
};
in
{
packages.x86_64-linux.albatros = albatros;
packages.x86_64-linux.docker.albatros = docker;
packages.x86_64-linux.default = self.packages.x86_64-linux.albatros;
devShell.x86_64-linux = pkgs.mkShell { buildInputs = [ pkgs.kaniko pkgs.manifest-tool ]; };
};
}