# This file is part of birdtown-visit-counter, and is © 2024 Alexander Khodyrev. # # Full source code is available at https://git.akho.name/akho/birdtown-visit-counter # # birdtown-visit-counter is free software: you can redistribute it and/or # modify it under the terms of the GNU Affero General Public License as # published by the Free Software Foundation, either version 3 of the License, # or (at your option) any later version. # # birdtown-visit-counter is distributed in the hope that it will be useful, # but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY # or FITNESS FOR A PARTICULAR PURPOSE. See the GNU Affero General Public License # for more details. # # You should have received a copy of the GNU Affero General Public License along # with birdtown-visit-counter. If not, see . { description = "birdtown-visit-counter"; inputs.nixpkgs.url = "github:NixOS/nixpkgs/nixos-unstable"; inputs.flake-utils.url = "github:numtide/flake-utils"; inputs.gomod2nix.url = "github:nix-community/gomod2nix"; inputs.gomod2nix.inputs.nixpkgs.follows = "nixpkgs"; inputs.gomod2nix.inputs.flake-utils.follows = "flake-utils"; outputs = inputs@{ self, nixpkgs, flake-utils, gomod2nix }: (flake-utils.lib.eachDefaultSystem (system: let pkgs = nixpkgs.legacyPackages.${system}; callPackage = pkgs.darwin.apple_sdk_11_0.callPackage or pkgs.callPackage; in { packages.default = callPackage ./. { inherit (gomod2nix.legacyPackages.${system}) buildGoApplication; }; devShells.default = callPackage ./shell.nix { inherit (gomod2nix.legacyPackages.${system}) mkGoEnv gomod2nix; }; })) // { nixosModules.default = import ./module.nix inputs; }; }