use flake-utils input and also override it in the template

This commit is contained in:
Jörg Thalheim 2023-09-13 08:36:14 +02:00
parent f6cddc0ed8
commit 495a010f5e
3 changed files with 33 additions and 14 deletions

View file

@ -1,5 +1,23 @@
{ {
"nodes": { "nodes": {
"flake-utils": {
"inputs": {
"systems": "systems"
},
"locked": {
"lastModified": 1694529238,
"narHash": "sha256-zsNZZGTGnMOf9YpHKJqMSsa0dXbfmxeoJ7xHlrt+xmY=",
"owner": "numtide",
"repo": "flake-utils",
"rev": "ff7b65b44d01cf9ba6a71320833626af21126384",
"type": "github"
},
"original": {
"owner": "numtide",
"repo": "flake-utils",
"type": "github"
}
},
"nixpkgs": { "nixpkgs": {
"locked": { "locked": {
"lastModified": 1658285632, "lastModified": 1658285632,
@ -18,22 +36,22 @@
}, },
"root": { "root": {
"inputs": { "inputs": {
"nixpkgs": "nixpkgs", "flake-utils": "flake-utils",
"utils": "utils" "nixpkgs": "nixpkgs"
} }
}, },
"utils": { "systems": {
"locked": { "locked": {
"lastModified": 1653893745, "lastModified": 1681028828,
"narHash": "sha256-0jntwV3Z8//YwuOjzhV2sgJJPt+HY6KhU7VZUL0fKZQ=", "narHash": "sha256-Vy1rq5AaRuLzOxct8nz4T6wlgyUR7zLU309k9mBC768=",
"owner": "numtide", "owner": "nix-systems",
"repo": "flake-utils", "repo": "default",
"rev": "1ed9fb1935d260de5fe1c2f7ee0ebaae17ed2fa1", "rev": "da67096a3b9bf56a91d16901293e51ba5b49a27e",
"type": "github" "type": "github"
}, },
"original": { "original": {
"owner": "numtide", "owner": "nix-systems",
"repo": "flake-utils", "repo": "default",
"type": "github" "type": "github"
} }
} }

View file

@ -2,10 +2,9 @@
description = "Convert go.mod/go.sum to Nix packages"; description = "Convert go.mod/go.sum to Nix packages";
inputs.nixpkgs.url = "github:NixOS/nixpkgs/master"; inputs.nixpkgs.url = "github:NixOS/nixpkgs/master";
inputs.flake-utils.url = "github:numtide/flake-utils";
inputs.utils.url = "github:numtide/flake-utils"; outputs = { self, nixpkgs, flake-utils }:
outputs = { self, nixpkgs, utils }:
{ {
overlays.default = import ./overlay.nix; overlays.default = import ./overlay.nix;
@ -18,7 +17,7 @@
defaultTemplate = self.templates.app; defaultTemplate = self.templates.app;
} // } //
(utils.lib.eachDefaultSystem (flake-utils.lib.eachDefaultSystem
(system: (system:
let let
pkgs = nixpkgs.legacyPackages.${system}; pkgs = nixpkgs.legacyPackages.${system};

View file

@ -4,6 +4,8 @@
inputs.nixpkgs.url = "github:NixOS/nixpkgs/nixos-unstable"; inputs.nixpkgs.url = "github:NixOS/nixpkgs/nixos-unstable";
inputs.flake-utils.url = "github:numtide/flake-utils"; inputs.flake-utils.url = "github:numtide/flake-utils";
inputs.gomod2nix.url = "github:nix-community/gomod2nix"; 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 }: outputs = { self, nixpkgs, flake-utils, gomod2nix }:
(flake-utils.lib.eachDefaultSystem (flake-utils.lib.eachDefaultSystem