chore: fix flake.nix

This commit is contained in:
Slug-Boi
2025-04-28 16:38:19 +02:00
parent 2409fc7869
commit 6614af4874
3 changed files with 74 additions and 16 deletions
+1 -3
View File
@@ -1,8 +1,6 @@
{lib, buildGoModule, fetchFromGitHub }:
{ lib, buildGoModule, fetchFromGitHub }:
buildGoModule rec {
pname = "cocommit";
version = "1.3.0";
Generated
+61
View File
@@ -0,0 +1,61 @@
{
"nodes": {
"flake-utils": {
"inputs": {
"systems": "systems"
},
"locked": {
"lastModified": 1731533236,
"narHash": "sha256-l0KFg5HjrsfsO/JpG+r7fRrqm12kzFHyUHqHCVpMMbI=",
"owner": "numtide",
"repo": "flake-utils",
"rev": "11707dc2f618dd54ca8739b309ec4fc024de578b",
"type": "github"
},
"original": {
"owner": "numtide",
"repo": "flake-utils",
"type": "github"
}
},
"nixpkgs": {
"locked": {
"lastModified": 1745377448,
"narHash": "sha256-jhZDfXVKdD7TSEGgzFJQvEEZ2K65UMiqW5YJ2aIqxMA=",
"owner": "nixos",
"repo": "nixpkgs",
"rev": "507b63021ada5fee621b6ca371c4fca9ca46f52c",
"type": "github"
},
"original": {
"owner": "nixos",
"ref": "nixpkgs-unstable",
"repo": "nixpkgs",
"type": "github"
}
},
"root": {
"inputs": {
"flake-utils": "flake-utils",
"nixpkgs": "nixpkgs"
}
},
"systems": {
"locked": {
"lastModified": 1681028828,
"narHash": "sha256-Vy1rq5AaRuLzOxct8nz4T6wlgyUR7zLU309k9mBC768=",
"owner": "nix-systems",
"repo": "default",
"rev": "da67096a3b9bf56a91d16901293e51ba5b49a27e",
"type": "github"
},
"original": {
"owner": "nix-systems",
"repo": "default",
"type": "github"
}
}
},
"root": "root",
"version": 7
}
+12 -13
View File
@@ -2,30 +2,29 @@
inputs = {
nixpkgs.url = "github:nixos/nixpkgs/nixpkgs-unstable";
flake-utils.url = "github:numtide/flake-utils";
prog_src = {
flake = false;
url = "github:Slug-Boi/cocommit";
};
};
outputs = { self, nixpkgs, flake-utils, ... }@inputs: let
forAllSys = flake-utils.lib.eachSystem flake-utils.lib.allSystems;
APPNAME = "cocommit";
appOverlay = final: prev: {
# any pkgs overrides made here will be
# inherited in the arguments of default.nix
# because we used final.callPackage instead of prev.callPackage
# i.e.
# nodejs = prev.nodejs.overrideAttrs { name = "stinky"; };
# would make it so that final.callPackage gives the altered nodejs
${APPNAME} = final.callPackage ./. { inherit (inputs) prog_src; };
${APPNAME} = final.callPackage ./default.nix {
# Pass inputs as an argument to your package
inherit (prev) lib fetchFromGitHub buildGoModule;
# Or if you need all inputs:
# inherit inputs;
};
};
in {
overlays.default = appOverlay;
} // (
forAllSys (system: let
pkgs = import nixpkgs { inherit system; overlays = [ appOverlay ]; };
in{
pkgs = import nixpkgs {
inherit system;
overlays = [ appOverlay ];
};
in {
packages = {
default = pkgs.${APPNAME};
};