From 6614af48741f0f2934f334b833056bb7dd7305e5 Mon Sep 17 00:00:00 2001 From: Slug-Boi Date: Mon, 28 Apr 2025 16:38:19 +0200 Subject: [PATCH] chore: fix flake.nix --- default.nix | 4 +--- flake.lock | 61 +++++++++++++++++++++++++++++++++++++++++++++++++++++ flake.nix | 25 +++++++++++----------- 3 files changed, 74 insertions(+), 16 deletions(-) create mode 100644 flake.lock diff --git a/default.nix b/default.nix index 9750f0d..be41515 100644 --- a/default.nix +++ b/default.nix @@ -1,8 +1,6 @@ -{lib, buildGoModule, fetchFromGitHub }: +{ lib, buildGoModule, fetchFromGitHub }: buildGoModule rec { - - pname = "cocommit"; version = "1.3.0"; diff --git a/flake.lock b/flake.lock new file mode 100644 index 0000000..70d65af --- /dev/null +++ b/flake.lock @@ -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 +} diff --git a/flake.nix b/flake.nix index e122c26..0af3b76 100644 --- a/flake.nix +++ b/flake.nix @@ -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}; };