cultist.club-website/flake.nix

55 lines
1.4 KiB
Nix
Raw Normal View History

2026-05-19 22:36:24 +03:00
{
description = "cultist.club landing page";
inputs = {
nixpkgs.url = "github:NixOS/nixpkgs/nixos-25.11";
};
outputs = { self, nixpkgs }:
let
systems = [
"x86_64-linux"
"aarch64-darwin"
];
forAllSystems = nixpkgs.lib.genAttrs systems;
in
{
packages = forAllSystems (system:
let
pkgs = import nixpkgs { inherit system; };
cultist-website = pkgs.buildGoModule {
pname = "cultist-website";
version = "0.1.0";
src = ./.;
vendorHash = null;
nativeBuildInputs = [ pkgs.makeWrapper ];
ldflags = [ "-s" "-w" ];
postInstall =
if pkgs.stdenv.hostPlatform.isLinux then
''
wrapProgram $out/bin/cultist-website \
--prefix PATH : ${pkgs.lib.makeBinPath [ pkgs.procps ]}
''
else
"";
};
in
{
default = cultist-website;
cultist-website = cultist-website;
});
apps = forAllSystems (system: {
default = {
type = "app";
program = "${self.packages.${system}.default}/bin/cultist-website";
};
});
devShells = forAllSystems (system: {
default = import nixpkgs { inherit system; }.mkShell {
packages = [ (import nixpkgs { inherit system; }).go ];
};
});
};
}