module works

This commit is contained in:
Alexander Khodyrev 2024-09-12 22:05:40 +03:00
parent 10cf66ae53
commit 6bb712db98
2 changed files with 65 additions and 65 deletions

View file

@ -7,21 +7,20 @@
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;
})
);
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;
};
}