all repos — elgit @ dffc16df68df06151f177bc1702e7bb3eb190228

fork of legit: web frontend for git, written in go

switch to flakes

Alan Pearce
commit

dffc16df68df06151f177bc1702e7bb3eb190228

parent

6fc0ce917cc6ac9c1faaab61f14d686aa5bc0ab6

1 file changed, 25 insertions(+), 0 deletions(-)

changed files
A flake.nix
@@ -0,0 +1,25 @@
+{ + description = "A basic gomod2nix flake"; + + 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 = { self, nixpkgs, flake-utils, gomod2nix }: + (flake-utils.lib.eachDefaultSystem + (system: + let + pkgs = nixpkgs.legacyPackages.${system}; + in + { + packages.default = pkgs.callPackage ./nix/package { + inherit (gomod2nix.legacyPackages.${system}) buildGoApplication; + }; + devShells.default = pkgs.callPackage ./shell.nix { + inherit (gomod2nix.legacyPackages.${system}) mkGoEnv gomod2nix; + }; + }) + ); +}