fix: pass in pkgs and import nixpkgs correctly

Signed-off-by: Juan C. Müller <me@juancmuller.com>
This commit is contained in:
Juan C. Müller 2025-04-09 09:28:11 -04:00
parent 284adb75aa
commit 7c168c7c25
No known key found for this signature in database
GPG key ID: F44EA51A28F9B4A7
2 changed files with 4 additions and 13 deletions

View file

@ -1,19 +1,10 @@
{
pkgs ? (
let
inherit (builtins) fetchTree fromJSON readFile;
inherit ((fromJSON (readFile ./flake.lock)).nodes) nixpkgs;
in
import (fetchTree nixpkgs.locked) {}
),
buildGoModule ? pkgs.buildGoModule,
}:
buildGoModule {
{pkgs ? import <nixpkgs> {}, ...}:
pkgs.buildGoModule {
pname = "ess";
version = "2.16.4";
pwd = ./.;
src = ./.;
vendorHash = null;
meta = {
description = "ess (env-sample-sync): automatically and safely synchronize env.sample files with .env";
license = pkgs.lib.licenses.bsd2;

View file

@ -18,7 +18,7 @@
inherit system;
};
in {
packages.default = pkgs.callPackage ./. {};
packages.default = pkgs.callPackage ./. {inherit pkgs;};
CGO_ENABLED = 0;
defaultPackage = self.packages.${system}.default;
apps.default = flake-utils.lib.mkApp {