initial version

flake largely copied from the new birdtown-visit-counter
This commit is contained in:
Alexander Khodyrev 2024-09-14 11:10:27 +03:00
commit 7cdb8a123a
9 changed files with 426 additions and 0 deletions

26
flake.nix Normal file
View file

@ -0,0 +1,26 @@
{
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;
};
}