diff --git a/flake.nix b/flake.nix index 671905e..83680cf 100644 --- a/flake.nix +++ b/flake.nix @@ -9,13 +9,20 @@ outputs = { self, gomod2nix, nixpkgs, utils, ... }: utils.lib.eachDefaultSystem (system: - let inherit (gomod2nix.legacyPackages."${system}") buildGoApplication; + let + pkgs = import nixpkgs { + inherit system; + overlays = [ + (final: prev: { + inherit (gomod2nix.legacyPackages."${system}") buildGoApplication; + }) + ]; + }; in { packages = rec { default = google-photo-uploader; - google-photo-uploader = import ./google-photo-uploader.nix { - inherit nixpkgs buildGoApplication; - }; + google-photo-uploader = + pkgs.callPackage ./google-photo-uploader.nix { }; }; }); } diff --git a/google-photo-uploader.nix b/google-photo-uploader.nix index 06f8e40..a7ca7b1 100644 --- a/google-photo-uploader.nix +++ b/google-photo-uploader.nix @@ -1,11 +1,11 @@ -{ nixpkgs, buildGoApplication, ... }: +{ pkgs, lib, ... }: -with nixpkgs.lib; +with pkgs.lib; buildGoApplication rec { pname = "google-photo-uploader"; version = "1.6.1"; - src = nixpkgs.fetchFromGitHub { + src = pkgs.fetchFromGitHub { owner = "int128"; repo = "gpup"; rev = version; @@ -14,7 +14,7 @@ buildGoApplication rec { modules = ./gomod2nix.toml; - meta = with nixpkgs.lib; { + meta = { description = "Google photos uploader, written in Go."; homepage = "https://github.com/int128/gpup"; license = licenses.asl20;