v4/flake.nix
2025-03-24 22:49:12 -07:00

36 lines
No EOL
1,010 B
Nix

{
description = "roleypoly";
inputs = {
nixpkgs.url = "github:NixOS/nixpkgs/nixos-unstable";
flake-parts.url = "github:hercules-ci/flake-parts";
};
outputs = inputs: inputs.flake-parts.lib.mkFlake { inherit inputs; } {
systems = [ "x86_64-linux" "aarch64-linux" ];
perSystem = { config, self', pkgs, lib, system, ... }: rec {
devShells.default = import ./shell.nix { inherit pkgs; };
packages = let
vendorHash = "sha256-A5hZxo0zZ3w6qryV24PjYaKQatN2G2heyuee6QaU55M=";
in rec {
default = roleypoly;
roleypoly = pkgs.buildGoModule {
inherit vendorHash;
name = "roleypoly";
src = ./.;
};
container = pkgs.dockerTools.buildImage {
name = "roleypoly/roleypoly";
tag = "latest";
copyToRoot = [
pkgs.dockerTools.caCertificates
];
config = {
Cmd = [ "${roleypoly}/bin/roleypoly" ];
};
};
};
};
};
}