Rewrite to use nixpkgs

This commit is contained in:
niten 2024-01-27 10:19:46 -08:00
parent bd7b557550
commit fc9cf546f6
2 changed files with 25 additions and 12 deletions

View File

@ -1,13 +1,29 @@
{
description = "Google Photo Uploader";
inputs = { gomod2nix.url = "github:nix-community/gomod2nix"; };
outputs = { self, gomod2nix, ... }: {
packages = rec {
default = google-photo-uploader;
google-photo-uploader =
import ./google-photo-uploader.nix { inherit gomod2nix; };
};
inputs = {
nixpkgs.url = "nixpkgs/nixos-23.11";
gomod2nix.url = "github:nix-community/gomod2nix";
utils.url = "github:numtide/flake-utils";
};
outputs = { self, gomod2nix, nixpkgs, utils, ... }:
utils.eachDefaultSystem (system:
let
pkgs = import nixpkgs {
inherit system;
overlays = [
(self: super: {
buildGoApplication =
gomod2nix.packages."${system}".buildGoApplication;
})
];
};
in {
packages = rec {
default = google-photo-uploader;
google-photo-uploader =
pkgs.callPackage ./google-photo-uploader.nix { };
};
});
}

View File

@ -1,9 +1,6 @@
{ gomod2nix }:
{ config, lib, pkgs, ... }:
let buildGoApplication = gomod2nix.packages."${pkgs.system}".buildGoApplication;
in buildGoApplication rec {
pkgs.lib.buildGoApplication rec {
pname = "google-photo-uploader";
version = "1.6.1";