Skip to content

Commit

Permalink
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Replace flake-utils with flake-parts
Browse files Browse the repository at this point in the history
sestrella committed Nov 20, 2024
1 parent da6f12e commit e4f830c
Showing 2 changed files with 64 additions and 23 deletions.
54 changes: 49 additions & 5 deletions flake.lock

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

33 changes: 15 additions & 18 deletions flake.nix
Original file line number Diff line number Diff line change
@@ -2,36 +2,33 @@
description = "Interactive CLI for ECS";

inputs = {
flake-utils.url = "github:numtide/flake-utils";
flake-parts.url = "github:hercules-ci/flake-parts";
gomod2nix.url = "github:nix-community/gomod2nix";
gomod2nix.inputs = {
flake-utils.follows = "flake-utils";
nixpkgs.follows = "nixpkgs";
};
gomod2nix.inputs.nixpkgs.follows = "nixpkgs";
nixpkgs.url = "github:nixos/nixpkgs/nixos-unstable";
systems.url = "github:nix-systems/default";
};

outputs = { self, flake-utils, gomod2nix, nixpkgs, ... }:
(flake-utils.lib.eachDefaultSystem (system:
let
pkgs = import nixpkgs {
outputs = inputs@{ flake-parts, gomod2nix, nixpkgs, systems, ... }:
flake-parts.lib.mkFlake { inherit inputs; } {
imports = [
flake-parts.flakeModules.easyOverlay
];

systems = import systems;

perSystem = { system, pkgs, ... }: {
_module.args.pkgs = import nixpkgs {
inherit system;
overlays = [
gomod2nix.overlays.default
];
overlays = [ gomod2nix.overlays.default ];
};
in
{

packages.default = pkgs.buildGoApplication {
pname = "iecs";
version = "0.1.0";
src = ./.;
modules = ./gomod2nix.toml;
};
}
)) // {
overlays.default = final: prev: {
iecs = self.packages.${prev.system}.default;
};
};
}

0 comments on commit e4f830c

Please sign in to comment.