26 lines
613 B
Nix
26 lines
613 B
Nix
{ pkgs ? (
|
|
let
|
|
inherit (builtins) fetchTree fromJSON readFile;
|
|
inherit ((fromJSON (readFile ./flake.lock)).nodes) nixpkgs gomod2nix gitignore;
|
|
in
|
|
import (fetchTree nixpkgs.locked) {
|
|
overlays = [
|
|
(import "${fetchTree gomod2nix.locked}/overlay.nix")
|
|
(final: prev: (import "${fetchTree gitignore.locked}/default.nix") {
|
|
inherit (prev) lib;
|
|
})
|
|
];
|
|
}
|
|
)
|
|
, gitignoreSource ? pkgs.gitignoreSource
|
|
, name
|
|
, version
|
|
}:
|
|
pkgs.mkDerivation {
|
|
inherit version;
|
|
pname = name;
|
|
pwd = ./.;
|
|
src = gitignoreSource ./.;
|
|
modules = ./gomod2nix.toml;
|
|
}
|