all repos — elgit @ 12dacbabc52ac876311b0def6ec370fbe729c808

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

move shell.nix to subdirectory

Alan Pearce
commit

12dacbabc52ac876311b0def6ec370fbe729c808

parent

c08dedf2fb5a160a08962dc258e12e3c2b62e316

2 files changed, 28 insertions(+), 20 deletions(-)

changed files
M flake.nixflake.nix
@@ -7,21 +7,28 @@ 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; - }; - }) - ) // { + 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 ./nix/shell.nix { + inherit (gomod2nix.legacyPackages.${system}) mkGoEnv gomod2nix; + }; + } + )) + // { overlays = { default = final: prev: { elgit = self.packages.${final.system}.default;
M shell.nixnix/shell.nix
@@ -1,4 +1,5 @@
-{ pkgs ? ( +{ + pkgs ? ( let inherit (builtins) fetchTree fromJSON readFile; inherit ((fromJSON (readFile ./flake.lock)).nodes) nixpkgs gomod2nix;
@@ -8,13 +9,13 @@ overlays = [
(import "${fetchTree gomod2nix.locked}/overlay.nix") ]; } - ) -, mkGoEnv ? pkgs.mkGoEnv -, gomod2nix ? pkgs.gomod2nix + ), + mkGoEnv ? pkgs.mkGoEnv, + gomod2nix ? pkgs.gomod2nix, }: let - goEnv = mkGoEnv { pwd = ./.; }; + goEnv = mkGoEnv { pwd = ../.; }; in pkgs.mkShell { packages = with pkgs; [