{
  description = "arca - LUKS volume manager";

  inputs = {
    nixpkgs.url = "github:NixOS/nixpkgs/nixos-25.11";
  };

  outputs =
    { self, nixpkgs }:
    let
      system = "x86_64-linux";
      pkgs = nixpkgs.legacyPackages.${system};
      version = "1.2.0";
    in
    {
      packages.${system}.default = pkgs.buildGoModule {
        pname = "arca";
        inherit version;
        src = ./.;
        vendorHash = null;
        ldflags = [
          "-X main.version=${version}"
        ];
        postInstall = ''
          mkdir -p $out/share/zsh/site-functions
          mkdir -p $out/share/bash-completion/completions
          mkdir -p $out/share/fish/vendor_completions.d
          $out/bin/arca completion zsh > $out/share/zsh/site-functions/_arca
          $out/bin/arca completion bash > $out/share/bash-completion/completions/arca
          $out/bin/arca completion fish > $out/share/fish/vendor_completions.d/arca.fish
        '';
      };
    };
}
