Files
capytal.cc/flake.nix

70 lines
1.4 KiB
Nix
Raw Normal View History

2024-07-03 00:27:44 -03:00
{
inputs = {
nixpkgs.url = "github:nixos/nixpkgs/nixos-unstable";
};
outputs = {
nixpkgs,
2025-03-31 16:45:51 -03:00
self,
...
2025-03-31 16:45:51 -03:00
}: let
systems = [
"x86_64-linux"
"aarch64-linux"
"x86_64-darwin"
"aarch64-darwin"
];
forAllSystems = f:
nixpkgs.lib.genAttrs systems (system: let
pkgs = import nixpkgs {inherit system;};
in
2025-03-31 16:45:51 -03:00
f pkgs);
in {
2025-03-31 16:45:51 -03:00
devShells = forAllSystems (pkgs: {
default = pkgs.mkShell {
2025-03-31 17:42:46 -03:00
CGO_ENABLED = "0";
hardeningDisable = ["all"];
buildInputs = with pkgs; [
# Go tools
go
golangci-lint
2025-03-31 16:45:51 -03:00
gofumpt
gotools
delve
2025-03-31 16:45:51 -03:00
# TailwindCSS
tailwindcss_4
2025-03-31 17:42:46 -03:00
];
};
});
packages = forAllSystems (pkgs: {
default = self.packages.${pkgs.system}.capytalcc;
capytalcc = pkgs.buildGoModule {
name = "capytal.cc";
pname = "capytal.cc";
version = "0.1.0";
2025-03-31 17:42:46 -03:00
src = ./.;
2025-03-31 16:45:51 -03:00
2025-03-31 17:42:46 -03:00
nativeBuildInputs = with pkgs; [
tailwindcss_4
];
2025-03-31 17:42:46 -03:00
vendorHash = "sha256-aJK6vn76d1k9hWhUu+OBq3r9tM6uuqxAdDjiuwMOMTU=";
preBuild = ''
tailwindcss \
-i ./assets/stylesheets/tailwind.css \
-o ./assets/stylesheets/out.css \
--minify
'';
meta = {
mainProgram = "capytal.cc";
};
};
});
};
2024-07-03 00:27:44 -03:00
}